001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
052 */
053@ResourceDef(name="CapabilityStatement2", profile="http://hl7.org/fhir/StructureDefinition/CapabilityStatement2")
054public class CapabilityStatement2 extends CanonicalResource {
055
056    public enum CapabilityFeature {
057        /**
058         * 
059         */
060        FEATUREHEADER, 
061        /**
062         * 
063         */
064        SECURITYCORS, 
065        /**
066         * 
067         */
068        SECURITYSERVICE, 
069        /**
070         * 
071         */
072        VERSIONING, 
073        /**
074         * 
075         */
076        READHISTORY, 
077        /**
078         * 
079         */
080        UPDATECREATE, 
081        /**
082         * 
083         */
084        CONDITIONALCREATE, 
085        /**
086         * 
087         */
088        CONDITIONALREAD, 
089        /**
090         * 
091         */
092        CONDITIONALUPDATE, 
093        /**
094         * 
095         */
096        CONDITIONALDELETE, 
097        /**
098         * 
099         */
100        REFERENCEPOLICY, 
101        /**
102         * 
103         */
104        SEARCHINCLUDE, 
105        /**
106         * 
107         */
108        SEARCHREVINCLUDE, 
109        /**
110         * added to help the parsers with the generic types
111         */
112        NULL;
113        public static CapabilityFeature fromCode(String codeString) throws FHIRException {
114            if (codeString == null || "".equals(codeString))
115                return null;
116        if ("feature-header".equals(codeString))
117          return FEATUREHEADER;
118        if ("security-cors".equals(codeString))
119          return SECURITYCORS;
120        if ("security-service".equals(codeString))
121          return SECURITYSERVICE;
122        if ("versioning".equals(codeString))
123          return VERSIONING;
124        if ("readHistory".equals(codeString))
125          return READHISTORY;
126        if ("updateCreate".equals(codeString))
127          return UPDATECREATE;
128        if ("conditionalCreate".equals(codeString))
129          return CONDITIONALCREATE;
130        if ("conditionalRead".equals(codeString))
131          return CONDITIONALREAD;
132        if ("conditionalUpdate".equals(codeString))
133          return CONDITIONALUPDATE;
134        if ("conditionalDelete".equals(codeString))
135          return CONDITIONALDELETE;
136        if ("referencePolicy".equals(codeString))
137          return REFERENCEPOLICY;
138        if ("searchInclude".equals(codeString))
139          return SEARCHINCLUDE;
140        if ("searchRevInclude".equals(codeString))
141          return SEARCHREVINCLUDE;
142        if (Configuration.isAcceptInvalidEnums())
143          return null;
144        else
145          throw new FHIRException("Unknown CapabilityFeature code '"+codeString+"'");
146        }
147        public String toCode() {
148          switch (this) {
149            case FEATUREHEADER: return "feature-header";
150            case SECURITYCORS: return "security-cors";
151            case SECURITYSERVICE: return "security-service";
152            case VERSIONING: return "versioning";
153            case READHISTORY: return "readHistory";
154            case UPDATECREATE: return "updateCreate";
155            case CONDITIONALCREATE: return "conditionalCreate";
156            case CONDITIONALREAD: return "conditionalRead";
157            case CONDITIONALUPDATE: return "conditionalUpdate";
158            case CONDITIONALDELETE: return "conditionalDelete";
159            case REFERENCEPOLICY: return "referencePolicy";
160            case SEARCHINCLUDE: return "searchInclude";
161            case SEARCHREVINCLUDE: return "searchRevInclude";
162            case NULL: return null;
163            default: return "?";
164          }
165        }
166        public String getSystem() {
167          switch (this) {
168            case FEATUREHEADER: return "http://hl7.org/fhir/CodeSystem/capability-features";
169            case SECURITYCORS: return "http://hl7.org/fhir/CodeSystem/capability-features";
170            case SECURITYSERVICE: return "http://hl7.org/fhir/CodeSystem/capability-features";
171            case VERSIONING: return "http://hl7.org/fhir/CodeSystem/capability-features";
172            case READHISTORY: return "http://hl7.org/fhir/CodeSystem/capability-features";
173            case UPDATECREATE: return "http://hl7.org/fhir/CodeSystem/capability-features";
174            case CONDITIONALCREATE: return "http://hl7.org/fhir/CodeSystem/capability-features";
175            case CONDITIONALREAD: return "http://hl7.org/fhir/CodeSystem/capability-features";
176            case CONDITIONALUPDATE: return "http://hl7.org/fhir/CodeSystem/capability-features";
177            case CONDITIONALDELETE: return "http://hl7.org/fhir/CodeSystem/capability-features";
178            case REFERENCEPOLICY: return "http://hl7.org/fhir/CodeSystem/capability-features";
179            case SEARCHINCLUDE: return "http://hl7.org/fhir/CodeSystem/capability-features";
180            case SEARCHREVINCLUDE: return "http://hl7.org/fhir/CodeSystem/capability-features";
181            case NULL: return null;
182            default: return "?";
183          }
184        }
185        public String getDefinition() {
186          switch (this) {
187            case FEATUREHEADER: return "";
188            case SECURITYCORS: return "";
189            case SECURITYSERVICE: return "";
190            case VERSIONING: return "";
191            case READHISTORY: return "";
192            case UPDATECREATE: return "";
193            case CONDITIONALCREATE: return "";
194            case CONDITIONALREAD: return "";
195            case CONDITIONALUPDATE: return "";
196            case CONDITIONALDELETE: return "";
197            case REFERENCEPOLICY: return "";
198            case SEARCHINCLUDE: return "";
199            case SEARCHREVINCLUDE: return "";
200            case NULL: return null;
201            default: return "?";
202          }
203        }
204        public String getDisplay() {
205          switch (this) {
206            case FEATUREHEADER: return "Whether the server supports the Required-Feature header by which a client makes a feature as mandatory for processing a requrest properly";
207            case SECURITYCORS: return "security-cors";
208            case SECURITYSERVICE: return "security-service";
209            case VERSIONING: return "versioning";
210            case READHISTORY: return "readHistory";
211            case UPDATECREATE: return "updateCreate";
212            case CONDITIONALCREATE: return "conditionalCreate";
213            case CONDITIONALREAD: return "conditionalRead";
214            case CONDITIONALUPDATE: return "conditionalUpdate";
215            case CONDITIONALDELETE: return "conditionalDelete";
216            case REFERENCEPOLICY: return "referencePolicy";
217            case SEARCHINCLUDE: return "searchInclude";
218            case SEARCHREVINCLUDE: return "searchRevInclude";
219            case NULL: return null;
220            default: return "?";
221          }
222        }
223    }
224
225  public static class CapabilityFeatureEnumFactory implements EnumFactory<CapabilityFeature> {
226    public CapabilityFeature fromCode(String codeString) throws IllegalArgumentException {
227      if (codeString == null || "".equals(codeString))
228            if (codeString == null || "".equals(codeString))
229                return null;
230        if ("feature-header".equals(codeString))
231          return CapabilityFeature.FEATUREHEADER;
232        if ("security-cors".equals(codeString))
233          return CapabilityFeature.SECURITYCORS;
234        if ("security-service".equals(codeString))
235          return CapabilityFeature.SECURITYSERVICE;
236        if ("versioning".equals(codeString))
237          return CapabilityFeature.VERSIONING;
238        if ("readHistory".equals(codeString))
239          return CapabilityFeature.READHISTORY;
240        if ("updateCreate".equals(codeString))
241          return CapabilityFeature.UPDATECREATE;
242        if ("conditionalCreate".equals(codeString))
243          return CapabilityFeature.CONDITIONALCREATE;
244        if ("conditionalRead".equals(codeString))
245          return CapabilityFeature.CONDITIONALREAD;
246        if ("conditionalUpdate".equals(codeString))
247          return CapabilityFeature.CONDITIONALUPDATE;
248        if ("conditionalDelete".equals(codeString))
249          return CapabilityFeature.CONDITIONALDELETE;
250        if ("referencePolicy".equals(codeString))
251          return CapabilityFeature.REFERENCEPOLICY;
252        if ("searchInclude".equals(codeString))
253          return CapabilityFeature.SEARCHINCLUDE;
254        if ("searchRevInclude".equals(codeString))
255          return CapabilityFeature.SEARCHREVINCLUDE;
256        throw new IllegalArgumentException("Unknown CapabilityFeature code '"+codeString+"'");
257        }
258        public Enumeration<CapabilityFeature> fromType(Base code) throws FHIRException {
259          if (code == null)
260            return null;
261          if (code.isEmpty())
262            return new Enumeration<CapabilityFeature>(this);
263          String codeString = ((PrimitiveType) code).asStringValue();
264          if (codeString == null || "".equals(codeString))
265            return null;
266        if ("feature-header".equals(codeString))
267          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.FEATUREHEADER);
268        if ("security-cors".equals(codeString))
269          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.SECURITYCORS);
270        if ("security-service".equals(codeString))
271          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.SECURITYSERVICE);
272        if ("versioning".equals(codeString))
273          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.VERSIONING);
274        if ("readHistory".equals(codeString))
275          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.READHISTORY);
276        if ("updateCreate".equals(codeString))
277          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.UPDATECREATE);
278        if ("conditionalCreate".equals(codeString))
279          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.CONDITIONALCREATE);
280        if ("conditionalRead".equals(codeString))
281          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.CONDITIONALREAD);
282        if ("conditionalUpdate".equals(codeString))
283          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.CONDITIONALUPDATE);
284        if ("conditionalDelete".equals(codeString))
285          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.CONDITIONALDELETE);
286        if ("referencePolicy".equals(codeString))
287          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.REFERENCEPOLICY);
288        if ("searchInclude".equals(codeString))
289          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.SEARCHINCLUDE);
290        if ("searchRevInclude".equals(codeString))
291          return new Enumeration<CapabilityFeature>(this, CapabilityFeature.SEARCHREVINCLUDE);
292        throw new FHIRException("Unknown CapabilityFeature code '"+codeString+"'");
293        }
294    public String toCode(CapabilityFeature code) {
295      if (code == CapabilityFeature.FEATUREHEADER)
296        return "feature-header";
297      if (code == CapabilityFeature.SECURITYCORS)
298        return "security-cors";
299      if (code == CapabilityFeature.SECURITYSERVICE)
300        return "security-service";
301      if (code == CapabilityFeature.VERSIONING)
302        return "versioning";
303      if (code == CapabilityFeature.READHISTORY)
304        return "readHistory";
305      if (code == CapabilityFeature.UPDATECREATE)
306        return "updateCreate";
307      if (code == CapabilityFeature.CONDITIONALCREATE)
308        return "conditionalCreate";
309      if (code == CapabilityFeature.CONDITIONALREAD)
310        return "conditionalRead";
311      if (code == CapabilityFeature.CONDITIONALUPDATE)
312        return "conditionalUpdate";
313      if (code == CapabilityFeature.CONDITIONALDELETE)
314        return "conditionalDelete";
315      if (code == CapabilityFeature.REFERENCEPOLICY)
316        return "referencePolicy";
317      if (code == CapabilityFeature.SEARCHINCLUDE)
318        return "searchInclude";
319      if (code == CapabilityFeature.SEARCHREVINCLUDE)
320        return "searchRevInclude";
321      return "?";
322      }
323    public String toSystem(CapabilityFeature code) {
324      return code.getSystem();
325      }
326    }
327
328    public enum CapabilityFeatureValue {
329        /**
330         * 
331         */
332        TRUE, 
333        /**
334         * 
335         */
336        FALSE, 
337        /**
338         * VersionId meta-property is not supported (server) or used (client).
339         */
340        NOVERSION, 
341        /**
342         * VersionId meta-property is supported (server) or used (client).
343         */
344        VERSIONED, 
345        /**
346         * VersionId must be correct for updates (server) or will be specified (If-match header) for updates (client).
347         */
348        VERSIONEDUPDATE, 
349        /**
350         * No support for conditional reads.
351         */
352        NOTSUPPORTED, 
353        /**
354         * Conditional reads are supported, but only with the If-Modified-Since HTTP Header.
355         */
356        MODIFIEDSINCE, 
357        /**
358         * Conditional reads are supported, but only with the If-None-Match HTTP Header.
359         */
360        NOTMATCH, 
361        /**
362         * Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers.
363         */
364        FULLSUPPORT, 
365        /**
366         * Conditional deletes are supported, but only single resources at a time.
367         */
368        SINGLE, 
369        /**
370         * Conditional deletes are supported, and multiple resources can be deleted in a single interaction.
371         */
372        MULTIPLE, 
373        /**
374         * The server supports and populates Literal references (i.e. using Reference.reference) where they are known (this code does not guarantee that all references are literal; see 'enforced').
375         */
376        LITERAL, 
377        /**
378         * The server allows logical references (i.e. using Reference.identifier).
379         */
380        LOGICAL, 
381        /**
382         * The server will attempt to resolve logical references to literal references - i.e. converting Reference.identifier to Reference.reference (if resolution fails, the server may still accept resources; see logical).
383         */
384        RESOLVES, 
385        /**
386         * The server enforces that references have integrity - e.g. it ensures that references can always be resolved. This is typically the case for clinical record systems, but often not the case for middleware/proxy systems.
387         */
388        ENFORCED, 
389        /**
390         * The server does not support references that point to other servers.
391         */
392        LOCAL, 
393        /**
394         * added to help the parsers with the generic types
395         */
396        NULL;
397        public static CapabilityFeatureValue fromCode(String codeString) throws FHIRException {
398            if (codeString == null || "".equals(codeString))
399                return null;
400        if ("true".equals(codeString))
401          return TRUE;
402        if ("false".equals(codeString))
403          return FALSE;
404        if ("no-version".equals(codeString))
405          return NOVERSION;
406        if ("versioned".equals(codeString))
407          return VERSIONED;
408        if ("versioned-update".equals(codeString))
409          return VERSIONEDUPDATE;
410        if ("not-supported".equals(codeString))
411          return NOTSUPPORTED;
412        if ("modified-since".equals(codeString))
413          return MODIFIEDSINCE;
414        if ("not-match".equals(codeString))
415          return NOTMATCH;
416        if ("full-support".equals(codeString))
417          return FULLSUPPORT;
418        if ("single".equals(codeString))
419          return SINGLE;
420        if ("multiple".equals(codeString))
421          return MULTIPLE;
422        if ("literal".equals(codeString))
423          return LITERAL;
424        if ("logical".equals(codeString))
425          return LOGICAL;
426        if ("resolves".equals(codeString))
427          return RESOLVES;
428        if ("enforced".equals(codeString))
429          return ENFORCED;
430        if ("local".equals(codeString))
431          return LOCAL;
432        if (Configuration.isAcceptInvalidEnums())
433          return null;
434        else
435          throw new FHIRException("Unknown CapabilityFeatureValue code '"+codeString+"'");
436        }
437        public String toCode() {
438          switch (this) {
439            case TRUE: return "true";
440            case FALSE: return "false";
441            case NOVERSION: return "no-version";
442            case VERSIONED: return "versioned";
443            case VERSIONEDUPDATE: return "versioned-update";
444            case NOTSUPPORTED: return "not-supported";
445            case MODIFIEDSINCE: return "modified-since";
446            case NOTMATCH: return "not-match";
447            case FULLSUPPORT: return "full-support";
448            case SINGLE: return "single";
449            case MULTIPLE: return "multiple";
450            case LITERAL: return "literal";
451            case LOGICAL: return "logical";
452            case RESOLVES: return "resolves";
453            case ENFORCED: return "enforced";
454            case LOCAL: return "local";
455            case NULL: return null;
456            default: return "?";
457          }
458        }
459        public String getSystem() {
460          switch (this) {
461            case TRUE: return "http://hl7.org/fhir/CodeSystem/capability-features";
462            case FALSE: return "http://hl7.org/fhir/CodeSystem/capability-features";
463            case NOVERSION: return "http://hl7.org/fhir/CodeSystem/capability-features";
464            case VERSIONED: return "http://hl7.org/fhir/CodeSystem/capability-features";
465            case VERSIONEDUPDATE: return "http://hl7.org/fhir/CodeSystem/capability-features";
466            case NOTSUPPORTED: return "http://hl7.org/fhir/CodeSystem/capability-features";
467            case MODIFIEDSINCE: return "http://hl7.org/fhir/CodeSystem/capability-features";
468            case NOTMATCH: return "http://hl7.org/fhir/CodeSystem/capability-features";
469            case FULLSUPPORT: return "http://hl7.org/fhir/CodeSystem/capability-features";
470            case SINGLE: return "http://hl7.org/fhir/CodeSystem/capability-features";
471            case MULTIPLE: return "http://hl7.org/fhir/CodeSystem/capability-features";
472            case LITERAL: return "http://hl7.org/fhir/CodeSystem/capability-features";
473            case LOGICAL: return "http://hl7.org/fhir/CodeSystem/capability-features";
474            case RESOLVES: return "http://hl7.org/fhir/CodeSystem/capability-features";
475            case ENFORCED: return "http://hl7.org/fhir/CodeSystem/capability-features";
476            case LOCAL: return "http://hl7.org/fhir/CodeSystem/capability-features";
477            case NULL: return null;
478            default: return "?";
479          }
480        }
481        public String getDefinition() {
482          switch (this) {
483            case TRUE: return "";
484            case FALSE: return "";
485            case NOVERSION: return "VersionId meta-property is not supported (server) or used (client).";
486            case VERSIONED: return "VersionId meta-property is supported (server) or used (client).";
487            case VERSIONEDUPDATE: return "VersionId must be correct for updates (server) or will be specified (If-match header) for updates (client).";
488            case NOTSUPPORTED: return "No support for conditional reads.";
489            case MODIFIEDSINCE: return "Conditional reads are supported, but only with the If-Modified-Since HTTP Header.";
490            case NOTMATCH: return "Conditional reads are supported, but only with the If-None-Match HTTP Header.";
491            case FULLSUPPORT: return "Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers.";
492            case SINGLE: return "Conditional deletes are supported, but only single resources at a time.";
493            case MULTIPLE: return "Conditional deletes are supported, and multiple resources can be deleted in a single interaction.";
494            case LITERAL: return "The server supports and populates Literal references (i.e. using Reference.reference) where they are known (this code does not guarantee that all references are literal; see 'enforced').";
495            case LOGICAL: return "The server allows logical references (i.e. using Reference.identifier).";
496            case RESOLVES: return "The server will attempt to resolve logical references to literal references - i.e. converting Reference.identifier to Reference.reference (if resolution fails, the server may still accept resources; see logical).";
497            case ENFORCED: return "The server enforces that references have integrity - e.g. it ensures that references can always be resolved. This is typically the case for clinical record systems, but often not the case for middleware/proxy systems.";
498            case LOCAL: return "The server does not support references that point to other servers.";
499            case NULL: return null;
500            default: return "?";
501          }
502        }
503        public String getDisplay() {
504          switch (this) {
505            case TRUE: return "Value is true";
506            case FALSE: return "Value is false";
507            case NOVERSION: return "No VersionId Support";
508            case VERSIONED: return "Versioned";
509            case VERSIONEDUPDATE: return "VersionId tracked fully";
510            case NOTSUPPORTED: return "Not Supported";
511            case MODIFIEDSINCE: return "If-Modified-Since";
512            case NOTMATCH: return "If-None-Match";
513            case FULLSUPPORT: return "Full Support";
514            case SINGLE: return "Single Deletes Supported";
515            case MULTIPLE: return "Multiple Deletes Supported";
516            case LITERAL: return "Literal References";
517            case LOGICAL: return "Logical References";
518            case RESOLVES: return "Resolves References";
519            case ENFORCED: return "Reference Integrity Enforced";
520            case LOCAL: return "Local References Only";
521            case NULL: return null;
522            default: return "?";
523          }
524        }
525    }
526
527  public static class CapabilityFeatureValueEnumFactory implements EnumFactory<CapabilityFeatureValue> {
528    public CapabilityFeatureValue fromCode(String codeString) throws IllegalArgumentException {
529      if (codeString == null || "".equals(codeString))
530            if (codeString == null || "".equals(codeString))
531                return null;
532        if ("true".equals(codeString))
533          return CapabilityFeatureValue.TRUE;
534        if ("false".equals(codeString))
535          return CapabilityFeatureValue.FALSE;
536        if ("no-version".equals(codeString))
537          return CapabilityFeatureValue.NOVERSION;
538        if ("versioned".equals(codeString))
539          return CapabilityFeatureValue.VERSIONED;
540        if ("versioned-update".equals(codeString))
541          return CapabilityFeatureValue.VERSIONEDUPDATE;
542        if ("not-supported".equals(codeString))
543          return CapabilityFeatureValue.NOTSUPPORTED;
544        if ("modified-since".equals(codeString))
545          return CapabilityFeatureValue.MODIFIEDSINCE;
546        if ("not-match".equals(codeString))
547          return CapabilityFeatureValue.NOTMATCH;
548        if ("full-support".equals(codeString))
549          return CapabilityFeatureValue.FULLSUPPORT;
550        if ("single".equals(codeString))
551          return CapabilityFeatureValue.SINGLE;
552        if ("multiple".equals(codeString))
553          return CapabilityFeatureValue.MULTIPLE;
554        if ("literal".equals(codeString))
555          return CapabilityFeatureValue.LITERAL;
556        if ("logical".equals(codeString))
557          return CapabilityFeatureValue.LOGICAL;
558        if ("resolves".equals(codeString))
559          return CapabilityFeatureValue.RESOLVES;
560        if ("enforced".equals(codeString))
561          return CapabilityFeatureValue.ENFORCED;
562        if ("local".equals(codeString))
563          return CapabilityFeatureValue.LOCAL;
564        throw new IllegalArgumentException("Unknown CapabilityFeatureValue code '"+codeString+"'");
565        }
566        public Enumeration<CapabilityFeatureValue> fromType(Base code) throws FHIRException {
567          if (code == null)
568            return null;
569          if (code.isEmpty())
570            return new Enumeration<CapabilityFeatureValue>(this);
571          String codeString = ((PrimitiveType) code).asStringValue();
572          if (codeString == null || "".equals(codeString))
573            return null;
574        if ("true".equals(codeString))
575          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.TRUE);
576        if ("false".equals(codeString))
577          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.FALSE);
578        if ("no-version".equals(codeString))
579          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.NOVERSION);
580        if ("versioned".equals(codeString))
581          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.VERSIONED);
582        if ("versioned-update".equals(codeString))
583          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.VERSIONEDUPDATE);
584        if ("not-supported".equals(codeString))
585          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.NOTSUPPORTED);
586        if ("modified-since".equals(codeString))
587          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.MODIFIEDSINCE);
588        if ("not-match".equals(codeString))
589          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.NOTMATCH);
590        if ("full-support".equals(codeString))
591          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.FULLSUPPORT);
592        if ("single".equals(codeString))
593          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.SINGLE);
594        if ("multiple".equals(codeString))
595          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.MULTIPLE);
596        if ("literal".equals(codeString))
597          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.LITERAL);
598        if ("logical".equals(codeString))
599          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.LOGICAL);
600        if ("resolves".equals(codeString))
601          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.RESOLVES);
602        if ("enforced".equals(codeString))
603          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.ENFORCED);
604        if ("local".equals(codeString))
605          return new Enumeration<CapabilityFeatureValue>(this, CapabilityFeatureValue.LOCAL);
606        throw new FHIRException("Unknown CapabilityFeatureValue code '"+codeString+"'");
607        }
608    public String toCode(CapabilityFeatureValue code) {
609      if (code == CapabilityFeatureValue.TRUE)
610        return "true";
611      if (code == CapabilityFeatureValue.FALSE)
612        return "false";
613      if (code == CapabilityFeatureValue.NOVERSION)
614        return "no-version";
615      if (code == CapabilityFeatureValue.VERSIONED)
616        return "versioned";
617      if (code == CapabilityFeatureValue.VERSIONEDUPDATE)
618        return "versioned-update";
619      if (code == CapabilityFeatureValue.NOTSUPPORTED)
620        return "not-supported";
621      if (code == CapabilityFeatureValue.MODIFIEDSINCE)
622        return "modified-since";
623      if (code == CapabilityFeatureValue.NOTMATCH)
624        return "not-match";
625      if (code == CapabilityFeatureValue.FULLSUPPORT)
626        return "full-support";
627      if (code == CapabilityFeatureValue.SINGLE)
628        return "single";
629      if (code == CapabilityFeatureValue.MULTIPLE)
630        return "multiple";
631      if (code == CapabilityFeatureValue.LITERAL)
632        return "literal";
633      if (code == CapabilityFeatureValue.LOGICAL)
634        return "logical";
635      if (code == CapabilityFeatureValue.RESOLVES)
636        return "resolves";
637      if (code == CapabilityFeatureValue.ENFORCED)
638        return "enforced";
639      if (code == CapabilityFeatureValue.LOCAL)
640        return "local";
641      return "?";
642      }
643    public String toSystem(CapabilityFeatureValue code) {
644      return code.getSystem();
645      }
646    }
647
648    public enum SystemRestfulInteraction {
649        /**
650         * Update, create or delete a set of resources as a single transaction.
651         */
652        TRANSACTION, 
653        /**
654         * perform a set of a separate interactions in a single http operation
655         */
656        BATCH, 
657        /**
658         * Search all resources based on some filter criteria.
659         */
660        SEARCHSYSTEM, 
661        /**
662         * Retrieve the change history for all resources on a system.
663         */
664        HISTORYSYSTEM, 
665        /**
666         * added to help the parsers with the generic types
667         */
668        NULL;
669        public static SystemRestfulInteraction fromCode(String codeString) throws FHIRException {
670            if (codeString == null || "".equals(codeString))
671                return null;
672        if ("transaction".equals(codeString))
673          return TRANSACTION;
674        if ("batch".equals(codeString))
675          return BATCH;
676        if ("search-system".equals(codeString))
677          return SEARCHSYSTEM;
678        if ("history-system".equals(codeString))
679          return HISTORYSYSTEM;
680        if (Configuration.isAcceptInvalidEnums())
681          return null;
682        else
683          throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'");
684        }
685        public String toCode() {
686          switch (this) {
687            case TRANSACTION: return "transaction";
688            case BATCH: return "batch";
689            case SEARCHSYSTEM: return "search-system";
690            case HISTORYSYSTEM: return "history-system";
691            case NULL: return null;
692            default: return "?";
693          }
694        }
695        public String getSystem() {
696          switch (this) {
697            case TRANSACTION: return "http://hl7.org/fhir/restful-interaction";
698            case BATCH: return "http://hl7.org/fhir/restful-interaction";
699            case SEARCHSYSTEM: return "http://hl7.org/fhir/restful-interaction";
700            case HISTORYSYSTEM: return "http://hl7.org/fhir/restful-interaction";
701            case NULL: return null;
702            default: return "?";
703          }
704        }
705        public String getDefinition() {
706          switch (this) {
707            case TRANSACTION: return "Update, create or delete a set of resources as a single transaction.";
708            case BATCH: return "perform a set of a separate interactions in a single http operation";
709            case SEARCHSYSTEM: return "Search all resources based on some filter criteria.";
710            case HISTORYSYSTEM: return "Retrieve the change history for all resources on a system.";
711            case NULL: return null;
712            default: return "?";
713          }
714        }
715        public String getDisplay() {
716          switch (this) {
717            case TRANSACTION: return "transaction";
718            case BATCH: return "batch";
719            case SEARCHSYSTEM: return "search-system";
720            case HISTORYSYSTEM: return "history-system";
721            case NULL: return null;
722            default: return "?";
723          }
724        }
725    }
726
727  public static class SystemRestfulInteractionEnumFactory implements EnumFactory<SystemRestfulInteraction> {
728    public SystemRestfulInteraction fromCode(String codeString) throws IllegalArgumentException {
729      if (codeString == null || "".equals(codeString))
730            if (codeString == null || "".equals(codeString))
731                return null;
732        if ("transaction".equals(codeString))
733          return SystemRestfulInteraction.TRANSACTION;
734        if ("batch".equals(codeString))
735          return SystemRestfulInteraction.BATCH;
736        if ("search-system".equals(codeString))
737          return SystemRestfulInteraction.SEARCHSYSTEM;
738        if ("history-system".equals(codeString))
739          return SystemRestfulInteraction.HISTORYSYSTEM;
740        throw new IllegalArgumentException("Unknown SystemRestfulInteraction code '"+codeString+"'");
741        }
742        public Enumeration<SystemRestfulInteraction> fromType(Base code) throws FHIRException {
743          if (code == null)
744            return null;
745          if (code.isEmpty())
746            return new Enumeration<SystemRestfulInteraction>(this);
747          String codeString = ((PrimitiveType) code).asStringValue();
748          if (codeString == null || "".equals(codeString))
749            return null;
750        if ("transaction".equals(codeString))
751          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.TRANSACTION);
752        if ("batch".equals(codeString))
753          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.BATCH);
754        if ("search-system".equals(codeString))
755          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.SEARCHSYSTEM);
756        if ("history-system".equals(codeString))
757          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.HISTORYSYSTEM);
758        throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'");
759        }
760    public String toCode(SystemRestfulInteraction code) {
761      if (code == SystemRestfulInteraction.TRANSACTION)
762        return "transaction";
763      if (code == SystemRestfulInteraction.BATCH)
764        return "batch";
765      if (code == SystemRestfulInteraction.SEARCHSYSTEM)
766        return "search-system";
767      if (code == SystemRestfulInteraction.HISTORYSYSTEM)
768        return "history-system";
769      return "?";
770      }
771    public String toSystem(SystemRestfulInteraction code) {
772      return code.getSystem();
773      }
774    }
775
776    public enum TypeRestfulInteraction {
777        /**
778         * Read the current state of the resource.
779         */
780        READ, 
781        /**
782         * Read the state of a specific version of the resource.
783         */
784        VREAD, 
785        /**
786         * Update an existing resource by its id (or create it if it is new).
787         */
788        UPDATE, 
789        /**
790         * Update an existing resource by posting a set of changes to it.
791         */
792        PATCH, 
793        /**
794         * Delete a resource.
795         */
796        DELETE, 
797        /**
798         * Retrieve the change history for a particular resource.
799         */
800        HISTORYINSTANCE, 
801        /**
802         * Retrieve the change history for all resources of a particular type.
803         */
804        HISTORYTYPE, 
805        /**
806         * Create a new resource with a server assigned id.
807         */
808        CREATE, 
809        /**
810         * Search all resources of the specified type based on some filter criteria.
811         */
812        SEARCHTYPE, 
813        /**
814         * added to help the parsers with the generic types
815         */
816        NULL;
817        public static TypeRestfulInteraction fromCode(String codeString) throws FHIRException {
818            if (codeString == null || "".equals(codeString))
819                return null;
820        if ("read".equals(codeString))
821          return READ;
822        if ("vread".equals(codeString))
823          return VREAD;
824        if ("update".equals(codeString))
825          return UPDATE;
826        if ("patch".equals(codeString))
827          return PATCH;
828        if ("delete".equals(codeString))
829          return DELETE;
830        if ("history-instance".equals(codeString))
831          return HISTORYINSTANCE;
832        if ("history-type".equals(codeString))
833          return HISTORYTYPE;
834        if ("create".equals(codeString))
835          return CREATE;
836        if ("search-type".equals(codeString))
837          return SEARCHTYPE;
838        if (Configuration.isAcceptInvalidEnums())
839          return null;
840        else
841          throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'");
842        }
843        public String toCode() {
844          switch (this) {
845            case READ: return "read";
846            case VREAD: return "vread";
847            case UPDATE: return "update";
848            case PATCH: return "patch";
849            case DELETE: return "delete";
850            case HISTORYINSTANCE: return "history-instance";
851            case HISTORYTYPE: return "history-type";
852            case CREATE: return "create";
853            case SEARCHTYPE: return "search-type";
854            case NULL: return null;
855            default: return "?";
856          }
857        }
858        public String getSystem() {
859          switch (this) {
860            case READ: return "http://hl7.org/fhir/restful-interaction";
861            case VREAD: return "http://hl7.org/fhir/restful-interaction";
862            case UPDATE: return "http://hl7.org/fhir/restful-interaction";
863            case PATCH: return "http://hl7.org/fhir/restful-interaction";
864            case DELETE: return "http://hl7.org/fhir/restful-interaction";
865            case HISTORYINSTANCE: return "http://hl7.org/fhir/restful-interaction";
866            case HISTORYTYPE: return "http://hl7.org/fhir/restful-interaction";
867            case CREATE: return "http://hl7.org/fhir/restful-interaction";
868            case SEARCHTYPE: return "http://hl7.org/fhir/restful-interaction";
869            case NULL: return null;
870            default: return "?";
871          }
872        }
873        public String getDefinition() {
874          switch (this) {
875            case READ: return "Read the current state of the resource.";
876            case VREAD: return "Read the state of a specific version of the resource.";
877            case UPDATE: return "Update an existing resource by its id (or create it if it is new).";
878            case PATCH: return "Update an existing resource by posting a set of changes to it.";
879            case DELETE: return "Delete a resource.";
880            case HISTORYINSTANCE: return "Retrieve the change history for a particular resource.";
881            case HISTORYTYPE: return "Retrieve the change history for all resources of a particular type.";
882            case CREATE: return "Create a new resource with a server assigned id.";
883            case SEARCHTYPE: return "Search all resources of the specified type based on some filter criteria.";
884            case NULL: return null;
885            default: return "?";
886          }
887        }
888        public String getDisplay() {
889          switch (this) {
890            case READ: return "read";
891            case VREAD: return "vread";
892            case UPDATE: return "update";
893            case PATCH: return "patch";
894            case DELETE: return "delete";
895            case HISTORYINSTANCE: return "history-instance";
896            case HISTORYTYPE: return "history-type";
897            case CREATE: return "create";
898            case SEARCHTYPE: return "search-type";
899            case NULL: return null;
900            default: return "?";
901          }
902        }
903    }
904
905  public static class TypeRestfulInteractionEnumFactory implements EnumFactory<TypeRestfulInteraction> {
906    public TypeRestfulInteraction fromCode(String codeString) throws IllegalArgumentException {
907      if (codeString == null || "".equals(codeString))
908            if (codeString == null || "".equals(codeString))
909                return null;
910        if ("read".equals(codeString))
911          return TypeRestfulInteraction.READ;
912        if ("vread".equals(codeString))
913          return TypeRestfulInteraction.VREAD;
914        if ("update".equals(codeString))
915          return TypeRestfulInteraction.UPDATE;
916        if ("patch".equals(codeString))
917          return TypeRestfulInteraction.PATCH;
918        if ("delete".equals(codeString))
919          return TypeRestfulInteraction.DELETE;
920        if ("history-instance".equals(codeString))
921          return TypeRestfulInteraction.HISTORYINSTANCE;
922        if ("history-type".equals(codeString))
923          return TypeRestfulInteraction.HISTORYTYPE;
924        if ("create".equals(codeString))
925          return TypeRestfulInteraction.CREATE;
926        if ("search-type".equals(codeString))
927          return TypeRestfulInteraction.SEARCHTYPE;
928        throw new IllegalArgumentException("Unknown TypeRestfulInteraction code '"+codeString+"'");
929        }
930        public Enumeration<TypeRestfulInteraction> fromType(Base code) throws FHIRException {
931          if (code == null)
932            return null;
933          if (code.isEmpty())
934            return new Enumeration<TypeRestfulInteraction>(this);
935          String codeString = ((PrimitiveType) code).asStringValue();
936          if (codeString == null || "".equals(codeString))
937            return null;
938        if ("read".equals(codeString))
939          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.READ);
940        if ("vread".equals(codeString))
941          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.VREAD);
942        if ("update".equals(codeString))
943          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.UPDATE);
944        if ("patch".equals(codeString))
945          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.PATCH);
946        if ("delete".equals(codeString))
947          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.DELETE);
948        if ("history-instance".equals(codeString))
949          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.HISTORYINSTANCE);
950        if ("history-type".equals(codeString))
951          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.HISTORYTYPE);
952        if ("create".equals(codeString))
953          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.CREATE);
954        if ("search-type".equals(codeString))
955          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.SEARCHTYPE);
956        throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'");
957        }
958    public String toCode(TypeRestfulInteraction code) {
959      if (code == TypeRestfulInteraction.READ)
960        return "read";
961      if (code == TypeRestfulInteraction.VREAD)
962        return "vread";
963      if (code == TypeRestfulInteraction.UPDATE)
964        return "update";
965      if (code == TypeRestfulInteraction.PATCH)
966        return "patch";
967      if (code == TypeRestfulInteraction.DELETE)
968        return "delete";
969      if (code == TypeRestfulInteraction.HISTORYINSTANCE)
970        return "history-instance";
971      if (code == TypeRestfulInteraction.HISTORYTYPE)
972        return "history-type";
973      if (code == TypeRestfulInteraction.CREATE)
974        return "create";
975      if (code == TypeRestfulInteraction.SEARCHTYPE)
976        return "search-type";
977      return "?";
978      }
979    public String toSystem(TypeRestfulInteraction code) {
980      return code.getSystem();
981      }
982    }
983
984    @Block()
985    public static class CapabilityStatement2SoftwareComponent extends BackboneElement implements IBaseBackboneElement {
986        /**
987         * Name the software is known by.
988         */
989        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
990        @Description(shortDefinition="A name the software is known by", formalDefinition="Name the software is known by." )
991        protected StringType name;
992
993        /**
994         * The version identifier for the software covered by this statement.
995         */
996        @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
997        @Description(shortDefinition="Version covered by this statement", formalDefinition="The version identifier for the software covered by this statement." )
998        protected StringType version;
999
1000        /**
1001         * Date this version of the software was released.
1002         */
1003        @Child(name = "releaseDate", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1004        @Description(shortDefinition="Date this version was released", formalDefinition="Date this version of the software was released." )
1005        protected DateTimeType releaseDate;
1006
1007        private static final long serialVersionUID = 1819769027L;
1008
1009    /**
1010     * Constructor
1011     */
1012      public CapabilityStatement2SoftwareComponent() {
1013        super();
1014      }
1015
1016    /**
1017     * Constructor
1018     */
1019      public CapabilityStatement2SoftwareComponent(String name) {
1020        super();
1021        this.setName(name);
1022      }
1023
1024        /**
1025         * @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
1026         */
1027        public StringType getNameElement() { 
1028          if (this.name == null)
1029            if (Configuration.errorOnAutoCreate())
1030              throw new Error("Attempt to auto-create CapabilityStatement2SoftwareComponent.name");
1031            else if (Configuration.doAutoCreate())
1032              this.name = new StringType(); // bb
1033          return this.name;
1034        }
1035
1036        public boolean hasNameElement() { 
1037          return this.name != null && !this.name.isEmpty();
1038        }
1039
1040        public boolean hasName() { 
1041          return this.name != null && !this.name.isEmpty();
1042        }
1043
1044        /**
1045         * @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
1046         */
1047        public CapabilityStatement2SoftwareComponent setNameElement(StringType value) { 
1048          this.name = value;
1049          return this;
1050        }
1051
1052        /**
1053         * @return Name the software is known by.
1054         */
1055        public String getName() { 
1056          return this.name == null ? null : this.name.getValue();
1057        }
1058
1059        /**
1060         * @param value Name the software is known by.
1061         */
1062        public CapabilityStatement2SoftwareComponent setName(String value) { 
1063            if (this.name == null)
1064              this.name = new StringType();
1065            this.name.setValue(value);
1066          return this;
1067        }
1068
1069        /**
1070         * @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
1071         */
1072        public StringType getVersionElement() { 
1073          if (this.version == null)
1074            if (Configuration.errorOnAutoCreate())
1075              throw new Error("Attempt to auto-create CapabilityStatement2SoftwareComponent.version");
1076            else if (Configuration.doAutoCreate())
1077              this.version = new StringType(); // bb
1078          return this.version;
1079        }
1080
1081        public boolean hasVersionElement() { 
1082          return this.version != null && !this.version.isEmpty();
1083        }
1084
1085        public boolean hasVersion() { 
1086          return this.version != null && !this.version.isEmpty();
1087        }
1088
1089        /**
1090         * @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
1091         */
1092        public CapabilityStatement2SoftwareComponent setVersionElement(StringType value) { 
1093          this.version = value;
1094          return this;
1095        }
1096
1097        /**
1098         * @return The version identifier for the software covered by this statement.
1099         */
1100        public String getVersion() { 
1101          return this.version == null ? null : this.version.getValue();
1102        }
1103
1104        /**
1105         * @param value The version identifier for the software covered by this statement.
1106         */
1107        public CapabilityStatement2SoftwareComponent setVersion(String value) { 
1108          if (Utilities.noString(value))
1109            this.version = null;
1110          else {
1111            if (this.version == null)
1112              this.version = new StringType();
1113            this.version.setValue(value);
1114          }
1115          return this;
1116        }
1117
1118        /**
1119         * @return {@link #releaseDate} (Date this version of the software was released.). This is the underlying object with id, value and extensions. The accessor "getReleaseDate" gives direct access to the value
1120         */
1121        public DateTimeType getReleaseDateElement() { 
1122          if (this.releaseDate == null)
1123            if (Configuration.errorOnAutoCreate())
1124              throw new Error("Attempt to auto-create CapabilityStatement2SoftwareComponent.releaseDate");
1125            else if (Configuration.doAutoCreate())
1126              this.releaseDate = new DateTimeType(); // bb
1127          return this.releaseDate;
1128        }
1129
1130        public boolean hasReleaseDateElement() { 
1131          return this.releaseDate != null && !this.releaseDate.isEmpty();
1132        }
1133
1134        public boolean hasReleaseDate() { 
1135          return this.releaseDate != null && !this.releaseDate.isEmpty();
1136        }
1137
1138        /**
1139         * @param value {@link #releaseDate} (Date this version of the software was released.). This is the underlying object with id, value and extensions. The accessor "getReleaseDate" gives direct access to the value
1140         */
1141        public CapabilityStatement2SoftwareComponent setReleaseDateElement(DateTimeType value) { 
1142          this.releaseDate = value;
1143          return this;
1144        }
1145
1146        /**
1147         * @return Date this version of the software was released.
1148         */
1149        public Date getReleaseDate() { 
1150          return this.releaseDate == null ? null : this.releaseDate.getValue();
1151        }
1152
1153        /**
1154         * @param value Date this version of the software was released.
1155         */
1156        public CapabilityStatement2SoftwareComponent setReleaseDate(Date value) { 
1157          if (value == null)
1158            this.releaseDate = null;
1159          else {
1160            if (this.releaseDate == null)
1161              this.releaseDate = new DateTimeType();
1162            this.releaseDate.setValue(value);
1163          }
1164          return this;
1165        }
1166
1167        protected void listChildren(List<Property> children) {
1168          super.listChildren(children);
1169          children.add(new Property("name", "string", "Name the software is known by.", 0, 1, name));
1170          children.add(new Property("version", "string", "The version identifier for the software covered by this statement.", 0, 1, version));
1171          children.add(new Property("releaseDate", "dateTime", "Date this version of the software was released.", 0, 1, releaseDate));
1172        }
1173
1174        @Override
1175        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1176          switch (_hash) {
1177          case 3373707: /*name*/  return new Property("name", "string", "Name the software is known by.", 0, 1, name);
1178          case 351608024: /*version*/  return new Property("version", "string", "The version identifier for the software covered by this statement.", 0, 1, version);
1179          case 212873301: /*releaseDate*/  return new Property("releaseDate", "dateTime", "Date this version of the software was released.", 0, 1, releaseDate);
1180          default: return super.getNamedProperty(_hash, _name, _checkValid);
1181          }
1182
1183        }
1184
1185      @Override
1186      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1187        switch (hash) {
1188        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1189        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1190        case 212873301: /*releaseDate*/ return this.releaseDate == null ? new Base[0] : new Base[] {this.releaseDate}; // DateTimeType
1191        default: return super.getProperty(hash, name, checkValid);
1192        }
1193
1194      }
1195
1196      @Override
1197      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1198        switch (hash) {
1199        case 3373707: // name
1200          this.name = TypeConvertor.castToString(value); // StringType
1201          return value;
1202        case 351608024: // version
1203          this.version = TypeConvertor.castToString(value); // StringType
1204          return value;
1205        case 212873301: // releaseDate
1206          this.releaseDate = TypeConvertor.castToDateTime(value); // DateTimeType
1207          return value;
1208        default: return super.setProperty(hash, name, value);
1209        }
1210
1211      }
1212
1213      @Override
1214      public Base setProperty(String name, Base value) throws FHIRException {
1215        if (name.equals("name")) {
1216          this.name = TypeConvertor.castToString(value); // StringType
1217        } else if (name.equals("version")) {
1218          this.version = TypeConvertor.castToString(value); // StringType
1219        } else if (name.equals("releaseDate")) {
1220          this.releaseDate = TypeConvertor.castToDateTime(value); // DateTimeType
1221        } else
1222          return super.setProperty(name, value);
1223        return value;
1224      }
1225
1226      @Override
1227      public Base makeProperty(int hash, String name) throws FHIRException {
1228        switch (hash) {
1229        case 3373707:  return getNameElement();
1230        case 351608024:  return getVersionElement();
1231        case 212873301:  return getReleaseDateElement();
1232        default: return super.makeProperty(hash, name);
1233        }
1234
1235      }
1236
1237      @Override
1238      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1239        switch (hash) {
1240        case 3373707: /*name*/ return new String[] {"string"};
1241        case 351608024: /*version*/ return new String[] {"string"};
1242        case 212873301: /*releaseDate*/ return new String[] {"dateTime"};
1243        default: return super.getTypesForProperty(hash, name);
1244        }
1245
1246      }
1247
1248      @Override
1249      public Base addChild(String name) throws FHIRException {
1250        if (name.equals("name")) {
1251          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.software.name");
1252        }
1253        else if (name.equals("version")) {
1254          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.software.version");
1255        }
1256        else if (name.equals("releaseDate")) {
1257          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.software.releaseDate");
1258        }
1259        else
1260          return super.addChild(name);
1261      }
1262
1263      public CapabilityStatement2SoftwareComponent copy() {
1264        CapabilityStatement2SoftwareComponent dst = new CapabilityStatement2SoftwareComponent();
1265        copyValues(dst);
1266        return dst;
1267      }
1268
1269      public void copyValues(CapabilityStatement2SoftwareComponent dst) {
1270        super.copyValues(dst);
1271        dst.name = name == null ? null : name.copy();
1272        dst.version = version == null ? null : version.copy();
1273        dst.releaseDate = releaseDate == null ? null : releaseDate.copy();
1274      }
1275
1276      @Override
1277      public boolean equalsDeep(Base other_) {
1278        if (!super.equalsDeep(other_))
1279          return false;
1280        if (!(other_ instanceof CapabilityStatement2SoftwareComponent))
1281          return false;
1282        CapabilityStatement2SoftwareComponent o = (CapabilityStatement2SoftwareComponent) other_;
1283        return compareDeep(name, o.name, true) && compareDeep(version, o.version, true) && compareDeep(releaseDate, o.releaseDate, true)
1284          ;
1285      }
1286
1287      @Override
1288      public boolean equalsShallow(Base other_) {
1289        if (!super.equalsShallow(other_))
1290          return false;
1291        if (!(other_ instanceof CapabilityStatement2SoftwareComponent))
1292          return false;
1293        CapabilityStatement2SoftwareComponent o = (CapabilityStatement2SoftwareComponent) other_;
1294        return compareValues(name, o.name, true) && compareValues(version, o.version, true) && compareValues(releaseDate, o.releaseDate, true)
1295          ;
1296      }
1297
1298      public boolean isEmpty() {
1299        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, version, releaseDate
1300          );
1301      }
1302
1303  public String fhirType() {
1304    return "CapabilityStatement2.software";
1305
1306  }
1307
1308  }
1309
1310    @Block()
1311    public static class CapabilityStatement2ImplementationComponent extends BackboneElement implements IBaseBackboneElement {
1312        /**
1313         * Information about the specific installation that this capability statement relates to.
1314         */
1315        @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1316        @Description(shortDefinition="Describes this specific instance", formalDefinition="Information about the specific installation that this capability statement relates to." )
1317        protected StringType description;
1318
1319        /**
1320         * An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.
1321         */
1322        @Child(name = "url", type = {UrlType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1323        @Description(shortDefinition="Base URL for the installation", formalDefinition="An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces." )
1324        protected UrlType url;
1325
1326        /**
1327         * The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.
1328         */
1329        @Child(name = "custodian", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true)
1330        @Description(shortDefinition="Organization that manages the data", formalDefinition="The organization responsible for the management of the instance and oversight of the data on the server at the specified URL." )
1331        protected Reference custodian;
1332
1333        private static final long serialVersionUID = 1681322786L;
1334
1335    /**
1336     * Constructor
1337     */
1338      public CapabilityStatement2ImplementationComponent() {
1339        super();
1340      }
1341
1342    /**
1343     * Constructor
1344     */
1345      public CapabilityStatement2ImplementationComponent(String description) {
1346        super();
1347        this.setDescription(description);
1348      }
1349
1350        /**
1351         * @return {@link #description} (Information about the specific installation that this capability statement relates to.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1352         */
1353        public StringType getDescriptionElement() { 
1354          if (this.description == null)
1355            if (Configuration.errorOnAutoCreate())
1356              throw new Error("Attempt to auto-create CapabilityStatement2ImplementationComponent.description");
1357            else if (Configuration.doAutoCreate())
1358              this.description = new StringType(); // bb
1359          return this.description;
1360        }
1361
1362        public boolean hasDescriptionElement() { 
1363          return this.description != null && !this.description.isEmpty();
1364        }
1365
1366        public boolean hasDescription() { 
1367          return this.description != null && !this.description.isEmpty();
1368        }
1369
1370        /**
1371         * @param value {@link #description} (Information about the specific installation that this capability statement relates to.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1372         */
1373        public CapabilityStatement2ImplementationComponent setDescriptionElement(StringType value) { 
1374          this.description = value;
1375          return this;
1376        }
1377
1378        /**
1379         * @return Information about the specific installation that this capability statement relates to.
1380         */
1381        public String getDescription() { 
1382          return this.description == null ? null : this.description.getValue();
1383        }
1384
1385        /**
1386         * @param value Information about the specific installation that this capability statement relates to.
1387         */
1388        public CapabilityStatement2ImplementationComponent setDescription(String value) { 
1389            if (this.description == null)
1390              this.description = new StringType();
1391            this.description.setValue(value);
1392          return this;
1393        }
1394
1395        /**
1396         * @return {@link #url} (An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1397         */
1398        public UrlType getUrlElement() { 
1399          if (this.url == null)
1400            if (Configuration.errorOnAutoCreate())
1401              throw new Error("Attempt to auto-create CapabilityStatement2ImplementationComponent.url");
1402            else if (Configuration.doAutoCreate())
1403              this.url = new UrlType(); // bb
1404          return this.url;
1405        }
1406
1407        public boolean hasUrlElement() { 
1408          return this.url != null && !this.url.isEmpty();
1409        }
1410
1411        public boolean hasUrl() { 
1412          return this.url != null && !this.url.isEmpty();
1413        }
1414
1415        /**
1416         * @param value {@link #url} (An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1417         */
1418        public CapabilityStatement2ImplementationComponent setUrlElement(UrlType value) { 
1419          this.url = value;
1420          return this;
1421        }
1422
1423        /**
1424         * @return An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.
1425         */
1426        public String getUrl() { 
1427          return this.url == null ? null : this.url.getValue();
1428        }
1429
1430        /**
1431         * @param value An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.
1432         */
1433        public CapabilityStatement2ImplementationComponent setUrl(String value) { 
1434          if (Utilities.noString(value))
1435            this.url = null;
1436          else {
1437            if (this.url == null)
1438              this.url = new UrlType();
1439            this.url.setValue(value);
1440          }
1441          return this;
1442        }
1443
1444        /**
1445         * @return {@link #custodian} (The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.)
1446         */
1447        public Reference getCustodian() { 
1448          if (this.custodian == null)
1449            if (Configuration.errorOnAutoCreate())
1450              throw new Error("Attempt to auto-create CapabilityStatement2ImplementationComponent.custodian");
1451            else if (Configuration.doAutoCreate())
1452              this.custodian = new Reference(); // cc
1453          return this.custodian;
1454        }
1455
1456        public boolean hasCustodian() { 
1457          return this.custodian != null && !this.custodian.isEmpty();
1458        }
1459
1460        /**
1461         * @param value {@link #custodian} (The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.)
1462         */
1463        public CapabilityStatement2ImplementationComponent setCustodian(Reference value) { 
1464          this.custodian = value;
1465          return this;
1466        }
1467
1468        protected void listChildren(List<Property> children) {
1469          super.listChildren(children);
1470          children.add(new Property("description", "string", "Information about the specific installation that this capability statement relates to.", 0, 1, description));
1471          children.add(new Property("url", "url", "An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.", 0, 1, url));
1472          children.add(new Property("custodian", "Reference(Organization)", "The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.", 0, 1, custodian));
1473        }
1474
1475        @Override
1476        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1477          switch (_hash) {
1478          case -1724546052: /*description*/  return new Property("description", "string", "Information about the specific installation that this capability statement relates to.", 0, 1, description);
1479          case 116079: /*url*/  return new Property("url", "url", "An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.", 0, 1, url);
1480          case 1611297262: /*custodian*/  return new Property("custodian", "Reference(Organization)", "The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.", 0, 1, custodian);
1481          default: return super.getNamedProperty(_hash, _name, _checkValid);
1482          }
1483
1484        }
1485
1486      @Override
1487      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1488        switch (hash) {
1489        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1490        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UrlType
1491        case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference
1492        default: return super.getProperty(hash, name, checkValid);
1493        }
1494
1495      }
1496
1497      @Override
1498      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1499        switch (hash) {
1500        case -1724546052: // description
1501          this.description = TypeConvertor.castToString(value); // StringType
1502          return value;
1503        case 116079: // url
1504          this.url = TypeConvertor.castToUrl(value); // UrlType
1505          return value;
1506        case 1611297262: // custodian
1507          this.custodian = TypeConvertor.castToReference(value); // Reference
1508          return value;
1509        default: return super.setProperty(hash, name, value);
1510        }
1511
1512      }
1513
1514      @Override
1515      public Base setProperty(String name, Base value) throws FHIRException {
1516        if (name.equals("description")) {
1517          this.description = TypeConvertor.castToString(value); // StringType
1518        } else if (name.equals("url")) {
1519          this.url = TypeConvertor.castToUrl(value); // UrlType
1520        } else if (name.equals("custodian")) {
1521          this.custodian = TypeConvertor.castToReference(value); // Reference
1522        } else
1523          return super.setProperty(name, value);
1524        return value;
1525      }
1526
1527      @Override
1528      public Base makeProperty(int hash, String name) throws FHIRException {
1529        switch (hash) {
1530        case -1724546052:  return getDescriptionElement();
1531        case 116079:  return getUrlElement();
1532        case 1611297262:  return getCustodian();
1533        default: return super.makeProperty(hash, name);
1534        }
1535
1536      }
1537
1538      @Override
1539      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1540        switch (hash) {
1541        case -1724546052: /*description*/ return new String[] {"string"};
1542        case 116079: /*url*/ return new String[] {"url"};
1543        case 1611297262: /*custodian*/ return new String[] {"Reference"};
1544        default: return super.getTypesForProperty(hash, name);
1545        }
1546
1547      }
1548
1549      @Override
1550      public Base addChild(String name) throws FHIRException {
1551        if (name.equals("description")) {
1552          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.implementation.description");
1553        }
1554        else if (name.equals("url")) {
1555          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.implementation.url");
1556        }
1557        else if (name.equals("custodian")) {
1558          this.custodian = new Reference();
1559          return this.custodian;
1560        }
1561        else
1562          return super.addChild(name);
1563      }
1564
1565      public CapabilityStatement2ImplementationComponent copy() {
1566        CapabilityStatement2ImplementationComponent dst = new CapabilityStatement2ImplementationComponent();
1567        copyValues(dst);
1568        return dst;
1569      }
1570
1571      public void copyValues(CapabilityStatement2ImplementationComponent dst) {
1572        super.copyValues(dst);
1573        dst.description = description == null ? null : description.copy();
1574        dst.url = url == null ? null : url.copy();
1575        dst.custodian = custodian == null ? null : custodian.copy();
1576      }
1577
1578      @Override
1579      public boolean equalsDeep(Base other_) {
1580        if (!super.equalsDeep(other_))
1581          return false;
1582        if (!(other_ instanceof CapabilityStatement2ImplementationComponent))
1583          return false;
1584        CapabilityStatement2ImplementationComponent o = (CapabilityStatement2ImplementationComponent) other_;
1585        return compareDeep(description, o.description, true) && compareDeep(url, o.url, true) && compareDeep(custodian, o.custodian, true)
1586          ;
1587      }
1588
1589      @Override
1590      public boolean equalsShallow(Base other_) {
1591        if (!super.equalsShallow(other_))
1592          return false;
1593        if (!(other_ instanceof CapabilityStatement2ImplementationComponent))
1594          return false;
1595        CapabilityStatement2ImplementationComponent o = (CapabilityStatement2ImplementationComponent) other_;
1596        return compareValues(description, o.description, true) && compareValues(url, o.url, true);
1597      }
1598
1599      public boolean isEmpty() {
1600        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, url, custodian
1601          );
1602      }
1603
1604  public String fhirType() {
1605    return "CapabilityStatement2.implementation";
1606
1607  }
1608
1609  }
1610
1611    @Block()
1612    public static class CapabilityStatement2RestComponent extends BackboneElement implements IBaseBackboneElement {
1613        /**
1614         * Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.
1615         */
1616        @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1617        @Description(shortDefinition="client | server", formalDefinition="Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations." )
1618        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/restful-capability-mode")
1619        protected Enumeration<RestfulCapabilityMode> mode;
1620
1621        /**
1622         * Information about the system's restful capabilities that apply across all applications, such as security.
1623         */
1624        @Child(name = "documentation", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1625        @Description(shortDefinition="General description of implementation", formalDefinition="Information about the system's restful capabilities that apply across all applications, such as security." )
1626        protected MarkdownType documentation;
1627
1628        /**
1629         * A statement that affirms support for a feature.
1630         */
1631        @Child(name = "feature", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1632        @Description(shortDefinition="Statement of support for a feature", formalDefinition="A statement that affirms support for a feature." )
1633        protected List<CapabilityStatement2RestFeatureComponent> feature;
1634
1635        /**
1636         * A specification of the restful capabilities of the solution for a specific resource type.
1637         */
1638        @Child(name = "resource", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1639        @Description(shortDefinition="Resource served on the REST interface", formalDefinition="A specification of the restful capabilities of the solution for a specific resource type." )
1640        protected List<CapabilityStatement2RestResourceComponent> resource;
1641
1642        /**
1643         * A specification of restful operations supported by the system.
1644         */
1645        @Child(name = "interaction", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1646        @Description(shortDefinition="What operations are supported?", formalDefinition="A specification of restful operations supported by the system." )
1647        protected List<SystemInteractionComponent> interaction;
1648
1649        /**
1650         * Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.
1651         */
1652        @Child(name = "searchParam", type = {CapabilityStatement2RestResourceSearchParamComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1653        @Description(shortDefinition="Search parameters for searching all resources", formalDefinition="Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." )
1654        protected List<CapabilityStatement2RestResourceSearchParamComponent> searchParam;
1655
1656        /**
1657         * Definition of an operation or a named query together with its parameters and their meaning and type.
1658         */
1659        @Child(name = "operation", type = {CapabilityStatement2RestResourceOperationComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1660        @Description(shortDefinition="Definition of a system level operation", formalDefinition="Definition of an operation or a named query together with its parameters and their meaning and type." )
1661        protected List<CapabilityStatement2RestResourceOperationComponent> operation;
1662
1663        /**
1664         * An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .
1665         */
1666        @Child(name = "compartment", type = {CanonicalType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1667        @Description(shortDefinition="Compartments served/used by system", formalDefinition="An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL ." )
1668        protected List<CanonicalType> compartment;
1669
1670        private static final long serialVersionUID = 2139914073L;
1671
1672    /**
1673     * Constructor
1674     */
1675      public CapabilityStatement2RestComponent() {
1676        super();
1677      }
1678
1679    /**
1680     * Constructor
1681     */
1682      public CapabilityStatement2RestComponent(RestfulCapabilityMode mode) {
1683        super();
1684        this.setMode(mode);
1685      }
1686
1687        /**
1688         * @return {@link #mode} (Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
1689         */
1690        public Enumeration<RestfulCapabilityMode> getModeElement() { 
1691          if (this.mode == null)
1692            if (Configuration.errorOnAutoCreate())
1693              throw new Error("Attempt to auto-create CapabilityStatement2RestComponent.mode");
1694            else if (Configuration.doAutoCreate())
1695              this.mode = new Enumeration<RestfulCapabilityMode>(new RestfulCapabilityModeEnumFactory()); // bb
1696          return this.mode;
1697        }
1698
1699        public boolean hasModeElement() { 
1700          return this.mode != null && !this.mode.isEmpty();
1701        }
1702
1703        public boolean hasMode() { 
1704          return this.mode != null && !this.mode.isEmpty();
1705        }
1706
1707        /**
1708         * @param value {@link #mode} (Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
1709         */
1710        public CapabilityStatement2RestComponent setModeElement(Enumeration<RestfulCapabilityMode> value) { 
1711          this.mode = value;
1712          return this;
1713        }
1714
1715        /**
1716         * @return Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.
1717         */
1718        public RestfulCapabilityMode getMode() { 
1719          return this.mode == null ? null : this.mode.getValue();
1720        }
1721
1722        /**
1723         * @param value Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.
1724         */
1725        public CapabilityStatement2RestComponent setMode(RestfulCapabilityMode value) { 
1726            if (this.mode == null)
1727              this.mode = new Enumeration<RestfulCapabilityMode>(new RestfulCapabilityModeEnumFactory());
1728            this.mode.setValue(value);
1729          return this;
1730        }
1731
1732        /**
1733         * @return {@link #documentation} (Information about the system's restful capabilities that apply across all applications, such as security.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
1734         */
1735        public MarkdownType getDocumentationElement() { 
1736          if (this.documentation == null)
1737            if (Configuration.errorOnAutoCreate())
1738              throw new Error("Attempt to auto-create CapabilityStatement2RestComponent.documentation");
1739            else if (Configuration.doAutoCreate())
1740              this.documentation = new MarkdownType(); // bb
1741          return this.documentation;
1742        }
1743
1744        public boolean hasDocumentationElement() { 
1745          return this.documentation != null && !this.documentation.isEmpty();
1746        }
1747
1748        public boolean hasDocumentation() { 
1749          return this.documentation != null && !this.documentation.isEmpty();
1750        }
1751
1752        /**
1753         * @param value {@link #documentation} (Information about the system's restful capabilities that apply across all applications, such as security.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
1754         */
1755        public CapabilityStatement2RestComponent setDocumentationElement(MarkdownType value) { 
1756          this.documentation = value;
1757          return this;
1758        }
1759
1760        /**
1761         * @return Information about the system's restful capabilities that apply across all applications, such as security.
1762         */
1763        public String getDocumentation() { 
1764          return this.documentation == null ? null : this.documentation.getValue();
1765        }
1766
1767        /**
1768         * @param value Information about the system's restful capabilities that apply across all applications, such as security.
1769         */
1770        public CapabilityStatement2RestComponent setDocumentation(String value) { 
1771          if (value == null)
1772            this.documentation = null;
1773          else {
1774            if (this.documentation == null)
1775              this.documentation = new MarkdownType();
1776            this.documentation.setValue(value);
1777          }
1778          return this;
1779        }
1780
1781        /**
1782         * @return {@link #feature} (A statement that affirms support for a feature.)
1783         */
1784        public List<CapabilityStatement2RestFeatureComponent> getFeature() { 
1785          if (this.feature == null)
1786            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
1787          return this.feature;
1788        }
1789
1790        /**
1791         * @return Returns a reference to <code>this</code> for easy method chaining
1792         */
1793        public CapabilityStatement2RestComponent setFeature(List<CapabilityStatement2RestFeatureComponent> theFeature) { 
1794          this.feature = theFeature;
1795          return this;
1796        }
1797
1798        public boolean hasFeature() { 
1799          if (this.feature == null)
1800            return false;
1801          for (CapabilityStatement2RestFeatureComponent item : this.feature)
1802            if (!item.isEmpty())
1803              return true;
1804          return false;
1805        }
1806
1807        public CapabilityStatement2RestFeatureComponent addFeature() { //3
1808          CapabilityStatement2RestFeatureComponent t = new CapabilityStatement2RestFeatureComponent();
1809          if (this.feature == null)
1810            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
1811          this.feature.add(t);
1812          return t;
1813        }
1814
1815        public CapabilityStatement2RestComponent addFeature(CapabilityStatement2RestFeatureComponent t) { //3
1816          if (t == null)
1817            return this;
1818          if (this.feature == null)
1819            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
1820          this.feature.add(t);
1821          return this;
1822        }
1823
1824        /**
1825         * @return The first repetition of repeating field {@link #feature}, creating it if it does not already exist {3}
1826         */
1827        public CapabilityStatement2RestFeatureComponent getFeatureFirstRep() { 
1828          if (getFeature().isEmpty()) {
1829            addFeature();
1830          }
1831          return getFeature().get(0);
1832        }
1833
1834        /**
1835         * @return {@link #resource} (A specification of the restful capabilities of the solution for a specific resource type.)
1836         */
1837        public List<CapabilityStatement2RestResourceComponent> getResource() { 
1838          if (this.resource == null)
1839            this.resource = new ArrayList<CapabilityStatement2RestResourceComponent>();
1840          return this.resource;
1841        }
1842
1843        /**
1844         * @return Returns a reference to <code>this</code> for easy method chaining
1845         */
1846        public CapabilityStatement2RestComponent setResource(List<CapabilityStatement2RestResourceComponent> theResource) { 
1847          this.resource = theResource;
1848          return this;
1849        }
1850
1851        public boolean hasResource() { 
1852          if (this.resource == null)
1853            return false;
1854          for (CapabilityStatement2RestResourceComponent item : this.resource)
1855            if (!item.isEmpty())
1856              return true;
1857          return false;
1858        }
1859
1860        public CapabilityStatement2RestResourceComponent addResource() { //3
1861          CapabilityStatement2RestResourceComponent t = new CapabilityStatement2RestResourceComponent();
1862          if (this.resource == null)
1863            this.resource = new ArrayList<CapabilityStatement2RestResourceComponent>();
1864          this.resource.add(t);
1865          return t;
1866        }
1867
1868        public CapabilityStatement2RestComponent addResource(CapabilityStatement2RestResourceComponent t) { //3
1869          if (t == null)
1870            return this;
1871          if (this.resource == null)
1872            this.resource = new ArrayList<CapabilityStatement2RestResourceComponent>();
1873          this.resource.add(t);
1874          return this;
1875        }
1876
1877        /**
1878         * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist {3}
1879         */
1880        public CapabilityStatement2RestResourceComponent getResourceFirstRep() { 
1881          if (getResource().isEmpty()) {
1882            addResource();
1883          }
1884          return getResource().get(0);
1885        }
1886
1887        /**
1888         * @return {@link #interaction} (A specification of restful operations supported by the system.)
1889         */
1890        public List<SystemInteractionComponent> getInteraction() { 
1891          if (this.interaction == null)
1892            this.interaction = new ArrayList<SystemInteractionComponent>();
1893          return this.interaction;
1894        }
1895
1896        /**
1897         * @return Returns a reference to <code>this</code> for easy method chaining
1898         */
1899        public CapabilityStatement2RestComponent setInteraction(List<SystemInteractionComponent> theInteraction) { 
1900          this.interaction = theInteraction;
1901          return this;
1902        }
1903
1904        public boolean hasInteraction() { 
1905          if (this.interaction == null)
1906            return false;
1907          for (SystemInteractionComponent item : this.interaction)
1908            if (!item.isEmpty())
1909              return true;
1910          return false;
1911        }
1912
1913        public SystemInteractionComponent addInteraction() { //3
1914          SystemInteractionComponent t = new SystemInteractionComponent();
1915          if (this.interaction == null)
1916            this.interaction = new ArrayList<SystemInteractionComponent>();
1917          this.interaction.add(t);
1918          return t;
1919        }
1920
1921        public CapabilityStatement2RestComponent addInteraction(SystemInteractionComponent t) { //3
1922          if (t == null)
1923            return this;
1924          if (this.interaction == null)
1925            this.interaction = new ArrayList<SystemInteractionComponent>();
1926          this.interaction.add(t);
1927          return this;
1928        }
1929
1930        /**
1931         * @return The first repetition of repeating field {@link #interaction}, creating it if it does not already exist {3}
1932         */
1933        public SystemInteractionComponent getInteractionFirstRep() { 
1934          if (getInteraction().isEmpty()) {
1935            addInteraction();
1936          }
1937          return getInteraction().get(0);
1938        }
1939
1940        /**
1941         * @return {@link #searchParam} (Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.)
1942         */
1943        public List<CapabilityStatement2RestResourceSearchParamComponent> getSearchParam() { 
1944          if (this.searchParam == null)
1945            this.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
1946          return this.searchParam;
1947        }
1948
1949        /**
1950         * @return Returns a reference to <code>this</code> for easy method chaining
1951         */
1952        public CapabilityStatement2RestComponent setSearchParam(List<CapabilityStatement2RestResourceSearchParamComponent> theSearchParam) { 
1953          this.searchParam = theSearchParam;
1954          return this;
1955        }
1956
1957        public boolean hasSearchParam() { 
1958          if (this.searchParam == null)
1959            return false;
1960          for (CapabilityStatement2RestResourceSearchParamComponent item : this.searchParam)
1961            if (!item.isEmpty())
1962              return true;
1963          return false;
1964        }
1965
1966        public CapabilityStatement2RestResourceSearchParamComponent addSearchParam() { //3
1967          CapabilityStatement2RestResourceSearchParamComponent t = new CapabilityStatement2RestResourceSearchParamComponent();
1968          if (this.searchParam == null)
1969            this.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
1970          this.searchParam.add(t);
1971          return t;
1972        }
1973
1974        public CapabilityStatement2RestComponent addSearchParam(CapabilityStatement2RestResourceSearchParamComponent t) { //3
1975          if (t == null)
1976            return this;
1977          if (this.searchParam == null)
1978            this.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
1979          this.searchParam.add(t);
1980          return this;
1981        }
1982
1983        /**
1984         * @return The first repetition of repeating field {@link #searchParam}, creating it if it does not already exist {3}
1985         */
1986        public CapabilityStatement2RestResourceSearchParamComponent getSearchParamFirstRep() { 
1987          if (getSearchParam().isEmpty()) {
1988            addSearchParam();
1989          }
1990          return getSearchParam().get(0);
1991        }
1992
1993        /**
1994         * @return {@link #operation} (Definition of an operation or a named query together with its parameters and their meaning and type.)
1995         */
1996        public List<CapabilityStatement2RestResourceOperationComponent> getOperation() { 
1997          if (this.operation == null)
1998            this.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
1999          return this.operation;
2000        }
2001
2002        /**
2003         * @return Returns a reference to <code>this</code> for easy method chaining
2004         */
2005        public CapabilityStatement2RestComponent setOperation(List<CapabilityStatement2RestResourceOperationComponent> theOperation) { 
2006          this.operation = theOperation;
2007          return this;
2008        }
2009
2010        public boolean hasOperation() { 
2011          if (this.operation == null)
2012            return false;
2013          for (CapabilityStatement2RestResourceOperationComponent item : this.operation)
2014            if (!item.isEmpty())
2015              return true;
2016          return false;
2017        }
2018
2019        public CapabilityStatement2RestResourceOperationComponent addOperation() { //3
2020          CapabilityStatement2RestResourceOperationComponent t = new CapabilityStatement2RestResourceOperationComponent();
2021          if (this.operation == null)
2022            this.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
2023          this.operation.add(t);
2024          return t;
2025        }
2026
2027        public CapabilityStatement2RestComponent addOperation(CapabilityStatement2RestResourceOperationComponent t) { //3
2028          if (t == null)
2029            return this;
2030          if (this.operation == null)
2031            this.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
2032          this.operation.add(t);
2033          return this;
2034        }
2035
2036        /**
2037         * @return The first repetition of repeating field {@link #operation}, creating it if it does not already exist {3}
2038         */
2039        public CapabilityStatement2RestResourceOperationComponent getOperationFirstRep() { 
2040          if (getOperation().isEmpty()) {
2041            addOperation();
2042          }
2043          return getOperation().get(0);
2044        }
2045
2046        /**
2047         * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .)
2048         */
2049        public List<CanonicalType> getCompartment() { 
2050          if (this.compartment == null)
2051            this.compartment = new ArrayList<CanonicalType>();
2052          return this.compartment;
2053        }
2054
2055        /**
2056         * @return Returns a reference to <code>this</code> for easy method chaining
2057         */
2058        public CapabilityStatement2RestComponent setCompartment(List<CanonicalType> theCompartment) { 
2059          this.compartment = theCompartment;
2060          return this;
2061        }
2062
2063        public boolean hasCompartment() { 
2064          if (this.compartment == null)
2065            return false;
2066          for (CanonicalType item : this.compartment)
2067            if (!item.isEmpty())
2068              return true;
2069          return false;
2070        }
2071
2072        /**
2073         * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .)
2074         */
2075        public CanonicalType addCompartmentElement() {//2 
2076          CanonicalType t = new CanonicalType();
2077          if (this.compartment == null)
2078            this.compartment = new ArrayList<CanonicalType>();
2079          this.compartment.add(t);
2080          return t;
2081        }
2082
2083        /**
2084         * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .)
2085         */
2086        public CapabilityStatement2RestComponent addCompartment(String value) { //1
2087          CanonicalType t = new CanonicalType();
2088          t.setValue(value);
2089          if (this.compartment == null)
2090            this.compartment = new ArrayList<CanonicalType>();
2091          this.compartment.add(t);
2092          return this;
2093        }
2094
2095        /**
2096         * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .)
2097         */
2098        public boolean hasCompartment(String value) { 
2099          if (this.compartment == null)
2100            return false;
2101          for (CanonicalType v : this.compartment)
2102            if (v.getValue().equals(value)) // canonical
2103              return true;
2104          return false;
2105        }
2106
2107        protected void listChildren(List<Property> children) {
2108          super.listChildren(children);
2109          children.add(new Property("mode", "code", "Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.", 0, 1, mode));
2110          children.add(new Property("documentation", "markdown", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, 1, documentation));
2111          children.add(new Property("feature", "", "A statement that affirms support for a feature.", 0, java.lang.Integer.MAX_VALUE, feature));
2112          children.add(new Property("resource", "", "A specification of the restful capabilities of the solution for a specific resource type.", 0, java.lang.Integer.MAX_VALUE, resource));
2113          children.add(new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction));
2114          children.add(new Property("searchParam", "@CapabilityStatement2.rest.resource.searchParam", "Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam));
2115          children.add(new Property("operation", "@CapabilityStatement2.rest.resource.operation", "Definition of an operation or a named query together with its parameters and their meaning and type.", 0, java.lang.Integer.MAX_VALUE, operation));
2116          children.add(new Property("compartment", "canonical(CompartmentDefinition)", "An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .", 0, java.lang.Integer.MAX_VALUE, compartment));
2117        }
2118
2119        @Override
2120        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2121          switch (_hash) {
2122          case 3357091: /*mode*/  return new Property("mode", "code", "Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.", 0, 1, mode);
2123          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, 1, documentation);
2124          case -979207434: /*feature*/  return new Property("feature", "", "A statement that affirms support for a feature.", 0, java.lang.Integer.MAX_VALUE, feature);
2125          case -341064690: /*resource*/  return new Property("resource", "", "A specification of the restful capabilities of the solution for a specific resource type.", 0, java.lang.Integer.MAX_VALUE, resource);
2126          case 1844104722: /*interaction*/  return new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction);
2127          case -553645115: /*searchParam*/  return new Property("searchParam", "@CapabilityStatement2.rest.resource.searchParam", "Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam);
2128          case 1662702951: /*operation*/  return new Property("operation", "@CapabilityStatement2.rest.resource.operation", "Definition of an operation or a named query together with its parameters and their meaning and type.", 0, java.lang.Integer.MAX_VALUE, operation);
2129          case -397756334: /*compartment*/  return new Property("compartment", "canonical(CompartmentDefinition)", "An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .", 0, java.lang.Integer.MAX_VALUE, compartment);
2130          default: return super.getNamedProperty(_hash, _name, _checkValid);
2131          }
2132
2133        }
2134
2135      @Override
2136      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2137        switch (hash) {
2138        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<RestfulCapabilityMode>
2139        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
2140        case -979207434: /*feature*/ return this.feature == null ? new Base[0] : this.feature.toArray(new Base[this.feature.size()]); // CapabilityStatement2RestFeatureComponent
2141        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CapabilityStatement2RestResourceComponent
2142        case 1844104722: /*interaction*/ return this.interaction == null ? new Base[0] : this.interaction.toArray(new Base[this.interaction.size()]); // SystemInteractionComponent
2143        case -553645115: /*searchParam*/ return this.searchParam == null ? new Base[0] : this.searchParam.toArray(new Base[this.searchParam.size()]); // CapabilityStatement2RestResourceSearchParamComponent
2144        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : this.operation.toArray(new Base[this.operation.size()]); // CapabilityStatement2RestResourceOperationComponent
2145        case -397756334: /*compartment*/ return this.compartment == null ? new Base[0] : this.compartment.toArray(new Base[this.compartment.size()]); // CanonicalType
2146        default: return super.getProperty(hash, name, checkValid);
2147        }
2148
2149      }
2150
2151      @Override
2152      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2153        switch (hash) {
2154        case 3357091: // mode
2155          value = new RestfulCapabilityModeEnumFactory().fromType(TypeConvertor.castToCode(value));
2156          this.mode = (Enumeration) value; // Enumeration<RestfulCapabilityMode>
2157          return value;
2158        case 1587405498: // documentation
2159          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
2160          return value;
2161        case -979207434: // feature
2162          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value); // CapabilityStatement2RestFeatureComponent
2163          return value;
2164        case -341064690: // resource
2165          this.getResource().add((CapabilityStatement2RestResourceComponent) value); // CapabilityStatement2RestResourceComponent
2166          return value;
2167        case 1844104722: // interaction
2168          this.getInteraction().add((SystemInteractionComponent) value); // SystemInteractionComponent
2169          return value;
2170        case -553645115: // searchParam
2171          this.getSearchParam().add((CapabilityStatement2RestResourceSearchParamComponent) value); // CapabilityStatement2RestResourceSearchParamComponent
2172          return value;
2173        case 1662702951: // operation
2174          this.getOperation().add((CapabilityStatement2RestResourceOperationComponent) value); // CapabilityStatement2RestResourceOperationComponent
2175          return value;
2176        case -397756334: // compartment
2177          this.getCompartment().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2178          return value;
2179        default: return super.setProperty(hash, name, value);
2180        }
2181
2182      }
2183
2184      @Override
2185      public Base setProperty(String name, Base value) throws FHIRException {
2186        if (name.equals("mode")) {
2187          value = new RestfulCapabilityModeEnumFactory().fromType(TypeConvertor.castToCode(value));
2188          this.mode = (Enumeration) value; // Enumeration<RestfulCapabilityMode>
2189        } else if (name.equals("documentation")) {
2190          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
2191        } else if (name.equals("feature")) {
2192          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value);
2193        } else if (name.equals("resource")) {
2194          this.getResource().add((CapabilityStatement2RestResourceComponent) value);
2195        } else if (name.equals("interaction")) {
2196          this.getInteraction().add((SystemInteractionComponent) value);
2197        } else if (name.equals("searchParam")) {
2198          this.getSearchParam().add((CapabilityStatement2RestResourceSearchParamComponent) value);
2199        } else if (name.equals("operation")) {
2200          this.getOperation().add((CapabilityStatement2RestResourceOperationComponent) value);
2201        } else if (name.equals("compartment")) {
2202          this.getCompartment().add(TypeConvertor.castToCanonical(value));
2203        } else
2204          return super.setProperty(name, value);
2205        return value;
2206      }
2207
2208      @Override
2209      public Base makeProperty(int hash, String name) throws FHIRException {
2210        switch (hash) {
2211        case 3357091:  return getModeElement();
2212        case 1587405498:  return getDocumentationElement();
2213        case -979207434:  return addFeature(); 
2214        case -341064690:  return addResource(); 
2215        case 1844104722:  return addInteraction(); 
2216        case -553645115:  return addSearchParam(); 
2217        case 1662702951:  return addOperation(); 
2218        case -397756334:  return addCompartmentElement();
2219        default: return super.makeProperty(hash, name);
2220        }
2221
2222      }
2223
2224      @Override
2225      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2226        switch (hash) {
2227        case 3357091: /*mode*/ return new String[] {"code"};
2228        case 1587405498: /*documentation*/ return new String[] {"markdown"};
2229        case -979207434: /*feature*/ return new String[] {};
2230        case -341064690: /*resource*/ return new String[] {};
2231        case 1844104722: /*interaction*/ return new String[] {};
2232        case -553645115: /*searchParam*/ return new String[] {"@CapabilityStatement2.rest.resource.searchParam"};
2233        case 1662702951: /*operation*/ return new String[] {"@CapabilityStatement2.rest.resource.operation"};
2234        case -397756334: /*compartment*/ return new String[] {"canonical"};
2235        default: return super.getTypesForProperty(hash, name);
2236        }
2237
2238      }
2239
2240      @Override
2241      public Base addChild(String name) throws FHIRException {
2242        if (name.equals("mode")) {
2243          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.mode");
2244        }
2245        else if (name.equals("documentation")) {
2246          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.documentation");
2247        }
2248        else if (name.equals("feature")) {
2249          return addFeature();
2250        }
2251        else if (name.equals("resource")) {
2252          return addResource();
2253        }
2254        else if (name.equals("interaction")) {
2255          return addInteraction();
2256        }
2257        else if (name.equals("searchParam")) {
2258          return addSearchParam();
2259        }
2260        else if (name.equals("operation")) {
2261          return addOperation();
2262        }
2263        else if (name.equals("compartment")) {
2264          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.compartment");
2265        }
2266        else
2267          return super.addChild(name);
2268      }
2269
2270      public CapabilityStatement2RestComponent copy() {
2271        CapabilityStatement2RestComponent dst = new CapabilityStatement2RestComponent();
2272        copyValues(dst);
2273        return dst;
2274      }
2275
2276      public void copyValues(CapabilityStatement2RestComponent dst) {
2277        super.copyValues(dst);
2278        dst.mode = mode == null ? null : mode.copy();
2279        dst.documentation = documentation == null ? null : documentation.copy();
2280        if (feature != null) {
2281          dst.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
2282          for (CapabilityStatement2RestFeatureComponent i : feature)
2283            dst.feature.add(i.copy());
2284        };
2285        if (resource != null) {
2286          dst.resource = new ArrayList<CapabilityStatement2RestResourceComponent>();
2287          for (CapabilityStatement2RestResourceComponent i : resource)
2288            dst.resource.add(i.copy());
2289        };
2290        if (interaction != null) {
2291          dst.interaction = new ArrayList<SystemInteractionComponent>();
2292          for (SystemInteractionComponent i : interaction)
2293            dst.interaction.add(i.copy());
2294        };
2295        if (searchParam != null) {
2296          dst.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
2297          for (CapabilityStatement2RestResourceSearchParamComponent i : searchParam)
2298            dst.searchParam.add(i.copy());
2299        };
2300        if (operation != null) {
2301          dst.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
2302          for (CapabilityStatement2RestResourceOperationComponent i : operation)
2303            dst.operation.add(i.copy());
2304        };
2305        if (compartment != null) {
2306          dst.compartment = new ArrayList<CanonicalType>();
2307          for (CanonicalType i : compartment)
2308            dst.compartment.add(i.copy());
2309        };
2310      }
2311
2312      @Override
2313      public boolean equalsDeep(Base other_) {
2314        if (!super.equalsDeep(other_))
2315          return false;
2316        if (!(other_ instanceof CapabilityStatement2RestComponent))
2317          return false;
2318        CapabilityStatement2RestComponent o = (CapabilityStatement2RestComponent) other_;
2319        return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(feature, o.feature, true)
2320           && compareDeep(resource, o.resource, true) && compareDeep(interaction, o.interaction, true) && compareDeep(searchParam, o.searchParam, true)
2321           && compareDeep(operation, o.operation, true) && compareDeep(compartment, o.compartment, true);
2322      }
2323
2324      @Override
2325      public boolean equalsShallow(Base other_) {
2326        if (!super.equalsShallow(other_))
2327          return false;
2328        if (!(other_ instanceof CapabilityStatement2RestComponent))
2329          return false;
2330        CapabilityStatement2RestComponent o = (CapabilityStatement2RestComponent) other_;
2331        return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true) && compareValues(compartment, o.compartment, true)
2332          ;
2333      }
2334
2335      public boolean isEmpty() {
2336        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, documentation, feature
2337          , resource, interaction, searchParam, operation, compartment);
2338      }
2339
2340  public String fhirType() {
2341    return "CapabilityStatement2.rest";
2342
2343  }
2344
2345  }
2346
2347    @Block()
2348    public static class CapabilityStatement2RestFeatureComponent extends BackboneElement implements IBaseBackboneElement {
2349        /**
2350         * A code that describes the feature being reported on.
2351         */
2352        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2353        @Description(shortDefinition="Feature that is being reported", formalDefinition="A code that describes the feature being reported on." )
2354        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/capability-feature")
2355        protected Enumeration<CapabilityFeature> code;
2356
2357        /**
2358         * A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.
2359         */
2360        @Child(name = "value", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2361        @Description(shortDefinition="Value of the feature (true, false, or a code)", formalDefinition="A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code." )
2362        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/capability-feature-value")
2363        protected Enumeration<CapabilityFeatureValue> value;
2364
2365        private static final long serialVersionUID = 782619829L;
2366
2367    /**
2368     * Constructor
2369     */
2370      public CapabilityStatement2RestFeatureComponent() {
2371        super();
2372      }
2373
2374    /**
2375     * Constructor
2376     */
2377      public CapabilityStatement2RestFeatureComponent(CapabilityFeature code, CapabilityFeatureValue value) {
2378        super();
2379        this.setCode(code);
2380        this.setValue(value);
2381      }
2382
2383        /**
2384         * @return {@link #code} (A code that describes the feature being reported on.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2385         */
2386        public Enumeration<CapabilityFeature> getCodeElement() { 
2387          if (this.code == null)
2388            if (Configuration.errorOnAutoCreate())
2389              throw new Error("Attempt to auto-create CapabilityStatement2RestFeatureComponent.code");
2390            else if (Configuration.doAutoCreate())
2391              this.code = new Enumeration<CapabilityFeature>(new CapabilityFeatureEnumFactory()); // bb
2392          return this.code;
2393        }
2394
2395        public boolean hasCodeElement() { 
2396          return this.code != null && !this.code.isEmpty();
2397        }
2398
2399        public boolean hasCode() { 
2400          return this.code != null && !this.code.isEmpty();
2401        }
2402
2403        /**
2404         * @param value {@link #code} (A code that describes the feature being reported on.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2405         */
2406        public CapabilityStatement2RestFeatureComponent setCodeElement(Enumeration<CapabilityFeature> value) { 
2407          this.code = value;
2408          return this;
2409        }
2410
2411        /**
2412         * @return A code that describes the feature being reported on.
2413         */
2414        public CapabilityFeature getCode() { 
2415          return this.code == null ? null : this.code.getValue();
2416        }
2417
2418        /**
2419         * @param value A code that describes the feature being reported on.
2420         */
2421        public CapabilityStatement2RestFeatureComponent setCode(CapabilityFeature value) { 
2422            if (this.code == null)
2423              this.code = new Enumeration<CapabilityFeature>(new CapabilityFeatureEnumFactory());
2424            this.code.setValue(value);
2425          return this;
2426        }
2427
2428        /**
2429         * @return {@link #value} (A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
2430         */
2431        public Enumeration<CapabilityFeatureValue> getValueElement() { 
2432          if (this.value == null)
2433            if (Configuration.errorOnAutoCreate())
2434              throw new Error("Attempt to auto-create CapabilityStatement2RestFeatureComponent.value");
2435            else if (Configuration.doAutoCreate())
2436              this.value = new Enumeration<CapabilityFeatureValue>(new CapabilityFeatureValueEnumFactory()); // bb
2437          return this.value;
2438        }
2439
2440        public boolean hasValueElement() { 
2441          return this.value != null && !this.value.isEmpty();
2442        }
2443
2444        public boolean hasValue() { 
2445          return this.value != null && !this.value.isEmpty();
2446        }
2447
2448        /**
2449         * @param value {@link #value} (A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
2450         */
2451        public CapabilityStatement2RestFeatureComponent setValueElement(Enumeration<CapabilityFeatureValue> value) { 
2452          this.value = value;
2453          return this;
2454        }
2455
2456        /**
2457         * @return A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.
2458         */
2459        public CapabilityFeatureValue getValue() { 
2460          return this.value == null ? null : this.value.getValue();
2461        }
2462
2463        /**
2464         * @param value A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.
2465         */
2466        public CapabilityStatement2RestFeatureComponent setValue(CapabilityFeatureValue value) { 
2467            if (this.value == null)
2468              this.value = new Enumeration<CapabilityFeatureValue>(new CapabilityFeatureValueEnumFactory());
2469            this.value.setValue(value);
2470          return this;
2471        }
2472
2473        protected void listChildren(List<Property> children) {
2474          super.listChildren(children);
2475          children.add(new Property("code", "code", "A code that describes the feature being reported on.", 0, 1, code));
2476          children.add(new Property("value", "code", "A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.", 0, 1, value));
2477        }
2478
2479        @Override
2480        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2481          switch (_hash) {
2482          case 3059181: /*code*/  return new Property("code", "code", "A code that describes the feature being reported on.", 0, 1, code);
2483          case 111972721: /*value*/  return new Property("value", "code", "A value for the feature - maybe true, false, or one of the set of codes allowed in the definition of the feature code.", 0, 1, value);
2484          default: return super.getNamedProperty(_hash, _name, _checkValid);
2485          }
2486
2487        }
2488
2489      @Override
2490      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2491        switch (hash) {
2492        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<CapabilityFeature>
2493        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Enumeration<CapabilityFeatureValue>
2494        default: return super.getProperty(hash, name, checkValid);
2495        }
2496
2497      }
2498
2499      @Override
2500      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2501        switch (hash) {
2502        case 3059181: // code
2503          value = new CapabilityFeatureEnumFactory().fromType(TypeConvertor.castToCode(value));
2504          this.code = (Enumeration) value; // Enumeration<CapabilityFeature>
2505          return value;
2506        case 111972721: // value
2507          value = new CapabilityFeatureValueEnumFactory().fromType(TypeConvertor.castToCode(value));
2508          this.value = (Enumeration) value; // Enumeration<CapabilityFeatureValue>
2509          return value;
2510        default: return super.setProperty(hash, name, value);
2511        }
2512
2513      }
2514
2515      @Override
2516      public Base setProperty(String name, Base value) throws FHIRException {
2517        if (name.equals("code")) {
2518          value = new CapabilityFeatureEnumFactory().fromType(TypeConvertor.castToCode(value));
2519          this.code = (Enumeration) value; // Enumeration<CapabilityFeature>
2520        } else if (name.equals("value")) {
2521          value = new CapabilityFeatureValueEnumFactory().fromType(TypeConvertor.castToCode(value));
2522          this.value = (Enumeration) value; // Enumeration<CapabilityFeatureValue>
2523        } else
2524          return super.setProperty(name, value);
2525        return value;
2526      }
2527
2528      @Override
2529      public Base makeProperty(int hash, String name) throws FHIRException {
2530        switch (hash) {
2531        case 3059181:  return getCodeElement();
2532        case 111972721:  return getValueElement();
2533        default: return super.makeProperty(hash, name);
2534        }
2535
2536      }
2537
2538      @Override
2539      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2540        switch (hash) {
2541        case 3059181: /*code*/ return new String[] {"code"};
2542        case 111972721: /*value*/ return new String[] {"code"};
2543        default: return super.getTypesForProperty(hash, name);
2544        }
2545
2546      }
2547
2548      @Override
2549      public Base addChild(String name) throws FHIRException {
2550        if (name.equals("code")) {
2551          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.feature.code");
2552        }
2553        else if (name.equals("value")) {
2554          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.feature.value");
2555        }
2556        else
2557          return super.addChild(name);
2558      }
2559
2560      public CapabilityStatement2RestFeatureComponent copy() {
2561        CapabilityStatement2RestFeatureComponent dst = new CapabilityStatement2RestFeatureComponent();
2562        copyValues(dst);
2563        return dst;
2564      }
2565
2566      public void copyValues(CapabilityStatement2RestFeatureComponent dst) {
2567        super.copyValues(dst);
2568        dst.code = code == null ? null : code.copy();
2569        dst.value = value == null ? null : value.copy();
2570      }
2571
2572      @Override
2573      public boolean equalsDeep(Base other_) {
2574        if (!super.equalsDeep(other_))
2575          return false;
2576        if (!(other_ instanceof CapabilityStatement2RestFeatureComponent))
2577          return false;
2578        CapabilityStatement2RestFeatureComponent o = (CapabilityStatement2RestFeatureComponent) other_;
2579        return compareDeep(code, o.code, true) && compareDeep(value, o.value, true);
2580      }
2581
2582      @Override
2583      public boolean equalsShallow(Base other_) {
2584        if (!super.equalsShallow(other_))
2585          return false;
2586        if (!(other_ instanceof CapabilityStatement2RestFeatureComponent))
2587          return false;
2588        CapabilityStatement2RestFeatureComponent o = (CapabilityStatement2RestFeatureComponent) other_;
2589        return compareValues(code, o.code, true) && compareValues(value, o.value, true);
2590      }
2591
2592      public boolean isEmpty() {
2593        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value);
2594      }
2595
2596  public String fhirType() {
2597    return "CapabilityStatement2.rest.feature";
2598
2599  }
2600
2601  }
2602
2603    @Block()
2604    public static class CapabilityStatement2RestResourceComponent extends BackboneElement implements IBaseBackboneElement {
2605        /**
2606         * A type of resource exposed via the restful interface.
2607         */
2608        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
2609        @Description(shortDefinition="A resource type that is supported", formalDefinition="A type of resource exposed via the restful interface." )
2610        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
2611        protected CodeType type;
2612
2613        /**
2614         * A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).
2615         */
2616        @Child(name = "profile", type = {CanonicalType.class}, order=2, min=0, max=1, modifier=false, summary=true)
2617        @Description(shortDefinition="Base System profile for all uses of resource", formalDefinition="A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses)." )
2618        protected CanonicalType profile;
2619
2620        /**
2621         * A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).
2622         */
2623        @Child(name = "supportedProfile", type = {CanonicalType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2624        @Description(shortDefinition="Profiles for use cases supported", formalDefinition="A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses)." )
2625        protected List<CanonicalType> supportedProfile;
2626
2627        /**
2628         * Additional information about the resource type used by the system.
2629         */
2630        @Child(name = "documentation", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2631        @Description(shortDefinition="Additional information about the use of the resource type", formalDefinition="Additional information about the resource type used by the system." )
2632        protected MarkdownType documentation;
2633
2634        /**
2635         * A statement that affirms support for a feature, in this context.
2636         */
2637        @Child(name = "feature", type = {CapabilityStatement2RestFeatureComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2638        @Description(shortDefinition="Statement of support for a feature in this context", formalDefinition="A statement that affirms support for a feature, in this context." )
2639        protected List<CapabilityStatement2RestFeatureComponent> feature;
2640
2641        /**
2642         * Identifies a restful operation supported by the solution.
2643         */
2644        @Child(name = "interaction", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2645        @Description(shortDefinition="What operations are supported?", formalDefinition="Identifies a restful operation supported by the solution." )
2646        protected List<ResourceInteractionComponent> interaction;
2647
2648        /**
2649         * Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.
2650         */
2651        @Child(name = "searchParam", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2652        @Description(shortDefinition="Search parameters supported by implementation", formalDefinition="Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." )
2653        protected List<CapabilityStatement2RestResourceSearchParamComponent> searchParam;
2654
2655        /**
2656         * Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.
2657         */
2658        @Child(name = "operation", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2659        @Description(shortDefinition="Definition of a resource operation", formalDefinition="Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters." )
2660        protected List<CapabilityStatement2RestResourceOperationComponent> operation;
2661
2662        private static final long serialVersionUID = -815167785L;
2663
2664    /**
2665     * Constructor
2666     */
2667      public CapabilityStatement2RestResourceComponent() {
2668        super();
2669      }
2670
2671    /**
2672     * Constructor
2673     */
2674      public CapabilityStatement2RestResourceComponent(String type) {
2675        super();
2676        this.setType(type);
2677      }
2678
2679        /**
2680         * @return {@link #type} (A type of resource exposed via the restful interface.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2681         */
2682        public CodeType getTypeElement() { 
2683          if (this.type == null)
2684            if (Configuration.errorOnAutoCreate())
2685              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceComponent.type");
2686            else if (Configuration.doAutoCreate())
2687              this.type = new CodeType(); // bb
2688          return this.type;
2689        }
2690
2691        public boolean hasTypeElement() { 
2692          return this.type != null && !this.type.isEmpty();
2693        }
2694
2695        public boolean hasType() { 
2696          return this.type != null && !this.type.isEmpty();
2697        }
2698
2699        /**
2700         * @param value {@link #type} (A type of resource exposed via the restful interface.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2701         */
2702        public CapabilityStatement2RestResourceComponent setTypeElement(CodeType value) { 
2703          this.type = value;
2704          return this;
2705        }
2706
2707        /**
2708         * @return A type of resource exposed via the restful interface.
2709         */
2710        public String getType() { 
2711          return this.type == null ? null : this.type.getValue();
2712        }
2713
2714        /**
2715         * @param value A type of resource exposed via the restful interface.
2716         */
2717        public CapabilityStatement2RestResourceComponent setType(String value) { 
2718            if (this.type == null)
2719              this.type = new CodeType();
2720            this.type.setValue(value);
2721          return this;
2722        }
2723
2724        /**
2725         * @return {@link #profile} (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value
2726         */
2727        public CanonicalType getProfileElement() { 
2728          if (this.profile == null)
2729            if (Configuration.errorOnAutoCreate())
2730              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceComponent.profile");
2731            else if (Configuration.doAutoCreate())
2732              this.profile = new CanonicalType(); // bb
2733          return this.profile;
2734        }
2735
2736        public boolean hasProfileElement() { 
2737          return this.profile != null && !this.profile.isEmpty();
2738        }
2739
2740        public boolean hasProfile() { 
2741          return this.profile != null && !this.profile.isEmpty();
2742        }
2743
2744        /**
2745         * @param value {@link #profile} (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value
2746         */
2747        public CapabilityStatement2RestResourceComponent setProfileElement(CanonicalType value) { 
2748          this.profile = value;
2749          return this;
2750        }
2751
2752        /**
2753         * @return A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).
2754         */
2755        public String getProfile() { 
2756          return this.profile == null ? null : this.profile.getValue();
2757        }
2758
2759        /**
2760         * @param value A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).
2761         */
2762        public CapabilityStatement2RestResourceComponent setProfile(String value) { 
2763          if (Utilities.noString(value))
2764            this.profile = null;
2765          else {
2766            if (this.profile == null)
2767              this.profile = new CanonicalType();
2768            this.profile.setValue(value);
2769          }
2770          return this;
2771        }
2772
2773        /**
2774         * @return {@link #supportedProfile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).)
2775         */
2776        public List<CanonicalType> getSupportedProfile() { 
2777          if (this.supportedProfile == null)
2778            this.supportedProfile = new ArrayList<CanonicalType>();
2779          return this.supportedProfile;
2780        }
2781
2782        /**
2783         * @return Returns a reference to <code>this</code> for easy method chaining
2784         */
2785        public CapabilityStatement2RestResourceComponent setSupportedProfile(List<CanonicalType> theSupportedProfile) { 
2786          this.supportedProfile = theSupportedProfile;
2787          return this;
2788        }
2789
2790        public boolean hasSupportedProfile() { 
2791          if (this.supportedProfile == null)
2792            return false;
2793          for (CanonicalType item : this.supportedProfile)
2794            if (!item.isEmpty())
2795              return true;
2796          return false;
2797        }
2798
2799        /**
2800         * @return {@link #supportedProfile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).)
2801         */
2802        public CanonicalType addSupportedProfileElement() {//2 
2803          CanonicalType t = new CanonicalType();
2804          if (this.supportedProfile == null)
2805            this.supportedProfile = new ArrayList<CanonicalType>();
2806          this.supportedProfile.add(t);
2807          return t;
2808        }
2809
2810        /**
2811         * @param value {@link #supportedProfile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).)
2812         */
2813        public CapabilityStatement2RestResourceComponent addSupportedProfile(String value) { //1
2814          CanonicalType t = new CanonicalType();
2815          t.setValue(value);
2816          if (this.supportedProfile == null)
2817            this.supportedProfile = new ArrayList<CanonicalType>();
2818          this.supportedProfile.add(t);
2819          return this;
2820        }
2821
2822        /**
2823         * @param value {@link #supportedProfile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).)
2824         */
2825        public boolean hasSupportedProfile(String value) { 
2826          if (this.supportedProfile == null)
2827            return false;
2828          for (CanonicalType v : this.supportedProfile)
2829            if (v.getValue().equals(value)) // canonical
2830              return true;
2831          return false;
2832        }
2833
2834        /**
2835         * @return {@link #documentation} (Additional information about the resource type used by the system.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
2836         */
2837        public MarkdownType getDocumentationElement() { 
2838          if (this.documentation == null)
2839            if (Configuration.errorOnAutoCreate())
2840              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceComponent.documentation");
2841            else if (Configuration.doAutoCreate())
2842              this.documentation = new MarkdownType(); // bb
2843          return this.documentation;
2844        }
2845
2846        public boolean hasDocumentationElement() { 
2847          return this.documentation != null && !this.documentation.isEmpty();
2848        }
2849
2850        public boolean hasDocumentation() { 
2851          return this.documentation != null && !this.documentation.isEmpty();
2852        }
2853
2854        /**
2855         * @param value {@link #documentation} (Additional information about the resource type used by the system.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
2856         */
2857        public CapabilityStatement2RestResourceComponent setDocumentationElement(MarkdownType value) { 
2858          this.documentation = value;
2859          return this;
2860        }
2861
2862        /**
2863         * @return Additional information about the resource type used by the system.
2864         */
2865        public String getDocumentation() { 
2866          return this.documentation == null ? null : this.documentation.getValue();
2867        }
2868
2869        /**
2870         * @param value Additional information about the resource type used by the system.
2871         */
2872        public CapabilityStatement2RestResourceComponent setDocumentation(String value) { 
2873          if (value == null)
2874            this.documentation = null;
2875          else {
2876            if (this.documentation == null)
2877              this.documentation = new MarkdownType();
2878            this.documentation.setValue(value);
2879          }
2880          return this;
2881        }
2882
2883        /**
2884         * @return {@link #feature} (A statement that affirms support for a feature, in this context.)
2885         */
2886        public List<CapabilityStatement2RestFeatureComponent> getFeature() { 
2887          if (this.feature == null)
2888            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
2889          return this.feature;
2890        }
2891
2892        /**
2893         * @return Returns a reference to <code>this</code> for easy method chaining
2894         */
2895        public CapabilityStatement2RestResourceComponent setFeature(List<CapabilityStatement2RestFeatureComponent> theFeature) { 
2896          this.feature = theFeature;
2897          return this;
2898        }
2899
2900        public boolean hasFeature() { 
2901          if (this.feature == null)
2902            return false;
2903          for (CapabilityStatement2RestFeatureComponent item : this.feature)
2904            if (!item.isEmpty())
2905              return true;
2906          return false;
2907        }
2908
2909        public CapabilityStatement2RestFeatureComponent addFeature() { //3
2910          CapabilityStatement2RestFeatureComponent t = new CapabilityStatement2RestFeatureComponent();
2911          if (this.feature == null)
2912            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
2913          this.feature.add(t);
2914          return t;
2915        }
2916
2917        public CapabilityStatement2RestResourceComponent addFeature(CapabilityStatement2RestFeatureComponent t) { //3
2918          if (t == null)
2919            return this;
2920          if (this.feature == null)
2921            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
2922          this.feature.add(t);
2923          return this;
2924        }
2925
2926        /**
2927         * @return The first repetition of repeating field {@link #feature}, creating it if it does not already exist {3}
2928         */
2929        public CapabilityStatement2RestFeatureComponent getFeatureFirstRep() { 
2930          if (getFeature().isEmpty()) {
2931            addFeature();
2932          }
2933          return getFeature().get(0);
2934        }
2935
2936        /**
2937         * @return {@link #interaction} (Identifies a restful operation supported by the solution.)
2938         */
2939        public List<ResourceInteractionComponent> getInteraction() { 
2940          if (this.interaction == null)
2941            this.interaction = new ArrayList<ResourceInteractionComponent>();
2942          return this.interaction;
2943        }
2944
2945        /**
2946         * @return Returns a reference to <code>this</code> for easy method chaining
2947         */
2948        public CapabilityStatement2RestResourceComponent setInteraction(List<ResourceInteractionComponent> theInteraction) { 
2949          this.interaction = theInteraction;
2950          return this;
2951        }
2952
2953        public boolean hasInteraction() { 
2954          if (this.interaction == null)
2955            return false;
2956          for (ResourceInteractionComponent item : this.interaction)
2957            if (!item.isEmpty())
2958              return true;
2959          return false;
2960        }
2961
2962        public ResourceInteractionComponent addInteraction() { //3
2963          ResourceInteractionComponent t = new ResourceInteractionComponent();
2964          if (this.interaction == null)
2965            this.interaction = new ArrayList<ResourceInteractionComponent>();
2966          this.interaction.add(t);
2967          return t;
2968        }
2969
2970        public CapabilityStatement2RestResourceComponent addInteraction(ResourceInteractionComponent t) { //3
2971          if (t == null)
2972            return this;
2973          if (this.interaction == null)
2974            this.interaction = new ArrayList<ResourceInteractionComponent>();
2975          this.interaction.add(t);
2976          return this;
2977        }
2978
2979        /**
2980         * @return The first repetition of repeating field {@link #interaction}, creating it if it does not already exist {3}
2981         */
2982        public ResourceInteractionComponent getInteractionFirstRep() { 
2983          if (getInteraction().isEmpty()) {
2984            addInteraction();
2985          }
2986          return getInteraction().get(0);
2987        }
2988
2989        /**
2990         * @return {@link #searchParam} (Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.)
2991         */
2992        public List<CapabilityStatement2RestResourceSearchParamComponent> getSearchParam() { 
2993          if (this.searchParam == null)
2994            this.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
2995          return this.searchParam;
2996        }
2997
2998        /**
2999         * @return Returns a reference to <code>this</code> for easy method chaining
3000         */
3001        public CapabilityStatement2RestResourceComponent setSearchParam(List<CapabilityStatement2RestResourceSearchParamComponent> theSearchParam) { 
3002          this.searchParam = theSearchParam;
3003          return this;
3004        }
3005
3006        public boolean hasSearchParam() { 
3007          if (this.searchParam == null)
3008            return false;
3009          for (CapabilityStatement2RestResourceSearchParamComponent item : this.searchParam)
3010            if (!item.isEmpty())
3011              return true;
3012          return false;
3013        }
3014
3015        public CapabilityStatement2RestResourceSearchParamComponent addSearchParam() { //3
3016          CapabilityStatement2RestResourceSearchParamComponent t = new CapabilityStatement2RestResourceSearchParamComponent();
3017          if (this.searchParam == null)
3018            this.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
3019          this.searchParam.add(t);
3020          return t;
3021        }
3022
3023        public CapabilityStatement2RestResourceComponent addSearchParam(CapabilityStatement2RestResourceSearchParamComponent t) { //3
3024          if (t == null)
3025            return this;
3026          if (this.searchParam == null)
3027            this.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
3028          this.searchParam.add(t);
3029          return this;
3030        }
3031
3032        /**
3033         * @return The first repetition of repeating field {@link #searchParam}, creating it if it does not already exist {3}
3034         */
3035        public CapabilityStatement2RestResourceSearchParamComponent getSearchParamFirstRep() { 
3036          if (getSearchParam().isEmpty()) {
3037            addSearchParam();
3038          }
3039          return getSearchParam().get(0);
3040        }
3041
3042        /**
3043         * @return {@link #operation} (Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.)
3044         */
3045        public List<CapabilityStatement2RestResourceOperationComponent> getOperation() { 
3046          if (this.operation == null)
3047            this.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
3048          return this.operation;
3049        }
3050
3051        /**
3052         * @return Returns a reference to <code>this</code> for easy method chaining
3053         */
3054        public CapabilityStatement2RestResourceComponent setOperation(List<CapabilityStatement2RestResourceOperationComponent> theOperation) { 
3055          this.operation = theOperation;
3056          return this;
3057        }
3058
3059        public boolean hasOperation() { 
3060          if (this.operation == null)
3061            return false;
3062          for (CapabilityStatement2RestResourceOperationComponent item : this.operation)
3063            if (!item.isEmpty())
3064              return true;
3065          return false;
3066        }
3067
3068        public CapabilityStatement2RestResourceOperationComponent addOperation() { //3
3069          CapabilityStatement2RestResourceOperationComponent t = new CapabilityStatement2RestResourceOperationComponent();
3070          if (this.operation == null)
3071            this.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
3072          this.operation.add(t);
3073          return t;
3074        }
3075
3076        public CapabilityStatement2RestResourceComponent addOperation(CapabilityStatement2RestResourceOperationComponent t) { //3
3077          if (t == null)
3078            return this;
3079          if (this.operation == null)
3080            this.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
3081          this.operation.add(t);
3082          return this;
3083        }
3084
3085        /**
3086         * @return The first repetition of repeating field {@link #operation}, creating it if it does not already exist {3}
3087         */
3088        public CapabilityStatement2RestResourceOperationComponent getOperationFirstRep() { 
3089          if (getOperation().isEmpty()) {
3090            addOperation();
3091          }
3092          return getOperation().get(0);
3093        }
3094
3095        protected void listChildren(List<Property> children) {
3096          super.listChildren(children);
3097          children.add(new Property("type", "code", "A type of resource exposed via the restful interface.", 0, 1, type));
3098          children.add(new Property("profile", "canonical(StructureDefinition)", "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", 0, 1, profile));
3099          children.add(new Property("supportedProfile", "canonical(StructureDefinition)", "A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", 0, java.lang.Integer.MAX_VALUE, supportedProfile));
3100          children.add(new Property("documentation", "markdown", "Additional information about the resource type used by the system.", 0, 1, documentation));
3101          children.add(new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature));
3102          children.add(new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction));
3103          children.add(new Property("searchParam", "", "Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam));
3104          children.add(new Property("operation", "", "Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.", 0, java.lang.Integer.MAX_VALUE, operation));
3105        }
3106
3107        @Override
3108        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3109          switch (_hash) {
3110          case 3575610: /*type*/  return new Property("type", "code", "A type of resource exposed via the restful interface.", 0, 1, type);
3111          case -309425751: /*profile*/  return new Property("profile", "canonical(StructureDefinition)", "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", 0, 1, profile);
3112          case 1225477403: /*supportedProfile*/  return new Property("supportedProfile", "canonical(StructureDefinition)", "A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", 0, java.lang.Integer.MAX_VALUE, supportedProfile);
3113          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Additional information about the resource type used by the system.", 0, 1, documentation);
3114          case -979207434: /*feature*/  return new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature);
3115          case 1844104722: /*interaction*/  return new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction);
3116          case -553645115: /*searchParam*/  return new Property("searchParam", "", "Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam);
3117          case 1662702951: /*operation*/  return new Property("operation", "", "Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.", 0, java.lang.Integer.MAX_VALUE, operation);
3118          default: return super.getNamedProperty(_hash, _name, _checkValid);
3119          }
3120
3121        }
3122
3123      @Override
3124      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3125        switch (hash) {
3126        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
3127        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // CanonicalType
3128        case 1225477403: /*supportedProfile*/ return this.supportedProfile == null ? new Base[0] : this.supportedProfile.toArray(new Base[this.supportedProfile.size()]); // CanonicalType
3129        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
3130        case -979207434: /*feature*/ return this.feature == null ? new Base[0] : this.feature.toArray(new Base[this.feature.size()]); // CapabilityStatement2RestFeatureComponent
3131        case 1844104722: /*interaction*/ return this.interaction == null ? new Base[0] : this.interaction.toArray(new Base[this.interaction.size()]); // ResourceInteractionComponent
3132        case -553645115: /*searchParam*/ return this.searchParam == null ? new Base[0] : this.searchParam.toArray(new Base[this.searchParam.size()]); // CapabilityStatement2RestResourceSearchParamComponent
3133        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : this.operation.toArray(new Base[this.operation.size()]); // CapabilityStatement2RestResourceOperationComponent
3134        default: return super.getProperty(hash, name, checkValid);
3135        }
3136
3137      }
3138
3139      @Override
3140      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3141        switch (hash) {
3142        case 3575610: // type
3143          this.type = TypeConvertor.castToCode(value); // CodeType
3144          return value;
3145        case -309425751: // profile
3146          this.profile = TypeConvertor.castToCanonical(value); // CanonicalType
3147          return value;
3148        case 1225477403: // supportedProfile
3149          this.getSupportedProfile().add(TypeConvertor.castToCanonical(value)); // CanonicalType
3150          return value;
3151        case 1587405498: // documentation
3152          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
3153          return value;
3154        case -979207434: // feature
3155          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value); // CapabilityStatement2RestFeatureComponent
3156          return value;
3157        case 1844104722: // interaction
3158          this.getInteraction().add((ResourceInteractionComponent) value); // ResourceInteractionComponent
3159          return value;
3160        case -553645115: // searchParam
3161          this.getSearchParam().add((CapabilityStatement2RestResourceSearchParamComponent) value); // CapabilityStatement2RestResourceSearchParamComponent
3162          return value;
3163        case 1662702951: // operation
3164          this.getOperation().add((CapabilityStatement2RestResourceOperationComponent) value); // CapabilityStatement2RestResourceOperationComponent
3165          return value;
3166        default: return super.setProperty(hash, name, value);
3167        }
3168
3169      }
3170
3171      @Override
3172      public Base setProperty(String name, Base value) throws FHIRException {
3173        if (name.equals("type")) {
3174          this.type = TypeConvertor.castToCode(value); // CodeType
3175        } else if (name.equals("profile")) {
3176          this.profile = TypeConvertor.castToCanonical(value); // CanonicalType
3177        } else if (name.equals("supportedProfile")) {
3178          this.getSupportedProfile().add(TypeConvertor.castToCanonical(value));
3179        } else if (name.equals("documentation")) {
3180          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
3181        } else if (name.equals("feature")) {
3182          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value);
3183        } else if (name.equals("interaction")) {
3184          this.getInteraction().add((ResourceInteractionComponent) value);
3185        } else if (name.equals("searchParam")) {
3186          this.getSearchParam().add((CapabilityStatement2RestResourceSearchParamComponent) value);
3187        } else if (name.equals("operation")) {
3188          this.getOperation().add((CapabilityStatement2RestResourceOperationComponent) value);
3189        } else
3190          return super.setProperty(name, value);
3191        return value;
3192      }
3193
3194      @Override
3195      public Base makeProperty(int hash, String name) throws FHIRException {
3196        switch (hash) {
3197        case 3575610:  return getTypeElement();
3198        case -309425751:  return getProfileElement();
3199        case 1225477403:  return addSupportedProfileElement();
3200        case 1587405498:  return getDocumentationElement();
3201        case -979207434:  return addFeature(); 
3202        case 1844104722:  return addInteraction(); 
3203        case -553645115:  return addSearchParam(); 
3204        case 1662702951:  return addOperation(); 
3205        default: return super.makeProperty(hash, name);
3206        }
3207
3208      }
3209
3210      @Override
3211      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3212        switch (hash) {
3213        case 3575610: /*type*/ return new String[] {"code"};
3214        case -309425751: /*profile*/ return new String[] {"canonical"};
3215        case 1225477403: /*supportedProfile*/ return new String[] {"canonical"};
3216        case 1587405498: /*documentation*/ return new String[] {"markdown"};
3217        case -979207434: /*feature*/ return new String[] {"@CapabilityStatement2.rest.feature"};
3218        case 1844104722: /*interaction*/ return new String[] {};
3219        case -553645115: /*searchParam*/ return new String[] {};
3220        case 1662702951: /*operation*/ return new String[] {};
3221        default: return super.getTypesForProperty(hash, name);
3222        }
3223
3224      }
3225
3226      @Override
3227      public Base addChild(String name) throws FHIRException {
3228        if (name.equals("type")) {
3229          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.type");
3230        }
3231        else if (name.equals("profile")) {
3232          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.profile");
3233        }
3234        else if (name.equals("supportedProfile")) {
3235          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.supportedProfile");
3236        }
3237        else if (name.equals("documentation")) {
3238          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.documentation");
3239        }
3240        else if (name.equals("feature")) {
3241          return addFeature();
3242        }
3243        else if (name.equals("interaction")) {
3244          return addInteraction();
3245        }
3246        else if (name.equals("searchParam")) {
3247          return addSearchParam();
3248        }
3249        else if (name.equals("operation")) {
3250          return addOperation();
3251        }
3252        else
3253          return super.addChild(name);
3254      }
3255
3256      public CapabilityStatement2RestResourceComponent copy() {
3257        CapabilityStatement2RestResourceComponent dst = new CapabilityStatement2RestResourceComponent();
3258        copyValues(dst);
3259        return dst;
3260      }
3261
3262      public void copyValues(CapabilityStatement2RestResourceComponent dst) {
3263        super.copyValues(dst);
3264        dst.type = type == null ? null : type.copy();
3265        dst.profile = profile == null ? null : profile.copy();
3266        if (supportedProfile != null) {
3267          dst.supportedProfile = new ArrayList<CanonicalType>();
3268          for (CanonicalType i : supportedProfile)
3269            dst.supportedProfile.add(i.copy());
3270        };
3271        dst.documentation = documentation == null ? null : documentation.copy();
3272        if (feature != null) {
3273          dst.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3274          for (CapabilityStatement2RestFeatureComponent i : feature)
3275            dst.feature.add(i.copy());
3276        };
3277        if (interaction != null) {
3278          dst.interaction = new ArrayList<ResourceInteractionComponent>();
3279          for (ResourceInteractionComponent i : interaction)
3280            dst.interaction.add(i.copy());
3281        };
3282        if (searchParam != null) {
3283          dst.searchParam = new ArrayList<CapabilityStatement2RestResourceSearchParamComponent>();
3284          for (CapabilityStatement2RestResourceSearchParamComponent i : searchParam)
3285            dst.searchParam.add(i.copy());
3286        };
3287        if (operation != null) {
3288          dst.operation = new ArrayList<CapabilityStatement2RestResourceOperationComponent>();
3289          for (CapabilityStatement2RestResourceOperationComponent i : operation)
3290            dst.operation.add(i.copy());
3291        };
3292      }
3293
3294      @Override
3295      public boolean equalsDeep(Base other_) {
3296        if (!super.equalsDeep(other_))
3297          return false;
3298        if (!(other_ instanceof CapabilityStatement2RestResourceComponent))
3299          return false;
3300        CapabilityStatement2RestResourceComponent o = (CapabilityStatement2RestResourceComponent) other_;
3301        return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(supportedProfile, o.supportedProfile, true)
3302           && compareDeep(documentation, o.documentation, true) && compareDeep(feature, o.feature, true) && compareDeep(interaction, o.interaction, true)
3303           && compareDeep(searchParam, o.searchParam, true) && compareDeep(operation, o.operation, true);
3304      }
3305
3306      @Override
3307      public boolean equalsShallow(Base other_) {
3308        if (!super.equalsShallow(other_))
3309          return false;
3310        if (!(other_ instanceof CapabilityStatement2RestResourceComponent))
3311          return false;
3312        CapabilityStatement2RestResourceComponent o = (CapabilityStatement2RestResourceComponent) other_;
3313        return compareValues(type, o.type, true) && compareValues(profile, o.profile, true) && compareValues(supportedProfile, o.supportedProfile, true)
3314           && compareValues(documentation, o.documentation, true);
3315      }
3316
3317      public boolean isEmpty() {
3318        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile, supportedProfile
3319          , documentation, feature, interaction, searchParam, operation);
3320      }
3321
3322  public String fhirType() {
3323    return "CapabilityStatement2.rest.resource";
3324
3325  }
3326
3327  }
3328
3329    @Block()
3330    public static class ResourceInteractionComponent extends BackboneElement implements IBaseBackboneElement {
3331        /**
3332         * Coded identifier of the operation, supported by the system resource.
3333         */
3334        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3335        @Description(shortDefinition="read | vread | update | patch | delete | history-instance | history-type | create | search-type", formalDefinition="Coded identifier of the operation, supported by the system resource." )
3336        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/type-restful-interaction")
3337        protected Enumeration<TypeRestfulInteraction> code;
3338
3339        /**
3340         * Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.
3341         */
3342        @Child(name = "documentation", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3343        @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'." )
3344        protected MarkdownType documentation;
3345
3346        /**
3347         * A statement that affirms support for a feature, in this context.
3348         */
3349        @Child(name = "feature", type = {CapabilityStatement2RestFeatureComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3350        @Description(shortDefinition="Statement of support for a feature in this context", formalDefinition="A statement that affirms support for a feature, in this context." )
3351        protected List<CapabilityStatement2RestFeatureComponent> feature;
3352
3353        private static final long serialVersionUID = -543206334L;
3354
3355    /**
3356     * Constructor
3357     */
3358      public ResourceInteractionComponent() {
3359        super();
3360      }
3361
3362    /**
3363     * Constructor
3364     */
3365      public ResourceInteractionComponent(TypeRestfulInteraction code) {
3366        super();
3367        this.setCode(code);
3368      }
3369
3370        /**
3371         * @return {@link #code} (Coded identifier of the operation, supported by the system resource.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
3372         */
3373        public Enumeration<TypeRestfulInteraction> getCodeElement() { 
3374          if (this.code == null)
3375            if (Configuration.errorOnAutoCreate())
3376              throw new Error("Attempt to auto-create ResourceInteractionComponent.code");
3377            else if (Configuration.doAutoCreate())
3378              this.code = new Enumeration<TypeRestfulInteraction>(new TypeRestfulInteractionEnumFactory()); // bb
3379          return this.code;
3380        }
3381
3382        public boolean hasCodeElement() { 
3383          return this.code != null && !this.code.isEmpty();
3384        }
3385
3386        public boolean hasCode() { 
3387          return this.code != null && !this.code.isEmpty();
3388        }
3389
3390        /**
3391         * @param value {@link #code} (Coded identifier of the operation, supported by the system resource.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
3392         */
3393        public ResourceInteractionComponent setCodeElement(Enumeration<TypeRestfulInteraction> value) { 
3394          this.code = value;
3395          return this;
3396        }
3397
3398        /**
3399         * @return Coded identifier of the operation, supported by the system resource.
3400         */
3401        public TypeRestfulInteraction getCode() { 
3402          return this.code == null ? null : this.code.getValue();
3403        }
3404
3405        /**
3406         * @param value Coded identifier of the operation, supported by the system resource.
3407         */
3408        public ResourceInteractionComponent setCode(TypeRestfulInteraction value) { 
3409            if (this.code == null)
3410              this.code = new Enumeration<TypeRestfulInteraction>(new TypeRestfulInteractionEnumFactory());
3411            this.code.setValue(value);
3412          return this;
3413        }
3414
3415        /**
3416         * @return {@link #documentation} (Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
3417         */
3418        public MarkdownType getDocumentationElement() { 
3419          if (this.documentation == null)
3420            if (Configuration.errorOnAutoCreate())
3421              throw new Error("Attempt to auto-create ResourceInteractionComponent.documentation");
3422            else if (Configuration.doAutoCreate())
3423              this.documentation = new MarkdownType(); // bb
3424          return this.documentation;
3425        }
3426
3427        public boolean hasDocumentationElement() { 
3428          return this.documentation != null && !this.documentation.isEmpty();
3429        }
3430
3431        public boolean hasDocumentation() { 
3432          return this.documentation != null && !this.documentation.isEmpty();
3433        }
3434
3435        /**
3436         * @param value {@link #documentation} (Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
3437         */
3438        public ResourceInteractionComponent setDocumentationElement(MarkdownType value) { 
3439          this.documentation = value;
3440          return this;
3441        }
3442
3443        /**
3444         * @return Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.
3445         */
3446        public String getDocumentation() { 
3447          return this.documentation == null ? null : this.documentation.getValue();
3448        }
3449
3450        /**
3451         * @param value Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.
3452         */
3453        public ResourceInteractionComponent setDocumentation(String value) { 
3454          if (value == null)
3455            this.documentation = null;
3456          else {
3457            if (this.documentation == null)
3458              this.documentation = new MarkdownType();
3459            this.documentation.setValue(value);
3460          }
3461          return this;
3462        }
3463
3464        /**
3465         * @return {@link #feature} (A statement that affirms support for a feature, in this context.)
3466         */
3467        public List<CapabilityStatement2RestFeatureComponent> getFeature() { 
3468          if (this.feature == null)
3469            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3470          return this.feature;
3471        }
3472
3473        /**
3474         * @return Returns a reference to <code>this</code> for easy method chaining
3475         */
3476        public ResourceInteractionComponent setFeature(List<CapabilityStatement2RestFeatureComponent> theFeature) { 
3477          this.feature = theFeature;
3478          return this;
3479        }
3480
3481        public boolean hasFeature() { 
3482          if (this.feature == null)
3483            return false;
3484          for (CapabilityStatement2RestFeatureComponent item : this.feature)
3485            if (!item.isEmpty())
3486              return true;
3487          return false;
3488        }
3489
3490        public CapabilityStatement2RestFeatureComponent addFeature() { //3
3491          CapabilityStatement2RestFeatureComponent t = new CapabilityStatement2RestFeatureComponent();
3492          if (this.feature == null)
3493            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3494          this.feature.add(t);
3495          return t;
3496        }
3497
3498        public ResourceInteractionComponent addFeature(CapabilityStatement2RestFeatureComponent t) { //3
3499          if (t == null)
3500            return this;
3501          if (this.feature == null)
3502            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3503          this.feature.add(t);
3504          return this;
3505        }
3506
3507        /**
3508         * @return The first repetition of repeating field {@link #feature}, creating it if it does not already exist {3}
3509         */
3510        public CapabilityStatement2RestFeatureComponent getFeatureFirstRep() { 
3511          if (getFeature().isEmpty()) {
3512            addFeature();
3513          }
3514          return getFeature().get(0);
3515        }
3516
3517        protected void listChildren(List<Property> children) {
3518          super.listChildren(children);
3519          children.add(new Property("code", "code", "Coded identifier of the operation, supported by the system resource.", 0, 1, code));
3520          children.add(new Property("documentation", "markdown", "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", 0, 1, documentation));
3521          children.add(new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature));
3522        }
3523
3524        @Override
3525        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3526          switch (_hash) {
3527          case 3059181: /*code*/  return new Property("code", "code", "Coded identifier of the operation, supported by the system resource.", 0, 1, code);
3528          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", 0, 1, documentation);
3529          case -979207434: /*feature*/  return new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature);
3530          default: return super.getNamedProperty(_hash, _name, _checkValid);
3531          }
3532
3533        }
3534
3535      @Override
3536      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3537        switch (hash) {
3538        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<TypeRestfulInteraction>
3539        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
3540        case -979207434: /*feature*/ return this.feature == null ? new Base[0] : this.feature.toArray(new Base[this.feature.size()]); // CapabilityStatement2RestFeatureComponent
3541        default: return super.getProperty(hash, name, checkValid);
3542        }
3543
3544      }
3545
3546      @Override
3547      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3548        switch (hash) {
3549        case 3059181: // code
3550          value = new TypeRestfulInteractionEnumFactory().fromType(TypeConvertor.castToCode(value));
3551          this.code = (Enumeration) value; // Enumeration<TypeRestfulInteraction>
3552          return value;
3553        case 1587405498: // documentation
3554          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
3555          return value;
3556        case -979207434: // feature
3557          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value); // CapabilityStatement2RestFeatureComponent
3558          return value;
3559        default: return super.setProperty(hash, name, value);
3560        }
3561
3562      }
3563
3564      @Override
3565      public Base setProperty(String name, Base value) throws FHIRException {
3566        if (name.equals("code")) {
3567          value = new TypeRestfulInteractionEnumFactory().fromType(TypeConvertor.castToCode(value));
3568          this.code = (Enumeration) value; // Enumeration<TypeRestfulInteraction>
3569        } else if (name.equals("documentation")) {
3570          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
3571        } else if (name.equals("feature")) {
3572          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value);
3573        } else
3574          return super.setProperty(name, value);
3575        return value;
3576      }
3577
3578      @Override
3579      public Base makeProperty(int hash, String name) throws FHIRException {
3580        switch (hash) {
3581        case 3059181:  return getCodeElement();
3582        case 1587405498:  return getDocumentationElement();
3583        case -979207434:  return addFeature(); 
3584        default: return super.makeProperty(hash, name);
3585        }
3586
3587      }
3588
3589      @Override
3590      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3591        switch (hash) {
3592        case 3059181: /*code*/ return new String[] {"code"};
3593        case 1587405498: /*documentation*/ return new String[] {"markdown"};
3594        case -979207434: /*feature*/ return new String[] {"@CapabilityStatement2.rest.feature"};
3595        default: return super.getTypesForProperty(hash, name);
3596        }
3597
3598      }
3599
3600      @Override
3601      public Base addChild(String name) throws FHIRException {
3602        if (name.equals("code")) {
3603          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.interaction.code");
3604        }
3605        else if (name.equals("documentation")) {
3606          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.interaction.documentation");
3607        }
3608        else if (name.equals("feature")) {
3609          return addFeature();
3610        }
3611        else
3612          return super.addChild(name);
3613      }
3614
3615      public ResourceInteractionComponent copy() {
3616        ResourceInteractionComponent dst = new ResourceInteractionComponent();
3617        copyValues(dst);
3618        return dst;
3619      }
3620
3621      public void copyValues(ResourceInteractionComponent dst) {
3622        super.copyValues(dst);
3623        dst.code = code == null ? null : code.copy();
3624        dst.documentation = documentation == null ? null : documentation.copy();
3625        if (feature != null) {
3626          dst.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3627          for (CapabilityStatement2RestFeatureComponent i : feature)
3628            dst.feature.add(i.copy());
3629        };
3630      }
3631
3632      @Override
3633      public boolean equalsDeep(Base other_) {
3634        if (!super.equalsDeep(other_))
3635          return false;
3636        if (!(other_ instanceof ResourceInteractionComponent))
3637          return false;
3638        ResourceInteractionComponent o = (ResourceInteractionComponent) other_;
3639        return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true) && compareDeep(feature, o.feature, true)
3640          ;
3641      }
3642
3643      @Override
3644      public boolean equalsShallow(Base other_) {
3645        if (!super.equalsShallow(other_))
3646          return false;
3647        if (!(other_ instanceof ResourceInteractionComponent))
3648          return false;
3649        ResourceInteractionComponent o = (ResourceInteractionComponent) other_;
3650        return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true);
3651      }
3652
3653      public boolean isEmpty() {
3654        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, documentation, feature
3655          );
3656      }
3657
3658  public String fhirType() {
3659    return "CapabilityStatement2.rest.resource.interaction";
3660
3661  }
3662
3663  }
3664
3665    @Block()
3666    public static class CapabilityStatement2RestResourceSearchParamComponent extends BackboneElement implements IBaseBackboneElement {
3667        /**
3668         * The name of the search parameter used in the interface.
3669         */
3670        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3671        @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the search parameter used in the interface." )
3672        protected StringType name;
3673
3674        /**
3675         * An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.
3676         */
3677        @Child(name = "definition", type = {CanonicalType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3678        @Description(shortDefinition="Source of definition for parameter", formalDefinition="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs." )
3679        protected CanonicalType definition;
3680
3681        /**
3682         * The type of value a search parameter refers to, and how the content is interpreted.
3683         */
3684        @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false)
3685        @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri | special", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." )
3686        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-param-type")
3687        protected Enumeration<SearchParamType> type;
3688
3689        /**
3690         * This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.
3691         */
3692        @Child(name = "documentation", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
3693        @Description(shortDefinition="Server-specific usage", formalDefinition="This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms." )
3694        protected MarkdownType documentation;
3695
3696        /**
3697         * A statement that affirms support for a feature, in this context.
3698         */
3699        @Child(name = "feature", type = {CapabilityStatement2RestFeatureComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3700        @Description(shortDefinition="Statement of support for a feature in this context", formalDefinition="A statement that affirms support for a feature, in this context." )
3701        protected List<CapabilityStatement2RestFeatureComponent> feature;
3702
3703        private static final long serialVersionUID = -300448290L;
3704
3705    /**
3706     * Constructor
3707     */
3708      public CapabilityStatement2RestResourceSearchParamComponent() {
3709        super();
3710      }
3711
3712    /**
3713     * Constructor
3714     */
3715      public CapabilityStatement2RestResourceSearchParamComponent(String name, SearchParamType type) {
3716        super();
3717        this.setName(name);
3718        this.setType(type);
3719      }
3720
3721        /**
3722         * @return {@link #name} (The name of the search parameter used in the interface.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3723         */
3724        public StringType getNameElement() { 
3725          if (this.name == null)
3726            if (Configuration.errorOnAutoCreate())
3727              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceSearchParamComponent.name");
3728            else if (Configuration.doAutoCreate())
3729              this.name = new StringType(); // bb
3730          return this.name;
3731        }
3732
3733        public boolean hasNameElement() { 
3734          return this.name != null && !this.name.isEmpty();
3735        }
3736
3737        public boolean hasName() { 
3738          return this.name != null && !this.name.isEmpty();
3739        }
3740
3741        /**
3742         * @param value {@link #name} (The name of the search parameter used in the interface.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3743         */
3744        public CapabilityStatement2RestResourceSearchParamComponent setNameElement(StringType value) { 
3745          this.name = value;
3746          return this;
3747        }
3748
3749        /**
3750         * @return The name of the search parameter used in the interface.
3751         */
3752        public String getName() { 
3753          return this.name == null ? null : this.name.getValue();
3754        }
3755
3756        /**
3757         * @param value The name of the search parameter used in the interface.
3758         */
3759        public CapabilityStatement2RestResourceSearchParamComponent setName(String value) { 
3760            if (this.name == null)
3761              this.name = new StringType();
3762            this.name.setValue(value);
3763          return this;
3764        }
3765
3766        /**
3767         * @return {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
3768         */
3769        public CanonicalType getDefinitionElement() { 
3770          if (this.definition == null)
3771            if (Configuration.errorOnAutoCreate())
3772              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceSearchParamComponent.definition");
3773            else if (Configuration.doAutoCreate())
3774              this.definition = new CanonicalType(); // bb
3775          return this.definition;
3776        }
3777
3778        public boolean hasDefinitionElement() { 
3779          return this.definition != null && !this.definition.isEmpty();
3780        }
3781
3782        public boolean hasDefinition() { 
3783          return this.definition != null && !this.definition.isEmpty();
3784        }
3785
3786        /**
3787         * @param value {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
3788         */
3789        public CapabilityStatement2RestResourceSearchParamComponent setDefinitionElement(CanonicalType value) { 
3790          this.definition = value;
3791          return this;
3792        }
3793
3794        /**
3795         * @return An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.
3796         */
3797        public String getDefinition() { 
3798          return this.definition == null ? null : this.definition.getValue();
3799        }
3800
3801        /**
3802         * @param value An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.
3803         */
3804        public CapabilityStatement2RestResourceSearchParamComponent setDefinition(String value) { 
3805          if (Utilities.noString(value))
3806            this.definition = null;
3807          else {
3808            if (this.definition == null)
3809              this.definition = new CanonicalType();
3810            this.definition.setValue(value);
3811          }
3812          return this;
3813        }
3814
3815        /**
3816         * @return {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
3817         */
3818        public Enumeration<SearchParamType> getTypeElement() { 
3819          if (this.type == null)
3820            if (Configuration.errorOnAutoCreate())
3821              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceSearchParamComponent.type");
3822            else if (Configuration.doAutoCreate())
3823              this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb
3824          return this.type;
3825        }
3826
3827        public boolean hasTypeElement() { 
3828          return this.type != null && !this.type.isEmpty();
3829        }
3830
3831        public boolean hasType() { 
3832          return this.type != null && !this.type.isEmpty();
3833        }
3834
3835        /**
3836         * @param value {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
3837         */
3838        public CapabilityStatement2RestResourceSearchParamComponent setTypeElement(Enumeration<SearchParamType> value) { 
3839          this.type = value;
3840          return this;
3841        }
3842
3843        /**
3844         * @return The type of value a search parameter refers to, and how the content is interpreted.
3845         */
3846        public SearchParamType getType() { 
3847          return this.type == null ? null : this.type.getValue();
3848        }
3849
3850        /**
3851         * @param value The type of value a search parameter refers to, and how the content is interpreted.
3852         */
3853        public CapabilityStatement2RestResourceSearchParamComponent setType(SearchParamType value) { 
3854            if (this.type == null)
3855              this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory());
3856            this.type.setValue(value);
3857          return this;
3858        }
3859
3860        /**
3861         * @return {@link #documentation} (This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
3862         */
3863        public MarkdownType getDocumentationElement() { 
3864          if (this.documentation == null)
3865            if (Configuration.errorOnAutoCreate())
3866              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceSearchParamComponent.documentation");
3867            else if (Configuration.doAutoCreate())
3868              this.documentation = new MarkdownType(); // bb
3869          return this.documentation;
3870        }
3871
3872        public boolean hasDocumentationElement() { 
3873          return this.documentation != null && !this.documentation.isEmpty();
3874        }
3875
3876        public boolean hasDocumentation() { 
3877          return this.documentation != null && !this.documentation.isEmpty();
3878        }
3879
3880        /**
3881         * @param value {@link #documentation} (This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
3882         */
3883        public CapabilityStatement2RestResourceSearchParamComponent setDocumentationElement(MarkdownType value) { 
3884          this.documentation = value;
3885          return this;
3886        }
3887
3888        /**
3889         * @return This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.
3890         */
3891        public String getDocumentation() { 
3892          return this.documentation == null ? null : this.documentation.getValue();
3893        }
3894
3895        /**
3896         * @param value This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.
3897         */
3898        public CapabilityStatement2RestResourceSearchParamComponent setDocumentation(String value) { 
3899          if (value == null)
3900            this.documentation = null;
3901          else {
3902            if (this.documentation == null)
3903              this.documentation = new MarkdownType();
3904            this.documentation.setValue(value);
3905          }
3906          return this;
3907        }
3908
3909        /**
3910         * @return {@link #feature} (A statement that affirms support for a feature, in this context.)
3911         */
3912        public List<CapabilityStatement2RestFeatureComponent> getFeature() { 
3913          if (this.feature == null)
3914            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3915          return this.feature;
3916        }
3917
3918        /**
3919         * @return Returns a reference to <code>this</code> for easy method chaining
3920         */
3921        public CapabilityStatement2RestResourceSearchParamComponent setFeature(List<CapabilityStatement2RestFeatureComponent> theFeature) { 
3922          this.feature = theFeature;
3923          return this;
3924        }
3925
3926        public boolean hasFeature() { 
3927          if (this.feature == null)
3928            return false;
3929          for (CapabilityStatement2RestFeatureComponent item : this.feature)
3930            if (!item.isEmpty())
3931              return true;
3932          return false;
3933        }
3934
3935        public CapabilityStatement2RestFeatureComponent addFeature() { //3
3936          CapabilityStatement2RestFeatureComponent t = new CapabilityStatement2RestFeatureComponent();
3937          if (this.feature == null)
3938            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3939          this.feature.add(t);
3940          return t;
3941        }
3942
3943        public CapabilityStatement2RestResourceSearchParamComponent addFeature(CapabilityStatement2RestFeatureComponent t) { //3
3944          if (t == null)
3945            return this;
3946          if (this.feature == null)
3947            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
3948          this.feature.add(t);
3949          return this;
3950        }
3951
3952        /**
3953         * @return The first repetition of repeating field {@link #feature}, creating it if it does not already exist {3}
3954         */
3955        public CapabilityStatement2RestFeatureComponent getFeatureFirstRep() { 
3956          if (getFeature().isEmpty()) {
3957            addFeature();
3958          }
3959          return getFeature().get(0);
3960        }
3961
3962        protected void listChildren(List<Property> children) {
3963          super.listChildren(children);
3964          children.add(new Property("name", "string", "The name of the search parameter used in the interface.", 0, 1, name));
3965          children.add(new Property("definition", "canonical(SearchParameter)", "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.", 0, 1, definition));
3966          children.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, 1, type));
3967          children.add(new Property("documentation", "markdown", "This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.", 0, 1, documentation));
3968          children.add(new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature));
3969        }
3970
3971        @Override
3972        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3973          switch (_hash) {
3974          case 3373707: /*name*/  return new Property("name", "string", "The name of the search parameter used in the interface.", 0, 1, name);
3975          case -1014418093: /*definition*/  return new Property("definition", "canonical(SearchParameter)", "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.", 0, 1, definition);
3976          case 3575610: /*type*/  return new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, 1, type);
3977          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.", 0, 1, documentation);
3978          case -979207434: /*feature*/  return new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature);
3979          default: return super.getNamedProperty(_hash, _name, _checkValid);
3980          }
3981
3982        }
3983
3984      @Override
3985      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3986        switch (hash) {
3987        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3988        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // CanonicalType
3989        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SearchParamType>
3990        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
3991        case -979207434: /*feature*/ return this.feature == null ? new Base[0] : this.feature.toArray(new Base[this.feature.size()]); // CapabilityStatement2RestFeatureComponent
3992        default: return super.getProperty(hash, name, checkValid);
3993        }
3994
3995      }
3996
3997      @Override
3998      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3999        switch (hash) {
4000        case 3373707: // name
4001          this.name = TypeConvertor.castToString(value); // StringType
4002          return value;
4003        case -1014418093: // definition
4004          this.definition = TypeConvertor.castToCanonical(value); // CanonicalType
4005          return value;
4006        case 3575610: // type
4007          value = new SearchParamTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
4008          this.type = (Enumeration) value; // Enumeration<SearchParamType>
4009          return value;
4010        case 1587405498: // documentation
4011          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
4012          return value;
4013        case -979207434: // feature
4014          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value); // CapabilityStatement2RestFeatureComponent
4015          return value;
4016        default: return super.setProperty(hash, name, value);
4017        }
4018
4019      }
4020
4021      @Override
4022      public Base setProperty(String name, Base value) throws FHIRException {
4023        if (name.equals("name")) {
4024          this.name = TypeConvertor.castToString(value); // StringType
4025        } else if (name.equals("definition")) {
4026          this.definition = TypeConvertor.castToCanonical(value); // CanonicalType
4027        } else if (name.equals("type")) {
4028          value = new SearchParamTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
4029          this.type = (Enumeration) value; // Enumeration<SearchParamType>
4030        } else if (name.equals("documentation")) {
4031          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
4032        } else if (name.equals("feature")) {
4033          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value);
4034        } else
4035          return super.setProperty(name, value);
4036        return value;
4037      }
4038
4039      @Override
4040      public Base makeProperty(int hash, String name) throws FHIRException {
4041        switch (hash) {
4042        case 3373707:  return getNameElement();
4043        case -1014418093:  return getDefinitionElement();
4044        case 3575610:  return getTypeElement();
4045        case 1587405498:  return getDocumentationElement();
4046        case -979207434:  return addFeature(); 
4047        default: return super.makeProperty(hash, name);
4048        }
4049
4050      }
4051
4052      @Override
4053      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4054        switch (hash) {
4055        case 3373707: /*name*/ return new String[] {"string"};
4056        case -1014418093: /*definition*/ return new String[] {"canonical"};
4057        case 3575610: /*type*/ return new String[] {"code"};
4058        case 1587405498: /*documentation*/ return new String[] {"markdown"};
4059        case -979207434: /*feature*/ return new String[] {"@CapabilityStatement2.rest.feature"};
4060        default: return super.getTypesForProperty(hash, name);
4061        }
4062
4063      }
4064
4065      @Override
4066      public Base addChild(String name) throws FHIRException {
4067        if (name.equals("name")) {
4068          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.searchParam.name");
4069        }
4070        else if (name.equals("definition")) {
4071          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.searchParam.definition");
4072        }
4073        else if (name.equals("type")) {
4074          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.searchParam.type");
4075        }
4076        else if (name.equals("documentation")) {
4077          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.searchParam.documentation");
4078        }
4079        else if (name.equals("feature")) {
4080          return addFeature();
4081        }
4082        else
4083          return super.addChild(name);
4084      }
4085
4086      public CapabilityStatement2RestResourceSearchParamComponent copy() {
4087        CapabilityStatement2RestResourceSearchParamComponent dst = new CapabilityStatement2RestResourceSearchParamComponent();
4088        copyValues(dst);
4089        return dst;
4090      }
4091
4092      public void copyValues(CapabilityStatement2RestResourceSearchParamComponent dst) {
4093        super.copyValues(dst);
4094        dst.name = name == null ? null : name.copy();
4095        dst.definition = definition == null ? null : definition.copy();
4096        dst.type = type == null ? null : type.copy();
4097        dst.documentation = documentation == null ? null : documentation.copy();
4098        if (feature != null) {
4099          dst.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4100          for (CapabilityStatement2RestFeatureComponent i : feature)
4101            dst.feature.add(i.copy());
4102        };
4103      }
4104
4105      @Override
4106      public boolean equalsDeep(Base other_) {
4107        if (!super.equalsDeep(other_))
4108          return false;
4109        if (!(other_ instanceof CapabilityStatement2RestResourceSearchParamComponent))
4110          return false;
4111        CapabilityStatement2RestResourceSearchParamComponent o = (CapabilityStatement2RestResourceSearchParamComponent) other_;
4112        return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true) && compareDeep(type, o.type, true)
4113           && compareDeep(documentation, o.documentation, true) && compareDeep(feature, o.feature, true);
4114      }
4115
4116      @Override
4117      public boolean equalsShallow(Base other_) {
4118        if (!super.equalsShallow(other_))
4119          return false;
4120        if (!(other_ instanceof CapabilityStatement2RestResourceSearchParamComponent))
4121          return false;
4122        CapabilityStatement2RestResourceSearchParamComponent o = (CapabilityStatement2RestResourceSearchParamComponent) other_;
4123        return compareValues(name, o.name, true) && compareValues(definition, o.definition, true) && compareValues(type, o.type, true)
4124           && compareValues(documentation, o.documentation, true);
4125      }
4126
4127      public boolean isEmpty() {
4128        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, definition, type, documentation
4129          , feature);
4130      }
4131
4132  public String fhirType() {
4133    return "CapabilityStatement2.rest.resource.searchParam";
4134
4135  }
4136
4137  }
4138
4139    @Block()
4140    public static class CapabilityStatement2RestResourceOperationComponent extends BackboneElement implements IBaseBackboneElement {
4141        /**
4142         * The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.
4143         */
4144        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
4145        @Description(shortDefinition="Name by which the operation/query is invoked", formalDefinition="The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called." )
4146        protected StringType name;
4147
4148        /**
4149         * Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.
4150         */
4151        @Child(name = "definition", type = {CanonicalType.class}, order=2, min=1, max=1, modifier=false, summary=true)
4152        @Description(shortDefinition="The defined operation/query", formalDefinition="Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported." )
4153        protected CanonicalType definition;
4154
4155        /**
4156         * Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.
4157         */
4158        @Child(name = "documentation", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false)
4159        @Description(shortDefinition="Specific details about operation behavior", formalDefinition="Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation." )
4160        protected MarkdownType documentation;
4161
4162        /**
4163         * A statement that affirms support for a feature, in this context.
4164         */
4165        @Child(name = "feature", type = {CapabilityStatement2RestFeatureComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4166        @Description(shortDefinition="Statement of support for a feature in this context", formalDefinition="A statement that affirms support for a feature, in this context." )
4167        protected List<CapabilityStatement2RestFeatureComponent> feature;
4168
4169        private static final long serialVersionUID = 1206974170L;
4170
4171    /**
4172     * Constructor
4173     */
4174      public CapabilityStatement2RestResourceOperationComponent() {
4175        super();
4176      }
4177
4178    /**
4179     * Constructor
4180     */
4181      public CapabilityStatement2RestResourceOperationComponent(String name, String definition) {
4182        super();
4183        this.setName(name);
4184        this.setDefinition(definition);
4185      }
4186
4187        /**
4188         * @return {@link #name} (The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4189         */
4190        public StringType getNameElement() { 
4191          if (this.name == null)
4192            if (Configuration.errorOnAutoCreate())
4193              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceOperationComponent.name");
4194            else if (Configuration.doAutoCreate())
4195              this.name = new StringType(); // bb
4196          return this.name;
4197        }
4198
4199        public boolean hasNameElement() { 
4200          return this.name != null && !this.name.isEmpty();
4201        }
4202
4203        public boolean hasName() { 
4204          return this.name != null && !this.name.isEmpty();
4205        }
4206
4207        /**
4208         * @param value {@link #name} (The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4209         */
4210        public CapabilityStatement2RestResourceOperationComponent setNameElement(StringType value) { 
4211          this.name = value;
4212          return this;
4213        }
4214
4215        /**
4216         * @return The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.
4217         */
4218        public String getName() { 
4219          return this.name == null ? null : this.name.getValue();
4220        }
4221
4222        /**
4223         * @param value The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.
4224         */
4225        public CapabilityStatement2RestResourceOperationComponent setName(String value) { 
4226            if (this.name == null)
4227              this.name = new StringType();
4228            this.name.setValue(value);
4229          return this;
4230        }
4231
4232        /**
4233         * @return {@link #definition} (Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
4234         */
4235        public CanonicalType getDefinitionElement() { 
4236          if (this.definition == null)
4237            if (Configuration.errorOnAutoCreate())
4238              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceOperationComponent.definition");
4239            else if (Configuration.doAutoCreate())
4240              this.definition = new CanonicalType(); // bb
4241          return this.definition;
4242        }
4243
4244        public boolean hasDefinitionElement() { 
4245          return this.definition != null && !this.definition.isEmpty();
4246        }
4247
4248        public boolean hasDefinition() { 
4249          return this.definition != null && !this.definition.isEmpty();
4250        }
4251
4252        /**
4253         * @param value {@link #definition} (Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
4254         */
4255        public CapabilityStatement2RestResourceOperationComponent setDefinitionElement(CanonicalType value) { 
4256          this.definition = value;
4257          return this;
4258        }
4259
4260        /**
4261         * @return Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.
4262         */
4263        public String getDefinition() { 
4264          return this.definition == null ? null : this.definition.getValue();
4265        }
4266
4267        /**
4268         * @param value Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.
4269         */
4270        public CapabilityStatement2RestResourceOperationComponent setDefinition(String value) { 
4271            if (this.definition == null)
4272              this.definition = new CanonicalType();
4273            this.definition.setValue(value);
4274          return this;
4275        }
4276
4277        /**
4278         * @return {@link #documentation} (Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
4279         */
4280        public MarkdownType getDocumentationElement() { 
4281          if (this.documentation == null)
4282            if (Configuration.errorOnAutoCreate())
4283              throw new Error("Attempt to auto-create CapabilityStatement2RestResourceOperationComponent.documentation");
4284            else if (Configuration.doAutoCreate())
4285              this.documentation = new MarkdownType(); // bb
4286          return this.documentation;
4287        }
4288
4289        public boolean hasDocumentationElement() { 
4290          return this.documentation != null && !this.documentation.isEmpty();
4291        }
4292
4293        public boolean hasDocumentation() { 
4294          return this.documentation != null && !this.documentation.isEmpty();
4295        }
4296
4297        /**
4298         * @param value {@link #documentation} (Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
4299         */
4300        public CapabilityStatement2RestResourceOperationComponent setDocumentationElement(MarkdownType value) { 
4301          this.documentation = value;
4302          return this;
4303        }
4304
4305        /**
4306         * @return Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.
4307         */
4308        public String getDocumentation() { 
4309          return this.documentation == null ? null : this.documentation.getValue();
4310        }
4311
4312        /**
4313         * @param value Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.
4314         */
4315        public CapabilityStatement2RestResourceOperationComponent setDocumentation(String value) { 
4316          if (value == null)
4317            this.documentation = null;
4318          else {
4319            if (this.documentation == null)
4320              this.documentation = new MarkdownType();
4321            this.documentation.setValue(value);
4322          }
4323          return this;
4324        }
4325
4326        /**
4327         * @return {@link #feature} (A statement that affirms support for a feature, in this context.)
4328         */
4329        public List<CapabilityStatement2RestFeatureComponent> getFeature() { 
4330          if (this.feature == null)
4331            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4332          return this.feature;
4333        }
4334
4335        /**
4336         * @return Returns a reference to <code>this</code> for easy method chaining
4337         */
4338        public CapabilityStatement2RestResourceOperationComponent setFeature(List<CapabilityStatement2RestFeatureComponent> theFeature) { 
4339          this.feature = theFeature;
4340          return this;
4341        }
4342
4343        public boolean hasFeature() { 
4344          if (this.feature == null)
4345            return false;
4346          for (CapabilityStatement2RestFeatureComponent item : this.feature)
4347            if (!item.isEmpty())
4348              return true;
4349          return false;
4350        }
4351
4352        public CapabilityStatement2RestFeatureComponent addFeature() { //3
4353          CapabilityStatement2RestFeatureComponent t = new CapabilityStatement2RestFeatureComponent();
4354          if (this.feature == null)
4355            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4356          this.feature.add(t);
4357          return t;
4358        }
4359
4360        public CapabilityStatement2RestResourceOperationComponent addFeature(CapabilityStatement2RestFeatureComponent t) { //3
4361          if (t == null)
4362            return this;
4363          if (this.feature == null)
4364            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4365          this.feature.add(t);
4366          return this;
4367        }
4368
4369        /**
4370         * @return The first repetition of repeating field {@link #feature}, creating it if it does not already exist {3}
4371         */
4372        public CapabilityStatement2RestFeatureComponent getFeatureFirstRep() { 
4373          if (getFeature().isEmpty()) {
4374            addFeature();
4375          }
4376          return getFeature().get(0);
4377        }
4378
4379        protected void listChildren(List<Property> children) {
4380          super.listChildren(children);
4381          children.add(new Property("name", "string", "The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.", 0, 1, name));
4382          children.add(new Property("definition", "canonical(OperationDefinition)", "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.", 0, 1, definition));
4383          children.add(new Property("documentation", "markdown", "Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.", 0, 1, documentation));
4384          children.add(new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature));
4385        }
4386
4387        @Override
4388        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4389          switch (_hash) {
4390          case 3373707: /*name*/  return new Property("name", "string", "The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.", 0, 1, name);
4391          case -1014418093: /*definition*/  return new Property("definition", "canonical(OperationDefinition)", "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported.", 0, 1, definition);
4392          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.", 0, 1, documentation);
4393          case -979207434: /*feature*/  return new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature);
4394          default: return super.getNamedProperty(_hash, _name, _checkValid);
4395          }
4396
4397        }
4398
4399      @Override
4400      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4401        switch (hash) {
4402        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4403        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // CanonicalType
4404        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
4405        case -979207434: /*feature*/ return this.feature == null ? new Base[0] : this.feature.toArray(new Base[this.feature.size()]); // CapabilityStatement2RestFeatureComponent
4406        default: return super.getProperty(hash, name, checkValid);
4407        }
4408
4409      }
4410
4411      @Override
4412      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4413        switch (hash) {
4414        case 3373707: // name
4415          this.name = TypeConvertor.castToString(value); // StringType
4416          return value;
4417        case -1014418093: // definition
4418          this.definition = TypeConvertor.castToCanonical(value); // CanonicalType
4419          return value;
4420        case 1587405498: // documentation
4421          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
4422          return value;
4423        case -979207434: // feature
4424          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value); // CapabilityStatement2RestFeatureComponent
4425          return value;
4426        default: return super.setProperty(hash, name, value);
4427        }
4428
4429      }
4430
4431      @Override
4432      public Base setProperty(String name, Base value) throws FHIRException {
4433        if (name.equals("name")) {
4434          this.name = TypeConvertor.castToString(value); // StringType
4435        } else if (name.equals("definition")) {
4436          this.definition = TypeConvertor.castToCanonical(value); // CanonicalType
4437        } else if (name.equals("documentation")) {
4438          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
4439        } else if (name.equals("feature")) {
4440          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value);
4441        } else
4442          return super.setProperty(name, value);
4443        return value;
4444      }
4445
4446      @Override
4447      public Base makeProperty(int hash, String name) throws FHIRException {
4448        switch (hash) {
4449        case 3373707:  return getNameElement();
4450        case -1014418093:  return getDefinitionElement();
4451        case 1587405498:  return getDocumentationElement();
4452        case -979207434:  return addFeature(); 
4453        default: return super.makeProperty(hash, name);
4454        }
4455
4456      }
4457
4458      @Override
4459      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4460        switch (hash) {
4461        case 3373707: /*name*/ return new String[] {"string"};
4462        case -1014418093: /*definition*/ return new String[] {"canonical"};
4463        case 1587405498: /*documentation*/ return new String[] {"markdown"};
4464        case -979207434: /*feature*/ return new String[] {"@CapabilityStatement2.rest.feature"};
4465        default: return super.getTypesForProperty(hash, name);
4466        }
4467
4468      }
4469
4470      @Override
4471      public Base addChild(String name) throws FHIRException {
4472        if (name.equals("name")) {
4473          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.operation.name");
4474        }
4475        else if (name.equals("definition")) {
4476          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.operation.definition");
4477        }
4478        else if (name.equals("documentation")) {
4479          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.resource.operation.documentation");
4480        }
4481        else if (name.equals("feature")) {
4482          return addFeature();
4483        }
4484        else
4485          return super.addChild(name);
4486      }
4487
4488      public CapabilityStatement2RestResourceOperationComponent copy() {
4489        CapabilityStatement2RestResourceOperationComponent dst = new CapabilityStatement2RestResourceOperationComponent();
4490        copyValues(dst);
4491        return dst;
4492      }
4493
4494      public void copyValues(CapabilityStatement2RestResourceOperationComponent dst) {
4495        super.copyValues(dst);
4496        dst.name = name == null ? null : name.copy();
4497        dst.definition = definition == null ? null : definition.copy();
4498        dst.documentation = documentation == null ? null : documentation.copy();
4499        if (feature != null) {
4500          dst.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4501          for (CapabilityStatement2RestFeatureComponent i : feature)
4502            dst.feature.add(i.copy());
4503        };
4504      }
4505
4506      @Override
4507      public boolean equalsDeep(Base other_) {
4508        if (!super.equalsDeep(other_))
4509          return false;
4510        if (!(other_ instanceof CapabilityStatement2RestResourceOperationComponent))
4511          return false;
4512        CapabilityStatement2RestResourceOperationComponent o = (CapabilityStatement2RestResourceOperationComponent) other_;
4513        return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true) && compareDeep(documentation, o.documentation, true)
4514           && compareDeep(feature, o.feature, true);
4515      }
4516
4517      @Override
4518      public boolean equalsShallow(Base other_) {
4519        if (!super.equalsShallow(other_))
4520          return false;
4521        if (!(other_ instanceof CapabilityStatement2RestResourceOperationComponent))
4522          return false;
4523        CapabilityStatement2RestResourceOperationComponent o = (CapabilityStatement2RestResourceOperationComponent) other_;
4524        return compareValues(name, o.name, true) && compareValues(definition, o.definition, true) && compareValues(documentation, o.documentation, true)
4525          ;
4526      }
4527
4528      public boolean isEmpty() {
4529        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, definition, documentation
4530          , feature);
4531      }
4532
4533  public String fhirType() {
4534    return "CapabilityStatement2.rest.resource.operation";
4535
4536  }
4537
4538  }
4539
4540    @Block()
4541    public static class SystemInteractionComponent extends BackboneElement implements IBaseBackboneElement {
4542        /**
4543         * A coded identifier of the operation, supported by the system.
4544         */
4545        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4546        @Description(shortDefinition="transaction | batch | search-system | history-system", formalDefinition="A coded identifier of the operation, supported by the system." )
4547        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/system-restful-interaction")
4548        protected Enumeration<SystemRestfulInteraction> code;
4549
4550        /**
4551         * Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.
4552         */
4553        @Child(name = "documentation", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4554        @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented." )
4555        protected MarkdownType documentation;
4556
4557        /**
4558         * A statement that affirms support for a feature, in this context.
4559         */
4560        @Child(name = "feature", type = {CapabilityStatement2RestFeatureComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4561        @Description(shortDefinition="Statement of support for a feature in this context", formalDefinition="A statement that affirms support for a feature, in this context." )
4562        protected List<CapabilityStatement2RestFeatureComponent> feature;
4563
4564        private static final long serialVersionUID = 353704493L;
4565
4566    /**
4567     * Constructor
4568     */
4569      public SystemInteractionComponent() {
4570        super();
4571      }
4572
4573    /**
4574     * Constructor
4575     */
4576      public SystemInteractionComponent(SystemRestfulInteraction code) {
4577        super();
4578        this.setCode(code);
4579      }
4580
4581        /**
4582         * @return {@link #code} (A coded identifier of the operation, supported by the system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
4583         */
4584        public Enumeration<SystemRestfulInteraction> getCodeElement() { 
4585          if (this.code == null)
4586            if (Configuration.errorOnAutoCreate())
4587              throw new Error("Attempt to auto-create SystemInteractionComponent.code");
4588            else if (Configuration.doAutoCreate())
4589              this.code = new Enumeration<SystemRestfulInteraction>(new SystemRestfulInteractionEnumFactory()); // bb
4590          return this.code;
4591        }
4592
4593        public boolean hasCodeElement() { 
4594          return this.code != null && !this.code.isEmpty();
4595        }
4596
4597        public boolean hasCode() { 
4598          return this.code != null && !this.code.isEmpty();
4599        }
4600
4601        /**
4602         * @param value {@link #code} (A coded identifier of the operation, supported by the system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
4603         */
4604        public SystemInteractionComponent setCodeElement(Enumeration<SystemRestfulInteraction> value) { 
4605          this.code = value;
4606          return this;
4607        }
4608
4609        /**
4610         * @return A coded identifier of the operation, supported by the system.
4611         */
4612        public SystemRestfulInteraction getCode() { 
4613          return this.code == null ? null : this.code.getValue();
4614        }
4615
4616        /**
4617         * @param value A coded identifier of the operation, supported by the system.
4618         */
4619        public SystemInteractionComponent setCode(SystemRestfulInteraction value) { 
4620            if (this.code == null)
4621              this.code = new Enumeration<SystemRestfulInteraction>(new SystemRestfulInteractionEnumFactory());
4622            this.code.setValue(value);
4623          return this;
4624        }
4625
4626        /**
4627         * @return {@link #documentation} (Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
4628         */
4629        public MarkdownType getDocumentationElement() { 
4630          if (this.documentation == null)
4631            if (Configuration.errorOnAutoCreate())
4632              throw new Error("Attempt to auto-create SystemInteractionComponent.documentation");
4633            else if (Configuration.doAutoCreate())
4634              this.documentation = new MarkdownType(); // bb
4635          return this.documentation;
4636        }
4637
4638        public boolean hasDocumentationElement() { 
4639          return this.documentation != null && !this.documentation.isEmpty();
4640        }
4641
4642        public boolean hasDocumentation() { 
4643          return this.documentation != null && !this.documentation.isEmpty();
4644        }
4645
4646        /**
4647         * @param value {@link #documentation} (Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
4648         */
4649        public SystemInteractionComponent setDocumentationElement(MarkdownType value) { 
4650          this.documentation = value;
4651          return this;
4652        }
4653
4654        /**
4655         * @return Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.
4656         */
4657        public String getDocumentation() { 
4658          return this.documentation == null ? null : this.documentation.getValue();
4659        }
4660
4661        /**
4662         * @param value Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.
4663         */
4664        public SystemInteractionComponent setDocumentation(String value) { 
4665          if (value == null)
4666            this.documentation = null;
4667          else {
4668            if (this.documentation == null)
4669              this.documentation = new MarkdownType();
4670            this.documentation.setValue(value);
4671          }
4672          return this;
4673        }
4674
4675        /**
4676         * @return {@link #feature} (A statement that affirms support for a feature, in this context.)
4677         */
4678        public List<CapabilityStatement2RestFeatureComponent> getFeature() { 
4679          if (this.feature == null)
4680            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4681          return this.feature;
4682        }
4683
4684        /**
4685         * @return Returns a reference to <code>this</code> for easy method chaining
4686         */
4687        public SystemInteractionComponent setFeature(List<CapabilityStatement2RestFeatureComponent> theFeature) { 
4688          this.feature = theFeature;
4689          return this;
4690        }
4691
4692        public boolean hasFeature() { 
4693          if (this.feature == null)
4694            return false;
4695          for (CapabilityStatement2RestFeatureComponent item : this.feature)
4696            if (!item.isEmpty())
4697              return true;
4698          return false;
4699        }
4700
4701        public CapabilityStatement2RestFeatureComponent addFeature() { //3
4702          CapabilityStatement2RestFeatureComponent t = new CapabilityStatement2RestFeatureComponent();
4703          if (this.feature == null)
4704            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4705          this.feature.add(t);
4706          return t;
4707        }
4708
4709        public SystemInteractionComponent addFeature(CapabilityStatement2RestFeatureComponent t) { //3
4710          if (t == null)
4711            return this;
4712          if (this.feature == null)
4713            this.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4714          this.feature.add(t);
4715          return this;
4716        }
4717
4718        /**
4719         * @return The first repetition of repeating field {@link #feature}, creating it if it does not already exist {3}
4720         */
4721        public CapabilityStatement2RestFeatureComponent getFeatureFirstRep() { 
4722          if (getFeature().isEmpty()) {
4723            addFeature();
4724          }
4725          return getFeature().get(0);
4726        }
4727
4728        protected void listChildren(List<Property> children) {
4729          super.listChildren(children);
4730          children.add(new Property("code", "code", "A coded identifier of the operation, supported by the system.", 0, 1, code));
4731          children.add(new Property("documentation", "markdown", "Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.", 0, 1, documentation));
4732          children.add(new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature));
4733        }
4734
4735        @Override
4736        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4737          switch (_hash) {
4738          case 3059181: /*code*/  return new Property("code", "code", "A coded identifier of the operation, supported by the system.", 0, 1, code);
4739          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.", 0, 1, documentation);
4740          case -979207434: /*feature*/  return new Property("feature", "@CapabilityStatement2.rest.feature", "A statement that affirms support for a feature, in this context.", 0, java.lang.Integer.MAX_VALUE, feature);
4741          default: return super.getNamedProperty(_hash, _name, _checkValid);
4742          }
4743
4744        }
4745
4746      @Override
4747      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4748        switch (hash) {
4749        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<SystemRestfulInteraction>
4750        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
4751        case -979207434: /*feature*/ return this.feature == null ? new Base[0] : this.feature.toArray(new Base[this.feature.size()]); // CapabilityStatement2RestFeatureComponent
4752        default: return super.getProperty(hash, name, checkValid);
4753        }
4754
4755      }
4756
4757      @Override
4758      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4759        switch (hash) {
4760        case 3059181: // code
4761          value = new SystemRestfulInteractionEnumFactory().fromType(TypeConvertor.castToCode(value));
4762          this.code = (Enumeration) value; // Enumeration<SystemRestfulInteraction>
4763          return value;
4764        case 1587405498: // documentation
4765          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
4766          return value;
4767        case -979207434: // feature
4768          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value); // CapabilityStatement2RestFeatureComponent
4769          return value;
4770        default: return super.setProperty(hash, name, value);
4771        }
4772
4773      }
4774
4775      @Override
4776      public Base setProperty(String name, Base value) throws FHIRException {
4777        if (name.equals("code")) {
4778          value = new SystemRestfulInteractionEnumFactory().fromType(TypeConvertor.castToCode(value));
4779          this.code = (Enumeration) value; // Enumeration<SystemRestfulInteraction>
4780        } else if (name.equals("documentation")) {
4781          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
4782        } else if (name.equals("feature")) {
4783          this.getFeature().add((CapabilityStatement2RestFeatureComponent) value);
4784        } else
4785          return super.setProperty(name, value);
4786        return value;
4787      }
4788
4789      @Override
4790      public Base makeProperty(int hash, String name) throws FHIRException {
4791        switch (hash) {
4792        case 3059181:  return getCodeElement();
4793        case 1587405498:  return getDocumentationElement();
4794        case -979207434:  return addFeature(); 
4795        default: return super.makeProperty(hash, name);
4796        }
4797
4798      }
4799
4800      @Override
4801      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4802        switch (hash) {
4803        case 3059181: /*code*/ return new String[] {"code"};
4804        case 1587405498: /*documentation*/ return new String[] {"markdown"};
4805        case -979207434: /*feature*/ return new String[] {"@CapabilityStatement2.rest.feature"};
4806        default: return super.getTypesForProperty(hash, name);
4807        }
4808
4809      }
4810
4811      @Override
4812      public Base addChild(String name) throws FHIRException {
4813        if (name.equals("code")) {
4814          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.interaction.code");
4815        }
4816        else if (name.equals("documentation")) {
4817          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.rest.interaction.documentation");
4818        }
4819        else if (name.equals("feature")) {
4820          return addFeature();
4821        }
4822        else
4823          return super.addChild(name);
4824      }
4825
4826      public SystemInteractionComponent copy() {
4827        SystemInteractionComponent dst = new SystemInteractionComponent();
4828        copyValues(dst);
4829        return dst;
4830      }
4831
4832      public void copyValues(SystemInteractionComponent dst) {
4833        super.copyValues(dst);
4834        dst.code = code == null ? null : code.copy();
4835        dst.documentation = documentation == null ? null : documentation.copy();
4836        if (feature != null) {
4837          dst.feature = new ArrayList<CapabilityStatement2RestFeatureComponent>();
4838          for (CapabilityStatement2RestFeatureComponent i : feature)
4839            dst.feature.add(i.copy());
4840        };
4841      }
4842
4843      @Override
4844      public boolean equalsDeep(Base other_) {
4845        if (!super.equalsDeep(other_))
4846          return false;
4847        if (!(other_ instanceof SystemInteractionComponent))
4848          return false;
4849        SystemInteractionComponent o = (SystemInteractionComponent) other_;
4850        return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true) && compareDeep(feature, o.feature, true)
4851          ;
4852      }
4853
4854      @Override
4855      public boolean equalsShallow(Base other_) {
4856        if (!super.equalsShallow(other_))
4857          return false;
4858        if (!(other_ instanceof SystemInteractionComponent))
4859          return false;
4860        SystemInteractionComponent o = (SystemInteractionComponent) other_;
4861        return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true);
4862      }
4863
4864      public boolean isEmpty() {
4865        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, documentation, feature
4866          );
4867      }
4868
4869  public String fhirType() {
4870    return "CapabilityStatement2.rest.interaction";
4871
4872  }
4873
4874  }
4875
4876    /**
4877     * An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.
4878     */
4879    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
4880    @Description(shortDefinition="Canonical identifier for this capability statement2, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers." )
4881    protected UriType url;
4882
4883    /**
4884     * The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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.
4885     */
4886    @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
4887    @Description(shortDefinition="Business version of the capability statement2", formalDefinition="The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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." )
4888    protected StringType version;
4889
4890    /**
4891     * A natural language name identifying the capability statement2. This name should be usable as an identifier for the module by machine processing applications such as code generation.
4892     */
4893    @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4894    @Description(shortDefinition="Name for this capability statement2 (computer friendly)", formalDefinition="A natural language name identifying the capability statement2. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
4895    protected StringType name;
4896
4897    /**
4898     * A short, descriptive, user-friendly title for the capability statement2.
4899     */
4900    @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
4901    @Description(shortDefinition="Name for this capability statement2 (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the capability statement2." )
4902    protected StringType title;
4903
4904    /**
4905     * The status of this capability statement2. Enables tracking the life-cycle of the content.
4906     */
4907    @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
4908    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this capability statement2. Enables tracking the life-cycle of the content." )
4909    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
4910    protected Enumeration<PublicationStatus> status;
4911
4912    /**
4913     * A Boolean value to indicate that this capability statement2 is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
4914     */
4915    @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true)
4916    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this capability statement2 is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." )
4917    protected BooleanType experimental;
4918
4919    /**
4920     * The date  (and optionally time) when the capability statement2 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 capability statement2 changes.
4921     */
4922    @Child(name = "date", type = {DateTimeType.class}, order=6, min=1, max=1, modifier=false, summary=true)
4923    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the capability statement2 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 capability statement2 changes." )
4924    protected DateTimeType date;
4925
4926    /**
4927     * The name of the organization or individual that published the capability statement2.
4928     */
4929    @Child(name = "publisher", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true)
4930    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the capability statement2." )
4931    protected StringType publisher;
4932
4933    /**
4934     * Contact details to assist a user in finding and communicating with the publisher.
4935     */
4936    @Child(name = "contact", type = {ContactDetail.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4937    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
4938    protected List<ContactDetail> contact;
4939
4940    /**
4941     * A free text natural language description of the capability statement2 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.
4942     */
4943    @Child(name = "description", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=false)
4944    @Description(shortDefinition="Natural language description of the capability statement2", formalDefinition="A free text natural language description of the capability statement2 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." )
4945    protected MarkdownType description;
4946
4947    /**
4948     * 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 capability statement2 instances.
4949     */
4950    @Child(name = "useContext", type = {UsageContext.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4951    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="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 capability statement2 instances." )
4952    protected List<UsageContext> useContext;
4953
4954    /**
4955     * A legal or geographic region in which the capability statement2 is intended to be used.
4956     */
4957    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4958    @Description(shortDefinition="Intended jurisdiction for capability statement2 (if applicable)", formalDefinition="A legal or geographic region in which the capability statement2 is intended to be used." )
4959    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
4960    protected List<CodeableConcept> jurisdiction;
4961
4962    /**
4963     * Explanation of why this capability statement2 is needed and why it has been designed as it has.
4964     */
4965    @Child(name = "purpose", type = {MarkdownType.class}, order=12, min=0, max=1, modifier=false, summary=false)
4966    @Description(shortDefinition="Why this capability statement2 is defined", formalDefinition="Explanation of why this capability statement2 is needed and why it has been designed as it has." )
4967    protected MarkdownType purpose;
4968
4969    /**
4970     * A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.
4971     */
4972    @Child(name = "copyright", type = {MarkdownType.class}, order=13, min=0, max=1, modifier=false, summary=false)
4973    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2." )
4974    protected MarkdownType copyright;
4975
4976    /**
4977     * 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).
4978     */
4979    @Child(name = "kind", type = {CodeType.class}, order=14, min=1, max=1, modifier=false, summary=true)
4980    @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)." )
4981    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/capability-statement-kind")
4982    protected Enumeration<CapabilityStatementKind> kind;
4983
4984    /**
4985     * Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.
4986     */
4987    @Child(name = "instantiates", type = {CanonicalType.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4988    @Description(shortDefinition="Canonical URL of another capability statement this implements", formalDefinition="Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details." )
4989    protected List<CanonicalType> instantiates;
4990
4991    /**
4992     * Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.
4993     */
4994    @Child(name = "imports", type = {CanonicalType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4995    @Description(shortDefinition="Canonical URL of another capability statement this adds to", formalDefinition="Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them." )
4996    protected List<CanonicalType> imports;
4997
4998    /**
4999     * Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.
5000     */
5001    @Child(name = "software", type = {}, order=17, min=0, max=1, modifier=false, summary=true)
5002    @Description(shortDefinition="Software that is covered by this capability statement", formalDefinition="Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation." )
5003    protected CapabilityStatement2SoftwareComponent software;
5004
5005    /**
5006     * Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.
5007     */
5008    @Child(name = "implementation", type = {}, order=18, min=0, max=1, modifier=false, summary=true)
5009    @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program." )
5010    protected CapabilityStatement2ImplementationComponent implementation;
5011
5012    /**
5013     * The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.
5014     */
5015    @Child(name = "fhirVersion", type = {CodeType.class}, order=19, min=1, max=1, modifier=false, summary=true)
5016    @Description(shortDefinition="FHIR Version the system supports", formalDefinition="The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value." )
5017    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/FHIR-version")
5018    protected Enumeration<FHIRVersion> fhirVersion;
5019
5020    /**
5021     * A list of the formats supported by this implementation using their content types.
5022     */
5023    @Child(name = "format", type = {CodeType.class}, order=20, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5024    @Description(shortDefinition="formats supported (xml | json | ttl | mime type)", formalDefinition="A list of the formats supported by this implementation using their content types." )
5025    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
5026    protected List<CodeType> format;
5027
5028    /**
5029     * A list of the patch formats supported by this implementation using their content types.
5030     */
5031    @Child(name = "patchFormat", type = {CodeType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5032    @Description(shortDefinition="Patch formats supported", formalDefinition="A list of the patch formats supported by this implementation using their content types." )
5033    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
5034    protected List<CodeType> patchFormat;
5035
5036    /**
5037     * A list of implementation guides that the server does (or should) support in their entirety.
5038     */
5039    @Child(name = "implementationGuide", type = {CanonicalType.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5040    @Description(shortDefinition="Implementation guides supported", formalDefinition="A list of implementation guides that the server does (or should) support in their entirety." )
5041    protected List<CanonicalType> implementationGuide;
5042
5043    /**
5044     * A definition of the restful capabilities of the solution, if any.
5045     */
5046    @Child(name = "rest", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5047    @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." )
5048    protected List<CapabilityStatement2RestComponent> rest;
5049
5050    private static final long serialVersionUID = -242661375L;
5051
5052  /**
5053   * Constructor
5054   */
5055    public CapabilityStatement2() {
5056      super();
5057    }
5058
5059  /**
5060   * Constructor
5061   */
5062    public CapabilityStatement2(PublicationStatus status, Date date, CapabilityStatementKind kind, FHIRVersion fhirVersion, String format) {
5063      super();
5064      this.setStatus(status);
5065      this.setDate(date);
5066      this.setKind(kind);
5067      this.setFhirVersion(fhirVersion);
5068      this.addFormat(format);
5069    }
5070
5071    /**
5072     * @return {@link #url} (An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
5073     */
5074    public UriType getUrlElement() { 
5075      if (this.url == null)
5076        if (Configuration.errorOnAutoCreate())
5077          throw new Error("Attempt to auto-create CapabilityStatement2.url");
5078        else if (Configuration.doAutoCreate())
5079          this.url = new UriType(); // bb
5080      return this.url;
5081    }
5082
5083    public boolean hasUrlElement() { 
5084      return this.url != null && !this.url.isEmpty();
5085    }
5086
5087    public boolean hasUrl() { 
5088      return this.url != null && !this.url.isEmpty();
5089    }
5090
5091    /**
5092     * @param value {@link #url} (An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
5093     */
5094    public CapabilityStatement2 setUrlElement(UriType value) { 
5095      this.url = value;
5096      return this;
5097    }
5098
5099    /**
5100     * @return An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.
5101     */
5102    public String getUrl() { 
5103      return this.url == null ? null : this.url.getValue();
5104    }
5105
5106    /**
5107     * @param value An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.
5108     */
5109    public CapabilityStatement2 setUrl(String value) { 
5110      if (Utilities.noString(value))
5111        this.url = null;
5112      else {
5113        if (this.url == null)
5114          this.url = new UriType();
5115        this.url.setValue(value);
5116      }
5117      return this;
5118    }
5119
5120    /**
5121     * @return {@link #version} (The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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
5122     */
5123    public StringType getVersionElement() { 
5124      if (this.version == null)
5125        if (Configuration.errorOnAutoCreate())
5126          throw new Error("Attempt to auto-create CapabilityStatement2.version");
5127        else if (Configuration.doAutoCreate())
5128          this.version = new StringType(); // bb
5129      return this.version;
5130    }
5131
5132    public boolean hasVersionElement() { 
5133      return this.version != null && !this.version.isEmpty();
5134    }
5135
5136    public boolean hasVersion() { 
5137      return this.version != null && !this.version.isEmpty();
5138    }
5139
5140    /**
5141     * @param value {@link #version} (The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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
5142     */
5143    public CapabilityStatement2 setVersionElement(StringType value) { 
5144      this.version = value;
5145      return this;
5146    }
5147
5148    /**
5149     * @return The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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.
5150     */
5151    public String getVersion() { 
5152      return this.version == null ? null : this.version.getValue();
5153    }
5154
5155    /**
5156     * @param value The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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.
5157     */
5158    public CapabilityStatement2 setVersion(String value) { 
5159      if (Utilities.noString(value))
5160        this.version = null;
5161      else {
5162        if (this.version == null)
5163          this.version = new StringType();
5164        this.version.setValue(value);
5165      }
5166      return this;
5167    }
5168
5169    /**
5170     * @return {@link #name} (A natural language name identifying the capability statement2. 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
5171     */
5172    public StringType getNameElement() { 
5173      if (this.name == null)
5174        if (Configuration.errorOnAutoCreate())
5175          throw new Error("Attempt to auto-create CapabilityStatement2.name");
5176        else if (Configuration.doAutoCreate())
5177          this.name = new StringType(); // bb
5178      return this.name;
5179    }
5180
5181    public boolean hasNameElement() { 
5182      return this.name != null && !this.name.isEmpty();
5183    }
5184
5185    public boolean hasName() { 
5186      return this.name != null && !this.name.isEmpty();
5187    }
5188
5189    /**
5190     * @param value {@link #name} (A natural language name identifying the capability statement2. 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
5191     */
5192    public CapabilityStatement2 setNameElement(StringType value) { 
5193      this.name = value;
5194      return this;
5195    }
5196
5197    /**
5198     * @return A natural language name identifying the capability statement2. This name should be usable as an identifier for the module by machine processing applications such as code generation.
5199     */
5200    public String getName() { 
5201      return this.name == null ? null : this.name.getValue();
5202    }
5203
5204    /**
5205     * @param value A natural language name identifying the capability statement2. This name should be usable as an identifier for the module by machine processing applications such as code generation.
5206     */
5207    public CapabilityStatement2 setName(String value) { 
5208      if (Utilities.noString(value))
5209        this.name = null;
5210      else {
5211        if (this.name == null)
5212          this.name = new StringType();
5213        this.name.setValue(value);
5214      }
5215      return this;
5216    }
5217
5218    /**
5219     * @return {@link #title} (A short, descriptive, user-friendly title for the capability statement2.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
5220     */
5221    public StringType getTitleElement() { 
5222      if (this.title == null)
5223        if (Configuration.errorOnAutoCreate())
5224          throw new Error("Attempt to auto-create CapabilityStatement2.title");
5225        else if (Configuration.doAutoCreate())
5226          this.title = new StringType(); // bb
5227      return this.title;
5228    }
5229
5230    public boolean hasTitleElement() { 
5231      return this.title != null && !this.title.isEmpty();
5232    }
5233
5234    public boolean hasTitle() { 
5235      return this.title != null && !this.title.isEmpty();
5236    }
5237
5238    /**
5239     * @param value {@link #title} (A short, descriptive, user-friendly title for the capability statement2.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
5240     */
5241    public CapabilityStatement2 setTitleElement(StringType value) { 
5242      this.title = value;
5243      return this;
5244    }
5245
5246    /**
5247     * @return A short, descriptive, user-friendly title for the capability statement2.
5248     */
5249    public String getTitle() { 
5250      return this.title == null ? null : this.title.getValue();
5251    }
5252
5253    /**
5254     * @param value A short, descriptive, user-friendly title for the capability statement2.
5255     */
5256    public CapabilityStatement2 setTitle(String value) { 
5257      if (Utilities.noString(value))
5258        this.title = null;
5259      else {
5260        if (this.title == null)
5261          this.title = new StringType();
5262        this.title.setValue(value);
5263      }
5264      return this;
5265    }
5266
5267    /**
5268     * @return {@link #status} (The status of this capability statement2. 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
5269     */
5270    public Enumeration<PublicationStatus> getStatusElement() { 
5271      if (this.status == null)
5272        if (Configuration.errorOnAutoCreate())
5273          throw new Error("Attempt to auto-create CapabilityStatement2.status");
5274        else if (Configuration.doAutoCreate())
5275          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
5276      return this.status;
5277    }
5278
5279    public boolean hasStatusElement() { 
5280      return this.status != null && !this.status.isEmpty();
5281    }
5282
5283    public boolean hasStatus() { 
5284      return this.status != null && !this.status.isEmpty();
5285    }
5286
5287    /**
5288     * @param value {@link #status} (The status of this capability statement2. 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
5289     */
5290    public CapabilityStatement2 setStatusElement(Enumeration<PublicationStatus> value) { 
5291      this.status = value;
5292      return this;
5293    }
5294
5295    /**
5296     * @return The status of this capability statement2. Enables tracking the life-cycle of the content.
5297     */
5298    public PublicationStatus getStatus() { 
5299      return this.status == null ? null : this.status.getValue();
5300    }
5301
5302    /**
5303     * @param value The status of this capability statement2. Enables tracking the life-cycle of the content.
5304     */
5305    public CapabilityStatement2 setStatus(PublicationStatus value) { 
5306        if (this.status == null)
5307          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
5308        this.status.setValue(value);
5309      return this;
5310    }
5311
5312    /**
5313     * @return {@link #experimental} (A Boolean value to indicate that this capability statement2 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
5314     */
5315    public BooleanType getExperimentalElement() { 
5316      if (this.experimental == null)
5317        if (Configuration.errorOnAutoCreate())
5318          throw new Error("Attempt to auto-create CapabilityStatement2.experimental");
5319        else if (Configuration.doAutoCreate())
5320          this.experimental = new BooleanType(); // bb
5321      return this.experimental;
5322    }
5323
5324    public boolean hasExperimentalElement() { 
5325      return this.experimental != null && !this.experimental.isEmpty();
5326    }
5327
5328    public boolean hasExperimental() { 
5329      return this.experimental != null && !this.experimental.isEmpty();
5330    }
5331
5332    /**
5333     * @param value {@link #experimental} (A Boolean value to indicate that this capability statement2 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
5334     */
5335    public CapabilityStatement2 setExperimentalElement(BooleanType value) { 
5336      this.experimental = value;
5337      return this;
5338    }
5339
5340    /**
5341     * @return A Boolean value to indicate that this capability statement2 is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
5342     */
5343    public boolean getExperimental() { 
5344      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
5345    }
5346
5347    /**
5348     * @param value A Boolean value to indicate that this capability statement2 is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
5349     */
5350    public CapabilityStatement2 setExperimental(boolean value) { 
5351        if (this.experimental == null)
5352          this.experimental = new BooleanType();
5353        this.experimental.setValue(value);
5354      return this;
5355    }
5356
5357    /**
5358     * @return {@link #date} (The date  (and optionally time) when the capability statement2 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 capability statement2 changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
5359     */
5360    public DateTimeType getDateElement() { 
5361      if (this.date == null)
5362        if (Configuration.errorOnAutoCreate())
5363          throw new Error("Attempt to auto-create CapabilityStatement2.date");
5364        else if (Configuration.doAutoCreate())
5365          this.date = new DateTimeType(); // bb
5366      return this.date;
5367    }
5368
5369    public boolean hasDateElement() { 
5370      return this.date != null && !this.date.isEmpty();
5371    }
5372
5373    public boolean hasDate() { 
5374      return this.date != null && !this.date.isEmpty();
5375    }
5376
5377    /**
5378     * @param value {@link #date} (The date  (and optionally time) when the capability statement2 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 capability statement2 changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
5379     */
5380    public CapabilityStatement2 setDateElement(DateTimeType value) { 
5381      this.date = value;
5382      return this;
5383    }
5384
5385    /**
5386     * @return The date  (and optionally time) when the capability statement2 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 capability statement2 changes.
5387     */
5388    public Date getDate() { 
5389      return this.date == null ? null : this.date.getValue();
5390    }
5391
5392    /**
5393     * @param value The date  (and optionally time) when the capability statement2 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 capability statement2 changes.
5394     */
5395    public CapabilityStatement2 setDate(Date value) { 
5396        if (this.date == null)
5397          this.date = new DateTimeType();
5398        this.date.setValue(value);
5399      return this;
5400    }
5401
5402    /**
5403     * @return {@link #publisher} (The name of the organization or individual that published the capability statement2.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
5404     */
5405    public StringType getPublisherElement() { 
5406      if (this.publisher == null)
5407        if (Configuration.errorOnAutoCreate())
5408          throw new Error("Attempt to auto-create CapabilityStatement2.publisher");
5409        else if (Configuration.doAutoCreate())
5410          this.publisher = new StringType(); // bb
5411      return this.publisher;
5412    }
5413
5414    public boolean hasPublisherElement() { 
5415      return this.publisher != null && !this.publisher.isEmpty();
5416    }
5417
5418    public boolean hasPublisher() { 
5419      return this.publisher != null && !this.publisher.isEmpty();
5420    }
5421
5422    /**
5423     * @param value {@link #publisher} (The name of the organization or individual that published the capability statement2.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
5424     */
5425    public CapabilityStatement2 setPublisherElement(StringType value) { 
5426      this.publisher = value;
5427      return this;
5428    }
5429
5430    /**
5431     * @return The name of the organization or individual that published the capability statement2.
5432     */
5433    public String getPublisher() { 
5434      return this.publisher == null ? null : this.publisher.getValue();
5435    }
5436
5437    /**
5438     * @param value The name of the organization or individual that published the capability statement2.
5439     */
5440    public CapabilityStatement2 setPublisher(String value) { 
5441      if (Utilities.noString(value))
5442        this.publisher = null;
5443      else {
5444        if (this.publisher == null)
5445          this.publisher = new StringType();
5446        this.publisher.setValue(value);
5447      }
5448      return this;
5449    }
5450
5451    /**
5452     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
5453     */
5454    public List<ContactDetail> getContact() { 
5455      if (this.contact == null)
5456        this.contact = new ArrayList<ContactDetail>();
5457      return this.contact;
5458    }
5459
5460    /**
5461     * @return Returns a reference to <code>this</code> for easy method chaining
5462     */
5463    public CapabilityStatement2 setContact(List<ContactDetail> theContact) { 
5464      this.contact = theContact;
5465      return this;
5466    }
5467
5468    public boolean hasContact() { 
5469      if (this.contact == null)
5470        return false;
5471      for (ContactDetail item : this.contact)
5472        if (!item.isEmpty())
5473          return true;
5474      return false;
5475    }
5476
5477    public ContactDetail addContact() { //3
5478      ContactDetail t = new ContactDetail();
5479      if (this.contact == null)
5480        this.contact = new ArrayList<ContactDetail>();
5481      this.contact.add(t);
5482      return t;
5483    }
5484
5485    public CapabilityStatement2 addContact(ContactDetail t) { //3
5486      if (t == null)
5487        return this;
5488      if (this.contact == null)
5489        this.contact = new ArrayList<ContactDetail>();
5490      this.contact.add(t);
5491      return this;
5492    }
5493
5494    /**
5495     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
5496     */
5497    public ContactDetail getContactFirstRep() { 
5498      if (getContact().isEmpty()) {
5499        addContact();
5500      }
5501      return getContact().get(0);
5502    }
5503
5504    /**
5505     * @return {@link #description} (A free text natural language description of the capability statement2 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
5506     */
5507    public MarkdownType getDescriptionElement() { 
5508      if (this.description == null)
5509        if (Configuration.errorOnAutoCreate())
5510          throw new Error("Attempt to auto-create CapabilityStatement2.description");
5511        else if (Configuration.doAutoCreate())
5512          this.description = new MarkdownType(); // bb
5513      return this.description;
5514    }
5515
5516    public boolean hasDescriptionElement() { 
5517      return this.description != null && !this.description.isEmpty();
5518    }
5519
5520    public boolean hasDescription() { 
5521      return this.description != null && !this.description.isEmpty();
5522    }
5523
5524    /**
5525     * @param value {@link #description} (A free text natural language description of the capability statement2 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
5526     */
5527    public CapabilityStatement2 setDescriptionElement(MarkdownType value) { 
5528      this.description = value;
5529      return this;
5530    }
5531
5532    /**
5533     * @return A free text natural language description of the capability statement2 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.
5534     */
5535    public String getDescription() { 
5536      return this.description == null ? null : this.description.getValue();
5537    }
5538
5539    /**
5540     * @param value A free text natural language description of the capability statement2 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.
5541     */
5542    public CapabilityStatement2 setDescription(String value) { 
5543      if (value == null)
5544        this.description = null;
5545      else {
5546        if (this.description == null)
5547          this.description = new MarkdownType();
5548        this.description.setValue(value);
5549      }
5550      return this;
5551    }
5552
5553    /**
5554     * @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 capability statement2 instances.)
5555     */
5556    public List<UsageContext> getUseContext() { 
5557      if (this.useContext == null)
5558        this.useContext = new ArrayList<UsageContext>();
5559      return this.useContext;
5560    }
5561
5562    /**
5563     * @return Returns a reference to <code>this</code> for easy method chaining
5564     */
5565    public CapabilityStatement2 setUseContext(List<UsageContext> theUseContext) { 
5566      this.useContext = theUseContext;
5567      return this;
5568    }
5569
5570    public boolean hasUseContext() { 
5571      if (this.useContext == null)
5572        return false;
5573      for (UsageContext item : this.useContext)
5574        if (!item.isEmpty())
5575          return true;
5576      return false;
5577    }
5578
5579    public UsageContext addUseContext() { //3
5580      UsageContext t = new UsageContext();
5581      if (this.useContext == null)
5582        this.useContext = new ArrayList<UsageContext>();
5583      this.useContext.add(t);
5584      return t;
5585    }
5586
5587    public CapabilityStatement2 addUseContext(UsageContext t) { //3
5588      if (t == null)
5589        return this;
5590      if (this.useContext == null)
5591        this.useContext = new ArrayList<UsageContext>();
5592      this.useContext.add(t);
5593      return this;
5594    }
5595
5596    /**
5597     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
5598     */
5599    public UsageContext getUseContextFirstRep() { 
5600      if (getUseContext().isEmpty()) {
5601        addUseContext();
5602      }
5603      return getUseContext().get(0);
5604    }
5605
5606    /**
5607     * @return {@link #jurisdiction} (A legal or geographic region in which the capability statement2 is intended to be used.)
5608     */
5609    public List<CodeableConcept> getJurisdiction() { 
5610      if (this.jurisdiction == null)
5611        this.jurisdiction = new ArrayList<CodeableConcept>();
5612      return this.jurisdiction;
5613    }
5614
5615    /**
5616     * @return Returns a reference to <code>this</code> for easy method chaining
5617     */
5618    public CapabilityStatement2 setJurisdiction(List<CodeableConcept> theJurisdiction) { 
5619      this.jurisdiction = theJurisdiction;
5620      return this;
5621    }
5622
5623    public boolean hasJurisdiction() { 
5624      if (this.jurisdiction == null)
5625        return false;
5626      for (CodeableConcept item : this.jurisdiction)
5627        if (!item.isEmpty())
5628          return true;
5629      return false;
5630    }
5631
5632    public CodeableConcept addJurisdiction() { //3
5633      CodeableConcept t = new CodeableConcept();
5634      if (this.jurisdiction == null)
5635        this.jurisdiction = new ArrayList<CodeableConcept>();
5636      this.jurisdiction.add(t);
5637      return t;
5638    }
5639
5640    public CapabilityStatement2 addJurisdiction(CodeableConcept t) { //3
5641      if (t == null)
5642        return this;
5643      if (this.jurisdiction == null)
5644        this.jurisdiction = new ArrayList<CodeableConcept>();
5645      this.jurisdiction.add(t);
5646      return this;
5647    }
5648
5649    /**
5650     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
5651     */
5652    public CodeableConcept getJurisdictionFirstRep() { 
5653      if (getJurisdiction().isEmpty()) {
5654        addJurisdiction();
5655      }
5656      return getJurisdiction().get(0);
5657    }
5658
5659    /**
5660     * @return {@link #purpose} (Explanation of why this capability statement2 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
5661     */
5662    public MarkdownType getPurposeElement() { 
5663      if (this.purpose == null)
5664        if (Configuration.errorOnAutoCreate())
5665          throw new Error("Attempt to auto-create CapabilityStatement2.purpose");
5666        else if (Configuration.doAutoCreate())
5667          this.purpose = new MarkdownType(); // bb
5668      return this.purpose;
5669    }
5670
5671    public boolean hasPurposeElement() { 
5672      return this.purpose != null && !this.purpose.isEmpty();
5673    }
5674
5675    public boolean hasPurpose() { 
5676      return this.purpose != null && !this.purpose.isEmpty();
5677    }
5678
5679    /**
5680     * @param value {@link #purpose} (Explanation of why this capability statement2 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
5681     */
5682    public CapabilityStatement2 setPurposeElement(MarkdownType value) { 
5683      this.purpose = value;
5684      return this;
5685    }
5686
5687    /**
5688     * @return Explanation of why this capability statement2 is needed and why it has been designed as it has.
5689     */
5690    public String getPurpose() { 
5691      return this.purpose == null ? null : this.purpose.getValue();
5692    }
5693
5694    /**
5695     * @param value Explanation of why this capability statement2 is needed and why it has been designed as it has.
5696     */
5697    public CapabilityStatement2 setPurpose(String value) { 
5698      if (value == null)
5699        this.purpose = null;
5700      else {
5701        if (this.purpose == null)
5702          this.purpose = new MarkdownType();
5703        this.purpose.setValue(value);
5704      }
5705      return this;
5706    }
5707
5708    /**
5709     * @return {@link #copyright} (A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
5710     */
5711    public MarkdownType getCopyrightElement() { 
5712      if (this.copyright == null)
5713        if (Configuration.errorOnAutoCreate())
5714          throw new Error("Attempt to auto-create CapabilityStatement2.copyright");
5715        else if (Configuration.doAutoCreate())
5716          this.copyright = new MarkdownType(); // bb
5717      return this.copyright;
5718    }
5719
5720    public boolean hasCopyrightElement() { 
5721      return this.copyright != null && !this.copyright.isEmpty();
5722    }
5723
5724    public boolean hasCopyright() { 
5725      return this.copyright != null && !this.copyright.isEmpty();
5726    }
5727
5728    /**
5729     * @param value {@link #copyright} (A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
5730     */
5731    public CapabilityStatement2 setCopyrightElement(MarkdownType value) { 
5732      this.copyright = value;
5733      return this;
5734    }
5735
5736    /**
5737     * @return A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.
5738     */
5739    public String getCopyright() { 
5740      return this.copyright == null ? null : this.copyright.getValue();
5741    }
5742
5743    /**
5744     * @param value A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.
5745     */
5746    public CapabilityStatement2 setCopyright(String value) { 
5747      if (value == null)
5748        this.copyright = null;
5749      else {
5750        if (this.copyright == null)
5751          this.copyright = new MarkdownType();
5752        this.copyright.setValue(value);
5753      }
5754      return this;
5755    }
5756
5757    /**
5758     * @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
5759     */
5760    public Enumeration<CapabilityStatementKind> getKindElement() { 
5761      if (this.kind == null)
5762        if (Configuration.errorOnAutoCreate())
5763          throw new Error("Attempt to auto-create CapabilityStatement2.kind");
5764        else if (Configuration.doAutoCreate())
5765          this.kind = new Enumeration<CapabilityStatementKind>(new CapabilityStatementKindEnumFactory()); // bb
5766      return this.kind;
5767    }
5768
5769    public boolean hasKindElement() { 
5770      return this.kind != null && !this.kind.isEmpty();
5771    }
5772
5773    public boolean hasKind() { 
5774      return this.kind != null && !this.kind.isEmpty();
5775    }
5776
5777    /**
5778     * @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
5779     */
5780    public CapabilityStatement2 setKindElement(Enumeration<CapabilityStatementKind> value) { 
5781      this.kind = value;
5782      return this;
5783    }
5784
5785    /**
5786     * @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).
5787     */
5788    public CapabilityStatementKind getKind() { 
5789      return this.kind == null ? null : this.kind.getValue();
5790    }
5791
5792    /**
5793     * @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).
5794     */
5795    public CapabilityStatement2 setKind(CapabilityStatementKind value) { 
5796        if (this.kind == null)
5797          this.kind = new Enumeration<CapabilityStatementKind>(new CapabilityStatementKindEnumFactory());
5798        this.kind.setValue(value);
5799      return this;
5800    }
5801
5802    /**
5803     * @return {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.)
5804     */
5805    public List<CanonicalType> getInstantiates() { 
5806      if (this.instantiates == null)
5807        this.instantiates = new ArrayList<CanonicalType>();
5808      return this.instantiates;
5809    }
5810
5811    /**
5812     * @return Returns a reference to <code>this</code> for easy method chaining
5813     */
5814    public CapabilityStatement2 setInstantiates(List<CanonicalType> theInstantiates) { 
5815      this.instantiates = theInstantiates;
5816      return this;
5817    }
5818
5819    public boolean hasInstantiates() { 
5820      if (this.instantiates == null)
5821        return false;
5822      for (CanonicalType item : this.instantiates)
5823        if (!item.isEmpty())
5824          return true;
5825      return false;
5826    }
5827
5828    /**
5829     * @return {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.)
5830     */
5831    public CanonicalType addInstantiatesElement() {//2 
5832      CanonicalType t = new CanonicalType();
5833      if (this.instantiates == null)
5834        this.instantiates = new ArrayList<CanonicalType>();
5835      this.instantiates.add(t);
5836      return t;
5837    }
5838
5839    /**
5840     * @param value {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.)
5841     */
5842    public CapabilityStatement2 addInstantiates(String value) { //1
5843      CanonicalType t = new CanonicalType();
5844      t.setValue(value);
5845      if (this.instantiates == null)
5846        this.instantiates = new ArrayList<CanonicalType>();
5847      this.instantiates.add(t);
5848      return this;
5849    }
5850
5851    /**
5852     * @param value {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.)
5853     */
5854    public boolean hasInstantiates(String value) { 
5855      if (this.instantiates == null)
5856        return false;
5857      for (CanonicalType v : this.instantiates)
5858        if (v.getValue().equals(value)) // canonical
5859          return true;
5860      return false;
5861    }
5862
5863    /**
5864     * @return {@link #imports} (Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.)
5865     */
5866    public List<CanonicalType> getImports() { 
5867      if (this.imports == null)
5868        this.imports = new ArrayList<CanonicalType>();
5869      return this.imports;
5870    }
5871
5872    /**
5873     * @return Returns a reference to <code>this</code> for easy method chaining
5874     */
5875    public CapabilityStatement2 setImports(List<CanonicalType> theImports) { 
5876      this.imports = theImports;
5877      return this;
5878    }
5879
5880    public boolean hasImports() { 
5881      if (this.imports == null)
5882        return false;
5883      for (CanonicalType item : this.imports)
5884        if (!item.isEmpty())
5885          return true;
5886      return false;
5887    }
5888
5889    /**
5890     * @return {@link #imports} (Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.)
5891     */
5892    public CanonicalType addImportsElement() {//2 
5893      CanonicalType t = new CanonicalType();
5894      if (this.imports == null)
5895        this.imports = new ArrayList<CanonicalType>();
5896      this.imports.add(t);
5897      return t;
5898    }
5899
5900    /**
5901     * @param value {@link #imports} (Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.)
5902     */
5903    public CapabilityStatement2 addImports(String value) { //1
5904      CanonicalType t = new CanonicalType();
5905      t.setValue(value);
5906      if (this.imports == null)
5907        this.imports = new ArrayList<CanonicalType>();
5908      this.imports.add(t);
5909      return this;
5910    }
5911
5912    /**
5913     * @param value {@link #imports} (Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.)
5914     */
5915    public boolean hasImports(String value) { 
5916      if (this.imports == null)
5917        return false;
5918      for (CanonicalType v : this.imports)
5919        if (v.getValue().equals(value)) // canonical
5920          return true;
5921      return false;
5922    }
5923
5924    /**
5925     * @return {@link #software} (Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.)
5926     */
5927    public CapabilityStatement2SoftwareComponent getSoftware() { 
5928      if (this.software == null)
5929        if (Configuration.errorOnAutoCreate())
5930          throw new Error("Attempt to auto-create CapabilityStatement2.software");
5931        else if (Configuration.doAutoCreate())
5932          this.software = new CapabilityStatement2SoftwareComponent(); // cc
5933      return this.software;
5934    }
5935
5936    public boolean hasSoftware() { 
5937      return this.software != null && !this.software.isEmpty();
5938    }
5939
5940    /**
5941     * @param value {@link #software} (Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.)
5942     */
5943    public CapabilityStatement2 setSoftware(CapabilityStatement2SoftwareComponent value) { 
5944      this.software = value;
5945      return this;
5946    }
5947
5948    /**
5949     * @return {@link #implementation} (Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.)
5950     */
5951    public CapabilityStatement2ImplementationComponent getImplementation() { 
5952      if (this.implementation == null)
5953        if (Configuration.errorOnAutoCreate())
5954          throw new Error("Attempt to auto-create CapabilityStatement2.implementation");
5955        else if (Configuration.doAutoCreate())
5956          this.implementation = new CapabilityStatement2ImplementationComponent(); // cc
5957      return this.implementation;
5958    }
5959
5960    public boolean hasImplementation() { 
5961      return this.implementation != null && !this.implementation.isEmpty();
5962    }
5963
5964    /**
5965     * @param value {@link #implementation} (Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.)
5966     */
5967    public CapabilityStatement2 setImplementation(CapabilityStatement2ImplementationComponent value) { 
5968      this.implementation = value;
5969      return this;
5970    }
5971
5972    /**
5973     * @return {@link #fhirVersion} (The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
5974     */
5975    public Enumeration<FHIRVersion> getFhirVersionElement() { 
5976      if (this.fhirVersion == null)
5977        if (Configuration.errorOnAutoCreate())
5978          throw new Error("Attempt to auto-create CapabilityStatement2.fhirVersion");
5979        else if (Configuration.doAutoCreate())
5980          this.fhirVersion = new Enumeration<FHIRVersion>(new FHIRVersionEnumFactory()); // bb
5981      return this.fhirVersion;
5982    }
5983
5984    public boolean hasFhirVersionElement() { 
5985      return this.fhirVersion != null && !this.fhirVersion.isEmpty();
5986    }
5987
5988    public boolean hasFhirVersion() { 
5989      return this.fhirVersion != null && !this.fhirVersion.isEmpty();
5990    }
5991
5992    /**
5993     * @param value {@link #fhirVersion} (The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
5994     */
5995    public CapabilityStatement2 setFhirVersionElement(Enumeration<FHIRVersion> value) { 
5996      this.fhirVersion = value;
5997      return this;
5998    }
5999
6000    /**
6001     * @return The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.
6002     */
6003    public FHIRVersion getFhirVersion() { 
6004      return this.fhirVersion == null ? null : this.fhirVersion.getValue();
6005    }
6006
6007    /**
6008     * @param value The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.
6009     */
6010    public CapabilityStatement2 setFhirVersion(FHIRVersion value) { 
6011        if (this.fhirVersion == null)
6012          this.fhirVersion = new Enumeration<FHIRVersion>(new FHIRVersionEnumFactory());
6013        this.fhirVersion.setValue(value);
6014      return this;
6015    }
6016
6017    /**
6018     * @return {@link #format} (A list of the formats supported by this implementation using their content types.)
6019     */
6020    public List<CodeType> getFormat() { 
6021      if (this.format == null)
6022        this.format = new ArrayList<CodeType>();
6023      return this.format;
6024    }
6025
6026    /**
6027     * @return Returns a reference to <code>this</code> for easy method chaining
6028     */
6029    public CapabilityStatement2 setFormat(List<CodeType> theFormat) { 
6030      this.format = theFormat;
6031      return this;
6032    }
6033
6034    public boolean hasFormat() { 
6035      if (this.format == null)
6036        return false;
6037      for (CodeType item : this.format)
6038        if (!item.isEmpty())
6039          return true;
6040      return false;
6041    }
6042
6043    /**
6044     * @return {@link #format} (A list of the formats supported by this implementation using their content types.)
6045     */
6046    public CodeType addFormatElement() {//2 
6047      CodeType t = new CodeType();
6048      if (this.format == null)
6049        this.format = new ArrayList<CodeType>();
6050      this.format.add(t);
6051      return t;
6052    }
6053
6054    /**
6055     * @param value {@link #format} (A list of the formats supported by this implementation using their content types.)
6056     */
6057    public CapabilityStatement2 addFormat(String value) { //1
6058      CodeType t = new CodeType();
6059      t.setValue(value);
6060      if (this.format == null)
6061        this.format = new ArrayList<CodeType>();
6062      this.format.add(t);
6063      return this;
6064    }
6065
6066    /**
6067     * @param value {@link #format} (A list of the formats supported by this implementation using their content types.)
6068     */
6069    public boolean hasFormat(String value) { 
6070      if (this.format == null)
6071        return false;
6072      for (CodeType v : this.format)
6073        if (v.getValue().equals(value)) // code
6074          return true;
6075      return false;
6076    }
6077
6078    /**
6079     * @return {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
6080     */
6081    public List<CodeType> getPatchFormat() { 
6082      if (this.patchFormat == null)
6083        this.patchFormat = new ArrayList<CodeType>();
6084      return this.patchFormat;
6085    }
6086
6087    /**
6088     * @return Returns a reference to <code>this</code> for easy method chaining
6089     */
6090    public CapabilityStatement2 setPatchFormat(List<CodeType> thePatchFormat) { 
6091      this.patchFormat = thePatchFormat;
6092      return this;
6093    }
6094
6095    public boolean hasPatchFormat() { 
6096      if (this.patchFormat == null)
6097        return false;
6098      for (CodeType item : this.patchFormat)
6099        if (!item.isEmpty())
6100          return true;
6101      return false;
6102    }
6103
6104    /**
6105     * @return {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
6106     */
6107    public CodeType addPatchFormatElement() {//2 
6108      CodeType t = new CodeType();
6109      if (this.patchFormat == null)
6110        this.patchFormat = new ArrayList<CodeType>();
6111      this.patchFormat.add(t);
6112      return t;
6113    }
6114
6115    /**
6116     * @param value {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
6117     */
6118    public CapabilityStatement2 addPatchFormat(String value) { //1
6119      CodeType t = new CodeType();
6120      t.setValue(value);
6121      if (this.patchFormat == null)
6122        this.patchFormat = new ArrayList<CodeType>();
6123      this.patchFormat.add(t);
6124      return this;
6125    }
6126
6127    /**
6128     * @param value {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
6129     */
6130    public boolean hasPatchFormat(String value) { 
6131      if (this.patchFormat == null)
6132        return false;
6133      for (CodeType v : this.patchFormat)
6134        if (v.getValue().equals(value)) // code
6135          return true;
6136      return false;
6137    }
6138
6139    /**
6140     * @return {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
6141     */
6142    public List<CanonicalType> getImplementationGuide() { 
6143      if (this.implementationGuide == null)
6144        this.implementationGuide = new ArrayList<CanonicalType>();
6145      return this.implementationGuide;
6146    }
6147
6148    /**
6149     * @return Returns a reference to <code>this</code> for easy method chaining
6150     */
6151    public CapabilityStatement2 setImplementationGuide(List<CanonicalType> theImplementationGuide) { 
6152      this.implementationGuide = theImplementationGuide;
6153      return this;
6154    }
6155
6156    public boolean hasImplementationGuide() { 
6157      if (this.implementationGuide == null)
6158        return false;
6159      for (CanonicalType item : this.implementationGuide)
6160        if (!item.isEmpty())
6161          return true;
6162      return false;
6163    }
6164
6165    /**
6166     * @return {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
6167     */
6168    public CanonicalType addImplementationGuideElement() {//2 
6169      CanonicalType t = new CanonicalType();
6170      if (this.implementationGuide == null)
6171        this.implementationGuide = new ArrayList<CanonicalType>();
6172      this.implementationGuide.add(t);
6173      return t;
6174    }
6175
6176    /**
6177     * @param value {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
6178     */
6179    public CapabilityStatement2 addImplementationGuide(String value) { //1
6180      CanonicalType t = new CanonicalType();
6181      t.setValue(value);
6182      if (this.implementationGuide == null)
6183        this.implementationGuide = new ArrayList<CanonicalType>();
6184      this.implementationGuide.add(t);
6185      return this;
6186    }
6187
6188    /**
6189     * @param value {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
6190     */
6191    public boolean hasImplementationGuide(String value) { 
6192      if (this.implementationGuide == null)
6193        return false;
6194      for (CanonicalType v : this.implementationGuide)
6195        if (v.getValue().equals(value)) // canonical
6196          return true;
6197      return false;
6198    }
6199
6200    /**
6201     * @return {@link #rest} (A definition of the restful capabilities of the solution, if any.)
6202     */
6203    public List<CapabilityStatement2RestComponent> getRest() { 
6204      if (this.rest == null)
6205        this.rest = new ArrayList<CapabilityStatement2RestComponent>();
6206      return this.rest;
6207    }
6208
6209    /**
6210     * @return Returns a reference to <code>this</code> for easy method chaining
6211     */
6212    public CapabilityStatement2 setRest(List<CapabilityStatement2RestComponent> theRest) { 
6213      this.rest = theRest;
6214      return this;
6215    }
6216
6217    public boolean hasRest() { 
6218      if (this.rest == null)
6219        return false;
6220      for (CapabilityStatement2RestComponent item : this.rest)
6221        if (!item.isEmpty())
6222          return true;
6223      return false;
6224    }
6225
6226    public CapabilityStatement2RestComponent addRest() { //3
6227      CapabilityStatement2RestComponent t = new CapabilityStatement2RestComponent();
6228      if (this.rest == null)
6229        this.rest = new ArrayList<CapabilityStatement2RestComponent>();
6230      this.rest.add(t);
6231      return t;
6232    }
6233
6234    public CapabilityStatement2 addRest(CapabilityStatement2RestComponent t) { //3
6235      if (t == null)
6236        return this;
6237      if (this.rest == null)
6238        this.rest = new ArrayList<CapabilityStatement2RestComponent>();
6239      this.rest.add(t);
6240      return this;
6241    }
6242
6243    /**
6244     * @return The first repetition of repeating field {@link #rest}, creating it if it does not already exist {3}
6245     */
6246    public CapabilityStatement2RestComponent getRestFirstRep() { 
6247      if (getRest().isEmpty()) {
6248        addRest();
6249      }
6250      return getRest().get(0);
6251    }
6252
6253    /**
6254     * not supported on this implementation
6255     */
6256    @Override
6257    public int getIdentifierMax() { 
6258      return 0;
6259    }
6260    /**
6261     * @return {@link #identifier} (A formal identifier that is used to identify this capability statement2 when it is represented in other formats, or referenced in a specification, model, design or an instance.)
6262     */
6263    public List<Identifier> getIdentifier() { 
6264      return new ArrayList<>();
6265    }
6266    /**
6267     * @return Returns a reference to <code>this</code> for easy method chaining
6268     */
6269    public CapabilityStatement2 setIdentifier(List<Identifier> theIdentifier) { 
6270      throw new Error("The resource type \"CapabilityStatement2\" does not implement the property \"identifier\"");
6271    }
6272    public boolean hasIdentifier() { 
6273      return false;
6274    }
6275
6276    public Identifier addIdentifier() { //3
6277      throw new Error("The resource type \"CapabilityStatement2\" does not implement the property \"identifier\"");
6278    }
6279    public CapabilityStatement2 addIdentifier(Identifier t) { //3
6280      throw new Error("The resource type \"CapabilityStatement2\" does not implement the property \"identifier\"");
6281    }
6282    /**
6283     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {2}
6284     */
6285    public Identifier getIdentifierFirstRep() { 
6286      throw new Error("The resource type \"CapabilityStatement2\" does not implement the property \"identifier\"");
6287    }
6288      protected void listChildren(List<Property> children) {
6289        super.listChildren(children);
6290        children.add(new Property("url", "uri", "An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.", 0, 1, url));
6291        children.add(new Property("version", "string", "The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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));
6292        children.add(new Property("name", "string", "A natural language name identifying the capability statement2. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
6293        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the capability statement2.", 0, 1, title));
6294        children.add(new Property("status", "code", "The status of this capability statement2. Enables tracking the life-cycle of the content.", 0, 1, status));
6295        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this capability statement2 is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
6296        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the capability statement2 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 capability statement2 changes.", 0, 1, date));
6297        children.add(new Property("publisher", "string", "The name of the organization or individual that published the capability statement2.", 0, 1, publisher));
6298        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));
6299        children.add(new Property("description", "markdown", "A free text natural language description of the capability statement2 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));
6300        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 capability statement2 instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
6301        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the capability statement2 is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
6302        children.add(new Property("purpose", "markdown", "Explanation of why this capability statement2 is needed and why it has been designed as it has.", 0, 1, purpose));
6303        children.add(new Property("copyright", "markdown", "A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.", 0, 1, copyright));
6304        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));
6305        children.add(new Property("instantiates", "canonical(CapabilityStatement2)", "Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.", 0, java.lang.Integer.MAX_VALUE, instantiates));
6306        children.add(new Property("imports", "canonical(CapabilityStatement2)", "Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.", 0, java.lang.Integer.MAX_VALUE, imports));
6307        children.add(new Property("software", "", "Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.", 0, 1, software));
6308        children.add(new Property("implementation", "", "Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.", 0, 1, implementation));
6309        children.add(new Property("fhirVersion", "code", "The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.", 0, 1, fhirVersion));
6310        children.add(new Property("format", "code", "A list of the formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, format));
6311        children.add(new Property("patchFormat", "code", "A list of the patch formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, patchFormat));
6312        children.add(new Property("implementationGuide", "canonical(ImplementationGuide)", "A list of implementation guides that the server does (or should) support in their entirety.", 0, java.lang.Integer.MAX_VALUE, implementationGuide));
6313        children.add(new Property("rest", "", "A definition of the restful capabilities of the solution, if any.", 0, java.lang.Integer.MAX_VALUE, rest));
6314      }
6315
6316      @Override
6317      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6318        switch (_hash) {
6319        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this capability statement2 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 capability statement2 is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement2 is stored on different servers.", 0, 1, url);
6320        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the capability statement2 when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement2 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);
6321        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the capability statement2. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
6322        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the capability statement2.", 0, 1, title);
6323        case -892481550: /*status*/  return new Property("status", "code", "The status of this capability statement2. Enables tracking the life-cycle of the content.", 0, 1, status);
6324        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this capability statement2 is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
6325        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the capability statement2 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 capability statement2 changes.", 0, 1, date);
6326        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the capability statement2.", 0, 1, publisher);
6327        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);
6328        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the capability statement2 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);
6329        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 capability statement2 instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
6330        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the capability statement2 is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
6331        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this capability statement2 is needed and why it has been designed as it has.", 0, 1, purpose);
6332        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the capability statement2 and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement2.", 0, 1, copyright);
6333        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);
6334        case -246883639: /*instantiates*/  return new Property("instantiates", "canonical(CapabilityStatement2)", "Reference to a canonical URL of another CapabilityStatement2 that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.", 0, java.lang.Integer.MAX_VALUE, instantiates);
6335        case 1926037870: /*imports*/  return new Property("imports", "canonical(CapabilityStatement2)", "Reference to a canonical URL of another CapabilityStatement2 that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.", 0, java.lang.Integer.MAX_VALUE, imports);
6336        case 1319330215: /*software*/  return new Property("software", "", "Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.", 0, 1, software);
6337        case 1683336114: /*implementation*/  return new Property("implementation", "", "Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.", 0, 1, implementation);
6338        case 461006061: /*fhirVersion*/  return new Property("fhirVersion", "code", "The version of the FHIR specification that this CapabilityStatement2 describes (which SHALL be the same as the FHIR version of the CapabilityStatement2 itself). There is no default value.", 0, 1, fhirVersion);
6339        case -1268779017: /*format*/  return new Property("format", "code", "A list of the formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, format);
6340        case 172338783: /*patchFormat*/  return new Property("patchFormat", "code", "A list of the patch formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, patchFormat);
6341        case 156966506: /*implementationGuide*/  return new Property("implementationGuide", "canonical(ImplementationGuide)", "A list of implementation guides that the server does (or should) support in their entirety.", 0, java.lang.Integer.MAX_VALUE, implementationGuide);
6342        case 3496916: /*rest*/  return new Property("rest", "", "A definition of the restful capabilities of the solution, if any.", 0, java.lang.Integer.MAX_VALUE, rest);
6343        default: return super.getNamedProperty(_hash, _name, _checkValid);
6344        }
6345
6346      }
6347
6348      @Override
6349      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6350        switch (hash) {
6351        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
6352        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
6353        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
6354        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
6355        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
6356        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
6357        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
6358        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
6359        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
6360        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
6361        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
6362        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
6363        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
6364        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
6365        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<CapabilityStatementKind>
6366        case -246883639: /*instantiates*/ return this.instantiates == null ? new Base[0] : this.instantiates.toArray(new Base[this.instantiates.size()]); // CanonicalType
6367        case 1926037870: /*imports*/ return this.imports == null ? new Base[0] : this.imports.toArray(new Base[this.imports.size()]); // CanonicalType
6368        case 1319330215: /*software*/ return this.software == null ? new Base[0] : new Base[] {this.software}; // CapabilityStatement2SoftwareComponent
6369        case 1683336114: /*implementation*/ return this.implementation == null ? new Base[0] : new Base[] {this.implementation}; // CapabilityStatement2ImplementationComponent
6370        case 461006061: /*fhirVersion*/ return this.fhirVersion == null ? new Base[0] : new Base[] {this.fhirVersion}; // Enumeration<FHIRVersion>
6371        case -1268779017: /*format*/ return this.format == null ? new Base[0] : this.format.toArray(new Base[this.format.size()]); // CodeType
6372        case 172338783: /*patchFormat*/ return this.patchFormat == null ? new Base[0] : this.patchFormat.toArray(new Base[this.patchFormat.size()]); // CodeType
6373        case 156966506: /*implementationGuide*/ return this.implementationGuide == null ? new Base[0] : this.implementationGuide.toArray(new Base[this.implementationGuide.size()]); // CanonicalType
6374        case 3496916: /*rest*/ return this.rest == null ? new Base[0] : this.rest.toArray(new Base[this.rest.size()]); // CapabilityStatement2RestComponent
6375        default: return super.getProperty(hash, name, checkValid);
6376        }
6377
6378      }
6379
6380      @Override
6381      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6382        switch (hash) {
6383        case 116079: // url
6384          this.url = TypeConvertor.castToUri(value); // UriType
6385          return value;
6386        case 351608024: // version
6387          this.version = TypeConvertor.castToString(value); // StringType
6388          return value;
6389        case 3373707: // name
6390          this.name = TypeConvertor.castToString(value); // StringType
6391          return value;
6392        case 110371416: // title
6393          this.title = TypeConvertor.castToString(value); // StringType
6394          return value;
6395        case -892481550: // status
6396          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
6397          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
6398          return value;
6399        case -404562712: // experimental
6400          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
6401          return value;
6402        case 3076014: // date
6403          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
6404          return value;
6405        case 1447404028: // publisher
6406          this.publisher = TypeConvertor.castToString(value); // StringType
6407          return value;
6408        case 951526432: // contact
6409          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
6410          return value;
6411        case -1724546052: // description
6412          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
6413          return value;
6414        case -669707736: // useContext
6415          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
6416          return value;
6417        case -507075711: // jurisdiction
6418          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
6419          return value;
6420        case -220463842: // purpose
6421          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
6422          return value;
6423        case 1522889671: // copyright
6424          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
6425          return value;
6426        case 3292052: // kind
6427          value = new CapabilityStatementKindEnumFactory().fromType(TypeConvertor.castToCode(value));
6428          this.kind = (Enumeration) value; // Enumeration<CapabilityStatementKind>
6429          return value;
6430        case -246883639: // instantiates
6431          this.getInstantiates().add(TypeConvertor.castToCanonical(value)); // CanonicalType
6432          return value;
6433        case 1926037870: // imports
6434          this.getImports().add(TypeConvertor.castToCanonical(value)); // CanonicalType
6435          return value;
6436        case 1319330215: // software
6437          this.software = (CapabilityStatement2SoftwareComponent) value; // CapabilityStatement2SoftwareComponent
6438          return value;
6439        case 1683336114: // implementation
6440          this.implementation = (CapabilityStatement2ImplementationComponent) value; // CapabilityStatement2ImplementationComponent
6441          return value;
6442        case 461006061: // fhirVersion
6443          value = new FHIRVersionEnumFactory().fromType(TypeConvertor.castToCode(value));
6444          this.fhirVersion = (Enumeration) value; // Enumeration<FHIRVersion>
6445          return value;
6446        case -1268779017: // format
6447          this.getFormat().add(TypeConvertor.castToCode(value)); // CodeType
6448          return value;
6449        case 172338783: // patchFormat
6450          this.getPatchFormat().add(TypeConvertor.castToCode(value)); // CodeType
6451          return value;
6452        case 156966506: // implementationGuide
6453          this.getImplementationGuide().add(TypeConvertor.castToCanonical(value)); // CanonicalType
6454          return value;
6455        case 3496916: // rest
6456          this.getRest().add((CapabilityStatement2RestComponent) value); // CapabilityStatement2RestComponent
6457          return value;
6458        default: return super.setProperty(hash, name, value);
6459        }
6460
6461      }
6462
6463      @Override
6464      public Base setProperty(String name, Base value) throws FHIRException {
6465        if (name.equals("url")) {
6466          this.url = TypeConvertor.castToUri(value); // UriType
6467        } else if (name.equals("version")) {
6468          this.version = TypeConvertor.castToString(value); // StringType
6469        } else if (name.equals("name")) {
6470          this.name = TypeConvertor.castToString(value); // StringType
6471        } else if (name.equals("title")) {
6472          this.title = TypeConvertor.castToString(value); // StringType
6473        } else if (name.equals("status")) {
6474          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
6475          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
6476        } else if (name.equals("experimental")) {
6477          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
6478        } else if (name.equals("date")) {
6479          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
6480        } else if (name.equals("publisher")) {
6481          this.publisher = TypeConvertor.castToString(value); // StringType
6482        } else if (name.equals("contact")) {
6483          this.getContact().add(TypeConvertor.castToContactDetail(value));
6484        } else if (name.equals("description")) {
6485          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
6486        } else if (name.equals("useContext")) {
6487          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
6488        } else if (name.equals("jurisdiction")) {
6489          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
6490        } else if (name.equals("purpose")) {
6491          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
6492        } else if (name.equals("copyright")) {
6493          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
6494        } else if (name.equals("kind")) {
6495          value = new CapabilityStatementKindEnumFactory().fromType(TypeConvertor.castToCode(value));
6496          this.kind = (Enumeration) value; // Enumeration<CapabilityStatementKind>
6497        } else if (name.equals("instantiates")) {
6498          this.getInstantiates().add(TypeConvertor.castToCanonical(value));
6499        } else if (name.equals("imports")) {
6500          this.getImports().add(TypeConvertor.castToCanonical(value));
6501        } else if (name.equals("software")) {
6502          this.software = (CapabilityStatement2SoftwareComponent) value; // CapabilityStatement2SoftwareComponent
6503        } else if (name.equals("implementation")) {
6504          this.implementation = (CapabilityStatement2ImplementationComponent) value; // CapabilityStatement2ImplementationComponent
6505        } else if (name.equals("fhirVersion")) {
6506          value = new FHIRVersionEnumFactory().fromType(TypeConvertor.castToCode(value));
6507          this.fhirVersion = (Enumeration) value; // Enumeration<FHIRVersion>
6508        } else if (name.equals("format")) {
6509          this.getFormat().add(TypeConvertor.castToCode(value));
6510        } else if (name.equals("patchFormat")) {
6511          this.getPatchFormat().add(TypeConvertor.castToCode(value));
6512        } else if (name.equals("implementationGuide")) {
6513          this.getImplementationGuide().add(TypeConvertor.castToCanonical(value));
6514        } else if (name.equals("rest")) {
6515          this.getRest().add((CapabilityStatement2RestComponent) value);
6516        } else
6517          return super.setProperty(name, value);
6518        return value;
6519      }
6520
6521      @Override
6522      public Base makeProperty(int hash, String name) throws FHIRException {
6523        switch (hash) {
6524        case 116079:  return getUrlElement();
6525        case 351608024:  return getVersionElement();
6526        case 3373707:  return getNameElement();
6527        case 110371416:  return getTitleElement();
6528        case -892481550:  return getStatusElement();
6529        case -404562712:  return getExperimentalElement();
6530        case 3076014:  return getDateElement();
6531        case 1447404028:  return getPublisherElement();
6532        case 951526432:  return addContact(); 
6533        case -1724546052:  return getDescriptionElement();
6534        case -669707736:  return addUseContext(); 
6535        case -507075711:  return addJurisdiction(); 
6536        case -220463842:  return getPurposeElement();
6537        case 1522889671:  return getCopyrightElement();
6538        case 3292052:  return getKindElement();
6539        case -246883639:  return addInstantiatesElement();
6540        case 1926037870:  return addImportsElement();
6541        case 1319330215:  return getSoftware();
6542        case 1683336114:  return getImplementation();
6543        case 461006061:  return getFhirVersionElement();
6544        case -1268779017:  return addFormatElement();
6545        case 172338783:  return addPatchFormatElement();
6546        case 156966506:  return addImplementationGuideElement();
6547        case 3496916:  return addRest(); 
6548        default: return super.makeProperty(hash, name);
6549        }
6550
6551      }
6552
6553      @Override
6554      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6555        switch (hash) {
6556        case 116079: /*url*/ return new String[] {"uri"};
6557        case 351608024: /*version*/ return new String[] {"string"};
6558        case 3373707: /*name*/ return new String[] {"string"};
6559        case 110371416: /*title*/ return new String[] {"string"};
6560        case -892481550: /*status*/ return new String[] {"code"};
6561        case -404562712: /*experimental*/ return new String[] {"boolean"};
6562        case 3076014: /*date*/ return new String[] {"dateTime"};
6563        case 1447404028: /*publisher*/ return new String[] {"string"};
6564        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
6565        case -1724546052: /*description*/ return new String[] {"markdown"};
6566        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
6567        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
6568        case -220463842: /*purpose*/ return new String[] {"markdown"};
6569        case 1522889671: /*copyright*/ return new String[] {"markdown"};
6570        case 3292052: /*kind*/ return new String[] {"code"};
6571        case -246883639: /*instantiates*/ return new String[] {"canonical"};
6572        case 1926037870: /*imports*/ return new String[] {"canonical"};
6573        case 1319330215: /*software*/ return new String[] {};
6574        case 1683336114: /*implementation*/ return new String[] {};
6575        case 461006061: /*fhirVersion*/ return new String[] {"code"};
6576        case -1268779017: /*format*/ return new String[] {"code"};
6577        case 172338783: /*patchFormat*/ return new String[] {"code"};
6578        case 156966506: /*implementationGuide*/ return new String[] {"canonical"};
6579        case 3496916: /*rest*/ return new String[] {};
6580        default: return super.getTypesForProperty(hash, name);
6581        }
6582
6583      }
6584
6585      @Override
6586      public Base addChild(String name) throws FHIRException {
6587        if (name.equals("url")) {
6588          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.url");
6589        }
6590        else if (name.equals("version")) {
6591          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.version");
6592        }
6593        else if (name.equals("name")) {
6594          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.name");
6595        }
6596        else if (name.equals("title")) {
6597          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.title");
6598        }
6599        else if (name.equals("status")) {
6600          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.status");
6601        }
6602        else if (name.equals("experimental")) {
6603          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.experimental");
6604        }
6605        else if (name.equals("date")) {
6606          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.date");
6607        }
6608        else if (name.equals("publisher")) {
6609          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.publisher");
6610        }
6611        else if (name.equals("contact")) {
6612          return addContact();
6613        }
6614        else if (name.equals("description")) {
6615          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.description");
6616        }
6617        else if (name.equals("useContext")) {
6618          return addUseContext();
6619        }
6620        else if (name.equals("jurisdiction")) {
6621          return addJurisdiction();
6622        }
6623        else if (name.equals("purpose")) {
6624          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.purpose");
6625        }
6626        else if (name.equals("copyright")) {
6627          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.copyright");
6628        }
6629        else if (name.equals("kind")) {
6630          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.kind");
6631        }
6632        else if (name.equals("instantiates")) {
6633          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.instantiates");
6634        }
6635        else if (name.equals("imports")) {
6636          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.imports");
6637        }
6638        else if (name.equals("software")) {
6639          this.software = new CapabilityStatement2SoftwareComponent();
6640          return this.software;
6641        }
6642        else if (name.equals("implementation")) {
6643          this.implementation = new CapabilityStatement2ImplementationComponent();
6644          return this.implementation;
6645        }
6646        else if (name.equals("fhirVersion")) {
6647          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.fhirVersion");
6648        }
6649        else if (name.equals("format")) {
6650          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.format");
6651        }
6652        else if (name.equals("patchFormat")) {
6653          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.patchFormat");
6654        }
6655        else if (name.equals("implementationGuide")) {
6656          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement2.implementationGuide");
6657        }
6658        else if (name.equals("rest")) {
6659          return addRest();
6660        }
6661        else
6662          return super.addChild(name);
6663      }
6664
6665  public String fhirType() {
6666    return "CapabilityStatement2";
6667
6668  }
6669
6670      public CapabilityStatement2 copy() {
6671        CapabilityStatement2 dst = new CapabilityStatement2();
6672        copyValues(dst);
6673        return dst;
6674      }
6675
6676      public void copyValues(CapabilityStatement2 dst) {
6677        super.copyValues(dst);
6678        dst.url = url == null ? null : url.copy();
6679        dst.version = version == null ? null : version.copy();
6680        dst.name = name == null ? null : name.copy();
6681        dst.title = title == null ? null : title.copy();
6682        dst.status = status == null ? null : status.copy();
6683        dst.experimental = experimental == null ? null : experimental.copy();
6684        dst.date = date == null ? null : date.copy();
6685        dst.publisher = publisher == null ? null : publisher.copy();
6686        if (contact != null) {
6687          dst.contact = new ArrayList<ContactDetail>();
6688          for (ContactDetail i : contact)
6689            dst.contact.add(i.copy());
6690        };
6691        dst.description = description == null ? null : description.copy();
6692        if (useContext != null) {
6693          dst.useContext = new ArrayList<UsageContext>();
6694          for (UsageContext i : useContext)
6695            dst.useContext.add(i.copy());
6696        };
6697        if (jurisdiction != null) {
6698          dst.jurisdiction = new ArrayList<CodeableConcept>();
6699          for (CodeableConcept i : jurisdiction)
6700            dst.jurisdiction.add(i.copy());
6701        };
6702        dst.purpose = purpose == null ? null : purpose.copy();
6703        dst.copyright = copyright == null ? null : copyright.copy();
6704        dst.kind = kind == null ? null : kind.copy();
6705        if (instantiates != null) {
6706          dst.instantiates = new ArrayList<CanonicalType>();
6707          for (CanonicalType i : instantiates)
6708            dst.instantiates.add(i.copy());
6709        };
6710        if (imports != null) {
6711          dst.imports = new ArrayList<CanonicalType>();
6712          for (CanonicalType i : imports)
6713            dst.imports.add(i.copy());
6714        };
6715        dst.software = software == null ? null : software.copy();
6716        dst.implementation = implementation == null ? null : implementation.copy();
6717        dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy();
6718        if (format != null) {
6719          dst.format = new ArrayList<CodeType>();
6720          for (CodeType i : format)
6721            dst.format.add(i.copy());
6722        };
6723        if (patchFormat != null) {
6724          dst.patchFormat = new ArrayList<CodeType>();
6725          for (CodeType i : patchFormat)
6726            dst.patchFormat.add(i.copy());
6727        };
6728        if (implementationGuide != null) {
6729          dst.implementationGuide = new ArrayList<CanonicalType>();
6730          for (CanonicalType i : implementationGuide)
6731            dst.implementationGuide.add(i.copy());
6732        };
6733        if (rest != null) {
6734          dst.rest = new ArrayList<CapabilityStatement2RestComponent>();
6735          for (CapabilityStatement2RestComponent i : rest)
6736            dst.rest.add(i.copy());
6737        };
6738      }
6739
6740      protected CapabilityStatement2 typedCopy() {
6741        return copy();
6742      }
6743
6744      @Override
6745      public boolean equalsDeep(Base other_) {
6746        if (!super.equalsDeep(other_))
6747          return false;
6748        if (!(other_ instanceof CapabilityStatement2))
6749          return false;
6750        CapabilityStatement2 o = (CapabilityStatement2) other_;
6751        return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true)
6752           && compareDeep(title, o.title, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
6753           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
6754           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
6755           && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
6756           && compareDeep(kind, o.kind, true) && compareDeep(instantiates, o.instantiates, true) && compareDeep(imports, o.imports, true)
6757           && compareDeep(software, o.software, true) && compareDeep(implementation, o.implementation, true)
6758           && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(format, o.format, true) && compareDeep(patchFormat, o.patchFormat, true)
6759           && compareDeep(implementationGuide, o.implementationGuide, true) && compareDeep(rest, o.rest, true)
6760          ;
6761      }
6762
6763      @Override
6764      public boolean equalsShallow(Base other_) {
6765        if (!super.equalsShallow(other_))
6766          return false;
6767        if (!(other_ instanceof CapabilityStatement2))
6768          return false;
6769        CapabilityStatement2 o = (CapabilityStatement2) other_;
6770        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
6771           && compareValues(title, o.title, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true)
6772           && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true)
6773           && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(kind, o.kind, true)
6774           && compareValues(instantiates, o.instantiates, true) && compareValues(imports, o.imports, true) && compareValues(fhirVersion, o.fhirVersion, true)
6775           && compareValues(format, o.format, true) && compareValues(patchFormat, o.patchFormat, true) && compareValues(implementationGuide, o.implementationGuide, true)
6776          ;
6777      }
6778
6779      public boolean isEmpty() {
6780        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, version, name, title
6781          , status, experimental, date, publisher, contact, description, useContext, jurisdiction
6782          , purpose, copyright, kind, instantiates, imports, software, implementation, fhirVersion
6783          , format, patchFormat, implementationGuide, rest);
6784      }
6785
6786  @Override
6787  public ResourceType getResourceType() {
6788    return ResourceType.CapabilityStatement2;
6789   }
6790
6791 /**
6792   * Search parameter: <b>context-quantity</b>
6793   * <p>
6794   * Description: <b>A quantity- or range-valued use context assigned to the capability statement2</b><br>
6795   * Type: <b>quantity</b><br>
6796   * Path: <b>(CapabilityStatement2.useContext.value as Quantity) | (CapabilityStatement2.useContext.value as Range)</b><br>
6797   * </p>
6798   */
6799  @SearchParamDefinition(name="context-quantity", path="(CapabilityStatement2.useContext.value as Quantity) | (CapabilityStatement2.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the capability statement2", type="quantity" )
6800  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
6801 /**
6802   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
6803   * <p>
6804   * Description: <b>A quantity- or range-valued use context assigned to the capability statement2</b><br>
6805   * Type: <b>quantity</b><br>
6806   * Path: <b>(CapabilityStatement2.useContext.value as Quantity) | (CapabilityStatement2.useContext.value as Range)</b><br>
6807   * </p>
6808   */
6809  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
6810
6811 /**
6812   * Search parameter: <b>context-type-quantity</b>
6813   * <p>
6814   * Description: <b>A use context type and quantity- or range-based value assigned to the capability statement2</b><br>
6815   * Type: <b>composite</b><br>
6816   * Path: <b>CapabilityStatement2.useContext</b><br>
6817   * </p>
6818   */
6819  @SearchParamDefinition(name="context-type-quantity", path="CapabilityStatement2.useContext", description="A use context type and quantity- or range-based value assigned to the capability statement2", type="composite", compositeOf={"context-type", "context-quantity"} )
6820  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
6821 /**
6822   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
6823   * <p>
6824   * Description: <b>A use context type and quantity- or range-based value assigned to the capability statement2</b><br>
6825   * Type: <b>composite</b><br>
6826   * Path: <b>CapabilityStatement2.useContext</b><br>
6827   * </p>
6828   */
6829  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);
6830
6831 /**
6832   * Search parameter: <b>context-type-value</b>
6833   * <p>
6834   * Description: <b>A use context type and value assigned to the capability statement2</b><br>
6835   * Type: <b>composite</b><br>
6836   * Path: <b>CapabilityStatement2.useContext</b><br>
6837   * </p>
6838   */
6839  @SearchParamDefinition(name="context-type-value", path="CapabilityStatement2.useContext", description="A use context type and value assigned to the capability statement2", type="composite", compositeOf={"context-type", "context"} )
6840  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
6841 /**
6842   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
6843   * <p>
6844   * Description: <b>A use context type and value assigned to the capability statement2</b><br>
6845   * Type: <b>composite</b><br>
6846   * Path: <b>CapabilityStatement2.useContext</b><br>
6847   * </p>
6848   */
6849  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);
6850
6851 /**
6852   * Search parameter: <b>context-type</b>
6853   * <p>
6854   * Description: <b>A type of use context assigned to the capability statement2</b><br>
6855   * Type: <b>token</b><br>
6856   * Path: <b>CapabilityStatement2.useContext.code</b><br>
6857   * </p>
6858   */
6859  @SearchParamDefinition(name="context-type", path="CapabilityStatement2.useContext.code", description="A type of use context assigned to the capability statement2", type="token" )
6860  public static final String SP_CONTEXT_TYPE = "context-type";
6861 /**
6862   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
6863   * <p>
6864   * Description: <b>A type of use context assigned to the capability statement2</b><br>
6865   * Type: <b>token</b><br>
6866   * Path: <b>CapabilityStatement2.useContext.code</b><br>
6867   * </p>
6868   */
6869  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
6870
6871 /**
6872   * Search parameter: <b>context</b>
6873   * <p>
6874   * Description: <b>A use context assigned to the capability statement2</b><br>
6875   * Type: <b>token</b><br>
6876   * Path: <b>(CapabilityStatement2.useContext.value as CodeableConcept)</b><br>
6877   * </p>
6878   */
6879  @SearchParamDefinition(name="context", path="(CapabilityStatement2.useContext.value as CodeableConcept)", description="A use context assigned to the capability statement2", type="token" )
6880  public static final String SP_CONTEXT = "context";
6881 /**
6882   * <b>Fluent Client</b> search parameter constant for <b>context</b>
6883   * <p>
6884   * Description: <b>A use context assigned to the capability statement2</b><br>
6885   * Type: <b>token</b><br>
6886   * Path: <b>(CapabilityStatement2.useContext.value as CodeableConcept)</b><br>
6887   * </p>
6888   */
6889  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
6890
6891 /**
6892   * Search parameter: <b>date</b>
6893   * <p>
6894   * Description: <b>The capability statement2 publication date</b><br>
6895   * Type: <b>date</b><br>
6896   * Path: <b>CapabilityStatement2.date</b><br>
6897   * </p>
6898   */
6899  @SearchParamDefinition(name="date", path="CapabilityStatement2.date", description="The capability statement2 publication date", type="date" )
6900  public static final String SP_DATE = "date";
6901 /**
6902   * <b>Fluent Client</b> search parameter constant for <b>date</b>
6903   * <p>
6904   * Description: <b>The capability statement2 publication date</b><br>
6905   * Type: <b>date</b><br>
6906   * Path: <b>CapabilityStatement2.date</b><br>
6907   * </p>
6908   */
6909  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
6910
6911 /**
6912   * Search parameter: <b>description</b>
6913   * <p>
6914   * Description: <b>The description of the capability statement2</b><br>
6915   * Type: <b>string</b><br>
6916   * Path: <b>CapabilityStatement2.description</b><br>
6917   * </p>
6918   */
6919  @SearchParamDefinition(name="description", path="CapabilityStatement2.description", description="The description of the capability statement2", type="string" )
6920  public static final String SP_DESCRIPTION = "description";
6921 /**
6922   * <b>Fluent Client</b> search parameter constant for <b>description</b>
6923   * <p>
6924   * Description: <b>The description of the capability statement2</b><br>
6925   * Type: <b>string</b><br>
6926   * Path: <b>CapabilityStatement2.description</b><br>
6927   * </p>
6928   */
6929  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
6930
6931 /**
6932   * Search parameter: <b>fhirversion</b>
6933   * <p>
6934   * Description: <b>The version of FHIR</b><br>
6935   * Type: <b>token</b><br>
6936   * Path: <b>CapabilityStatement2.version</b><br>
6937   * </p>
6938   */
6939  @SearchParamDefinition(name="fhirversion", path="CapabilityStatement2.version", description="The version of FHIR", type="token" )
6940  public static final String SP_FHIRVERSION = "fhirversion";
6941 /**
6942   * <b>Fluent Client</b> search parameter constant for <b>fhirversion</b>
6943   * <p>
6944   * Description: <b>The version of FHIR</b><br>
6945   * Type: <b>token</b><br>
6946   * Path: <b>CapabilityStatement2.version</b><br>
6947   * </p>
6948   */
6949  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FHIRVERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FHIRVERSION);
6950
6951 /**
6952   * Search parameter: <b>format</b>
6953   * <p>
6954   * Description: <b>formats supported (xml | json | ttl | mime type)</b><br>
6955   * Type: <b>token</b><br>
6956   * Path: <b>CapabilityStatement2.format</b><br>
6957   * </p>
6958   */
6959  @SearchParamDefinition(name="format", path="CapabilityStatement2.format", description="formats supported (xml | json | ttl | mime type)", type="token" )
6960  public static final String SP_FORMAT = "format";
6961 /**
6962   * <b>Fluent Client</b> search parameter constant for <b>format</b>
6963   * <p>
6964   * Description: <b>formats supported (xml | json | ttl | mime type)</b><br>
6965   * Type: <b>token</b><br>
6966   * Path: <b>CapabilityStatement2.format</b><br>
6967   * </p>
6968   */
6969  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORMAT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FORMAT);
6970
6971 /**
6972   * Search parameter: <b>guide</b>
6973   * <p>
6974   * Description: <b>Implementation guides supported</b><br>
6975   * Type: <b>reference</b><br>
6976   * Path: <b>CapabilityStatement2.implementationGuide</b><br>
6977   * </p>
6978   */
6979  @SearchParamDefinition(name="guide", path="CapabilityStatement2.implementationGuide", description="Implementation guides supported", type="reference", target={ImplementationGuide.class } )
6980  public static final String SP_GUIDE = "guide";
6981 /**
6982   * <b>Fluent Client</b> search parameter constant for <b>guide</b>
6983   * <p>
6984   * Description: <b>Implementation guides supported</b><br>
6985   * Type: <b>reference</b><br>
6986   * Path: <b>CapabilityStatement2.implementationGuide</b><br>
6987   * </p>
6988   */
6989  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GUIDE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GUIDE);
6990
6991/**
6992   * Constant for fluent queries to be used to add include statements. Specifies
6993   * the path value of "<b>CapabilityStatement2:guide</b>".
6994   */
6995  public static final ca.uhn.fhir.model.api.Include INCLUDE_GUIDE = new ca.uhn.fhir.model.api.Include("CapabilityStatement2:guide").toLocked();
6996
6997 /**
6998   * Search parameter: <b>jurisdiction</b>
6999   * <p>
7000   * Description: <b>Intended jurisdiction for the capability statement2</b><br>
7001   * Type: <b>token</b><br>
7002   * Path: <b>CapabilityStatement2.jurisdiction</b><br>
7003   * </p>
7004   */
7005  @SearchParamDefinition(name="jurisdiction", path="CapabilityStatement2.jurisdiction", description="Intended jurisdiction for the capability statement2", type="token" )
7006  public static final String SP_JURISDICTION = "jurisdiction";
7007 /**
7008   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
7009   * <p>
7010   * Description: <b>Intended jurisdiction for the capability statement2</b><br>
7011   * Type: <b>token</b><br>
7012   * Path: <b>CapabilityStatement2.jurisdiction</b><br>
7013   * </p>
7014   */
7015  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
7016
7017 /**
7018   * Search parameter: <b>mode</b>
7019   * <p>
7020   * Description: <b>Mode - restful (server/client) or messaging (sender/receiver)</b><br>
7021   * Type: <b>token</b><br>
7022   * Path: <b>CapabilityStatement2.rest.mode</b><br>
7023   * </p>
7024   */
7025  @SearchParamDefinition(name="mode", path="CapabilityStatement2.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" )
7026  public static final String SP_MODE = "mode";
7027 /**
7028   * <b>Fluent Client</b> search parameter constant for <b>mode</b>
7029   * <p>
7030   * Description: <b>Mode - restful (server/client) or messaging (sender/receiver)</b><br>
7031   * Type: <b>token</b><br>
7032   * Path: <b>CapabilityStatement2.rest.mode</b><br>
7033   * </p>
7034   */
7035  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MODE);
7036
7037 /**
7038   * Search parameter: <b>name</b>
7039   * <p>
7040   * Description: <b>Computationally friendly name of the capability statement2</b><br>
7041   * Type: <b>string</b><br>
7042   * Path: <b>CapabilityStatement2.name</b><br>
7043   * </p>
7044   */
7045  @SearchParamDefinition(name="name", path="CapabilityStatement2.name", description="Computationally friendly name of the capability statement2", type="string" )
7046  public static final String SP_NAME = "name";
7047 /**
7048   * <b>Fluent Client</b> search parameter constant for <b>name</b>
7049   * <p>
7050   * Description: <b>Computationally friendly name of the capability statement2</b><br>
7051   * Type: <b>string</b><br>
7052   * Path: <b>CapabilityStatement2.name</b><br>
7053   * </p>
7054   */
7055  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
7056
7057 /**
7058   * Search parameter: <b>publisher</b>
7059   * <p>
7060   * Description: <b>Name of the publisher of the capability statement2</b><br>
7061   * Type: <b>string</b><br>
7062   * Path: <b>CapabilityStatement2.publisher</b><br>
7063   * </p>
7064   */
7065  @SearchParamDefinition(name="publisher", path="CapabilityStatement2.publisher", description="Name of the publisher of the capability statement2", type="string" )
7066  public static final String SP_PUBLISHER = "publisher";
7067 /**
7068   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
7069   * <p>
7070   * Description: <b>Name of the publisher of the capability statement2</b><br>
7071   * Type: <b>string</b><br>
7072   * Path: <b>CapabilityStatement2.publisher</b><br>
7073   * </p>
7074   */
7075  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
7076
7077 /**
7078   * Search parameter: <b>resource-profile</b>
7079   * <p>
7080   * Description: <b>A profile id invoked in a capability statement</b><br>
7081   * Type: <b>reference</b><br>
7082   * Path: <b>CapabilityStatement2.rest.resource.profile</b><br>
7083   * </p>
7084   */
7085  @SearchParamDefinition(name="resource-profile", path="CapabilityStatement2.rest.resource.profile", description="A profile id invoked in a capability statement", type="reference", target={StructureDefinition.class } )
7086  public static final String SP_RESOURCE_PROFILE = "resource-profile";
7087 /**
7088   * <b>Fluent Client</b> search parameter constant for <b>resource-profile</b>
7089   * <p>
7090   * Description: <b>A profile id invoked in a capability statement</b><br>
7091   * Type: <b>reference</b><br>
7092   * Path: <b>CapabilityStatement2.rest.resource.profile</b><br>
7093   * </p>
7094   */
7095  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESOURCE_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESOURCE_PROFILE);
7096
7097/**
7098   * Constant for fluent queries to be used to add include statements. Specifies
7099   * the path value of "<b>CapabilityStatement2:resource-profile</b>".
7100   */
7101  public static final ca.uhn.fhir.model.api.Include INCLUDE_RESOURCE_PROFILE = new ca.uhn.fhir.model.api.Include("CapabilityStatement2:resource-profile").toLocked();
7102
7103 /**
7104   * Search parameter: <b>resource</b>
7105   * <p>
7106   * Description: <b>Name of a resource mentioned in a capability statement</b><br>
7107   * Type: <b>token</b><br>
7108   * Path: <b>CapabilityStatement2.rest.resource.type</b><br>
7109   * </p>
7110   */
7111  @SearchParamDefinition(name="resource", path="CapabilityStatement2.rest.resource.type", description="Name of a resource mentioned in a capability statement", type="token" )
7112  public static final String SP_RESOURCE = "resource";
7113 /**
7114   * <b>Fluent Client</b> search parameter constant for <b>resource</b>
7115   * <p>
7116   * Description: <b>Name of a resource mentioned in a capability statement</b><br>
7117   * Type: <b>token</b><br>
7118   * Path: <b>CapabilityStatement2.rest.resource.type</b><br>
7119   * </p>
7120   */
7121  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE);
7122
7123 /**
7124   * Search parameter: <b>software</b>
7125   * <p>
7126   * Description: <b>Part of the name of a software application</b><br>
7127   * Type: <b>string</b><br>
7128   * Path: <b>CapabilityStatement2.software.name</b><br>
7129   * </p>
7130   */
7131  @SearchParamDefinition(name="software", path="CapabilityStatement2.software.name", description="Part of the name of a software application", type="string" )
7132  public static final String SP_SOFTWARE = "software";
7133 /**
7134   * <b>Fluent Client</b> search parameter constant for <b>software</b>
7135   * <p>
7136   * Description: <b>Part of the name of a software application</b><br>
7137   * Type: <b>string</b><br>
7138   * Path: <b>CapabilityStatement2.software.name</b><br>
7139   * </p>
7140   */
7141  public static final ca.uhn.fhir.rest.gclient.StringClientParam SOFTWARE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_SOFTWARE);
7142
7143 /**
7144   * Search parameter: <b>status</b>
7145   * <p>
7146   * Description: <b>The current status of the capability statement2</b><br>
7147   * Type: <b>token</b><br>
7148   * Path: <b>CapabilityStatement2.status</b><br>
7149   * </p>
7150   */
7151  @SearchParamDefinition(name="status", path="CapabilityStatement2.status", description="The current status of the capability statement2", type="token" )
7152  public static final String SP_STATUS = "status";
7153 /**
7154   * <b>Fluent Client</b> search parameter constant for <b>status</b>
7155   * <p>
7156   * Description: <b>The current status of the capability statement2</b><br>
7157   * Type: <b>token</b><br>
7158   * Path: <b>CapabilityStatement2.status</b><br>
7159   * </p>
7160   */
7161  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
7162
7163 /**
7164   * Search parameter: <b>supported-profile</b>
7165   * <p>
7166   * Description: <b>Profiles for use cases supported</b><br>
7167   * Type: <b>reference</b><br>
7168   * Path: <b>CapabilityStatement2.rest.resource.supportedProfile</b><br>
7169   * </p>
7170   */
7171  @SearchParamDefinition(name="supported-profile", path="CapabilityStatement2.rest.resource.supportedProfile", description="Profiles for use cases supported", type="reference", target={StructureDefinition.class } )
7172  public static final String SP_SUPPORTED_PROFILE = "supported-profile";
7173 /**
7174   * <b>Fluent Client</b> search parameter constant for <b>supported-profile</b>
7175   * <p>
7176   * Description: <b>Profiles for use cases supported</b><br>
7177   * Type: <b>reference</b><br>
7178   * Path: <b>CapabilityStatement2.rest.resource.supportedProfile</b><br>
7179   * </p>
7180   */
7181  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTED_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTED_PROFILE);
7182
7183/**
7184   * Constant for fluent queries to be used to add include statements. Specifies
7185   * the path value of "<b>CapabilityStatement2:supported-profile</b>".
7186   */
7187  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTED_PROFILE = new ca.uhn.fhir.model.api.Include("CapabilityStatement2:supported-profile").toLocked();
7188
7189 /**
7190   * Search parameter: <b>title</b>
7191   * <p>
7192   * Description: <b>The human-friendly name of the capability statement2</b><br>
7193   * Type: <b>string</b><br>
7194   * Path: <b>CapabilityStatement2.title</b><br>
7195   * </p>
7196   */
7197  @SearchParamDefinition(name="title", path="CapabilityStatement2.title", description="The human-friendly name of the capability statement2", type="string" )
7198  public static final String SP_TITLE = "title";
7199 /**
7200   * <b>Fluent Client</b> search parameter constant for <b>title</b>
7201   * <p>
7202   * Description: <b>The human-friendly name of the capability statement2</b><br>
7203   * Type: <b>string</b><br>
7204   * Path: <b>CapabilityStatement2.title</b><br>
7205   * </p>
7206   */
7207  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
7208
7209 /**
7210   * Search parameter: <b>url</b>
7211   * <p>
7212   * Description: <b>The uri that identifies the capability statement2</b><br>
7213   * Type: <b>uri</b><br>
7214   * Path: <b>CapabilityStatement2.url</b><br>
7215   * </p>
7216   */
7217  @SearchParamDefinition(name="url", path="CapabilityStatement2.url", description="The uri that identifies the capability statement2", type="uri" )
7218  public static final String SP_URL = "url";
7219 /**
7220   * <b>Fluent Client</b> search parameter constant for <b>url</b>
7221   * <p>
7222   * Description: <b>The uri that identifies the capability statement2</b><br>
7223   * Type: <b>uri</b><br>
7224   * Path: <b>CapabilityStatement2.url</b><br>
7225   * </p>
7226   */
7227  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
7228
7229 /**
7230   * Search parameter: <b>version</b>
7231   * <p>
7232   * Description: <b>The business version of the capability statement2</b><br>
7233   * Type: <b>token</b><br>
7234   * Path: <b>CapabilityStatement2.version</b><br>
7235   * </p>
7236   */
7237  @SearchParamDefinition(name="version", path="CapabilityStatement2.version", description="The business version of the capability statement2", type="token" )
7238  public static final String SP_VERSION = "version";
7239 /**
7240   * <b>Fluent Client</b> search parameter constant for <b>version</b>
7241   * <p>
7242   * Description: <b>The business version of the capability statement2</b><br>
7243   * Type: <b>token</b><br>
7244   * Path: <b>CapabilityStatement2.version</b><br>
7245   * </p>
7246   */
7247  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
7248
7249
7250}
7251