001package org.hl7.fhir.dstu3.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.dstu3.model.Enumerations.*;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046import org.hl7.fhir.exceptions.FHIRFormatError;
047/**
048 * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
049 */
050@ResourceDef(name="CapabilityStatement", profile="http://hl7.org/fhir/StructureDefinition/CapabilityStatement")
051@ChildOrder(names={"url", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "kind", "instantiates", "software", "implementation", "fhirVersion", "acceptUnknown", "format", "patchFormat", "implementationGuide", "profile", "rest", "messaging", "document"})
052public class CapabilityStatement extends MetadataResource implements IBaseConformance {
053
054    public enum CapabilityStatementKind {
055        /**
056         * The CapabilityStatement instance represents the present capabilities of a specific system instance.  This is the kind returned by OPTIONS for a FHIR server end-point.
057         */
058        INSTANCE, 
059        /**
060         * The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.
061         */
062        CAPABILITY, 
063        /**
064         * The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'.
065         */
066        REQUIREMENTS, 
067        /**
068         * added to help the parsers with the generic types
069         */
070        NULL;
071        public static CapabilityStatementKind fromCode(String codeString) throws FHIRException {
072            if (codeString == null || "".equals(codeString))
073                return null;
074        if ("instance".equals(codeString))
075          return INSTANCE;
076        if ("capability".equals(codeString))
077          return CAPABILITY;
078        if ("requirements".equals(codeString))
079          return REQUIREMENTS;
080        if (Configuration.isAcceptInvalidEnums())
081          return null;
082        else
083          throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
084        }
085        public String toCode() {
086          switch (this) {
087            case INSTANCE: return "instance";
088            case CAPABILITY: return "capability";
089            case REQUIREMENTS: return "requirements";
090            default: return "?";
091          }
092        }
093        public String getSystem() {
094          switch (this) {
095            case INSTANCE: return "http://hl7.org/fhir/capability-statement-kind";
096            case CAPABILITY: return "http://hl7.org/fhir/capability-statement-kind";
097            case REQUIREMENTS: return "http://hl7.org/fhir/capability-statement-kind";
098            default: return "?";
099          }
100        }
101        public String getDefinition() {
102          switch (this) {
103            case INSTANCE: return "The CapabilityStatement instance represents the present capabilities of a specific system instance.  This is the kind returned by OPTIONS for a FHIR server end-point.";
104            case CAPABILITY: return "The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.";
105            case REQUIREMENTS: return "The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'.";
106            default: return "?";
107          }
108        }
109        public String getDisplay() {
110          switch (this) {
111            case INSTANCE: return "Instance";
112            case CAPABILITY: return "Capability";
113            case REQUIREMENTS: return "Requirements";
114            default: return "?";
115          }
116        }
117    }
118
119  public static class CapabilityStatementKindEnumFactory implements EnumFactory<CapabilityStatementKind> {
120    public CapabilityStatementKind fromCode(String codeString) throws IllegalArgumentException {
121      if (codeString == null || "".equals(codeString))
122            if (codeString == null || "".equals(codeString))
123                return null;
124        if ("instance".equals(codeString))
125          return CapabilityStatementKind.INSTANCE;
126        if ("capability".equals(codeString))
127          return CapabilityStatementKind.CAPABILITY;
128        if ("requirements".equals(codeString))
129          return CapabilityStatementKind.REQUIREMENTS;
130        throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'");
131        }
132        public Enumeration<CapabilityStatementKind> fromType(Base code) throws FHIRException {
133          if (code == null)
134            return null;
135          if (code.isEmpty())
136            return new Enumeration<CapabilityStatementKind>(this);
137          String codeString = ((PrimitiveType) code).asStringValue();
138          if (codeString == null || "".equals(codeString))
139            return null;
140        if ("instance".equals(codeString))
141          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.INSTANCE);
142        if ("capability".equals(codeString))
143          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.CAPABILITY);
144        if ("requirements".equals(codeString))
145          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.REQUIREMENTS);
146        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
147        }
148    public String toCode(CapabilityStatementKind code) {
149      if (code == CapabilityStatementKind.INSTANCE)
150        return "instance";
151      if (code == CapabilityStatementKind.CAPABILITY)
152        return "capability";
153      if (code == CapabilityStatementKind.REQUIREMENTS)
154        return "requirements";
155      return "?";
156      }
157    public String toSystem(CapabilityStatementKind code) {
158      return code.getSystem();
159      }
160    }
161
162    public enum UnknownContentCode {
163        /**
164         * The application does not accept either unknown elements or extensions.
165         */
166        NO, 
167        /**
168         * The application accepts unknown extensions, but not unknown elements.
169         */
170        EXTENSIONS, 
171        /**
172         * The application accepts unknown elements, but not unknown extensions.
173         */
174        ELEMENTS, 
175        /**
176         * The application accepts unknown elements and extensions.
177         */
178        BOTH, 
179        /**
180         * added to help the parsers with the generic types
181         */
182        NULL;
183        public static UnknownContentCode fromCode(String codeString) throws FHIRException {
184            if (codeString == null || "".equals(codeString))
185                return null;
186        if ("no".equals(codeString))
187          return NO;
188        if ("extensions".equals(codeString))
189          return EXTENSIONS;
190        if ("elements".equals(codeString))
191          return ELEMENTS;
192        if ("both".equals(codeString))
193          return BOTH;
194        if (Configuration.isAcceptInvalidEnums())
195          return null;
196        else
197          throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'");
198        }
199        public String toCode() {
200          switch (this) {
201            case NO: return "no";
202            case EXTENSIONS: return "extensions";
203            case ELEMENTS: return "elements";
204            case BOTH: return "both";
205            default: return "?";
206          }
207        }
208        public String getSystem() {
209          switch (this) {
210            case NO: return "http://hl7.org/fhir/unknown-content-code";
211            case EXTENSIONS: return "http://hl7.org/fhir/unknown-content-code";
212            case ELEMENTS: return "http://hl7.org/fhir/unknown-content-code";
213            case BOTH: return "http://hl7.org/fhir/unknown-content-code";
214            default: return "?";
215          }
216        }
217        public String getDefinition() {
218          switch (this) {
219            case NO: return "The application does not accept either unknown elements or extensions.";
220            case EXTENSIONS: return "The application accepts unknown extensions, but not unknown elements.";
221            case ELEMENTS: return "The application accepts unknown elements, but not unknown extensions.";
222            case BOTH: return "The application accepts unknown elements and extensions.";
223            default: return "?";
224          }
225        }
226        public String getDisplay() {
227          switch (this) {
228            case NO: return "Neither Elements or Extensions";
229            case EXTENSIONS: return "Unknown Extensions";
230            case ELEMENTS: return "Unknown Elements";
231            case BOTH: return "Unknown Elements and Extensions";
232            default: return "?";
233          }
234        }
235    }
236
237  public static class UnknownContentCodeEnumFactory implements EnumFactory<UnknownContentCode> {
238    public UnknownContentCode fromCode(String codeString) throws IllegalArgumentException {
239      if (codeString == null || "".equals(codeString))
240            if (codeString == null || "".equals(codeString))
241                return null;
242        if ("no".equals(codeString))
243          return UnknownContentCode.NO;
244        if ("extensions".equals(codeString))
245          return UnknownContentCode.EXTENSIONS;
246        if ("elements".equals(codeString))
247          return UnknownContentCode.ELEMENTS;
248        if ("both".equals(codeString))
249          return UnknownContentCode.BOTH;
250        throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'");
251        }
252        public Enumeration<UnknownContentCode> fromType(Base code) throws FHIRException {
253          if (code == null)
254            return null;
255          if (code.isEmpty())
256            return new Enumeration<UnknownContentCode>(this);
257          String codeString = ((PrimitiveType) code).asStringValue();
258          if (codeString == null || "".equals(codeString))
259            return null;
260        if ("no".equals(codeString))
261          return new Enumeration<UnknownContentCode>(this, UnknownContentCode.NO);
262        if ("extensions".equals(codeString))
263          return new Enumeration<UnknownContentCode>(this, UnknownContentCode.EXTENSIONS);
264        if ("elements".equals(codeString))
265          return new Enumeration<UnknownContentCode>(this, UnknownContentCode.ELEMENTS);
266        if ("both".equals(codeString))
267          return new Enumeration<UnknownContentCode>(this, UnknownContentCode.BOTH);
268        throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'");
269        }
270    public String toCode(UnknownContentCode code) {
271      if (code == UnknownContentCode.NO)
272        return "no";
273      if (code == UnknownContentCode.EXTENSIONS)
274        return "extensions";
275      if (code == UnknownContentCode.ELEMENTS)
276        return "elements";
277      if (code == UnknownContentCode.BOTH)
278        return "both";
279      return "?";
280      }
281    public String toSystem(UnknownContentCode code) {
282      return code.getSystem();
283      }
284    }
285
286    public enum RestfulCapabilityMode {
287        /**
288         * The application acts as a client for this resource.
289         */
290        CLIENT, 
291        /**
292         * The application acts as a server for this resource.
293         */
294        SERVER, 
295        /**
296         * added to help the parsers with the generic types
297         */
298        NULL;
299        public static RestfulCapabilityMode fromCode(String codeString) throws FHIRException {
300            if (codeString == null || "".equals(codeString))
301                return null;
302        if ("client".equals(codeString))
303          return CLIENT;
304        if ("server".equals(codeString))
305          return SERVER;
306        if (Configuration.isAcceptInvalidEnums())
307          return null;
308        else
309          throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'");
310        }
311        public String toCode() {
312          switch (this) {
313            case CLIENT: return "client";
314            case SERVER: return "server";
315            default: return "?";
316          }
317        }
318        public String getSystem() {
319          switch (this) {
320            case CLIENT: return "http://hl7.org/fhir/restful-capability-mode";
321            case SERVER: return "http://hl7.org/fhir/restful-capability-mode";
322            default: return "?";
323          }
324        }
325        public String getDefinition() {
326          switch (this) {
327            case CLIENT: return "The application acts as a client for this resource.";
328            case SERVER: return "The application acts as a server for this resource.";
329            default: return "?";
330          }
331        }
332        public String getDisplay() {
333          switch (this) {
334            case CLIENT: return "Client";
335            case SERVER: return "Server";
336            default: return "?";
337          }
338        }
339    }
340
341  public static class RestfulCapabilityModeEnumFactory implements EnumFactory<RestfulCapabilityMode> {
342    public RestfulCapabilityMode fromCode(String codeString) throws IllegalArgumentException {
343      if (codeString == null || "".equals(codeString))
344            if (codeString == null || "".equals(codeString))
345                return null;
346        if ("client".equals(codeString))
347          return RestfulCapabilityMode.CLIENT;
348        if ("server".equals(codeString))
349          return RestfulCapabilityMode.SERVER;
350        throw new IllegalArgumentException("Unknown RestfulCapabilityMode code '"+codeString+"'");
351        }
352        public Enumeration<RestfulCapabilityMode> fromType(Base code) throws FHIRException {
353          if (code == null)
354            return null;
355          if (code.isEmpty())
356            return new Enumeration<RestfulCapabilityMode>(this);
357          String codeString = ((PrimitiveType) code).asStringValue();
358          if (codeString == null || "".equals(codeString))
359            return null;
360        if ("client".equals(codeString))
361          return new Enumeration<RestfulCapabilityMode>(this, RestfulCapabilityMode.CLIENT);
362        if ("server".equals(codeString))
363          return new Enumeration<RestfulCapabilityMode>(this, RestfulCapabilityMode.SERVER);
364        throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'");
365        }
366    public String toCode(RestfulCapabilityMode code) {
367      if (code == RestfulCapabilityMode.CLIENT)
368        return "client";
369      if (code == RestfulCapabilityMode.SERVER)
370        return "server";
371      return "?";
372      }
373    public String toSystem(RestfulCapabilityMode code) {
374      return code.getSystem();
375      }
376    }
377
378    public enum TypeRestfulInteraction {
379        /**
380         * null
381         */
382        READ, 
383        /**
384         * null
385         */
386        VREAD, 
387        /**
388         * null
389         */
390        UPDATE, 
391        /**
392         * null
393         */
394        PATCH, 
395        /**
396         * null
397         */
398        DELETE, 
399        /**
400         * null
401         */
402        HISTORYINSTANCE, 
403        /**
404         * null
405         */
406        HISTORYTYPE, 
407        /**
408         * null
409         */
410        CREATE, 
411        /**
412         * null
413         */
414        SEARCHTYPE, 
415        /**
416         * added to help the parsers with the generic types
417         */
418        NULL;
419        public static TypeRestfulInteraction fromCode(String codeString) throws FHIRException {
420            if (codeString == null || "".equals(codeString))
421                return null;
422        if ("read".equals(codeString))
423          return READ;
424        if ("vread".equals(codeString))
425          return VREAD;
426        if ("update".equals(codeString))
427          return UPDATE;
428        if ("patch".equals(codeString))
429          return PATCH;
430        if ("delete".equals(codeString))
431          return DELETE;
432        if ("history-instance".equals(codeString))
433          return HISTORYINSTANCE;
434        if ("history-type".equals(codeString))
435          return HISTORYTYPE;
436        if ("create".equals(codeString))
437          return CREATE;
438        if ("search-type".equals(codeString))
439          return SEARCHTYPE;
440        if (Configuration.isAcceptInvalidEnums())
441          return null;
442        else
443          throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'");
444        }
445        public String toCode() {
446          switch (this) {
447            case READ: return "read";
448            case VREAD: return "vread";
449            case UPDATE: return "update";
450            case PATCH: return "patch";
451            case DELETE: return "delete";
452            case HISTORYINSTANCE: return "history-instance";
453            case HISTORYTYPE: return "history-type";
454            case CREATE: return "create";
455            case SEARCHTYPE: return "search-type";
456            default: return "?";
457          }
458        }
459        public String getSystem() {
460          switch (this) {
461            case READ: return "http://hl7.org/fhir/restful-interaction";
462            case VREAD: return "http://hl7.org/fhir/restful-interaction";
463            case UPDATE: return "http://hl7.org/fhir/restful-interaction";
464            case PATCH: return "http://hl7.org/fhir/restful-interaction";
465            case DELETE: return "http://hl7.org/fhir/restful-interaction";
466            case HISTORYINSTANCE: return "http://hl7.org/fhir/restful-interaction";
467            case HISTORYTYPE: return "http://hl7.org/fhir/restful-interaction";
468            case CREATE: return "http://hl7.org/fhir/restful-interaction";
469            case SEARCHTYPE: return "http://hl7.org/fhir/restful-interaction";
470            default: return "?";
471          }
472        }
473        public String getDefinition() {
474          switch (this) {
475            case READ: return "";
476            case VREAD: return "";
477            case UPDATE: return "";
478            case PATCH: return "";
479            case DELETE: return "";
480            case HISTORYINSTANCE: return "";
481            case HISTORYTYPE: return "";
482            case CREATE: return "";
483            case SEARCHTYPE: return "";
484            default: return "?";
485          }
486        }
487        public String getDisplay() {
488          switch (this) {
489            case READ: return "read";
490            case VREAD: return "vread";
491            case UPDATE: return "update";
492            case PATCH: return "patch";
493            case DELETE: return "delete";
494            case HISTORYINSTANCE: return "history-instance";
495            case HISTORYTYPE: return "history-type";
496            case CREATE: return "create";
497            case SEARCHTYPE: return "search-type";
498            default: return "?";
499          }
500        }
501    }
502
503  public static class TypeRestfulInteractionEnumFactory implements EnumFactory<TypeRestfulInteraction> {
504    public TypeRestfulInteraction fromCode(String codeString) throws IllegalArgumentException {
505      if (codeString == null || "".equals(codeString))
506            if (codeString == null || "".equals(codeString))
507                return null;
508        if ("read".equals(codeString))
509          return TypeRestfulInteraction.READ;
510        if ("vread".equals(codeString))
511          return TypeRestfulInteraction.VREAD;
512        if ("update".equals(codeString))
513          return TypeRestfulInteraction.UPDATE;
514        if ("patch".equals(codeString))
515          return TypeRestfulInteraction.PATCH;
516        if ("delete".equals(codeString))
517          return TypeRestfulInteraction.DELETE;
518        if ("history-instance".equals(codeString))
519          return TypeRestfulInteraction.HISTORYINSTANCE;
520        if ("history-type".equals(codeString))
521          return TypeRestfulInteraction.HISTORYTYPE;
522        if ("create".equals(codeString))
523          return TypeRestfulInteraction.CREATE;
524        if ("search-type".equals(codeString))
525          return TypeRestfulInteraction.SEARCHTYPE;
526        throw new IllegalArgumentException("Unknown TypeRestfulInteraction code '"+codeString+"'");
527        }
528        public Enumeration<TypeRestfulInteraction> fromType(Base code) throws FHIRException {
529          if (code == null)
530            return null;
531          if (code.isEmpty())
532            return new Enumeration<TypeRestfulInteraction>(this);
533          String codeString = ((PrimitiveType) code).asStringValue();
534          if (codeString == null || "".equals(codeString))
535            return null;
536        if ("read".equals(codeString))
537          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.READ);
538        if ("vread".equals(codeString))
539          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.VREAD);
540        if ("update".equals(codeString))
541          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.UPDATE);
542        if ("patch".equals(codeString))
543          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.PATCH);
544        if ("delete".equals(codeString))
545          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.DELETE);
546        if ("history-instance".equals(codeString))
547          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.HISTORYINSTANCE);
548        if ("history-type".equals(codeString))
549          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.HISTORYTYPE);
550        if ("create".equals(codeString))
551          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.CREATE);
552        if ("search-type".equals(codeString))
553          return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.SEARCHTYPE);
554        throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'");
555        }
556    public String toCode(TypeRestfulInteraction code) {
557      if (code == TypeRestfulInteraction.READ)
558        return "read";
559      if (code == TypeRestfulInteraction.VREAD)
560        return "vread";
561      if (code == TypeRestfulInteraction.UPDATE)
562        return "update";
563      if (code == TypeRestfulInteraction.PATCH)
564        return "patch";
565      if (code == TypeRestfulInteraction.DELETE)
566        return "delete";
567      if (code == TypeRestfulInteraction.HISTORYINSTANCE)
568        return "history-instance";
569      if (code == TypeRestfulInteraction.HISTORYTYPE)
570        return "history-type";
571      if (code == TypeRestfulInteraction.CREATE)
572        return "create";
573      if (code == TypeRestfulInteraction.SEARCHTYPE)
574        return "search-type";
575      return "?";
576      }
577    public String toSystem(TypeRestfulInteraction code) {
578      return code.getSystem();
579      }
580    }
581
582    public enum ResourceVersionPolicy {
583        /**
584         * VersionId meta-property is not supported (server) or used (client).
585         */
586        NOVERSION, 
587        /**
588         * VersionId meta-property is supported (server) or used (client).
589         */
590        VERSIONED, 
591        /**
592         * VersionId must be correct for updates (server) or will be specified (If-match header) for updates (client).
593         */
594        VERSIONEDUPDATE, 
595        /**
596         * added to help the parsers with the generic types
597         */
598        NULL;
599        public static ResourceVersionPolicy fromCode(String codeString) throws FHIRException {
600            if (codeString == null || "".equals(codeString))
601                return null;
602        if ("no-version".equals(codeString))
603          return NOVERSION;
604        if ("versioned".equals(codeString))
605          return VERSIONED;
606        if ("versioned-update".equals(codeString))
607          return VERSIONEDUPDATE;
608        if (Configuration.isAcceptInvalidEnums())
609          return null;
610        else
611          throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'");
612        }
613        public String toCode() {
614          switch (this) {
615            case NOVERSION: return "no-version";
616            case VERSIONED: return "versioned";
617            case VERSIONEDUPDATE: return "versioned-update";
618            default: return "?";
619          }
620        }
621        public String getSystem() {
622          switch (this) {
623            case NOVERSION: return "http://hl7.org/fhir/versioning-policy";
624            case VERSIONED: return "http://hl7.org/fhir/versioning-policy";
625            case VERSIONEDUPDATE: return "http://hl7.org/fhir/versioning-policy";
626            default: return "?";
627          }
628        }
629        public String getDefinition() {
630          switch (this) {
631            case NOVERSION: return "VersionId meta-property is not supported (server) or used (client).";
632            case VERSIONED: return "VersionId meta-property is supported (server) or used (client).";
633            case VERSIONEDUPDATE: return "VersionId must be correct for updates (server) or will be specified (If-match header) for updates (client).";
634            default: return "?";
635          }
636        }
637        public String getDisplay() {
638          switch (this) {
639            case NOVERSION: return "No VersionId Support";
640            case VERSIONED: return "Versioned";
641            case VERSIONEDUPDATE: return "VersionId tracked fully";
642            default: return "?";
643          }
644        }
645    }
646
647  public static class ResourceVersionPolicyEnumFactory implements EnumFactory<ResourceVersionPolicy> {
648    public ResourceVersionPolicy fromCode(String codeString) throws IllegalArgumentException {
649      if (codeString == null || "".equals(codeString))
650            if (codeString == null || "".equals(codeString))
651                return null;
652        if ("no-version".equals(codeString))
653          return ResourceVersionPolicy.NOVERSION;
654        if ("versioned".equals(codeString))
655          return ResourceVersionPolicy.VERSIONED;
656        if ("versioned-update".equals(codeString))
657          return ResourceVersionPolicy.VERSIONEDUPDATE;
658        throw new IllegalArgumentException("Unknown ResourceVersionPolicy code '"+codeString+"'");
659        }
660        public Enumeration<ResourceVersionPolicy> fromType(Base code) throws FHIRException {
661          if (code == null)
662            return null;
663          if (code.isEmpty())
664            return new Enumeration<ResourceVersionPolicy>(this);
665          String codeString = ((PrimitiveType) code).asStringValue();
666          if (codeString == null || "".equals(codeString))
667            return null;
668        if ("no-version".equals(codeString))
669          return new Enumeration<ResourceVersionPolicy>(this, ResourceVersionPolicy.NOVERSION);
670        if ("versioned".equals(codeString))
671          return new Enumeration<ResourceVersionPolicy>(this, ResourceVersionPolicy.VERSIONED);
672        if ("versioned-update".equals(codeString))
673          return new Enumeration<ResourceVersionPolicy>(this, ResourceVersionPolicy.VERSIONEDUPDATE);
674        throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'");
675        }
676    public String toCode(ResourceVersionPolicy code) {
677      if (code == ResourceVersionPolicy.NOVERSION)
678        return "no-version";
679      if (code == ResourceVersionPolicy.VERSIONED)
680        return "versioned";
681      if (code == ResourceVersionPolicy.VERSIONEDUPDATE)
682        return "versioned-update";
683      return "?";
684      }
685    public String toSystem(ResourceVersionPolicy code) {
686      return code.getSystem();
687      }
688    }
689
690    public enum ConditionalReadStatus {
691        /**
692         * No support for conditional deletes.
693         */
694        NOTSUPPORTED, 
695        /**
696         * Conditional reads are supported, but only with the If-Modified-Since HTTP Header.
697         */
698        MODIFIEDSINCE, 
699        /**
700         * Conditional reads are supported, but only with the If-None-Match HTTP Header.
701         */
702        NOTMATCH, 
703        /**
704         * Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers.
705         */
706        FULLSUPPORT, 
707        /**
708         * added to help the parsers with the generic types
709         */
710        NULL;
711        public static ConditionalReadStatus fromCode(String codeString) throws FHIRException {
712            if (codeString == null || "".equals(codeString))
713                return null;
714        if ("not-supported".equals(codeString))
715          return NOTSUPPORTED;
716        if ("modified-since".equals(codeString))
717          return MODIFIEDSINCE;
718        if ("not-match".equals(codeString))
719          return NOTMATCH;
720        if ("full-support".equals(codeString))
721          return FULLSUPPORT;
722        if (Configuration.isAcceptInvalidEnums())
723          return null;
724        else
725          throw new FHIRException("Unknown ConditionalReadStatus code '"+codeString+"'");
726        }
727        public String toCode() {
728          switch (this) {
729            case NOTSUPPORTED: return "not-supported";
730            case MODIFIEDSINCE: return "modified-since";
731            case NOTMATCH: return "not-match";
732            case FULLSUPPORT: return "full-support";
733            default: return "?";
734          }
735        }
736        public String getSystem() {
737          switch (this) {
738            case NOTSUPPORTED: return "http://hl7.org/fhir/conditional-read-status";
739            case MODIFIEDSINCE: return "http://hl7.org/fhir/conditional-read-status";
740            case NOTMATCH: return "http://hl7.org/fhir/conditional-read-status";
741            case FULLSUPPORT: return "http://hl7.org/fhir/conditional-read-status";
742            default: return "?";
743          }
744        }
745        public String getDefinition() {
746          switch (this) {
747            case NOTSUPPORTED: return "No support for conditional deletes.";
748            case MODIFIEDSINCE: return "Conditional reads are supported, but only with the If-Modified-Since HTTP Header.";
749            case NOTMATCH: return "Conditional reads are supported, but only with the If-None-Match HTTP Header.";
750            case FULLSUPPORT: return "Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers.";
751            default: return "?";
752          }
753        }
754        public String getDisplay() {
755          switch (this) {
756            case NOTSUPPORTED: return "Not Supported";
757            case MODIFIEDSINCE: return "If-Modified-Since";
758            case NOTMATCH: return "If-None-Match";
759            case FULLSUPPORT: return "Full Support";
760            default: return "?";
761          }
762        }
763    }
764
765  public static class ConditionalReadStatusEnumFactory implements EnumFactory<ConditionalReadStatus> {
766    public ConditionalReadStatus fromCode(String codeString) throws IllegalArgumentException {
767      if (codeString == null || "".equals(codeString))
768            if (codeString == null || "".equals(codeString))
769                return null;
770        if ("not-supported".equals(codeString))
771          return ConditionalReadStatus.NOTSUPPORTED;
772        if ("modified-since".equals(codeString))
773          return ConditionalReadStatus.MODIFIEDSINCE;
774        if ("not-match".equals(codeString))
775          return ConditionalReadStatus.NOTMATCH;
776        if ("full-support".equals(codeString))
777          return ConditionalReadStatus.FULLSUPPORT;
778        throw new IllegalArgumentException("Unknown ConditionalReadStatus code '"+codeString+"'");
779        }
780        public Enumeration<ConditionalReadStatus> fromType(Base code) throws FHIRException {
781          if (code == null)
782            return null;
783          if (code.isEmpty())
784            return new Enumeration<ConditionalReadStatus>(this);
785          String codeString = ((PrimitiveType) code).asStringValue();
786          if (codeString == null || "".equals(codeString))
787            return null;
788        if ("not-supported".equals(codeString))
789          return new Enumeration<ConditionalReadStatus>(this, ConditionalReadStatus.NOTSUPPORTED);
790        if ("modified-since".equals(codeString))
791          return new Enumeration<ConditionalReadStatus>(this, ConditionalReadStatus.MODIFIEDSINCE);
792        if ("not-match".equals(codeString))
793          return new Enumeration<ConditionalReadStatus>(this, ConditionalReadStatus.NOTMATCH);
794        if ("full-support".equals(codeString))
795          return new Enumeration<ConditionalReadStatus>(this, ConditionalReadStatus.FULLSUPPORT);
796        throw new FHIRException("Unknown ConditionalReadStatus code '"+codeString+"'");
797        }
798    public String toCode(ConditionalReadStatus code) {
799      if (code == ConditionalReadStatus.NOTSUPPORTED)
800        return "not-supported";
801      if (code == ConditionalReadStatus.MODIFIEDSINCE)
802        return "modified-since";
803      if (code == ConditionalReadStatus.NOTMATCH)
804        return "not-match";
805      if (code == ConditionalReadStatus.FULLSUPPORT)
806        return "full-support";
807      return "?";
808      }
809    public String toSystem(ConditionalReadStatus code) {
810      return code.getSystem();
811      }
812    }
813
814    public enum ConditionalDeleteStatus {
815        /**
816         * No support for conditional deletes.
817         */
818        NOTSUPPORTED, 
819        /**
820         * Conditional deletes are supported, but only single resources at a time.
821         */
822        SINGLE, 
823        /**
824         * Conditional deletes are supported, and multiple resources can be deleted in a single interaction.
825         */
826        MULTIPLE, 
827        /**
828         * added to help the parsers with the generic types
829         */
830        NULL;
831        public static ConditionalDeleteStatus fromCode(String codeString) throws FHIRException {
832            if (codeString == null || "".equals(codeString))
833                return null;
834        if ("not-supported".equals(codeString))
835          return NOTSUPPORTED;
836        if ("single".equals(codeString))
837          return SINGLE;
838        if ("multiple".equals(codeString))
839          return MULTIPLE;
840        if (Configuration.isAcceptInvalidEnums())
841          return null;
842        else
843          throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'");
844        }
845        public String toCode() {
846          switch (this) {
847            case NOTSUPPORTED: return "not-supported";
848            case SINGLE: return "single";
849            case MULTIPLE: return "multiple";
850            default: return "?";
851          }
852        }
853        public String getSystem() {
854          switch (this) {
855            case NOTSUPPORTED: return "http://hl7.org/fhir/conditional-delete-status";
856            case SINGLE: return "http://hl7.org/fhir/conditional-delete-status";
857            case MULTIPLE: return "http://hl7.org/fhir/conditional-delete-status";
858            default: return "?";
859          }
860        }
861        public String getDefinition() {
862          switch (this) {
863            case NOTSUPPORTED: return "No support for conditional deletes.";
864            case SINGLE: return "Conditional deletes are supported, but only single resources at a time.";
865            case MULTIPLE: return "Conditional deletes are supported, and multiple resources can be deleted in a single interaction.";
866            default: return "?";
867          }
868        }
869        public String getDisplay() {
870          switch (this) {
871            case NOTSUPPORTED: return "Not Supported";
872            case SINGLE: return "Single Deletes Supported";
873            case MULTIPLE: return "Multiple Deletes Supported";
874            default: return "?";
875          }
876        }
877    }
878
879  public static class ConditionalDeleteStatusEnumFactory implements EnumFactory<ConditionalDeleteStatus> {
880    public ConditionalDeleteStatus fromCode(String codeString) throws IllegalArgumentException {
881      if (codeString == null || "".equals(codeString))
882            if (codeString == null || "".equals(codeString))
883                return null;
884        if ("not-supported".equals(codeString))
885          return ConditionalDeleteStatus.NOTSUPPORTED;
886        if ("single".equals(codeString))
887          return ConditionalDeleteStatus.SINGLE;
888        if ("multiple".equals(codeString))
889          return ConditionalDeleteStatus.MULTIPLE;
890        throw new IllegalArgumentException("Unknown ConditionalDeleteStatus code '"+codeString+"'");
891        }
892        public Enumeration<ConditionalDeleteStatus> fromType(Base code) throws FHIRException {
893          if (code == null)
894            return null;
895          if (code.isEmpty())
896            return new Enumeration<ConditionalDeleteStatus>(this);
897          String codeString = ((PrimitiveType) code).asStringValue();
898          if (codeString == null || "".equals(codeString))
899            return null;
900        if ("not-supported".equals(codeString))
901          return new Enumeration<ConditionalDeleteStatus>(this, ConditionalDeleteStatus.NOTSUPPORTED);
902        if ("single".equals(codeString))
903          return new Enumeration<ConditionalDeleteStatus>(this, ConditionalDeleteStatus.SINGLE);
904        if ("multiple".equals(codeString))
905          return new Enumeration<ConditionalDeleteStatus>(this, ConditionalDeleteStatus.MULTIPLE);
906        throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'");
907        }
908    public String toCode(ConditionalDeleteStatus code) {
909      if (code == ConditionalDeleteStatus.NOTSUPPORTED)
910        return "not-supported";
911      if (code == ConditionalDeleteStatus.SINGLE)
912        return "single";
913      if (code == ConditionalDeleteStatus.MULTIPLE)
914        return "multiple";
915      return "?";
916      }
917    public String toSystem(ConditionalDeleteStatus code) {
918      return code.getSystem();
919      }
920    }
921
922    public enum ReferenceHandlingPolicy {
923        /**
924         * The server supports and populates Literal references where they are known (this code does not guarantee that all references are literal; see 'enforced')
925         */
926        LITERAL, 
927        /**
928         * The server allows logical references
929         */
930        LOGICAL, 
931        /**
932         * The server will attempt to resolve logical references to literal references (if resolution fails, the server may still accept resources; see logical)
933         */
934        RESOLVES, 
935        /**
936         * 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
937         */
938        ENFORCED, 
939        /**
940         * The server does not support references that point to other servers
941         */
942        LOCAL, 
943        /**
944         * added to help the parsers with the generic types
945         */
946        NULL;
947        public static ReferenceHandlingPolicy fromCode(String codeString) throws FHIRException {
948            if (codeString == null || "".equals(codeString))
949                return null;
950        if ("literal".equals(codeString))
951          return LITERAL;
952        if ("logical".equals(codeString))
953          return LOGICAL;
954        if ("resolves".equals(codeString))
955          return RESOLVES;
956        if ("enforced".equals(codeString))
957          return ENFORCED;
958        if ("local".equals(codeString))
959          return LOCAL;
960        if (Configuration.isAcceptInvalidEnums())
961          return null;
962        else
963          throw new FHIRException("Unknown ReferenceHandlingPolicy code '"+codeString+"'");
964        }
965        public String toCode() {
966          switch (this) {
967            case LITERAL: return "literal";
968            case LOGICAL: return "logical";
969            case RESOLVES: return "resolves";
970            case ENFORCED: return "enforced";
971            case LOCAL: return "local";
972            default: return "?";
973          }
974        }
975        public String getSystem() {
976          switch (this) {
977            case LITERAL: return "http://hl7.org/fhir/reference-handling-policy";
978            case LOGICAL: return "http://hl7.org/fhir/reference-handling-policy";
979            case RESOLVES: return "http://hl7.org/fhir/reference-handling-policy";
980            case ENFORCED: return "http://hl7.org/fhir/reference-handling-policy";
981            case LOCAL: return "http://hl7.org/fhir/reference-handling-policy";
982            default: return "?";
983          }
984        }
985        public String getDefinition() {
986          switch (this) {
987            case LITERAL: return "The server supports and populates Literal references where they are known (this code does not guarantee that all references are literal; see 'enforced')";
988            case LOGICAL: return "The server allows logical references";
989            case RESOLVES: return "The server will attempt to resolve logical references to literal references (if resolution fails, the server may still accept resources; see logical)";
990            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";
991            case LOCAL: return "The server does not support references that point to other servers";
992            default: return "?";
993          }
994        }
995        public String getDisplay() {
996          switch (this) {
997            case LITERAL: return "Literal References";
998            case LOGICAL: return "Logical References";
999            case RESOLVES: return "Resolves References";
1000            case ENFORCED: return "Reference Integrity Enforced";
1001            case LOCAL: return "Local References Only";
1002            default: return "?";
1003          }
1004        }
1005    }
1006
1007  public static class ReferenceHandlingPolicyEnumFactory implements EnumFactory<ReferenceHandlingPolicy> {
1008    public ReferenceHandlingPolicy fromCode(String codeString) throws IllegalArgumentException {
1009      if (codeString == null || "".equals(codeString))
1010            if (codeString == null || "".equals(codeString))
1011                return null;
1012        if ("literal".equals(codeString))
1013          return ReferenceHandlingPolicy.LITERAL;
1014        if ("logical".equals(codeString))
1015          return ReferenceHandlingPolicy.LOGICAL;
1016        if ("resolves".equals(codeString))
1017          return ReferenceHandlingPolicy.RESOLVES;
1018        if ("enforced".equals(codeString))
1019          return ReferenceHandlingPolicy.ENFORCED;
1020        if ("local".equals(codeString))
1021          return ReferenceHandlingPolicy.LOCAL;
1022        throw new IllegalArgumentException("Unknown ReferenceHandlingPolicy code '"+codeString+"'");
1023        }
1024        public Enumeration<ReferenceHandlingPolicy> fromType(Base code) throws FHIRException {
1025          if (code == null)
1026            return null;
1027          if (code.isEmpty())
1028            return new Enumeration<ReferenceHandlingPolicy>(this);
1029          String codeString = ((PrimitiveType) code).asStringValue();
1030          if (codeString == null || "".equals(codeString))
1031            return null;
1032        if ("literal".equals(codeString))
1033          return new Enumeration<ReferenceHandlingPolicy>(this, ReferenceHandlingPolicy.LITERAL);
1034        if ("logical".equals(codeString))
1035          return new Enumeration<ReferenceHandlingPolicy>(this, ReferenceHandlingPolicy.LOGICAL);
1036        if ("resolves".equals(codeString))
1037          return new Enumeration<ReferenceHandlingPolicy>(this, ReferenceHandlingPolicy.RESOLVES);
1038        if ("enforced".equals(codeString))
1039          return new Enumeration<ReferenceHandlingPolicy>(this, ReferenceHandlingPolicy.ENFORCED);
1040        if ("local".equals(codeString))
1041          return new Enumeration<ReferenceHandlingPolicy>(this, ReferenceHandlingPolicy.LOCAL);
1042        throw new FHIRException("Unknown ReferenceHandlingPolicy code '"+codeString+"'");
1043        }
1044    public String toCode(ReferenceHandlingPolicy code) {
1045      if (code == ReferenceHandlingPolicy.LITERAL)
1046        return "literal";
1047      if (code == ReferenceHandlingPolicy.LOGICAL)
1048        return "logical";
1049      if (code == ReferenceHandlingPolicy.RESOLVES)
1050        return "resolves";
1051      if (code == ReferenceHandlingPolicy.ENFORCED)
1052        return "enforced";
1053      if (code == ReferenceHandlingPolicy.LOCAL)
1054        return "local";
1055      return "?";
1056      }
1057    public String toSystem(ReferenceHandlingPolicy code) {
1058      return code.getSystem();
1059      }
1060    }
1061
1062    public enum SystemRestfulInteraction {
1063        /**
1064         * null
1065         */
1066        TRANSACTION, 
1067        /**
1068         * null
1069         */
1070        BATCH, 
1071        /**
1072         * null
1073         */
1074        SEARCHSYSTEM, 
1075        /**
1076         * null
1077         */
1078        HISTORYSYSTEM, 
1079        /**
1080         * added to help the parsers with the generic types
1081         */
1082        NULL;
1083        public static SystemRestfulInteraction fromCode(String codeString) throws FHIRException {
1084            if (codeString == null || "".equals(codeString))
1085                return null;
1086        if ("transaction".equals(codeString))
1087          return TRANSACTION;
1088        if ("batch".equals(codeString))
1089          return BATCH;
1090        if ("search-system".equals(codeString))
1091          return SEARCHSYSTEM;
1092        if ("history-system".equals(codeString))
1093          return HISTORYSYSTEM;
1094        if (Configuration.isAcceptInvalidEnums())
1095          return null;
1096        else
1097          throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'");
1098        }
1099        public String toCode() {
1100          switch (this) {
1101            case TRANSACTION: return "transaction";
1102            case BATCH: return "batch";
1103            case SEARCHSYSTEM: return "search-system";
1104            case HISTORYSYSTEM: return "history-system";
1105            default: return "?";
1106          }
1107        }
1108        public String getSystem() {
1109          switch (this) {
1110            case TRANSACTION: return "http://hl7.org/fhir/restful-interaction";
1111            case BATCH: return "http://hl7.org/fhir/restful-interaction";
1112            case SEARCHSYSTEM: return "http://hl7.org/fhir/restful-interaction";
1113            case HISTORYSYSTEM: return "http://hl7.org/fhir/restful-interaction";
1114            default: return "?";
1115          }
1116        }
1117        public String getDefinition() {
1118          switch (this) {
1119            case TRANSACTION: return "";
1120            case BATCH: return "";
1121            case SEARCHSYSTEM: return "";
1122            case HISTORYSYSTEM: return "";
1123            default: return "?";
1124          }
1125        }
1126        public String getDisplay() {
1127          switch (this) {
1128            case TRANSACTION: return "transaction";
1129            case BATCH: return "batch";
1130            case SEARCHSYSTEM: return "search-system";
1131            case HISTORYSYSTEM: return "history-system";
1132            default: return "?";
1133          }
1134        }
1135    }
1136
1137  public static class SystemRestfulInteractionEnumFactory implements EnumFactory<SystemRestfulInteraction> {
1138    public SystemRestfulInteraction fromCode(String codeString) throws IllegalArgumentException {
1139      if (codeString == null || "".equals(codeString))
1140            if (codeString == null || "".equals(codeString))
1141                return null;
1142        if ("transaction".equals(codeString))
1143          return SystemRestfulInteraction.TRANSACTION;
1144        if ("batch".equals(codeString))
1145          return SystemRestfulInteraction.BATCH;
1146        if ("search-system".equals(codeString))
1147          return SystemRestfulInteraction.SEARCHSYSTEM;
1148        if ("history-system".equals(codeString))
1149          return SystemRestfulInteraction.HISTORYSYSTEM;
1150        throw new IllegalArgumentException("Unknown SystemRestfulInteraction code '"+codeString+"'");
1151        }
1152        public Enumeration<SystemRestfulInteraction> fromType(Base code) throws FHIRException {
1153          if (code == null)
1154            return null;
1155          if (code.isEmpty())
1156            return new Enumeration<SystemRestfulInteraction>(this);
1157          String codeString = ((PrimitiveType) code).asStringValue();
1158          if (codeString == null || "".equals(codeString))
1159            return null;
1160        if ("transaction".equals(codeString))
1161          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.TRANSACTION);
1162        if ("batch".equals(codeString))
1163          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.BATCH);
1164        if ("search-system".equals(codeString))
1165          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.SEARCHSYSTEM);
1166        if ("history-system".equals(codeString))
1167          return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.HISTORYSYSTEM);
1168        throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'");
1169        }
1170    public String toCode(SystemRestfulInteraction code) {
1171      if (code == SystemRestfulInteraction.TRANSACTION)
1172        return "transaction";
1173      if (code == SystemRestfulInteraction.BATCH)
1174        return "batch";
1175      if (code == SystemRestfulInteraction.SEARCHSYSTEM)
1176        return "search-system";
1177      if (code == SystemRestfulInteraction.HISTORYSYSTEM)
1178        return "history-system";
1179      return "?";
1180      }
1181    public String toSystem(SystemRestfulInteraction code) {
1182      return code.getSystem();
1183      }
1184    }
1185
1186    public enum EventCapabilityMode {
1187        /**
1188         * The application sends requests and receives responses.
1189         */
1190        SENDER, 
1191        /**
1192         * The application receives requests and sends responses.
1193         */
1194        RECEIVER, 
1195        /**
1196         * added to help the parsers with the generic types
1197         */
1198        NULL;
1199        public static EventCapabilityMode fromCode(String codeString) throws FHIRException {
1200            if (codeString == null || "".equals(codeString))
1201                return null;
1202        if ("sender".equals(codeString))
1203          return SENDER;
1204        if ("receiver".equals(codeString))
1205          return RECEIVER;
1206        if (Configuration.isAcceptInvalidEnums())
1207          return null;
1208        else
1209          throw new FHIRException("Unknown EventCapabilityMode code '"+codeString+"'");
1210        }
1211        public String toCode() {
1212          switch (this) {
1213            case SENDER: return "sender";
1214            case RECEIVER: return "receiver";
1215            default: return "?";
1216          }
1217        }
1218        public String getSystem() {
1219          switch (this) {
1220            case SENDER: return "http://hl7.org/fhir/event-capability-mode";
1221            case RECEIVER: return "http://hl7.org/fhir/event-capability-mode";
1222            default: return "?";
1223          }
1224        }
1225        public String getDefinition() {
1226          switch (this) {
1227            case SENDER: return "The application sends requests and receives responses.";
1228            case RECEIVER: return "The application receives requests and sends responses.";
1229            default: return "?";
1230          }
1231        }
1232        public String getDisplay() {
1233          switch (this) {
1234            case SENDER: return "Sender";
1235            case RECEIVER: return "Receiver";
1236            default: return "?";
1237          }
1238        }
1239    }
1240
1241  public static class EventCapabilityModeEnumFactory implements EnumFactory<EventCapabilityMode> {
1242    public EventCapabilityMode fromCode(String codeString) throws IllegalArgumentException {
1243      if (codeString == null || "".equals(codeString))
1244            if (codeString == null || "".equals(codeString))
1245                return null;
1246        if ("sender".equals(codeString))
1247          return EventCapabilityMode.SENDER;
1248        if ("receiver".equals(codeString))
1249          return EventCapabilityMode.RECEIVER;
1250        throw new IllegalArgumentException("Unknown EventCapabilityMode code '"+codeString+"'");
1251        }
1252        public Enumeration<EventCapabilityMode> fromType(Base code) throws FHIRException {
1253          if (code == null)
1254            return null;
1255          if (code.isEmpty())
1256            return new Enumeration<EventCapabilityMode>(this);
1257          String codeString = ((PrimitiveType) code).asStringValue();
1258          if (codeString == null || "".equals(codeString))
1259            return null;
1260        if ("sender".equals(codeString))
1261          return new Enumeration<EventCapabilityMode>(this, EventCapabilityMode.SENDER);
1262        if ("receiver".equals(codeString))
1263          return new Enumeration<EventCapabilityMode>(this, EventCapabilityMode.RECEIVER);
1264        throw new FHIRException("Unknown EventCapabilityMode code '"+codeString+"'");
1265        }
1266    public String toCode(EventCapabilityMode code) {
1267      if (code == EventCapabilityMode.SENDER)
1268        return "sender";
1269      if (code == EventCapabilityMode.RECEIVER)
1270        return "receiver";
1271      return "?";
1272      }
1273    public String toSystem(EventCapabilityMode code) {
1274      return code.getSystem();
1275      }
1276    }
1277
1278    public enum MessageSignificanceCategory {
1279        /**
1280         * The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment.
1281         */
1282        CONSEQUENCE, 
1283        /**
1284         * The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful.
1285         */
1286        CURRENCY, 
1287        /**
1288         * The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications.
1289         */
1290        NOTIFICATION, 
1291        /**
1292         * added to help the parsers with the generic types
1293         */
1294        NULL;
1295        public static MessageSignificanceCategory fromCode(String codeString) throws FHIRException {
1296            if (codeString == null || "".equals(codeString))
1297                return null;
1298        if ("Consequence".equals(codeString))
1299          return CONSEQUENCE;
1300        if ("Currency".equals(codeString))
1301          return CURRENCY;
1302        if ("Notification".equals(codeString))
1303          return NOTIFICATION;
1304        if (Configuration.isAcceptInvalidEnums())
1305          return null;
1306        else
1307          throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'");
1308        }
1309        public String toCode() {
1310          switch (this) {
1311            case CONSEQUENCE: return "Consequence";
1312            case CURRENCY: return "Currency";
1313            case NOTIFICATION: return "Notification";
1314            default: return "?";
1315          }
1316        }
1317        public String getSystem() {
1318          switch (this) {
1319            case CONSEQUENCE: return "http://hl7.org/fhir/message-significance-category";
1320            case CURRENCY: return "http://hl7.org/fhir/message-significance-category";
1321            case NOTIFICATION: return "http://hl7.org/fhir/message-significance-category";
1322            default: return "?";
1323          }
1324        }
1325        public String getDefinition() {
1326          switch (this) {
1327            case CONSEQUENCE: return "The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment.";
1328            case CURRENCY: return "The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful.";
1329            case NOTIFICATION: return "The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications.";
1330            default: return "?";
1331          }
1332        }
1333        public String getDisplay() {
1334          switch (this) {
1335            case CONSEQUENCE: return "Consequence";
1336            case CURRENCY: return "Currency";
1337            case NOTIFICATION: return "Notification";
1338            default: return "?";
1339          }
1340        }
1341    }
1342
1343  public static class MessageSignificanceCategoryEnumFactory implements EnumFactory<MessageSignificanceCategory> {
1344    public MessageSignificanceCategory fromCode(String codeString) throws IllegalArgumentException {
1345      if (codeString == null || "".equals(codeString))
1346            if (codeString == null || "".equals(codeString))
1347                return null;
1348        if ("Consequence".equals(codeString))
1349          return MessageSignificanceCategory.CONSEQUENCE;
1350        if ("Currency".equals(codeString))
1351          return MessageSignificanceCategory.CURRENCY;
1352        if ("Notification".equals(codeString))
1353          return MessageSignificanceCategory.NOTIFICATION;
1354        throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'");
1355        }
1356        public Enumeration<MessageSignificanceCategory> fromType(Base code) throws FHIRException {
1357          if (code == null)
1358            return null;
1359          if (code.isEmpty())
1360            return new Enumeration<MessageSignificanceCategory>(this);
1361          String codeString = ((PrimitiveType) code).asStringValue();
1362          if (codeString == null || "".equals(codeString))
1363            return null;
1364        if ("Consequence".equals(codeString))
1365          return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.CONSEQUENCE);
1366        if ("Currency".equals(codeString))
1367          return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.CURRENCY);
1368        if ("Notification".equals(codeString))
1369          return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.NOTIFICATION);
1370        throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'");
1371        }
1372    public String toCode(MessageSignificanceCategory code) {
1373      if (code == MessageSignificanceCategory.CONSEQUENCE)
1374        return "Consequence";
1375      if (code == MessageSignificanceCategory.CURRENCY)
1376        return "Currency";
1377      if (code == MessageSignificanceCategory.NOTIFICATION)
1378        return "Notification";
1379      return "?";
1380      }
1381    public String toSystem(MessageSignificanceCategory code) {
1382      return code.getSystem();
1383      }
1384    }
1385
1386    public enum DocumentMode {
1387        /**
1388         * The application produces documents of the specified type.
1389         */
1390        PRODUCER, 
1391        /**
1392         * The application consumes documents of the specified type.
1393         */
1394        CONSUMER, 
1395        /**
1396         * added to help the parsers with the generic types
1397         */
1398        NULL;
1399        public static DocumentMode fromCode(String codeString) throws FHIRException {
1400            if (codeString == null || "".equals(codeString))
1401                return null;
1402        if ("producer".equals(codeString))
1403          return PRODUCER;
1404        if ("consumer".equals(codeString))
1405          return CONSUMER;
1406        if (Configuration.isAcceptInvalidEnums())
1407          return null;
1408        else
1409          throw new FHIRException("Unknown DocumentMode code '"+codeString+"'");
1410        }
1411        public String toCode() {
1412          switch (this) {
1413            case PRODUCER: return "producer";
1414            case CONSUMER: return "consumer";
1415            default: return "?";
1416          }
1417        }
1418        public String getSystem() {
1419          switch (this) {
1420            case PRODUCER: return "http://hl7.org/fhir/document-mode";
1421            case CONSUMER: return "http://hl7.org/fhir/document-mode";
1422            default: return "?";
1423          }
1424        }
1425        public String getDefinition() {
1426          switch (this) {
1427            case PRODUCER: return "The application produces documents of the specified type.";
1428            case CONSUMER: return "The application consumes documents of the specified type.";
1429            default: return "?";
1430          }
1431        }
1432        public String getDisplay() {
1433          switch (this) {
1434            case PRODUCER: return "Producer";
1435            case CONSUMER: return "Consumer";
1436            default: return "?";
1437          }
1438        }
1439    }
1440
1441  public static class DocumentModeEnumFactory implements EnumFactory<DocumentMode> {
1442    public DocumentMode fromCode(String codeString) throws IllegalArgumentException {
1443      if (codeString == null || "".equals(codeString))
1444            if (codeString == null || "".equals(codeString))
1445                return null;
1446        if ("producer".equals(codeString))
1447          return DocumentMode.PRODUCER;
1448        if ("consumer".equals(codeString))
1449          return DocumentMode.CONSUMER;
1450        throw new IllegalArgumentException("Unknown DocumentMode code '"+codeString+"'");
1451        }
1452        public Enumeration<DocumentMode> fromType(Base code) throws FHIRException {
1453          if (code == null)
1454            return null;
1455          if (code.isEmpty())
1456            return new Enumeration<DocumentMode>(this);
1457          String codeString = ((PrimitiveType) code).asStringValue();
1458          if (codeString == null || "".equals(codeString))
1459            return null;
1460        if ("producer".equals(codeString))
1461          return new Enumeration<DocumentMode>(this, DocumentMode.PRODUCER);
1462        if ("consumer".equals(codeString))
1463          return new Enumeration<DocumentMode>(this, DocumentMode.CONSUMER);
1464        throw new FHIRException("Unknown DocumentMode code '"+codeString+"'");
1465        }
1466    public String toCode(DocumentMode code) {
1467      if (code == DocumentMode.PRODUCER)
1468        return "producer";
1469      if (code == DocumentMode.CONSUMER)
1470        return "consumer";
1471      return "?";
1472      }
1473    public String toSystem(DocumentMode code) {
1474      return code.getSystem();
1475      }
1476    }
1477
1478    @Block()
1479    public static class CapabilityStatementSoftwareComponent extends BackboneElement implements IBaseBackboneElement {
1480        /**
1481         * Name software is known by.
1482         */
1483        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1484        @Description(shortDefinition="A name the software is known by", formalDefinition="Name software is known by." )
1485        protected StringType name;
1486
1487        /**
1488         * The version identifier for the software covered by this statement.
1489         */
1490        @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1491        @Description(shortDefinition="Version covered by this statement", formalDefinition="The version identifier for the software covered by this statement." )
1492        protected StringType version;
1493
1494        /**
1495         * Date this version of the software was released.
1496         */
1497        @Child(name = "releaseDate", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1498        @Description(shortDefinition="Date this version released", formalDefinition="Date this version of the software was released." )
1499        protected DateTimeType releaseDate;
1500
1501        private static final long serialVersionUID = 1819769027L;
1502
1503    /**
1504     * Constructor
1505     */
1506      public CapabilityStatementSoftwareComponent() {
1507        super();
1508      }
1509
1510    /**
1511     * Constructor
1512     */
1513      public CapabilityStatementSoftwareComponent(StringType name) {
1514        super();
1515        this.name = name;
1516      }
1517
1518        /**
1519         * @return {@link #name} (Name software is known by.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1520         */
1521        public StringType getNameElement() { 
1522          if (this.name == null)
1523            if (Configuration.errorOnAutoCreate())
1524              throw new Error("Attempt to auto-create CapabilityStatementSoftwareComponent.name");
1525            else if (Configuration.doAutoCreate())
1526              this.name = new StringType(); // bb
1527          return this.name;
1528        }
1529
1530        public boolean hasNameElement() { 
1531          return this.name != null && !this.name.isEmpty();
1532        }
1533
1534        public boolean hasName() { 
1535          return this.name != null && !this.name.isEmpty();
1536        }
1537
1538        /**
1539         * @param value {@link #name} (Name software is known by.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1540         */
1541        public CapabilityStatementSoftwareComponent setNameElement(StringType value) { 
1542          this.name = value;
1543          return this;
1544        }
1545
1546        /**
1547         * @return Name software is known by.
1548         */
1549        public String getName() { 
1550          return this.name == null ? null : this.name.getValue();
1551        }
1552
1553        /**
1554         * @param value Name software is known by.
1555         */
1556        public CapabilityStatementSoftwareComponent setName(String value) { 
1557            if (this.name == null)
1558              this.name = new StringType();
1559            this.name.setValue(value);
1560          return this;
1561        }
1562
1563        /**
1564         * @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
1565         */
1566        public StringType getVersionElement() { 
1567          if (this.version == null)
1568            if (Configuration.errorOnAutoCreate())
1569              throw new Error("Attempt to auto-create CapabilityStatementSoftwareComponent.version");
1570            else if (Configuration.doAutoCreate())
1571              this.version = new StringType(); // bb
1572          return this.version;
1573        }
1574
1575        public boolean hasVersionElement() { 
1576          return this.version != null && !this.version.isEmpty();
1577        }
1578
1579        public boolean hasVersion() { 
1580          return this.version != null && !this.version.isEmpty();
1581        }
1582
1583        /**
1584         * @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
1585         */
1586        public CapabilityStatementSoftwareComponent setVersionElement(StringType value) { 
1587          this.version = value;
1588          return this;
1589        }
1590
1591        /**
1592         * @return The version identifier for the software covered by this statement.
1593         */
1594        public String getVersion() { 
1595          return this.version == null ? null : this.version.getValue();
1596        }
1597
1598        /**
1599         * @param value The version identifier for the software covered by this statement.
1600         */
1601        public CapabilityStatementSoftwareComponent setVersion(String value) { 
1602          if (Utilities.noString(value))
1603            this.version = null;
1604          else {
1605            if (this.version == null)
1606              this.version = new StringType();
1607            this.version.setValue(value);
1608          }
1609          return this;
1610        }
1611
1612        /**
1613         * @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
1614         */
1615        public DateTimeType getReleaseDateElement() { 
1616          if (this.releaseDate == null)
1617            if (Configuration.errorOnAutoCreate())
1618              throw new Error("Attempt to auto-create CapabilityStatementSoftwareComponent.releaseDate");
1619            else if (Configuration.doAutoCreate())
1620              this.releaseDate = new DateTimeType(); // bb
1621          return this.releaseDate;
1622        }
1623
1624        public boolean hasReleaseDateElement() { 
1625          return this.releaseDate != null && !this.releaseDate.isEmpty();
1626        }
1627
1628        public boolean hasReleaseDate() { 
1629          return this.releaseDate != null && !this.releaseDate.isEmpty();
1630        }
1631
1632        /**
1633         * @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
1634         */
1635        public CapabilityStatementSoftwareComponent setReleaseDateElement(DateTimeType value) { 
1636          this.releaseDate = value;
1637          return this;
1638        }
1639
1640        /**
1641         * @return Date this version of the software was released.
1642         */
1643        public Date getReleaseDate() { 
1644          return this.releaseDate == null ? null : this.releaseDate.getValue();
1645        }
1646
1647        /**
1648         * @param value Date this version of the software was released.
1649         */
1650        public CapabilityStatementSoftwareComponent setReleaseDate(Date value) { 
1651          if (value == null)
1652            this.releaseDate = null;
1653          else {
1654            if (this.releaseDate == null)
1655              this.releaseDate = new DateTimeType();
1656            this.releaseDate.setValue(value);
1657          }
1658          return this;
1659        }
1660
1661        protected void listChildren(List<Property> children) {
1662          super.listChildren(children);
1663          children.add(new Property("name", "string", "Name software is known by.", 0, 1, name));
1664          children.add(new Property("version", "string", "The version identifier for the software covered by this statement.", 0, 1, version));
1665          children.add(new Property("releaseDate", "dateTime", "Date this version of the software was released.", 0, 1, releaseDate));
1666        }
1667
1668        @Override
1669        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1670          switch (_hash) {
1671          case 3373707: /*name*/  return new Property("name", "string", "Name software is known by.", 0, 1, name);
1672          case 351608024: /*version*/  return new Property("version", "string", "The version identifier for the software covered by this statement.", 0, 1, version);
1673          case 212873301: /*releaseDate*/  return new Property("releaseDate", "dateTime", "Date this version of the software was released.", 0, 1, releaseDate);
1674          default: return super.getNamedProperty(_hash, _name, _checkValid);
1675          }
1676
1677        }
1678
1679      @Override
1680      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1681        switch (hash) {
1682        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1683        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1684        case 212873301: /*releaseDate*/ return this.releaseDate == null ? new Base[0] : new Base[] {this.releaseDate}; // DateTimeType
1685        default: return super.getProperty(hash, name, checkValid);
1686        }
1687
1688      }
1689
1690      @Override
1691      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1692        switch (hash) {
1693        case 3373707: // name
1694          this.name = castToString(value); // StringType
1695          return value;
1696        case 351608024: // version
1697          this.version = castToString(value); // StringType
1698          return value;
1699        case 212873301: // releaseDate
1700          this.releaseDate = castToDateTime(value); // DateTimeType
1701          return value;
1702        default: return super.setProperty(hash, name, value);
1703        }
1704
1705      }
1706
1707      @Override
1708      public Base setProperty(String name, Base value) throws FHIRException {
1709        if (name.equals("name")) {
1710          this.name = castToString(value); // StringType
1711        } else if (name.equals("version")) {
1712          this.version = castToString(value); // StringType
1713        } else if (name.equals("releaseDate")) {
1714          this.releaseDate = castToDateTime(value); // DateTimeType
1715        } else
1716          return super.setProperty(name, value);
1717        return value;
1718      }
1719
1720      @Override
1721      public Base makeProperty(int hash, String name) throws FHIRException {
1722        switch (hash) {
1723        case 3373707:  return getNameElement();
1724        case 351608024:  return getVersionElement();
1725        case 212873301:  return getReleaseDateElement();
1726        default: return super.makeProperty(hash, name);
1727        }
1728
1729      }
1730
1731      @Override
1732      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1733        switch (hash) {
1734        case 3373707: /*name*/ return new String[] {"string"};
1735        case 351608024: /*version*/ return new String[] {"string"};
1736        case 212873301: /*releaseDate*/ return new String[] {"dateTime"};
1737        default: return super.getTypesForProperty(hash, name);
1738        }
1739
1740      }
1741
1742      @Override
1743      public Base addChild(String name) throws FHIRException {
1744        if (name.equals("name")) {
1745          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.name");
1746        }
1747        else if (name.equals("version")) {
1748          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.version");
1749        }
1750        else if (name.equals("releaseDate")) {
1751          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.releaseDate");
1752        }
1753        else
1754          return super.addChild(name);
1755      }
1756
1757      public CapabilityStatementSoftwareComponent copy() {
1758        CapabilityStatementSoftwareComponent dst = new CapabilityStatementSoftwareComponent();
1759        copyValues(dst);
1760        dst.name = name == null ? null : name.copy();
1761        dst.version = version == null ? null : version.copy();
1762        dst.releaseDate = releaseDate == null ? null : releaseDate.copy();
1763        return dst;
1764      }
1765
1766      @Override
1767      public boolean equalsDeep(Base other_) {
1768        if (!super.equalsDeep(other_))
1769          return false;
1770        if (!(other_ instanceof CapabilityStatementSoftwareComponent))
1771          return false;
1772        CapabilityStatementSoftwareComponent o = (CapabilityStatementSoftwareComponent) other_;
1773        return compareDeep(name, o.name, true) && compareDeep(version, o.version, true) && compareDeep(releaseDate, o.releaseDate, true)
1774          ;
1775      }
1776
1777      @Override
1778      public boolean equalsShallow(Base other_) {
1779        if (!super.equalsShallow(other_))
1780          return false;
1781        if (!(other_ instanceof CapabilityStatementSoftwareComponent))
1782          return false;
1783        CapabilityStatementSoftwareComponent o = (CapabilityStatementSoftwareComponent) other_;
1784        return compareValues(name, o.name, true) && compareValues(version, o.version, true) && compareValues(releaseDate, o.releaseDate, true)
1785          ;
1786      }
1787
1788      public boolean isEmpty() {
1789        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, version, releaseDate
1790          );
1791      }
1792
1793  public String fhirType() {
1794    return "CapabilityStatement.software";
1795
1796  }
1797
1798  }
1799
1800    @Block()
1801    public static class CapabilityStatementImplementationComponent extends BackboneElement implements IBaseBackboneElement {
1802        /**
1803         * Information about the specific installation that this capability statement relates to.
1804         */
1805        @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1806        @Description(shortDefinition="Describes this specific instance", formalDefinition="Information about the specific installation that this capability statement relates to." )
1807        protected StringType description;
1808
1809        /**
1810         * An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.
1811         */
1812        @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1813        @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." )
1814        protected UriType url;
1815
1816        private static final long serialVersionUID = -289238508L;
1817
1818    /**
1819     * Constructor
1820     */
1821      public CapabilityStatementImplementationComponent() {
1822        super();
1823      }
1824
1825    /**
1826     * Constructor
1827     */
1828      public CapabilityStatementImplementationComponent(StringType description) {
1829        super();
1830        this.description = description;
1831      }
1832
1833        /**
1834         * @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
1835         */
1836        public StringType getDescriptionElement() { 
1837          if (this.description == null)
1838            if (Configuration.errorOnAutoCreate())
1839              throw new Error("Attempt to auto-create CapabilityStatementImplementationComponent.description");
1840            else if (Configuration.doAutoCreate())
1841              this.description = new StringType(); // bb
1842          return this.description;
1843        }
1844
1845        public boolean hasDescriptionElement() { 
1846          return this.description != null && !this.description.isEmpty();
1847        }
1848
1849        public boolean hasDescription() { 
1850          return this.description != null && !this.description.isEmpty();
1851        }
1852
1853        /**
1854         * @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
1855         */
1856        public CapabilityStatementImplementationComponent setDescriptionElement(StringType value) { 
1857          this.description = value;
1858          return this;
1859        }
1860
1861        /**
1862         * @return Information about the specific installation that this capability statement relates to.
1863         */
1864        public String getDescription() { 
1865          return this.description == null ? null : this.description.getValue();
1866        }
1867
1868        /**
1869         * @param value Information about the specific installation that this capability statement relates to.
1870         */
1871        public CapabilityStatementImplementationComponent setDescription(String value) { 
1872            if (this.description == null)
1873              this.description = new StringType();
1874            this.description.setValue(value);
1875          return this;
1876        }
1877
1878        /**
1879         * @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
1880         */
1881        public UriType getUrlElement() { 
1882          if (this.url == null)
1883            if (Configuration.errorOnAutoCreate())
1884              throw new Error("Attempt to auto-create CapabilityStatementImplementationComponent.url");
1885            else if (Configuration.doAutoCreate())
1886              this.url = new UriType(); // bb
1887          return this.url;
1888        }
1889
1890        public boolean hasUrlElement() { 
1891          return this.url != null && !this.url.isEmpty();
1892        }
1893
1894        public boolean hasUrl() { 
1895          return this.url != null && !this.url.isEmpty();
1896        }
1897
1898        /**
1899         * @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
1900         */
1901        public CapabilityStatementImplementationComponent setUrlElement(UriType value) { 
1902          this.url = value;
1903          return this;
1904        }
1905
1906        /**
1907         * @return An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.
1908         */
1909        public String getUrl() { 
1910          return this.url == null ? null : this.url.getValue();
1911        }
1912
1913        /**
1914         * @param value An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.
1915         */
1916        public CapabilityStatementImplementationComponent setUrl(String value) { 
1917          if (Utilities.noString(value))
1918            this.url = null;
1919          else {
1920            if (this.url == null)
1921              this.url = new UriType();
1922            this.url.setValue(value);
1923          }
1924          return this;
1925        }
1926
1927        protected void listChildren(List<Property> children) {
1928          super.listChildren(children);
1929          children.add(new Property("description", "string", "Information about the specific installation that this capability statement relates to.", 0, 1, description));
1930          children.add(new Property("url", "uri", "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));
1931        }
1932
1933        @Override
1934        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1935          switch (_hash) {
1936          case -1724546052: /*description*/  return new Property("description", "string", "Information about the specific installation that this capability statement relates to.", 0, 1, description);
1937          case 116079: /*url*/  return new Property("url", "uri", "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);
1938          default: return super.getNamedProperty(_hash, _name, _checkValid);
1939          }
1940
1941        }
1942
1943      @Override
1944      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1945        switch (hash) {
1946        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1947        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1948        default: return super.getProperty(hash, name, checkValid);
1949        }
1950
1951      }
1952
1953      @Override
1954      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1955        switch (hash) {
1956        case -1724546052: // description
1957          this.description = castToString(value); // StringType
1958          return value;
1959        case 116079: // url
1960          this.url = castToUri(value); // UriType
1961          return value;
1962        default: return super.setProperty(hash, name, value);
1963        }
1964
1965      }
1966
1967      @Override
1968      public Base setProperty(String name, Base value) throws FHIRException {
1969        if (name.equals("description")) {
1970          this.description = castToString(value); // StringType
1971        } else if (name.equals("url")) {
1972          this.url = castToUri(value); // UriType
1973        } else
1974          return super.setProperty(name, value);
1975        return value;
1976      }
1977
1978      @Override
1979      public Base makeProperty(int hash, String name) throws FHIRException {
1980        switch (hash) {
1981        case -1724546052:  return getDescriptionElement();
1982        case 116079:  return getUrlElement();
1983        default: return super.makeProperty(hash, name);
1984        }
1985
1986      }
1987
1988      @Override
1989      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1990        switch (hash) {
1991        case -1724546052: /*description*/ return new String[] {"string"};
1992        case 116079: /*url*/ return new String[] {"uri"};
1993        default: return super.getTypesForProperty(hash, name);
1994        }
1995
1996      }
1997
1998      @Override
1999      public Base addChild(String name) throws FHIRException {
2000        if (name.equals("description")) {
2001          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.description");
2002        }
2003        else if (name.equals("url")) {
2004          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.url");
2005        }
2006        else
2007          return super.addChild(name);
2008      }
2009
2010      public CapabilityStatementImplementationComponent copy() {
2011        CapabilityStatementImplementationComponent dst = new CapabilityStatementImplementationComponent();
2012        copyValues(dst);
2013        dst.description = description == null ? null : description.copy();
2014        dst.url = url == null ? null : url.copy();
2015        return dst;
2016      }
2017
2018      @Override
2019      public boolean equalsDeep(Base other_) {
2020        if (!super.equalsDeep(other_))
2021          return false;
2022        if (!(other_ instanceof CapabilityStatementImplementationComponent))
2023          return false;
2024        CapabilityStatementImplementationComponent o = (CapabilityStatementImplementationComponent) other_;
2025        return compareDeep(description, o.description, true) && compareDeep(url, o.url, true);
2026      }
2027
2028      @Override
2029      public boolean equalsShallow(Base other_) {
2030        if (!super.equalsShallow(other_))
2031          return false;
2032        if (!(other_ instanceof CapabilityStatementImplementationComponent))
2033          return false;
2034        CapabilityStatementImplementationComponent o = (CapabilityStatementImplementationComponent) other_;
2035        return compareValues(description, o.description, true) && compareValues(url, o.url, true);
2036      }
2037
2038      public boolean isEmpty() {
2039        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, url);
2040      }
2041
2042  public String fhirType() {
2043    return "CapabilityStatement.implementation";
2044
2045  }
2046
2047  }
2048
2049    @Block()
2050    public static class CapabilityStatementRestComponent extends BackboneElement implements IBaseBackboneElement {
2051        /**
2052         * Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.
2053         */
2054        @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
2055        @Description(shortDefinition="client | server", formalDefinition="Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations." )
2056        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/restful-capability-mode")
2057        protected Enumeration<RestfulCapabilityMode> mode;
2058
2059        /**
2060         * Information about the system's restful capabilities that apply across all applications, such as security.
2061         */
2062        @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2063        @Description(shortDefinition="General description of implementation", formalDefinition="Information about the system's restful capabilities that apply across all applications, such as security." )
2064        protected StringType documentation;
2065
2066        /**
2067         * Information about security implementation from an interface perspective - what a client needs to know.
2068         */
2069        @Child(name = "security", type = {}, order=3, min=0, max=1, modifier=false, summary=true)
2070        @Description(shortDefinition="Information about security of implementation", formalDefinition="Information about security implementation from an interface perspective - what a client needs to know." )
2071        protected CapabilityStatementRestSecurityComponent security;
2072
2073        /**
2074         * A specification of the restful capabilities of the solution for a specific resource type.
2075         */
2076        @Child(name = "resource", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2077        @Description(shortDefinition="Resource served on the REST interface", formalDefinition="A specification of the restful capabilities of the solution for a specific resource type." )
2078        protected List<CapabilityStatementRestResourceComponent> resource;
2079
2080        /**
2081         * A specification of restful operations supported by the system.
2082         */
2083        @Child(name = "interaction", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2084        @Description(shortDefinition="What operations are supported?", formalDefinition="A specification of restful operations supported by the system." )
2085        protected List<SystemInteractionComponent> interaction;
2086
2087        /**
2088         * 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.
2089         */
2090        @Child(name = "searchParam", type = {CapabilityStatementRestResourceSearchParamComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2091        @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." )
2092        protected List<CapabilityStatementRestResourceSearchParamComponent> searchParam;
2093
2094        /**
2095         * Definition of an operation or a named query together with its parameters and their meaning and type.
2096         */
2097        @Child(name = "operation", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2098        @Description(shortDefinition="Definition of an operation or a custom query", formalDefinition="Definition of an operation or a named query together with its parameters and their meaning and type." )
2099        protected List<CapabilityStatementRestOperationComponent> operation;
2100
2101        /**
2102         * 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 .
2103         */
2104        @Child(name = "compartment", type = {UriType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2105        @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 ." )
2106        protected List<UriType> compartment;
2107
2108        private static final long serialVersionUID = 38012979L;
2109
2110    /**
2111     * Constructor
2112     */
2113      public CapabilityStatementRestComponent() {
2114        super();
2115      }
2116
2117    /**
2118     * Constructor
2119     */
2120      public CapabilityStatementRestComponent(Enumeration<RestfulCapabilityMode> mode) {
2121        super();
2122        this.mode = mode;
2123      }
2124
2125        /**
2126         * @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
2127         */
2128        public Enumeration<RestfulCapabilityMode> getModeElement() { 
2129          if (this.mode == null)
2130            if (Configuration.errorOnAutoCreate())
2131              throw new Error("Attempt to auto-create CapabilityStatementRestComponent.mode");
2132            else if (Configuration.doAutoCreate())
2133              this.mode = new Enumeration<RestfulCapabilityMode>(new RestfulCapabilityModeEnumFactory()); // bb
2134          return this.mode;
2135        }
2136
2137        public boolean hasModeElement() { 
2138          return this.mode != null && !this.mode.isEmpty();
2139        }
2140
2141        public boolean hasMode() { 
2142          return this.mode != null && !this.mode.isEmpty();
2143        }
2144
2145        /**
2146         * @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
2147         */
2148        public CapabilityStatementRestComponent setModeElement(Enumeration<RestfulCapabilityMode> value) { 
2149          this.mode = value;
2150          return this;
2151        }
2152
2153        /**
2154         * @return Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.
2155         */
2156        public RestfulCapabilityMode getMode() { 
2157          return this.mode == null ? null : this.mode.getValue();
2158        }
2159
2160        /**
2161         * @param value Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.
2162         */
2163        public CapabilityStatementRestComponent setMode(RestfulCapabilityMode value) { 
2164            if (this.mode == null)
2165              this.mode = new Enumeration<RestfulCapabilityMode>(new RestfulCapabilityModeEnumFactory());
2166            this.mode.setValue(value);
2167          return this;
2168        }
2169
2170        /**
2171         * @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
2172         */
2173        public StringType getDocumentationElement() { 
2174          if (this.documentation == null)
2175            if (Configuration.errorOnAutoCreate())
2176              throw new Error("Attempt to auto-create CapabilityStatementRestComponent.documentation");
2177            else if (Configuration.doAutoCreate())
2178              this.documentation = new StringType(); // bb
2179          return this.documentation;
2180        }
2181
2182        public boolean hasDocumentationElement() { 
2183          return this.documentation != null && !this.documentation.isEmpty();
2184        }
2185
2186        public boolean hasDocumentation() { 
2187          return this.documentation != null && !this.documentation.isEmpty();
2188        }
2189
2190        /**
2191         * @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
2192         */
2193        public CapabilityStatementRestComponent setDocumentationElement(StringType value) { 
2194          this.documentation = value;
2195          return this;
2196        }
2197
2198        /**
2199         * @return Information about the system's restful capabilities that apply across all applications, such as security.
2200         */
2201        public String getDocumentation() { 
2202          return this.documentation == null ? null : this.documentation.getValue();
2203        }
2204
2205        /**
2206         * @param value Information about the system's restful capabilities that apply across all applications, such as security.
2207         */
2208        public CapabilityStatementRestComponent setDocumentation(String value) { 
2209          if (Utilities.noString(value))
2210            this.documentation = null;
2211          else {
2212            if (this.documentation == null)
2213              this.documentation = new StringType();
2214            this.documentation.setValue(value);
2215          }
2216          return this;
2217        }
2218
2219        /**
2220         * @return {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.)
2221         */
2222        public CapabilityStatementRestSecurityComponent getSecurity() { 
2223          if (this.security == null)
2224            if (Configuration.errorOnAutoCreate())
2225              throw new Error("Attempt to auto-create CapabilityStatementRestComponent.security");
2226            else if (Configuration.doAutoCreate())
2227              this.security = new CapabilityStatementRestSecurityComponent(); // cc
2228          return this.security;
2229        }
2230
2231        public boolean hasSecurity() { 
2232          return this.security != null && !this.security.isEmpty();
2233        }
2234
2235        /**
2236         * @param value {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.)
2237         */
2238        public CapabilityStatementRestComponent setSecurity(CapabilityStatementRestSecurityComponent value)  { 
2239          this.security = value;
2240          return this;
2241        }
2242
2243        /**
2244         * @return {@link #resource} (A specification of the restful capabilities of the solution for a specific resource type.)
2245         */
2246        public List<CapabilityStatementRestResourceComponent> getResource() { 
2247          if (this.resource == null)
2248            this.resource = new ArrayList<CapabilityStatementRestResourceComponent>();
2249          return this.resource;
2250        }
2251
2252        /**
2253         * @return Returns a reference to <code>this</code> for easy method chaining
2254         */
2255        public CapabilityStatementRestComponent setResource(List<CapabilityStatementRestResourceComponent> theResource) { 
2256          this.resource = theResource;
2257          return this;
2258        }
2259
2260        public boolean hasResource() { 
2261          if (this.resource == null)
2262            return false;
2263          for (CapabilityStatementRestResourceComponent item : this.resource)
2264            if (!item.isEmpty())
2265              return true;
2266          return false;
2267        }
2268
2269        public CapabilityStatementRestResourceComponent addResource() { //3
2270          CapabilityStatementRestResourceComponent t = new CapabilityStatementRestResourceComponent();
2271          if (this.resource == null)
2272            this.resource = new ArrayList<CapabilityStatementRestResourceComponent>();
2273          this.resource.add(t);
2274          return t;
2275        }
2276
2277        public CapabilityStatementRestComponent addResource(CapabilityStatementRestResourceComponent t) { //3
2278          if (t == null)
2279            return this;
2280          if (this.resource == null)
2281            this.resource = new ArrayList<CapabilityStatementRestResourceComponent>();
2282          this.resource.add(t);
2283          return this;
2284        }
2285
2286        /**
2287         * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist
2288         */
2289        public CapabilityStatementRestResourceComponent getResourceFirstRep() { 
2290          if (getResource().isEmpty()) {
2291            addResource();
2292          }
2293          return getResource().get(0);
2294        }
2295
2296        /**
2297         * @return {@link #interaction} (A specification of restful operations supported by the system.)
2298         */
2299        public List<SystemInteractionComponent> getInteraction() { 
2300          if (this.interaction == null)
2301            this.interaction = new ArrayList<SystemInteractionComponent>();
2302          return this.interaction;
2303        }
2304
2305        /**
2306         * @return Returns a reference to <code>this</code> for easy method chaining
2307         */
2308        public CapabilityStatementRestComponent setInteraction(List<SystemInteractionComponent> theInteraction) { 
2309          this.interaction = theInteraction;
2310          return this;
2311        }
2312
2313        public boolean hasInteraction() { 
2314          if (this.interaction == null)
2315            return false;
2316          for (SystemInteractionComponent item : this.interaction)
2317            if (!item.isEmpty())
2318              return true;
2319          return false;
2320        }
2321
2322        public SystemInteractionComponent addInteraction() { //3
2323          SystemInteractionComponent t = new SystemInteractionComponent();
2324          if (this.interaction == null)
2325            this.interaction = new ArrayList<SystemInteractionComponent>();
2326          this.interaction.add(t);
2327          return t;
2328        }
2329
2330        public CapabilityStatementRestComponent addInteraction(SystemInteractionComponent t) { //3
2331          if (t == null)
2332            return this;
2333          if (this.interaction == null)
2334            this.interaction = new ArrayList<SystemInteractionComponent>();
2335          this.interaction.add(t);
2336          return this;
2337        }
2338
2339        /**
2340         * @return The first repetition of repeating field {@link #interaction}, creating it if it does not already exist
2341         */
2342        public SystemInteractionComponent getInteractionFirstRep() { 
2343          if (getInteraction().isEmpty()) {
2344            addInteraction();
2345          }
2346          return getInteraction().get(0);
2347        }
2348
2349        /**
2350         * @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.)
2351         */
2352        public List<CapabilityStatementRestResourceSearchParamComponent> getSearchParam() { 
2353          if (this.searchParam == null)
2354            this.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
2355          return this.searchParam;
2356        }
2357
2358        /**
2359         * @return Returns a reference to <code>this</code> for easy method chaining
2360         */
2361        public CapabilityStatementRestComponent setSearchParam(List<CapabilityStatementRestResourceSearchParamComponent> theSearchParam) { 
2362          this.searchParam = theSearchParam;
2363          return this;
2364        }
2365
2366        public boolean hasSearchParam() { 
2367          if (this.searchParam == null)
2368            return false;
2369          for (CapabilityStatementRestResourceSearchParamComponent item : this.searchParam)
2370            if (!item.isEmpty())
2371              return true;
2372          return false;
2373        }
2374
2375        public CapabilityStatementRestResourceSearchParamComponent addSearchParam() { //3
2376          CapabilityStatementRestResourceSearchParamComponent t = new CapabilityStatementRestResourceSearchParamComponent();
2377          if (this.searchParam == null)
2378            this.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
2379          this.searchParam.add(t);
2380          return t;
2381        }
2382
2383        public CapabilityStatementRestComponent addSearchParam(CapabilityStatementRestResourceSearchParamComponent t) { //3
2384          if (t == null)
2385            return this;
2386          if (this.searchParam == null)
2387            this.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
2388          this.searchParam.add(t);
2389          return this;
2390        }
2391
2392        /**
2393         * @return The first repetition of repeating field {@link #searchParam}, creating it if it does not already exist
2394         */
2395        public CapabilityStatementRestResourceSearchParamComponent getSearchParamFirstRep() { 
2396          if (getSearchParam().isEmpty()) {
2397            addSearchParam();
2398          }
2399          return getSearchParam().get(0);
2400        }
2401
2402        /**
2403         * @return {@link #operation} (Definition of an operation or a named query together with its parameters and their meaning and type.)
2404         */
2405        public List<CapabilityStatementRestOperationComponent> getOperation() { 
2406          if (this.operation == null)
2407            this.operation = new ArrayList<CapabilityStatementRestOperationComponent>();
2408          return this.operation;
2409        }
2410
2411        /**
2412         * @return Returns a reference to <code>this</code> for easy method chaining
2413         */
2414        public CapabilityStatementRestComponent setOperation(List<CapabilityStatementRestOperationComponent> theOperation) { 
2415          this.operation = theOperation;
2416          return this;
2417        }
2418
2419        public boolean hasOperation() { 
2420          if (this.operation == null)
2421            return false;
2422          for (CapabilityStatementRestOperationComponent item : this.operation)
2423            if (!item.isEmpty())
2424              return true;
2425          return false;
2426        }
2427
2428        public CapabilityStatementRestOperationComponent addOperation() { //3
2429          CapabilityStatementRestOperationComponent t = new CapabilityStatementRestOperationComponent();
2430          if (this.operation == null)
2431            this.operation = new ArrayList<CapabilityStatementRestOperationComponent>();
2432          this.operation.add(t);
2433          return t;
2434        }
2435
2436        public CapabilityStatementRestComponent addOperation(CapabilityStatementRestOperationComponent t) { //3
2437          if (t == null)
2438            return this;
2439          if (this.operation == null)
2440            this.operation = new ArrayList<CapabilityStatementRestOperationComponent>();
2441          this.operation.add(t);
2442          return this;
2443        }
2444
2445        /**
2446         * @return The first repetition of repeating field {@link #operation}, creating it if it does not already exist
2447         */
2448        public CapabilityStatementRestOperationComponent getOperationFirstRep() { 
2449          if (getOperation().isEmpty()) {
2450            addOperation();
2451          }
2452          return getOperation().get(0);
2453        }
2454
2455        /**
2456         * @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 .)
2457         */
2458        public List<UriType> getCompartment() { 
2459          if (this.compartment == null)
2460            this.compartment = new ArrayList<UriType>();
2461          return this.compartment;
2462        }
2463
2464        /**
2465         * @return Returns a reference to <code>this</code> for easy method chaining
2466         */
2467        public CapabilityStatementRestComponent setCompartment(List<UriType> theCompartment) { 
2468          this.compartment = theCompartment;
2469          return this;
2470        }
2471
2472        public boolean hasCompartment() { 
2473          if (this.compartment == null)
2474            return false;
2475          for (UriType item : this.compartment)
2476            if (!item.isEmpty())
2477              return true;
2478          return false;
2479        }
2480
2481        /**
2482         * @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 .)
2483         */
2484        public UriType addCompartmentElement() {//2 
2485          UriType t = new UriType();
2486          if (this.compartment == null)
2487            this.compartment = new ArrayList<UriType>();
2488          this.compartment.add(t);
2489          return t;
2490        }
2491
2492        /**
2493         * @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 .)
2494         */
2495        public CapabilityStatementRestComponent addCompartment(String value) { //1
2496          UriType t = new UriType();
2497          t.setValue(value);
2498          if (this.compartment == null)
2499            this.compartment = new ArrayList<UriType>();
2500          this.compartment.add(t);
2501          return this;
2502        }
2503
2504        /**
2505         * @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 .)
2506         */
2507        public boolean hasCompartment(String value) { 
2508          if (this.compartment == null)
2509            return false;
2510          for (UriType v : this.compartment)
2511            if (v.getValue().equals(value)) // uri
2512              return true;
2513          return false;
2514        }
2515
2516        protected void listChildren(List<Property> children) {
2517          super.listChildren(children);
2518          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));
2519          children.add(new Property("documentation", "string", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, 1, documentation));
2520          children.add(new Property("security", "", "Information about security implementation from an interface perspective - what a client needs to know.", 0, 1, security));
2521          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));
2522          children.add(new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction));
2523          children.add(new Property("searchParam", "@CapabilityStatement.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));
2524          children.add(new Property("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));
2525          children.add(new Property("compartment", "uri", "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));
2526        }
2527
2528        @Override
2529        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2530          switch (_hash) {
2531          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);
2532          case 1587405498: /*documentation*/  return new Property("documentation", "string", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, 1, documentation);
2533          case 949122880: /*security*/  return new Property("security", "", "Information about security implementation from an interface perspective - what a client needs to know.", 0, 1, security);
2534          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);
2535          case 1844104722: /*interaction*/  return new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction);
2536          case -553645115: /*searchParam*/  return new Property("searchParam", "@CapabilityStatement.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);
2537          case 1662702951: /*operation*/  return new Property("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);
2538          case -397756334: /*compartment*/  return new Property("compartment", "uri", "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);
2539          default: return super.getNamedProperty(_hash, _name, _checkValid);
2540          }
2541
2542        }
2543
2544      @Override
2545      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2546        switch (hash) {
2547        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<RestfulCapabilityMode>
2548        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
2549        case 949122880: /*security*/ return this.security == null ? new Base[0] : new Base[] {this.security}; // CapabilityStatementRestSecurityComponent
2550        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CapabilityStatementRestResourceComponent
2551        case 1844104722: /*interaction*/ return this.interaction == null ? new Base[0] : this.interaction.toArray(new Base[this.interaction.size()]); // SystemInteractionComponent
2552        case -553645115: /*searchParam*/ return this.searchParam == null ? new Base[0] : this.searchParam.toArray(new Base[this.searchParam.size()]); // CapabilityStatementRestResourceSearchParamComponent
2553        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : this.operation.toArray(new Base[this.operation.size()]); // CapabilityStatementRestOperationComponent
2554        case -397756334: /*compartment*/ return this.compartment == null ? new Base[0] : this.compartment.toArray(new Base[this.compartment.size()]); // UriType
2555        default: return super.getProperty(hash, name, checkValid);
2556        }
2557
2558      }
2559
2560      @Override
2561      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2562        switch (hash) {
2563        case 3357091: // mode
2564          value = new RestfulCapabilityModeEnumFactory().fromType(castToCode(value));
2565          this.mode = (Enumeration) value; // Enumeration<RestfulCapabilityMode>
2566          return value;
2567        case 1587405498: // documentation
2568          this.documentation = castToString(value); // StringType
2569          return value;
2570        case 949122880: // security
2571          this.security = (CapabilityStatementRestSecurityComponent) value; // CapabilityStatementRestSecurityComponent
2572          return value;
2573        case -341064690: // resource
2574          this.getResource().add((CapabilityStatementRestResourceComponent) value); // CapabilityStatementRestResourceComponent
2575          return value;
2576        case 1844104722: // interaction
2577          this.getInteraction().add((SystemInteractionComponent) value); // SystemInteractionComponent
2578          return value;
2579        case -553645115: // searchParam
2580          this.getSearchParam().add((CapabilityStatementRestResourceSearchParamComponent) value); // CapabilityStatementRestResourceSearchParamComponent
2581          return value;
2582        case 1662702951: // operation
2583          this.getOperation().add((CapabilityStatementRestOperationComponent) value); // CapabilityStatementRestOperationComponent
2584          return value;
2585        case -397756334: // compartment
2586          this.getCompartment().add(castToUri(value)); // UriType
2587          return value;
2588        default: return super.setProperty(hash, name, value);
2589        }
2590
2591      }
2592
2593      @Override
2594      public Base setProperty(String name, Base value) throws FHIRException {
2595        if (name.equals("mode")) {
2596          value = new RestfulCapabilityModeEnumFactory().fromType(castToCode(value));
2597          this.mode = (Enumeration) value; // Enumeration<RestfulCapabilityMode>
2598        } else if (name.equals("documentation")) {
2599          this.documentation = castToString(value); // StringType
2600        } else if (name.equals("security")) {
2601          this.security = (CapabilityStatementRestSecurityComponent) value; // CapabilityStatementRestSecurityComponent
2602        } else if (name.equals("resource")) {
2603          this.getResource().add((CapabilityStatementRestResourceComponent) value);
2604        } else if (name.equals("interaction")) {
2605          this.getInteraction().add((SystemInteractionComponent) value);
2606        } else if (name.equals("searchParam")) {
2607          this.getSearchParam().add((CapabilityStatementRestResourceSearchParamComponent) value);
2608        } else if (name.equals("operation")) {
2609          this.getOperation().add((CapabilityStatementRestOperationComponent) value);
2610        } else if (name.equals("compartment")) {
2611          this.getCompartment().add(castToUri(value));
2612        } else
2613          return super.setProperty(name, value);
2614        return value;
2615      }
2616
2617      @Override
2618      public Base makeProperty(int hash, String name) throws FHIRException {
2619        switch (hash) {
2620        case 3357091:  return getModeElement();
2621        case 1587405498:  return getDocumentationElement();
2622        case 949122880:  return getSecurity(); 
2623        case -341064690:  return addResource(); 
2624        case 1844104722:  return addInteraction(); 
2625        case -553645115:  return addSearchParam(); 
2626        case 1662702951:  return addOperation(); 
2627        case -397756334:  return addCompartmentElement();
2628        default: return super.makeProperty(hash, name);
2629        }
2630
2631      }
2632
2633      @Override
2634      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2635        switch (hash) {
2636        case 3357091: /*mode*/ return new String[] {"code"};
2637        case 1587405498: /*documentation*/ return new String[] {"string"};
2638        case 949122880: /*security*/ return new String[] {};
2639        case -341064690: /*resource*/ return new String[] {};
2640        case 1844104722: /*interaction*/ return new String[] {};
2641        case -553645115: /*searchParam*/ return new String[] {"@CapabilityStatement.rest.resource.searchParam"};
2642        case 1662702951: /*operation*/ return new String[] {};
2643        case -397756334: /*compartment*/ return new String[] {"uri"};
2644        default: return super.getTypesForProperty(hash, name);
2645        }
2646
2647      }
2648
2649      @Override
2650      public Base addChild(String name) throws FHIRException {
2651        if (name.equals("mode")) {
2652          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.mode");
2653        }
2654        else if (name.equals("documentation")) {
2655          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
2656        }
2657        else if (name.equals("security")) {
2658          this.security = new CapabilityStatementRestSecurityComponent();
2659          return this.security;
2660        }
2661        else if (name.equals("resource")) {
2662          return addResource();
2663        }
2664        else if (name.equals("interaction")) {
2665          return addInteraction();
2666        }
2667        else if (name.equals("searchParam")) {
2668          return addSearchParam();
2669        }
2670        else if (name.equals("operation")) {
2671          return addOperation();
2672        }
2673        else if (name.equals("compartment")) {
2674          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.compartment");
2675        }
2676        else
2677          return super.addChild(name);
2678      }
2679
2680      public CapabilityStatementRestComponent copy() {
2681        CapabilityStatementRestComponent dst = new CapabilityStatementRestComponent();
2682        copyValues(dst);
2683        dst.mode = mode == null ? null : mode.copy();
2684        dst.documentation = documentation == null ? null : documentation.copy();
2685        dst.security = security == null ? null : security.copy();
2686        if (resource != null) {
2687          dst.resource = new ArrayList<CapabilityStatementRestResourceComponent>();
2688          for (CapabilityStatementRestResourceComponent i : resource)
2689            dst.resource.add(i.copy());
2690        };
2691        if (interaction != null) {
2692          dst.interaction = new ArrayList<SystemInteractionComponent>();
2693          for (SystemInteractionComponent i : interaction)
2694            dst.interaction.add(i.copy());
2695        };
2696        if (searchParam != null) {
2697          dst.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
2698          for (CapabilityStatementRestResourceSearchParamComponent i : searchParam)
2699            dst.searchParam.add(i.copy());
2700        };
2701        if (operation != null) {
2702          dst.operation = new ArrayList<CapabilityStatementRestOperationComponent>();
2703          for (CapabilityStatementRestOperationComponent i : operation)
2704            dst.operation.add(i.copy());
2705        };
2706        if (compartment != null) {
2707          dst.compartment = new ArrayList<UriType>();
2708          for (UriType i : compartment)
2709            dst.compartment.add(i.copy());
2710        };
2711        return dst;
2712      }
2713
2714      @Override
2715      public boolean equalsDeep(Base other_) {
2716        if (!super.equalsDeep(other_))
2717          return false;
2718        if (!(other_ instanceof CapabilityStatementRestComponent))
2719          return false;
2720        CapabilityStatementRestComponent o = (CapabilityStatementRestComponent) other_;
2721        return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(security, o.security, true)
2722           && compareDeep(resource, o.resource, true) && compareDeep(interaction, o.interaction, true) && compareDeep(searchParam, o.searchParam, true)
2723           && compareDeep(operation, o.operation, true) && compareDeep(compartment, o.compartment, true);
2724      }
2725
2726      @Override
2727      public boolean equalsShallow(Base other_) {
2728        if (!super.equalsShallow(other_))
2729          return false;
2730        if (!(other_ instanceof CapabilityStatementRestComponent))
2731          return false;
2732        CapabilityStatementRestComponent o = (CapabilityStatementRestComponent) other_;
2733        return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true) && compareValues(compartment, o.compartment, true)
2734          ;
2735      }
2736
2737      public boolean isEmpty() {
2738        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, documentation, security
2739          , resource, interaction, searchParam, operation, compartment);
2740      }
2741
2742  public String fhirType() {
2743    return "CapabilityStatement.rest";
2744
2745  }
2746
2747  }
2748
2749    @Block()
2750    public static class CapabilityStatementRestSecurityComponent extends BackboneElement implements IBaseBackboneElement {
2751        /**
2752         * Server adds CORS headers when responding to requests - this enables javascript applications to use the server.
2753         */
2754        @Child(name = "cors", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true)
2755        @Description(shortDefinition="Adds CORS Headers (http://enable-cors.org/)", formalDefinition="Server adds CORS headers when responding to requests - this enables javascript applications to use the server." )
2756        protected BooleanType cors;
2757
2758        /**
2759         * Types of security services that are supported/required by the system.
2760         */
2761        @Child(name = "service", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2762        @Description(shortDefinition="OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", formalDefinition="Types of security services that are supported/required by the system." )
2763        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/restful-security-service")
2764        protected List<CodeableConcept> service;
2765
2766        /**
2767         * General description of how security works.
2768         */
2769        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2770        @Description(shortDefinition="General description of how security works", formalDefinition="General description of how security works." )
2771        protected StringType description;
2772
2773        /**
2774         * Certificates associated with security profiles.
2775         */
2776        @Child(name = "certificate", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2777        @Description(shortDefinition="Certificates associated with security profiles", formalDefinition="Certificates associated with security profiles." )
2778        protected List<CapabilityStatementRestSecurityCertificateComponent> certificate;
2779
2780        private static final long serialVersionUID = 1081654002L;
2781
2782    /**
2783     * Constructor
2784     */
2785      public CapabilityStatementRestSecurityComponent() {
2786        super();
2787      }
2788
2789        /**
2790         * @return {@link #cors} (Server adds CORS headers when responding to requests - this enables javascript applications to use the server.). This is the underlying object with id, value and extensions. The accessor "getCors" gives direct access to the value
2791         */
2792        public BooleanType getCorsElement() { 
2793          if (this.cors == null)
2794            if (Configuration.errorOnAutoCreate())
2795              throw new Error("Attempt to auto-create CapabilityStatementRestSecurityComponent.cors");
2796            else if (Configuration.doAutoCreate())
2797              this.cors = new BooleanType(); // bb
2798          return this.cors;
2799        }
2800
2801        public boolean hasCorsElement() { 
2802          return this.cors != null && !this.cors.isEmpty();
2803        }
2804
2805        public boolean hasCors() { 
2806          return this.cors != null && !this.cors.isEmpty();
2807        }
2808
2809        /**
2810         * @param value {@link #cors} (Server adds CORS headers when responding to requests - this enables javascript applications to use the server.). This is the underlying object with id, value and extensions. The accessor "getCors" gives direct access to the value
2811         */
2812        public CapabilityStatementRestSecurityComponent setCorsElement(BooleanType value) { 
2813          this.cors = value;
2814          return this;
2815        }
2816
2817        /**
2818         * @return Server adds CORS headers when responding to requests - this enables javascript applications to use the server.
2819         */
2820        public boolean getCors() { 
2821          return this.cors == null || this.cors.isEmpty() ? false : this.cors.getValue();
2822        }
2823
2824        /**
2825         * @param value Server adds CORS headers when responding to requests - this enables javascript applications to use the server.
2826         */
2827        public CapabilityStatementRestSecurityComponent setCors(boolean value) { 
2828            if (this.cors == null)
2829              this.cors = new BooleanType();
2830            this.cors.setValue(value);
2831          return this;
2832        }
2833
2834        /**
2835         * @return {@link #service} (Types of security services that are supported/required by the system.)
2836         */
2837        public List<CodeableConcept> getService() { 
2838          if (this.service == null)
2839            this.service = new ArrayList<CodeableConcept>();
2840          return this.service;
2841        }
2842
2843        /**
2844         * @return Returns a reference to <code>this</code> for easy method chaining
2845         */
2846        public CapabilityStatementRestSecurityComponent setService(List<CodeableConcept> theService) { 
2847          this.service = theService;
2848          return this;
2849        }
2850
2851        public boolean hasService() { 
2852          if (this.service == null)
2853            return false;
2854          for (CodeableConcept item : this.service)
2855            if (!item.isEmpty())
2856              return true;
2857          return false;
2858        }
2859
2860        public CodeableConcept addService() { //3
2861          CodeableConcept t = new CodeableConcept();
2862          if (this.service == null)
2863            this.service = new ArrayList<CodeableConcept>();
2864          this.service.add(t);
2865          return t;
2866        }
2867
2868        public CapabilityStatementRestSecurityComponent addService(CodeableConcept t) { //3
2869          if (t == null)
2870            return this;
2871          if (this.service == null)
2872            this.service = new ArrayList<CodeableConcept>();
2873          this.service.add(t);
2874          return this;
2875        }
2876
2877        /**
2878         * @return The first repetition of repeating field {@link #service}, creating it if it does not already exist
2879         */
2880        public CodeableConcept getServiceFirstRep() { 
2881          if (getService().isEmpty()) {
2882            addService();
2883          }
2884          return getService().get(0);
2885        }
2886
2887        /**
2888         * @return {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2889         */
2890        public StringType getDescriptionElement() { 
2891          if (this.description == null)
2892            if (Configuration.errorOnAutoCreate())
2893              throw new Error("Attempt to auto-create CapabilityStatementRestSecurityComponent.description");
2894            else if (Configuration.doAutoCreate())
2895              this.description = new StringType(); // bb
2896          return this.description;
2897        }
2898
2899        public boolean hasDescriptionElement() { 
2900          return this.description != null && !this.description.isEmpty();
2901        }
2902
2903        public boolean hasDescription() { 
2904          return this.description != null && !this.description.isEmpty();
2905        }
2906
2907        /**
2908         * @param value {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2909         */
2910        public CapabilityStatementRestSecurityComponent setDescriptionElement(StringType value) { 
2911          this.description = value;
2912          return this;
2913        }
2914
2915        /**
2916         * @return General description of how security works.
2917         */
2918        public String getDescription() { 
2919          return this.description == null ? null : this.description.getValue();
2920        }
2921
2922        /**
2923         * @param value General description of how security works.
2924         */
2925        public CapabilityStatementRestSecurityComponent setDescription(String value) { 
2926          if (Utilities.noString(value))
2927            this.description = null;
2928          else {
2929            if (this.description == null)
2930              this.description = new StringType();
2931            this.description.setValue(value);
2932          }
2933          return this;
2934        }
2935
2936        /**
2937         * @return {@link #certificate} (Certificates associated with security profiles.)
2938         */
2939        public List<CapabilityStatementRestSecurityCertificateComponent> getCertificate() { 
2940          if (this.certificate == null)
2941            this.certificate = new ArrayList<CapabilityStatementRestSecurityCertificateComponent>();
2942          return this.certificate;
2943        }
2944
2945        /**
2946         * @return Returns a reference to <code>this</code> for easy method chaining
2947         */
2948        public CapabilityStatementRestSecurityComponent setCertificate(List<CapabilityStatementRestSecurityCertificateComponent> theCertificate) { 
2949          this.certificate = theCertificate;
2950          return this;
2951        }
2952
2953        public boolean hasCertificate() { 
2954          if (this.certificate == null)
2955            return false;
2956          for (CapabilityStatementRestSecurityCertificateComponent item : this.certificate)
2957            if (!item.isEmpty())
2958              return true;
2959          return false;
2960        }
2961
2962        public CapabilityStatementRestSecurityCertificateComponent addCertificate() { //3
2963          CapabilityStatementRestSecurityCertificateComponent t = new CapabilityStatementRestSecurityCertificateComponent();
2964          if (this.certificate == null)
2965            this.certificate = new ArrayList<CapabilityStatementRestSecurityCertificateComponent>();
2966          this.certificate.add(t);
2967          return t;
2968        }
2969
2970        public CapabilityStatementRestSecurityComponent addCertificate(CapabilityStatementRestSecurityCertificateComponent t) { //3
2971          if (t == null)
2972            return this;
2973          if (this.certificate == null)
2974            this.certificate = new ArrayList<CapabilityStatementRestSecurityCertificateComponent>();
2975          this.certificate.add(t);
2976          return this;
2977        }
2978
2979        /**
2980         * @return The first repetition of repeating field {@link #certificate}, creating it if it does not already exist
2981         */
2982        public CapabilityStatementRestSecurityCertificateComponent getCertificateFirstRep() { 
2983          if (getCertificate().isEmpty()) {
2984            addCertificate();
2985          }
2986          return getCertificate().get(0);
2987        }
2988
2989        protected void listChildren(List<Property> children) {
2990          super.listChildren(children);
2991          children.add(new Property("cors", "boolean", "Server adds CORS headers when responding to requests - this enables javascript applications to use the server.", 0, 1, cors));
2992          children.add(new Property("service", "CodeableConcept", "Types of security services that are supported/required by the system.", 0, java.lang.Integer.MAX_VALUE, service));
2993          children.add(new Property("description", "string", "General description of how security works.", 0, 1, description));
2994          children.add(new Property("certificate", "", "Certificates associated with security profiles.", 0, java.lang.Integer.MAX_VALUE, certificate));
2995        }
2996
2997        @Override
2998        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2999          switch (_hash) {
3000          case 3059629: /*cors*/  return new Property("cors", "boolean", "Server adds CORS headers when responding to requests - this enables javascript applications to use the server.", 0, 1, cors);
3001          case 1984153269: /*service*/  return new Property("service", "CodeableConcept", "Types of security services that are supported/required by the system.", 0, java.lang.Integer.MAX_VALUE, service);
3002          case -1724546052: /*description*/  return new Property("description", "string", "General description of how security works.", 0, 1, description);
3003          case 1952399767: /*certificate*/  return new Property("certificate", "", "Certificates associated with security profiles.", 0, java.lang.Integer.MAX_VALUE, certificate);
3004          default: return super.getNamedProperty(_hash, _name, _checkValid);
3005          }
3006
3007        }
3008
3009      @Override
3010      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3011        switch (hash) {
3012        case 3059629: /*cors*/ return this.cors == null ? new Base[0] : new Base[] {this.cors}; // BooleanType
3013        case 1984153269: /*service*/ return this.service == null ? new Base[0] : this.service.toArray(new Base[this.service.size()]); // CodeableConcept
3014        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
3015        case 1952399767: /*certificate*/ return this.certificate == null ? new Base[0] : this.certificate.toArray(new Base[this.certificate.size()]); // CapabilityStatementRestSecurityCertificateComponent
3016        default: return super.getProperty(hash, name, checkValid);
3017        }
3018
3019      }
3020
3021      @Override
3022      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3023        switch (hash) {
3024        case 3059629: // cors
3025          this.cors = castToBoolean(value); // BooleanType
3026          return value;
3027        case 1984153269: // service
3028          this.getService().add(castToCodeableConcept(value)); // CodeableConcept
3029          return value;
3030        case -1724546052: // description
3031          this.description = castToString(value); // StringType
3032          return value;
3033        case 1952399767: // certificate
3034          this.getCertificate().add((CapabilityStatementRestSecurityCertificateComponent) value); // CapabilityStatementRestSecurityCertificateComponent
3035          return value;
3036        default: return super.setProperty(hash, name, value);
3037        }
3038
3039      }
3040
3041      @Override
3042      public Base setProperty(String name, Base value) throws FHIRException {
3043        if (name.equals("cors")) {
3044          this.cors = castToBoolean(value); // BooleanType
3045        } else if (name.equals("service")) {
3046          this.getService().add(castToCodeableConcept(value));
3047        } else if (name.equals("description")) {
3048          this.description = castToString(value); // StringType
3049        } else if (name.equals("certificate")) {
3050          this.getCertificate().add((CapabilityStatementRestSecurityCertificateComponent) value);
3051        } else
3052          return super.setProperty(name, value);
3053        return value;
3054      }
3055
3056      @Override
3057      public Base makeProperty(int hash, String name) throws FHIRException {
3058        switch (hash) {
3059        case 3059629:  return getCorsElement();
3060        case 1984153269:  return addService(); 
3061        case -1724546052:  return getDescriptionElement();
3062        case 1952399767:  return addCertificate(); 
3063        default: return super.makeProperty(hash, name);
3064        }
3065
3066      }
3067
3068      @Override
3069      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3070        switch (hash) {
3071        case 3059629: /*cors*/ return new String[] {"boolean"};
3072        case 1984153269: /*service*/ return new String[] {"CodeableConcept"};
3073        case -1724546052: /*description*/ return new String[] {"string"};
3074        case 1952399767: /*certificate*/ return new String[] {};
3075        default: return super.getTypesForProperty(hash, name);
3076        }
3077
3078      }
3079
3080      @Override
3081      public Base addChild(String name) throws FHIRException {
3082        if (name.equals("cors")) {
3083          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.cors");
3084        }
3085        else if (name.equals("service")) {
3086          return addService();
3087        }
3088        else if (name.equals("description")) {
3089          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.description");
3090        }
3091        else if (name.equals("certificate")) {
3092          return addCertificate();
3093        }
3094        else
3095          return super.addChild(name);
3096      }
3097
3098      public CapabilityStatementRestSecurityComponent copy() {
3099        CapabilityStatementRestSecurityComponent dst = new CapabilityStatementRestSecurityComponent();
3100        copyValues(dst);
3101        dst.cors = cors == null ? null : cors.copy();
3102        if (service != null) {
3103          dst.service = new ArrayList<CodeableConcept>();
3104          for (CodeableConcept i : service)
3105            dst.service.add(i.copy());
3106        };
3107        dst.description = description == null ? null : description.copy();
3108        if (certificate != null) {
3109          dst.certificate = new ArrayList<CapabilityStatementRestSecurityCertificateComponent>();
3110          for (CapabilityStatementRestSecurityCertificateComponent i : certificate)
3111            dst.certificate.add(i.copy());
3112        };
3113        return dst;
3114      }
3115
3116      @Override
3117      public boolean equalsDeep(Base other_) {
3118        if (!super.equalsDeep(other_))
3119          return false;
3120        if (!(other_ instanceof CapabilityStatementRestSecurityComponent))
3121          return false;
3122        CapabilityStatementRestSecurityComponent o = (CapabilityStatementRestSecurityComponent) other_;
3123        return compareDeep(cors, o.cors, true) && compareDeep(service, o.service, true) && compareDeep(description, o.description, true)
3124           && compareDeep(certificate, o.certificate, true);
3125      }
3126
3127      @Override
3128      public boolean equalsShallow(Base other_) {
3129        if (!super.equalsShallow(other_))
3130          return false;
3131        if (!(other_ instanceof CapabilityStatementRestSecurityComponent))
3132          return false;
3133        CapabilityStatementRestSecurityComponent o = (CapabilityStatementRestSecurityComponent) other_;
3134        return compareValues(cors, o.cors, true) && compareValues(description, o.description, true);
3135      }
3136
3137      public boolean isEmpty() {
3138        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(cors, service, description
3139          , certificate);
3140      }
3141
3142  public String fhirType() {
3143    return "CapabilityStatement.rest.security";
3144
3145  }
3146
3147  }
3148
3149    @Block()
3150    public static class CapabilityStatementRestSecurityCertificateComponent extends BackboneElement implements IBaseBackboneElement {
3151        /**
3152         * Mime type for a certificate.
3153         */
3154        @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
3155        @Description(shortDefinition="Mime type for certificates", formalDefinition="Mime type for a certificate." )
3156        protected CodeType type;
3157
3158        /**
3159         * Actual certificate.
3160         */
3161        @Child(name = "blob", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3162        @Description(shortDefinition="Actual certificate", formalDefinition="Actual certificate." )
3163        protected Base64BinaryType blob;
3164
3165        private static final long serialVersionUID = 2092655854L;
3166
3167    /**
3168     * Constructor
3169     */
3170      public CapabilityStatementRestSecurityCertificateComponent() {
3171        super();
3172      }
3173
3174        /**
3175         * @return {@link #type} (Mime type for a certificate.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
3176         */
3177        public CodeType getTypeElement() { 
3178          if (this.type == null)
3179            if (Configuration.errorOnAutoCreate())
3180              throw new Error("Attempt to auto-create CapabilityStatementRestSecurityCertificateComponent.type");
3181            else if (Configuration.doAutoCreate())
3182              this.type = new CodeType(); // bb
3183          return this.type;
3184        }
3185
3186        public boolean hasTypeElement() { 
3187          return this.type != null && !this.type.isEmpty();
3188        }
3189
3190        public boolean hasType() { 
3191          return this.type != null && !this.type.isEmpty();
3192        }
3193
3194        /**
3195         * @param value {@link #type} (Mime type for a certificate.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
3196         */
3197        public CapabilityStatementRestSecurityCertificateComponent setTypeElement(CodeType value) { 
3198          this.type = value;
3199          return this;
3200        }
3201
3202        /**
3203         * @return Mime type for a certificate.
3204         */
3205        public String getType() { 
3206          return this.type == null ? null : this.type.getValue();
3207        }
3208
3209        /**
3210         * @param value Mime type for a certificate.
3211         */
3212        public CapabilityStatementRestSecurityCertificateComponent setType(String value) { 
3213          if (Utilities.noString(value))
3214            this.type = null;
3215          else {
3216            if (this.type == null)
3217              this.type = new CodeType();
3218            this.type.setValue(value);
3219          }
3220          return this;
3221        }
3222
3223        /**
3224         * @return {@link #blob} (Actual certificate.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value
3225         */
3226        public Base64BinaryType getBlobElement() { 
3227          if (this.blob == null)
3228            if (Configuration.errorOnAutoCreate())
3229              throw new Error("Attempt to auto-create CapabilityStatementRestSecurityCertificateComponent.blob");
3230            else if (Configuration.doAutoCreate())
3231              this.blob = new Base64BinaryType(); // bb
3232          return this.blob;
3233        }
3234
3235        public boolean hasBlobElement() { 
3236          return this.blob != null && !this.blob.isEmpty();
3237        }
3238
3239        public boolean hasBlob() { 
3240          return this.blob != null && !this.blob.isEmpty();
3241        }
3242
3243        /**
3244         * @param value {@link #blob} (Actual certificate.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value
3245         */
3246        public CapabilityStatementRestSecurityCertificateComponent setBlobElement(Base64BinaryType value) { 
3247          this.blob = value;
3248          return this;
3249        }
3250
3251        /**
3252         * @return Actual certificate.
3253         */
3254        public byte[] getBlob() { 
3255          return this.blob == null ? null : this.blob.getValue();
3256        }
3257
3258        /**
3259         * @param value Actual certificate.
3260         */
3261        public CapabilityStatementRestSecurityCertificateComponent setBlob(byte[] value) { 
3262          if (value == null)
3263            this.blob = null;
3264          else {
3265            if (this.blob == null)
3266              this.blob = new Base64BinaryType();
3267            this.blob.setValue(value);
3268          }
3269          return this;
3270        }
3271
3272        protected void listChildren(List<Property> children) {
3273          super.listChildren(children);
3274          children.add(new Property("type", "code", "Mime type for a certificate.", 0, 1, type));
3275          children.add(new Property("blob", "base64Binary", "Actual certificate.", 0, 1, blob));
3276        }
3277
3278        @Override
3279        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3280          switch (_hash) {
3281          case 3575610: /*type*/  return new Property("type", "code", "Mime type for a certificate.", 0, 1, type);
3282          case 3026845: /*blob*/  return new Property("blob", "base64Binary", "Actual certificate.", 0, 1, blob);
3283          default: return super.getNamedProperty(_hash, _name, _checkValid);
3284          }
3285
3286        }
3287
3288      @Override
3289      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3290        switch (hash) {
3291        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
3292        case 3026845: /*blob*/ return this.blob == null ? new Base[0] : new Base[] {this.blob}; // Base64BinaryType
3293        default: return super.getProperty(hash, name, checkValid);
3294        }
3295
3296      }
3297
3298      @Override
3299      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3300        switch (hash) {
3301        case 3575610: // type
3302          this.type = castToCode(value); // CodeType
3303          return value;
3304        case 3026845: // blob
3305          this.blob = castToBase64Binary(value); // Base64BinaryType
3306          return value;
3307        default: return super.setProperty(hash, name, value);
3308        }
3309
3310      }
3311
3312      @Override
3313      public Base setProperty(String name, Base value) throws FHIRException {
3314        if (name.equals("type")) {
3315          this.type = castToCode(value); // CodeType
3316        } else if (name.equals("blob")) {
3317          this.blob = castToBase64Binary(value); // Base64BinaryType
3318        } else
3319          return super.setProperty(name, value);
3320        return value;
3321      }
3322
3323      @Override
3324      public Base makeProperty(int hash, String name) throws FHIRException {
3325        switch (hash) {
3326        case 3575610:  return getTypeElement();
3327        case 3026845:  return getBlobElement();
3328        default: return super.makeProperty(hash, name);
3329        }
3330
3331      }
3332
3333      @Override
3334      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3335        switch (hash) {
3336        case 3575610: /*type*/ return new String[] {"code"};
3337        case 3026845: /*blob*/ return new String[] {"base64Binary"};
3338        default: return super.getTypesForProperty(hash, name);
3339        }
3340
3341      }
3342
3343      @Override
3344      public Base addChild(String name) throws FHIRException {
3345        if (name.equals("type")) {
3346          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.type");
3347        }
3348        else if (name.equals("blob")) {
3349          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.blob");
3350        }
3351        else
3352          return super.addChild(name);
3353      }
3354
3355      public CapabilityStatementRestSecurityCertificateComponent copy() {
3356        CapabilityStatementRestSecurityCertificateComponent dst = new CapabilityStatementRestSecurityCertificateComponent();
3357        copyValues(dst);
3358        dst.type = type == null ? null : type.copy();
3359        dst.blob = blob == null ? null : blob.copy();
3360        return dst;
3361      }
3362
3363      @Override
3364      public boolean equalsDeep(Base other_) {
3365        if (!super.equalsDeep(other_))
3366          return false;
3367        if (!(other_ instanceof CapabilityStatementRestSecurityCertificateComponent))
3368          return false;
3369        CapabilityStatementRestSecurityCertificateComponent o = (CapabilityStatementRestSecurityCertificateComponent) other_;
3370        return compareDeep(type, o.type, true) && compareDeep(blob, o.blob, true);
3371      }
3372
3373      @Override
3374      public boolean equalsShallow(Base other_) {
3375        if (!super.equalsShallow(other_))
3376          return false;
3377        if (!(other_ instanceof CapabilityStatementRestSecurityCertificateComponent))
3378          return false;
3379        CapabilityStatementRestSecurityCertificateComponent o = (CapabilityStatementRestSecurityCertificateComponent) other_;
3380        return compareValues(type, o.type, true) && compareValues(blob, o.blob, true);
3381      }
3382
3383      public boolean isEmpty() {
3384        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, blob);
3385      }
3386
3387  public String fhirType() {
3388    return "CapabilityStatement.rest.security.certificate";
3389
3390  }
3391
3392  }
3393
3394    @Block()
3395    public static class CapabilityStatementRestResourceComponent extends BackboneElement implements IBaseBackboneElement {
3396        /**
3397         * A type of resource exposed via the restful interface.
3398         */
3399        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
3400        @Description(shortDefinition="A resource type that is supported", formalDefinition="A type of resource exposed via the restful interface." )
3401        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
3402        protected CodeType type;
3403
3404        /**
3405         * 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).
3406         */
3407        @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=0, max=1, modifier=false, summary=true)
3408        @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)." )
3409        protected Reference profile;
3410
3411        /**
3412         * The actual object that is the target of the reference (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).)
3413         */
3414        protected StructureDefinition profileTarget;
3415
3416        /**
3417         * Additional information about the resource type used by the system.
3418         */
3419        @Child(name = "documentation", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false)
3420        @Description(shortDefinition="Additional information about the use of the resource type", formalDefinition="Additional information about the resource type used by the system." )
3421        protected MarkdownType documentation;
3422
3423        /**
3424         * Identifies a restful operation supported by the solution.
3425         */
3426        @Child(name = "interaction", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3427        @Description(shortDefinition="What operations are supported?", formalDefinition="Identifies a restful operation supported by the solution." )
3428        protected List<ResourceInteractionComponent> interaction;
3429
3430        /**
3431         * This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.
3432         */
3433        @Child(name = "versioning", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
3434        @Description(shortDefinition="no-version | versioned | versioned-update", formalDefinition="This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API." )
3435        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/versioning-policy")
3436        protected Enumeration<ResourceVersionPolicy> versioning;
3437
3438        /**
3439         * A flag for whether the server is able to return past versions as part of the vRead operation.
3440         */
3441        @Child(name = "readHistory", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false)
3442        @Description(shortDefinition="Whether vRead can return past versions", formalDefinition="A flag for whether the server is able to return past versions as part of the vRead operation." )
3443        protected BooleanType readHistory;
3444
3445        /**
3446         * A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.
3447         */
3448        @Child(name = "updateCreate", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false)
3449        @Description(shortDefinition="If update can commit to a new identity", formalDefinition="A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server." )
3450        protected BooleanType updateCreate;
3451
3452        /**
3453         * A flag that indicates that the server supports conditional create.
3454         */
3455        @Child(name = "conditionalCreate", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false)
3456        @Description(shortDefinition="If allows/uses conditional create", formalDefinition="A flag that indicates that the server supports conditional create." )
3457        protected BooleanType conditionalCreate;
3458
3459        /**
3460         * A code that indicates how the server supports conditional read.
3461         */
3462        @Child(name = "conditionalRead", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false)
3463        @Description(shortDefinition="not-supported | modified-since | not-match | full-support", formalDefinition="A code that indicates how the server supports conditional read." )
3464        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/conditional-read-status")
3465        protected Enumeration<ConditionalReadStatus> conditionalRead;
3466
3467        /**
3468         * A flag that indicates that the server supports conditional update.
3469         */
3470        @Child(name = "conditionalUpdate", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=false)
3471        @Description(shortDefinition="If allows/uses conditional update", formalDefinition="A flag that indicates that the server supports conditional update." )
3472        protected BooleanType conditionalUpdate;
3473
3474        /**
3475         * A code that indicates how the server supports conditional delete.
3476         */
3477        @Child(name = "conditionalDelete", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=false)
3478        @Description(shortDefinition="not-supported | single | multiple - how conditional delete is supported", formalDefinition="A code that indicates how the server supports conditional delete." )
3479        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/conditional-delete-status")
3480        protected Enumeration<ConditionalDeleteStatus> conditionalDelete;
3481
3482        /**
3483         * A set of flags that defines how references are supported.
3484         */
3485        @Child(name = "referencePolicy", type = {CodeType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3486        @Description(shortDefinition="literal | logical | resolves | enforced | local", formalDefinition="A set of flags that defines how references are supported." )
3487        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reference-handling-policy")
3488        protected List<Enumeration<ReferenceHandlingPolicy>> referencePolicy;
3489
3490        /**
3491         * A list of _include values supported by the server.
3492         */
3493        @Child(name = "searchInclude", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3494        @Description(shortDefinition="_include values supported by the server", formalDefinition="A list of _include values supported by the server." )
3495        protected List<StringType> searchInclude;
3496
3497        /**
3498         * A list of _revinclude (reverse include) values supported by the server.
3499         */
3500        @Child(name = "searchRevInclude", type = {StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3501        @Description(shortDefinition="_revinclude values supported by the server", formalDefinition="A list of _revinclude (reverse include) values supported by the server." )
3502        protected List<StringType> searchRevInclude;
3503
3504        /**
3505         * 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.
3506         */
3507        @Child(name = "searchParam", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3508        @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." )
3509        protected List<CapabilityStatementRestResourceSearchParamComponent> searchParam;
3510
3511        private static final long serialVersionUID = 1271233297L;
3512
3513    /**
3514     * Constructor
3515     */
3516      public CapabilityStatementRestResourceComponent() {
3517        super();
3518      }
3519
3520    /**
3521     * Constructor
3522     */
3523      public CapabilityStatementRestResourceComponent(CodeType type) {
3524        super();
3525        this.type = type;
3526      }
3527
3528        /**
3529         * @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
3530         */
3531        public CodeType getTypeElement() { 
3532          if (this.type == null)
3533            if (Configuration.errorOnAutoCreate())
3534              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.type");
3535            else if (Configuration.doAutoCreate())
3536              this.type = new CodeType(); // bb
3537          return this.type;
3538        }
3539
3540        public boolean hasTypeElement() { 
3541          return this.type != null && !this.type.isEmpty();
3542        }
3543
3544        public boolean hasType() { 
3545          return this.type != null && !this.type.isEmpty();
3546        }
3547
3548        /**
3549         * @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
3550         */
3551        public CapabilityStatementRestResourceComponent setTypeElement(CodeType value) { 
3552          this.type = value;
3553          return this;
3554        }
3555
3556        /**
3557         * @return A type of resource exposed via the restful interface.
3558         */
3559        public String getType() { 
3560          return this.type == null ? null : this.type.getValue();
3561        }
3562
3563        /**
3564         * @param value A type of resource exposed via the restful interface.
3565         */
3566        public CapabilityStatementRestResourceComponent setType(String value) { 
3567            if (this.type == null)
3568              this.type = new CodeType();
3569            this.type.setValue(value);
3570          return this;
3571        }
3572
3573        /**
3574         * @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).)
3575         */
3576        public Reference getProfile() { 
3577          if (this.profile == null)
3578            if (Configuration.errorOnAutoCreate())
3579              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.profile");
3580            else if (Configuration.doAutoCreate())
3581              this.profile = new Reference(); // cc
3582          return this.profile;
3583        }
3584
3585        public boolean hasProfile() { 
3586          return this.profile != null && !this.profile.isEmpty();
3587        }
3588
3589        /**
3590         * @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).)
3591         */
3592        public CapabilityStatementRestResourceComponent setProfile(Reference value)  { 
3593          this.profile = value;
3594          return this;
3595        }
3596
3597        /**
3598         * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (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).)
3599         */
3600        public StructureDefinition getProfileTarget() { 
3601          if (this.profileTarget == null)
3602            if (Configuration.errorOnAutoCreate())
3603              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.profile");
3604            else if (Configuration.doAutoCreate())
3605              this.profileTarget = new StructureDefinition(); // aa
3606          return this.profileTarget;
3607        }
3608
3609        /**
3610         * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (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).)
3611         */
3612        public CapabilityStatementRestResourceComponent setProfileTarget(StructureDefinition value) { 
3613          this.profileTarget = value;
3614          return this;
3615        }
3616
3617        /**
3618         * @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
3619         */
3620        public MarkdownType getDocumentationElement() { 
3621          if (this.documentation == null)
3622            if (Configuration.errorOnAutoCreate())
3623              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.documentation");
3624            else if (Configuration.doAutoCreate())
3625              this.documentation = new MarkdownType(); // bb
3626          return this.documentation;
3627        }
3628
3629        public boolean hasDocumentationElement() { 
3630          return this.documentation != null && !this.documentation.isEmpty();
3631        }
3632
3633        public boolean hasDocumentation() { 
3634          return this.documentation != null && !this.documentation.isEmpty();
3635        }
3636
3637        /**
3638         * @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
3639         */
3640        public CapabilityStatementRestResourceComponent setDocumentationElement(MarkdownType value) { 
3641          this.documentation = value;
3642          return this;
3643        }
3644
3645        /**
3646         * @return Additional information about the resource type used by the system.
3647         */
3648        public String getDocumentation() { 
3649          return this.documentation == null ? null : this.documentation.getValue();
3650        }
3651
3652        /**
3653         * @param value Additional information about the resource type used by the system.
3654         */
3655        public CapabilityStatementRestResourceComponent setDocumentation(String value) { 
3656          if (value == null)
3657            this.documentation = null;
3658          else {
3659            if (this.documentation == null)
3660              this.documentation = new MarkdownType();
3661            this.documentation.setValue(value);
3662          }
3663          return this;
3664        }
3665
3666        /**
3667         * @return {@link #interaction} (Identifies a restful operation supported by the solution.)
3668         */
3669        public List<ResourceInteractionComponent> getInteraction() { 
3670          if (this.interaction == null)
3671            this.interaction = new ArrayList<ResourceInteractionComponent>();
3672          return this.interaction;
3673        }
3674
3675        /**
3676         * @return Returns a reference to <code>this</code> for easy method chaining
3677         */
3678        public CapabilityStatementRestResourceComponent setInteraction(List<ResourceInteractionComponent> theInteraction) { 
3679          this.interaction = theInteraction;
3680          return this;
3681        }
3682
3683        public boolean hasInteraction() { 
3684          if (this.interaction == null)
3685            return false;
3686          for (ResourceInteractionComponent item : this.interaction)
3687            if (!item.isEmpty())
3688              return true;
3689          return false;
3690        }
3691
3692        public ResourceInteractionComponent addInteraction() { //3
3693          ResourceInteractionComponent t = new ResourceInteractionComponent();
3694          if (this.interaction == null)
3695            this.interaction = new ArrayList<ResourceInteractionComponent>();
3696          this.interaction.add(t);
3697          return t;
3698        }
3699
3700        public CapabilityStatementRestResourceComponent addInteraction(ResourceInteractionComponent t) { //3
3701          if (t == null)
3702            return this;
3703          if (this.interaction == null)
3704            this.interaction = new ArrayList<ResourceInteractionComponent>();
3705          this.interaction.add(t);
3706          return this;
3707        }
3708
3709        /**
3710         * @return The first repetition of repeating field {@link #interaction}, creating it if it does not already exist
3711         */
3712        public ResourceInteractionComponent getInteractionFirstRep() { 
3713          if (getInteraction().isEmpty()) {
3714            addInteraction();
3715          }
3716          return getInteraction().get(0);
3717        }
3718
3719        /**
3720         * @return {@link #versioning} (This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value
3721         */
3722        public Enumeration<ResourceVersionPolicy> getVersioningElement() { 
3723          if (this.versioning == null)
3724            if (Configuration.errorOnAutoCreate())
3725              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.versioning");
3726            else if (Configuration.doAutoCreate())
3727              this.versioning = new Enumeration<ResourceVersionPolicy>(new ResourceVersionPolicyEnumFactory()); // bb
3728          return this.versioning;
3729        }
3730
3731        public boolean hasVersioningElement() { 
3732          return this.versioning != null && !this.versioning.isEmpty();
3733        }
3734
3735        public boolean hasVersioning() { 
3736          return this.versioning != null && !this.versioning.isEmpty();
3737        }
3738
3739        /**
3740         * @param value {@link #versioning} (This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value
3741         */
3742        public CapabilityStatementRestResourceComponent setVersioningElement(Enumeration<ResourceVersionPolicy> value) { 
3743          this.versioning = value;
3744          return this;
3745        }
3746
3747        /**
3748         * @return This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.
3749         */
3750        public ResourceVersionPolicy getVersioning() { 
3751          return this.versioning == null ? null : this.versioning.getValue();
3752        }
3753
3754        /**
3755         * @param value This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.
3756         */
3757        public CapabilityStatementRestResourceComponent setVersioning(ResourceVersionPolicy value) { 
3758          if (value == null)
3759            this.versioning = null;
3760          else {
3761            if (this.versioning == null)
3762              this.versioning = new Enumeration<ResourceVersionPolicy>(new ResourceVersionPolicyEnumFactory());
3763            this.versioning.setValue(value);
3764          }
3765          return this;
3766        }
3767
3768        /**
3769         * @return {@link #readHistory} (A flag for whether the server is able to return past versions as part of the vRead operation.). This is the underlying object with id, value and extensions. The accessor "getReadHistory" gives direct access to the value
3770         */
3771        public BooleanType getReadHistoryElement() { 
3772          if (this.readHistory == null)
3773            if (Configuration.errorOnAutoCreate())
3774              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.readHistory");
3775            else if (Configuration.doAutoCreate())
3776              this.readHistory = new BooleanType(); // bb
3777          return this.readHistory;
3778        }
3779
3780        public boolean hasReadHistoryElement() { 
3781          return this.readHistory != null && !this.readHistory.isEmpty();
3782        }
3783
3784        public boolean hasReadHistory() { 
3785          return this.readHistory != null && !this.readHistory.isEmpty();
3786        }
3787
3788        /**
3789         * @param value {@link #readHistory} (A flag for whether the server is able to return past versions as part of the vRead operation.). This is the underlying object with id, value and extensions. The accessor "getReadHistory" gives direct access to the value
3790         */
3791        public CapabilityStatementRestResourceComponent setReadHistoryElement(BooleanType value) { 
3792          this.readHistory = value;
3793          return this;
3794        }
3795
3796        /**
3797         * @return A flag for whether the server is able to return past versions as part of the vRead operation.
3798         */
3799        public boolean getReadHistory() { 
3800          return this.readHistory == null || this.readHistory.isEmpty() ? false : this.readHistory.getValue();
3801        }
3802
3803        /**
3804         * @param value A flag for whether the server is able to return past versions as part of the vRead operation.
3805         */
3806        public CapabilityStatementRestResourceComponent setReadHistory(boolean value) { 
3807            if (this.readHistory == null)
3808              this.readHistory = new BooleanType();
3809            this.readHistory.setValue(value);
3810          return this;
3811        }
3812
3813        /**
3814         * @return {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value
3815         */
3816        public BooleanType getUpdateCreateElement() { 
3817          if (this.updateCreate == null)
3818            if (Configuration.errorOnAutoCreate())
3819              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.updateCreate");
3820            else if (Configuration.doAutoCreate())
3821              this.updateCreate = new BooleanType(); // bb
3822          return this.updateCreate;
3823        }
3824
3825        public boolean hasUpdateCreateElement() { 
3826          return this.updateCreate != null && !this.updateCreate.isEmpty();
3827        }
3828
3829        public boolean hasUpdateCreate() { 
3830          return this.updateCreate != null && !this.updateCreate.isEmpty();
3831        }
3832
3833        /**
3834         * @param value {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value
3835         */
3836        public CapabilityStatementRestResourceComponent setUpdateCreateElement(BooleanType value) { 
3837          this.updateCreate = value;
3838          return this;
3839        }
3840
3841        /**
3842         * @return A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.
3843         */
3844        public boolean getUpdateCreate() { 
3845          return this.updateCreate == null || this.updateCreate.isEmpty() ? false : this.updateCreate.getValue();
3846        }
3847
3848        /**
3849         * @param value A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.
3850         */
3851        public CapabilityStatementRestResourceComponent setUpdateCreate(boolean value) { 
3852            if (this.updateCreate == null)
3853              this.updateCreate = new BooleanType();
3854            this.updateCreate.setValue(value);
3855          return this;
3856        }
3857
3858        /**
3859         * @return {@link #conditionalCreate} (A flag that indicates that the server supports conditional create.). This is the underlying object with id, value and extensions. The accessor "getConditionalCreate" gives direct access to the value
3860         */
3861        public BooleanType getConditionalCreateElement() { 
3862          if (this.conditionalCreate == null)
3863            if (Configuration.errorOnAutoCreate())
3864              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.conditionalCreate");
3865            else if (Configuration.doAutoCreate())
3866              this.conditionalCreate = new BooleanType(); // bb
3867          return this.conditionalCreate;
3868        }
3869
3870        public boolean hasConditionalCreateElement() { 
3871          return this.conditionalCreate != null && !this.conditionalCreate.isEmpty();
3872        }
3873
3874        public boolean hasConditionalCreate() { 
3875          return this.conditionalCreate != null && !this.conditionalCreate.isEmpty();
3876        }
3877
3878        /**
3879         * @param value {@link #conditionalCreate} (A flag that indicates that the server supports conditional create.). This is the underlying object with id, value and extensions. The accessor "getConditionalCreate" gives direct access to the value
3880         */
3881        public CapabilityStatementRestResourceComponent setConditionalCreateElement(BooleanType value) { 
3882          this.conditionalCreate = value;
3883          return this;
3884        }
3885
3886        /**
3887         * @return A flag that indicates that the server supports conditional create.
3888         */
3889        public boolean getConditionalCreate() { 
3890          return this.conditionalCreate == null || this.conditionalCreate.isEmpty() ? false : this.conditionalCreate.getValue();
3891        }
3892
3893        /**
3894         * @param value A flag that indicates that the server supports conditional create.
3895         */
3896        public CapabilityStatementRestResourceComponent setConditionalCreate(boolean value) { 
3897            if (this.conditionalCreate == null)
3898              this.conditionalCreate = new BooleanType();
3899            this.conditionalCreate.setValue(value);
3900          return this;
3901        }
3902
3903        /**
3904         * @return {@link #conditionalRead} (A code that indicates how the server supports conditional read.). This is the underlying object with id, value and extensions. The accessor "getConditionalRead" gives direct access to the value
3905         */
3906        public Enumeration<ConditionalReadStatus> getConditionalReadElement() { 
3907          if (this.conditionalRead == null)
3908            if (Configuration.errorOnAutoCreate())
3909              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.conditionalRead");
3910            else if (Configuration.doAutoCreate())
3911              this.conditionalRead = new Enumeration<ConditionalReadStatus>(new ConditionalReadStatusEnumFactory()); // bb
3912          return this.conditionalRead;
3913        }
3914
3915        public boolean hasConditionalReadElement() { 
3916          return this.conditionalRead != null && !this.conditionalRead.isEmpty();
3917        }
3918
3919        public boolean hasConditionalRead() { 
3920          return this.conditionalRead != null && !this.conditionalRead.isEmpty();
3921        }
3922
3923        /**
3924         * @param value {@link #conditionalRead} (A code that indicates how the server supports conditional read.). This is the underlying object with id, value and extensions. The accessor "getConditionalRead" gives direct access to the value
3925         */
3926        public CapabilityStatementRestResourceComponent setConditionalReadElement(Enumeration<ConditionalReadStatus> value) { 
3927          this.conditionalRead = value;
3928          return this;
3929        }
3930
3931        /**
3932         * @return A code that indicates how the server supports conditional read.
3933         */
3934        public ConditionalReadStatus getConditionalRead() { 
3935          return this.conditionalRead == null ? null : this.conditionalRead.getValue();
3936        }
3937
3938        /**
3939         * @param value A code that indicates how the server supports conditional read.
3940         */
3941        public CapabilityStatementRestResourceComponent setConditionalRead(ConditionalReadStatus value) { 
3942          if (value == null)
3943            this.conditionalRead = null;
3944          else {
3945            if (this.conditionalRead == null)
3946              this.conditionalRead = new Enumeration<ConditionalReadStatus>(new ConditionalReadStatusEnumFactory());
3947            this.conditionalRead.setValue(value);
3948          }
3949          return this;
3950        }
3951
3952        /**
3953         * @return {@link #conditionalUpdate} (A flag that indicates that the server supports conditional update.). This is the underlying object with id, value and extensions. The accessor "getConditionalUpdate" gives direct access to the value
3954         */
3955        public BooleanType getConditionalUpdateElement() { 
3956          if (this.conditionalUpdate == null)
3957            if (Configuration.errorOnAutoCreate())
3958              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.conditionalUpdate");
3959            else if (Configuration.doAutoCreate())
3960              this.conditionalUpdate = new BooleanType(); // bb
3961          return this.conditionalUpdate;
3962        }
3963
3964        public boolean hasConditionalUpdateElement() { 
3965          return this.conditionalUpdate != null && !this.conditionalUpdate.isEmpty();
3966        }
3967
3968        public boolean hasConditionalUpdate() { 
3969          return this.conditionalUpdate != null && !this.conditionalUpdate.isEmpty();
3970        }
3971
3972        /**
3973         * @param value {@link #conditionalUpdate} (A flag that indicates that the server supports conditional update.). This is the underlying object with id, value and extensions. The accessor "getConditionalUpdate" gives direct access to the value
3974         */
3975        public CapabilityStatementRestResourceComponent setConditionalUpdateElement(BooleanType value) { 
3976          this.conditionalUpdate = value;
3977          return this;
3978        }
3979
3980        /**
3981         * @return A flag that indicates that the server supports conditional update.
3982         */
3983        public boolean getConditionalUpdate() { 
3984          return this.conditionalUpdate == null || this.conditionalUpdate.isEmpty() ? false : this.conditionalUpdate.getValue();
3985        }
3986
3987        /**
3988         * @param value A flag that indicates that the server supports conditional update.
3989         */
3990        public CapabilityStatementRestResourceComponent setConditionalUpdate(boolean value) { 
3991            if (this.conditionalUpdate == null)
3992              this.conditionalUpdate = new BooleanType();
3993            this.conditionalUpdate.setValue(value);
3994          return this;
3995        }
3996
3997        /**
3998         * @return {@link #conditionalDelete} (A code that indicates how the server supports conditional delete.). This is the underlying object with id, value and extensions. The accessor "getConditionalDelete" gives direct access to the value
3999         */
4000        public Enumeration<ConditionalDeleteStatus> getConditionalDeleteElement() { 
4001          if (this.conditionalDelete == null)
4002            if (Configuration.errorOnAutoCreate())
4003              throw new Error("Attempt to auto-create CapabilityStatementRestResourceComponent.conditionalDelete");
4004            else if (Configuration.doAutoCreate())
4005              this.conditionalDelete = new Enumeration<ConditionalDeleteStatus>(new ConditionalDeleteStatusEnumFactory()); // bb
4006          return this.conditionalDelete;
4007        }
4008
4009        public boolean hasConditionalDeleteElement() { 
4010          return this.conditionalDelete != null && !this.conditionalDelete.isEmpty();
4011        }
4012
4013        public boolean hasConditionalDelete() { 
4014          return this.conditionalDelete != null && !this.conditionalDelete.isEmpty();
4015        }
4016
4017        /**
4018         * @param value {@link #conditionalDelete} (A code that indicates how the server supports conditional delete.). This is the underlying object with id, value and extensions. The accessor "getConditionalDelete" gives direct access to the value
4019         */
4020        public CapabilityStatementRestResourceComponent setConditionalDeleteElement(Enumeration<ConditionalDeleteStatus> value) { 
4021          this.conditionalDelete = value;
4022          return this;
4023        }
4024
4025        /**
4026         * @return A code that indicates how the server supports conditional delete.
4027         */
4028        public ConditionalDeleteStatus getConditionalDelete() { 
4029          return this.conditionalDelete == null ? null : this.conditionalDelete.getValue();
4030        }
4031
4032        /**
4033         * @param value A code that indicates how the server supports conditional delete.
4034         */
4035        public CapabilityStatementRestResourceComponent setConditionalDelete(ConditionalDeleteStatus value) { 
4036          if (value == null)
4037            this.conditionalDelete = null;
4038          else {
4039            if (this.conditionalDelete == null)
4040              this.conditionalDelete = new Enumeration<ConditionalDeleteStatus>(new ConditionalDeleteStatusEnumFactory());
4041            this.conditionalDelete.setValue(value);
4042          }
4043          return this;
4044        }
4045
4046        /**
4047         * @return {@link #referencePolicy} (A set of flags that defines how references are supported.)
4048         */
4049        public List<Enumeration<ReferenceHandlingPolicy>> getReferencePolicy() { 
4050          if (this.referencePolicy == null)
4051            this.referencePolicy = new ArrayList<Enumeration<ReferenceHandlingPolicy>>();
4052          return this.referencePolicy;
4053        }
4054
4055        /**
4056         * @return Returns a reference to <code>this</code> for easy method chaining
4057         */
4058        public CapabilityStatementRestResourceComponent setReferencePolicy(List<Enumeration<ReferenceHandlingPolicy>> theReferencePolicy) { 
4059          this.referencePolicy = theReferencePolicy;
4060          return this;
4061        }
4062
4063        public boolean hasReferencePolicy() { 
4064          if (this.referencePolicy == null)
4065            return false;
4066          for (Enumeration<ReferenceHandlingPolicy> item : this.referencePolicy)
4067            if (!item.isEmpty())
4068              return true;
4069          return false;
4070        }
4071
4072        /**
4073         * @return {@link #referencePolicy} (A set of flags that defines how references are supported.)
4074         */
4075        public Enumeration<ReferenceHandlingPolicy> addReferencePolicyElement() {//2 
4076          Enumeration<ReferenceHandlingPolicy> t = new Enumeration<ReferenceHandlingPolicy>(new ReferenceHandlingPolicyEnumFactory());
4077          if (this.referencePolicy == null)
4078            this.referencePolicy = new ArrayList<Enumeration<ReferenceHandlingPolicy>>();
4079          this.referencePolicy.add(t);
4080          return t;
4081        }
4082
4083        /**
4084         * @param value {@link #referencePolicy} (A set of flags that defines how references are supported.)
4085         */
4086        public CapabilityStatementRestResourceComponent addReferencePolicy(ReferenceHandlingPolicy value) { //1
4087          Enumeration<ReferenceHandlingPolicy> t = new Enumeration<ReferenceHandlingPolicy>(new ReferenceHandlingPolicyEnumFactory());
4088          t.setValue(value);
4089          if (this.referencePolicy == null)
4090            this.referencePolicy = new ArrayList<Enumeration<ReferenceHandlingPolicy>>();
4091          this.referencePolicy.add(t);
4092          return this;
4093        }
4094
4095        /**
4096         * @param value {@link #referencePolicy} (A set of flags that defines how references are supported.)
4097         */
4098        public boolean hasReferencePolicy(ReferenceHandlingPolicy value) { 
4099          if (this.referencePolicy == null)
4100            return false;
4101          for (Enumeration<ReferenceHandlingPolicy> v : this.referencePolicy)
4102            if (v.getValue().equals(value)) // code
4103              return true;
4104          return false;
4105        }
4106
4107        /**
4108         * @return {@link #searchInclude} (A list of _include values supported by the server.)
4109         */
4110        public List<StringType> getSearchInclude() { 
4111          if (this.searchInclude == null)
4112            this.searchInclude = new ArrayList<StringType>();
4113          return this.searchInclude;
4114        }
4115
4116        /**
4117         * @return Returns a reference to <code>this</code> for easy method chaining
4118         */
4119        public CapabilityStatementRestResourceComponent setSearchInclude(List<StringType> theSearchInclude) { 
4120          this.searchInclude = theSearchInclude;
4121          return this;
4122        }
4123
4124        public boolean hasSearchInclude() { 
4125          if (this.searchInclude == null)
4126            return false;
4127          for (StringType item : this.searchInclude)
4128            if (!item.isEmpty())
4129              return true;
4130          return false;
4131        }
4132
4133        /**
4134         * @return {@link #searchInclude} (A list of _include values supported by the server.)
4135         */
4136        public StringType addSearchIncludeElement() {//2 
4137          StringType t = new StringType();
4138          if (this.searchInclude == null)
4139            this.searchInclude = new ArrayList<StringType>();
4140          this.searchInclude.add(t);
4141          return t;
4142        }
4143
4144        /**
4145         * @param value {@link #searchInclude} (A list of _include values supported by the server.)
4146         */
4147        public CapabilityStatementRestResourceComponent addSearchInclude(String value) { //1
4148          StringType t = new StringType();
4149          t.setValue(value);
4150          if (this.searchInclude == null)
4151            this.searchInclude = new ArrayList<StringType>();
4152          this.searchInclude.add(t);
4153          return this;
4154        }
4155
4156        /**
4157         * @param value {@link #searchInclude} (A list of _include values supported by the server.)
4158         */
4159        public boolean hasSearchInclude(String value) { 
4160          if (this.searchInclude == null)
4161            return false;
4162          for (StringType v : this.searchInclude)
4163            if (v.getValue().equals(value)) // string
4164              return true;
4165          return false;
4166        }
4167
4168        /**
4169         * @return {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.)
4170         */
4171        public List<StringType> getSearchRevInclude() { 
4172          if (this.searchRevInclude == null)
4173            this.searchRevInclude = new ArrayList<StringType>();
4174          return this.searchRevInclude;
4175        }
4176
4177        /**
4178         * @return Returns a reference to <code>this</code> for easy method chaining
4179         */
4180        public CapabilityStatementRestResourceComponent setSearchRevInclude(List<StringType> theSearchRevInclude) { 
4181          this.searchRevInclude = theSearchRevInclude;
4182          return this;
4183        }
4184
4185        public boolean hasSearchRevInclude() { 
4186          if (this.searchRevInclude == null)
4187            return false;
4188          for (StringType item : this.searchRevInclude)
4189            if (!item.isEmpty())
4190              return true;
4191          return false;
4192        }
4193
4194        /**
4195         * @return {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.)
4196         */
4197        public StringType addSearchRevIncludeElement() {//2 
4198          StringType t = new StringType();
4199          if (this.searchRevInclude == null)
4200            this.searchRevInclude = new ArrayList<StringType>();
4201          this.searchRevInclude.add(t);
4202          return t;
4203        }
4204
4205        /**
4206         * @param value {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.)
4207         */
4208        public CapabilityStatementRestResourceComponent addSearchRevInclude(String value) { //1
4209          StringType t = new StringType();
4210          t.setValue(value);
4211          if (this.searchRevInclude == null)
4212            this.searchRevInclude = new ArrayList<StringType>();
4213          this.searchRevInclude.add(t);
4214          return this;
4215        }
4216
4217        /**
4218         * @param value {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.)
4219         */
4220        public boolean hasSearchRevInclude(String value) { 
4221          if (this.searchRevInclude == null)
4222            return false;
4223          for (StringType v : this.searchRevInclude)
4224            if (v.getValue().equals(value)) // string
4225              return true;
4226          return false;
4227        }
4228
4229        /**
4230         * @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.)
4231         */
4232        public List<CapabilityStatementRestResourceSearchParamComponent> getSearchParam() { 
4233          if (this.searchParam == null)
4234            this.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
4235          return this.searchParam;
4236        }
4237
4238        /**
4239         * @return Returns a reference to <code>this</code> for easy method chaining
4240         */
4241        public CapabilityStatementRestResourceComponent setSearchParam(List<CapabilityStatementRestResourceSearchParamComponent> theSearchParam) { 
4242          this.searchParam = theSearchParam;
4243          return this;
4244        }
4245
4246        public boolean hasSearchParam() { 
4247          if (this.searchParam == null)
4248            return false;
4249          for (CapabilityStatementRestResourceSearchParamComponent item : this.searchParam)
4250            if (!item.isEmpty())
4251              return true;
4252          return false;
4253        }
4254
4255        public CapabilityStatementRestResourceSearchParamComponent addSearchParam() { //3
4256          CapabilityStatementRestResourceSearchParamComponent t = new CapabilityStatementRestResourceSearchParamComponent();
4257          if (this.searchParam == null)
4258            this.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
4259          this.searchParam.add(t);
4260          return t;
4261        }
4262
4263        public CapabilityStatementRestResourceComponent addSearchParam(CapabilityStatementRestResourceSearchParamComponent t) { //3
4264          if (t == null)
4265            return this;
4266          if (this.searchParam == null)
4267            this.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
4268          this.searchParam.add(t);
4269          return this;
4270        }
4271
4272        /**
4273         * @return The first repetition of repeating field {@link #searchParam}, creating it if it does not already exist
4274         */
4275        public CapabilityStatementRestResourceSearchParamComponent getSearchParamFirstRep() { 
4276          if (getSearchParam().isEmpty()) {
4277            addSearchParam();
4278          }
4279          return getSearchParam().get(0);
4280        }
4281
4282        protected void listChildren(List<Property> children) {
4283          super.listChildren(children);
4284          children.add(new Property("type", "code", "A type of resource exposed via the restful interface.", 0, 1, type));
4285          children.add(new Property("profile", "Reference(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));
4286          children.add(new Property("documentation", "markdown", "Additional information about the resource type used by the system.", 0, 1, documentation));
4287          children.add(new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction));
4288          children.add(new Property("versioning", "code", "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", 0, 1, versioning));
4289          children.add(new Property("readHistory", "boolean", "A flag for whether the server is able to return past versions as part of the vRead operation.", 0, 1, readHistory));
4290          children.add(new Property("updateCreate", "boolean", "A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.", 0, 1, updateCreate));
4291          children.add(new Property("conditionalCreate", "boolean", "A flag that indicates that the server supports conditional create.", 0, 1, conditionalCreate));
4292          children.add(new Property("conditionalRead", "code", "A code that indicates how the server supports conditional read.", 0, 1, conditionalRead));
4293          children.add(new Property("conditionalUpdate", "boolean", "A flag that indicates that the server supports conditional update.", 0, 1, conditionalUpdate));
4294          children.add(new Property("conditionalDelete", "code", "A code that indicates how the server supports conditional delete.", 0, 1, conditionalDelete));
4295          children.add(new Property("referencePolicy", "code", "A set of flags that defines how references are supported.", 0, java.lang.Integer.MAX_VALUE, referencePolicy));
4296          children.add(new Property("searchInclude", "string", "A list of _include values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchInclude));
4297          children.add(new Property("searchRevInclude", "string", "A list of _revinclude (reverse include) values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchRevInclude));
4298          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));
4299        }
4300
4301        @Override
4302        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4303          switch (_hash) {
4304          case 3575610: /*type*/  return new Property("type", "code", "A type of resource exposed via the restful interface.", 0, 1, type);
4305          case -309425751: /*profile*/  return new Property("profile", "Reference(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);
4306          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Additional information about the resource type used by the system.", 0, 1, documentation);
4307          case 1844104722: /*interaction*/  return new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction);
4308          case -670487542: /*versioning*/  return new Property("versioning", "code", "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", 0, 1, versioning);
4309          case 187518494: /*readHistory*/  return new Property("readHistory", "boolean", "A flag for whether the server is able to return past versions as part of the vRead operation.", 0, 1, readHistory);
4310          case -1400550619: /*updateCreate*/  return new Property("updateCreate", "boolean", "A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.", 0, 1, updateCreate);
4311          case 6401826: /*conditionalCreate*/  return new Property("conditionalCreate", "boolean", "A flag that indicates that the server supports conditional create.", 0, 1, conditionalCreate);
4312          case 822786364: /*conditionalRead*/  return new Property("conditionalRead", "code", "A code that indicates how the server supports conditional read.", 0, 1, conditionalRead);
4313          case 519849711: /*conditionalUpdate*/  return new Property("conditionalUpdate", "boolean", "A flag that indicates that the server supports conditional update.", 0, 1, conditionalUpdate);
4314          case 23237585: /*conditionalDelete*/  return new Property("conditionalDelete", "code", "A code that indicates how the server supports conditional delete.", 0, 1, conditionalDelete);
4315          case 796257373: /*referencePolicy*/  return new Property("referencePolicy", "code", "A set of flags that defines how references are supported.", 0, java.lang.Integer.MAX_VALUE, referencePolicy);
4316          case -1035904544: /*searchInclude*/  return new Property("searchInclude", "string", "A list of _include values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchInclude);
4317          case -2123884979: /*searchRevInclude*/  return new Property("searchRevInclude", "string", "A list of _revinclude (reverse include) values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchRevInclude);
4318          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);
4319          default: return super.getNamedProperty(_hash, _name, _checkValid);
4320          }
4321
4322        }
4323
4324      @Override
4325      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4326        switch (hash) {
4327        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
4328        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
4329        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
4330        case 1844104722: /*interaction*/ return this.interaction == null ? new Base[0] : this.interaction.toArray(new Base[this.interaction.size()]); // ResourceInteractionComponent
4331        case -670487542: /*versioning*/ return this.versioning == null ? new Base[0] : new Base[] {this.versioning}; // Enumeration<ResourceVersionPolicy>
4332        case 187518494: /*readHistory*/ return this.readHistory == null ? new Base[0] : new Base[] {this.readHistory}; // BooleanType
4333        case -1400550619: /*updateCreate*/ return this.updateCreate == null ? new Base[0] : new Base[] {this.updateCreate}; // BooleanType
4334        case 6401826: /*conditionalCreate*/ return this.conditionalCreate == null ? new Base[0] : new Base[] {this.conditionalCreate}; // BooleanType
4335        case 822786364: /*conditionalRead*/ return this.conditionalRead == null ? new Base[0] : new Base[] {this.conditionalRead}; // Enumeration<ConditionalReadStatus>
4336        case 519849711: /*conditionalUpdate*/ return this.conditionalUpdate == null ? new Base[0] : new Base[] {this.conditionalUpdate}; // BooleanType
4337        case 23237585: /*conditionalDelete*/ return this.conditionalDelete == null ? new Base[0] : new Base[] {this.conditionalDelete}; // Enumeration<ConditionalDeleteStatus>
4338        case 796257373: /*referencePolicy*/ return this.referencePolicy == null ? new Base[0] : this.referencePolicy.toArray(new Base[this.referencePolicy.size()]); // Enumeration<ReferenceHandlingPolicy>
4339        case -1035904544: /*searchInclude*/ return this.searchInclude == null ? new Base[0] : this.searchInclude.toArray(new Base[this.searchInclude.size()]); // StringType
4340        case -2123884979: /*searchRevInclude*/ return this.searchRevInclude == null ? new Base[0] : this.searchRevInclude.toArray(new Base[this.searchRevInclude.size()]); // StringType
4341        case -553645115: /*searchParam*/ return this.searchParam == null ? new Base[0] : this.searchParam.toArray(new Base[this.searchParam.size()]); // CapabilityStatementRestResourceSearchParamComponent
4342        default: return super.getProperty(hash, name, checkValid);
4343        }
4344
4345      }
4346
4347      @Override
4348      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4349        switch (hash) {
4350        case 3575610: // type
4351          this.type = castToCode(value); // CodeType
4352          return value;
4353        case -309425751: // profile
4354          this.profile = castToReference(value); // Reference
4355          return value;
4356        case 1587405498: // documentation
4357          this.documentation = castToMarkdown(value); // MarkdownType
4358          return value;
4359        case 1844104722: // interaction
4360          this.getInteraction().add((ResourceInteractionComponent) value); // ResourceInteractionComponent
4361          return value;
4362        case -670487542: // versioning
4363          value = new ResourceVersionPolicyEnumFactory().fromType(castToCode(value));
4364          this.versioning = (Enumeration) value; // Enumeration<ResourceVersionPolicy>
4365          return value;
4366        case 187518494: // readHistory
4367          this.readHistory = castToBoolean(value); // BooleanType
4368          return value;
4369        case -1400550619: // updateCreate
4370          this.updateCreate = castToBoolean(value); // BooleanType
4371          return value;
4372        case 6401826: // conditionalCreate
4373          this.conditionalCreate = castToBoolean(value); // BooleanType
4374          return value;
4375        case 822786364: // conditionalRead
4376          value = new ConditionalReadStatusEnumFactory().fromType(castToCode(value));
4377          this.conditionalRead = (Enumeration) value; // Enumeration<ConditionalReadStatus>
4378          return value;
4379        case 519849711: // conditionalUpdate
4380          this.conditionalUpdate = castToBoolean(value); // BooleanType
4381          return value;
4382        case 23237585: // conditionalDelete
4383          value = new ConditionalDeleteStatusEnumFactory().fromType(castToCode(value));
4384          this.conditionalDelete = (Enumeration) value; // Enumeration<ConditionalDeleteStatus>
4385          return value;
4386        case 796257373: // referencePolicy
4387          value = new ReferenceHandlingPolicyEnumFactory().fromType(castToCode(value));
4388          this.getReferencePolicy().add((Enumeration) value); // Enumeration<ReferenceHandlingPolicy>
4389          return value;
4390        case -1035904544: // searchInclude
4391          this.getSearchInclude().add(castToString(value)); // StringType
4392          return value;
4393        case -2123884979: // searchRevInclude
4394          this.getSearchRevInclude().add(castToString(value)); // StringType
4395          return value;
4396        case -553645115: // searchParam
4397          this.getSearchParam().add((CapabilityStatementRestResourceSearchParamComponent) value); // CapabilityStatementRestResourceSearchParamComponent
4398          return value;
4399        default: return super.setProperty(hash, name, value);
4400        }
4401
4402      }
4403
4404      @Override
4405      public Base setProperty(String name, Base value) throws FHIRException {
4406        if (name.equals("type")) {
4407          this.type = castToCode(value); // CodeType
4408        } else if (name.equals("profile")) {
4409          this.profile = castToReference(value); // Reference
4410        } else if (name.equals("documentation")) {
4411          this.documentation = castToMarkdown(value); // MarkdownType
4412        } else if (name.equals("interaction")) {
4413          this.getInteraction().add((ResourceInteractionComponent) value);
4414        } else if (name.equals("versioning")) {
4415          value = new ResourceVersionPolicyEnumFactory().fromType(castToCode(value));
4416          this.versioning = (Enumeration) value; // Enumeration<ResourceVersionPolicy>
4417        } else if (name.equals("readHistory")) {
4418          this.readHistory = castToBoolean(value); // BooleanType
4419        } else if (name.equals("updateCreate")) {
4420          this.updateCreate = castToBoolean(value); // BooleanType
4421        } else if (name.equals("conditionalCreate")) {
4422          this.conditionalCreate = castToBoolean(value); // BooleanType
4423        } else if (name.equals("conditionalRead")) {
4424          value = new ConditionalReadStatusEnumFactory().fromType(castToCode(value));
4425          this.conditionalRead = (Enumeration) value; // Enumeration<ConditionalReadStatus>
4426        } else if (name.equals("conditionalUpdate")) {
4427          this.conditionalUpdate = castToBoolean(value); // BooleanType
4428        } else if (name.equals("conditionalDelete")) {
4429          value = new ConditionalDeleteStatusEnumFactory().fromType(castToCode(value));
4430          this.conditionalDelete = (Enumeration) value; // Enumeration<ConditionalDeleteStatus>
4431        } else if (name.equals("referencePolicy")) {
4432          value = new ReferenceHandlingPolicyEnumFactory().fromType(castToCode(value));
4433          this.getReferencePolicy().add((Enumeration) value);
4434        } else if (name.equals("searchInclude")) {
4435          this.getSearchInclude().add(castToString(value));
4436        } else if (name.equals("searchRevInclude")) {
4437          this.getSearchRevInclude().add(castToString(value));
4438        } else if (name.equals("searchParam")) {
4439          this.getSearchParam().add((CapabilityStatementRestResourceSearchParamComponent) value);
4440        } else
4441          return super.setProperty(name, value);
4442        return value;
4443      }
4444
4445      @Override
4446      public Base makeProperty(int hash, String name) throws FHIRException {
4447        switch (hash) {
4448        case 3575610:  return getTypeElement();
4449        case -309425751:  return getProfile(); 
4450        case 1587405498:  return getDocumentationElement();
4451        case 1844104722:  return addInteraction(); 
4452        case -670487542:  return getVersioningElement();
4453        case 187518494:  return getReadHistoryElement();
4454        case -1400550619:  return getUpdateCreateElement();
4455        case 6401826:  return getConditionalCreateElement();
4456        case 822786364:  return getConditionalReadElement();
4457        case 519849711:  return getConditionalUpdateElement();
4458        case 23237585:  return getConditionalDeleteElement();
4459        case 796257373:  return addReferencePolicyElement();
4460        case -1035904544:  return addSearchIncludeElement();
4461        case -2123884979:  return addSearchRevIncludeElement();
4462        case -553645115:  return addSearchParam(); 
4463        default: return super.makeProperty(hash, name);
4464        }
4465
4466      }
4467
4468      @Override
4469      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4470        switch (hash) {
4471        case 3575610: /*type*/ return new String[] {"code"};
4472        case -309425751: /*profile*/ return new String[] {"Reference"};
4473        case 1587405498: /*documentation*/ return new String[] {"markdown"};
4474        case 1844104722: /*interaction*/ return new String[] {};
4475        case -670487542: /*versioning*/ return new String[] {"code"};
4476        case 187518494: /*readHistory*/ return new String[] {"boolean"};
4477        case -1400550619: /*updateCreate*/ return new String[] {"boolean"};
4478        case 6401826: /*conditionalCreate*/ return new String[] {"boolean"};
4479        case 822786364: /*conditionalRead*/ return new String[] {"code"};
4480        case 519849711: /*conditionalUpdate*/ return new String[] {"boolean"};
4481        case 23237585: /*conditionalDelete*/ return new String[] {"code"};
4482        case 796257373: /*referencePolicy*/ return new String[] {"code"};
4483        case -1035904544: /*searchInclude*/ return new String[] {"string"};
4484        case -2123884979: /*searchRevInclude*/ return new String[] {"string"};
4485        case -553645115: /*searchParam*/ return new String[] {};
4486        default: return super.getTypesForProperty(hash, name);
4487        }
4488
4489      }
4490
4491      @Override
4492      public Base addChild(String name) throws FHIRException {
4493        if (name.equals("type")) {
4494          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.type");
4495        }
4496        else if (name.equals("profile")) {
4497          this.profile = new Reference();
4498          return this.profile;
4499        }
4500        else if (name.equals("documentation")) {
4501          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
4502        }
4503        else if (name.equals("interaction")) {
4504          return addInteraction();
4505        }
4506        else if (name.equals("versioning")) {
4507          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.versioning");
4508        }
4509        else if (name.equals("readHistory")) {
4510          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.readHistory");
4511        }
4512        else if (name.equals("updateCreate")) {
4513          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.updateCreate");
4514        }
4515        else if (name.equals("conditionalCreate")) {
4516          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.conditionalCreate");
4517        }
4518        else if (name.equals("conditionalRead")) {
4519          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.conditionalRead");
4520        }
4521        else if (name.equals("conditionalUpdate")) {
4522          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.conditionalUpdate");
4523        }
4524        else if (name.equals("conditionalDelete")) {
4525          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.conditionalDelete");
4526        }
4527        else if (name.equals("referencePolicy")) {
4528          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.referencePolicy");
4529        }
4530        else if (name.equals("searchInclude")) {
4531          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.searchInclude");
4532        }
4533        else if (name.equals("searchRevInclude")) {
4534          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.searchRevInclude");
4535        }
4536        else if (name.equals("searchParam")) {
4537          return addSearchParam();
4538        }
4539        else
4540          return super.addChild(name);
4541      }
4542
4543      public CapabilityStatementRestResourceComponent copy() {
4544        CapabilityStatementRestResourceComponent dst = new CapabilityStatementRestResourceComponent();
4545        copyValues(dst);
4546        dst.type = type == null ? null : type.copy();
4547        dst.profile = profile == null ? null : profile.copy();
4548        dst.documentation = documentation == null ? null : documentation.copy();
4549        if (interaction != null) {
4550          dst.interaction = new ArrayList<ResourceInteractionComponent>();
4551          for (ResourceInteractionComponent i : interaction)
4552            dst.interaction.add(i.copy());
4553        };
4554        dst.versioning = versioning == null ? null : versioning.copy();
4555        dst.readHistory = readHistory == null ? null : readHistory.copy();
4556        dst.updateCreate = updateCreate == null ? null : updateCreate.copy();
4557        dst.conditionalCreate = conditionalCreate == null ? null : conditionalCreate.copy();
4558        dst.conditionalRead = conditionalRead == null ? null : conditionalRead.copy();
4559        dst.conditionalUpdate = conditionalUpdate == null ? null : conditionalUpdate.copy();
4560        dst.conditionalDelete = conditionalDelete == null ? null : conditionalDelete.copy();
4561        if (referencePolicy != null) {
4562          dst.referencePolicy = new ArrayList<Enumeration<ReferenceHandlingPolicy>>();
4563          for (Enumeration<ReferenceHandlingPolicy> i : referencePolicy)
4564            dst.referencePolicy.add(i.copy());
4565        };
4566        if (searchInclude != null) {
4567          dst.searchInclude = new ArrayList<StringType>();
4568          for (StringType i : searchInclude)
4569            dst.searchInclude.add(i.copy());
4570        };
4571        if (searchRevInclude != null) {
4572          dst.searchRevInclude = new ArrayList<StringType>();
4573          for (StringType i : searchRevInclude)
4574            dst.searchRevInclude.add(i.copy());
4575        };
4576        if (searchParam != null) {
4577          dst.searchParam = new ArrayList<CapabilityStatementRestResourceSearchParamComponent>();
4578          for (CapabilityStatementRestResourceSearchParamComponent i : searchParam)
4579            dst.searchParam.add(i.copy());
4580        };
4581        return dst;
4582      }
4583
4584      @Override
4585      public boolean equalsDeep(Base other_) {
4586        if (!super.equalsDeep(other_))
4587          return false;
4588        if (!(other_ instanceof CapabilityStatementRestResourceComponent))
4589          return false;
4590        CapabilityStatementRestResourceComponent o = (CapabilityStatementRestResourceComponent) other_;
4591        return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(documentation, o.documentation, true)
4592           && compareDeep(interaction, o.interaction, true) && compareDeep(versioning, o.versioning, true)
4593           && compareDeep(readHistory, o.readHistory, true) && compareDeep(updateCreate, o.updateCreate, true)
4594           && compareDeep(conditionalCreate, o.conditionalCreate, true) && compareDeep(conditionalRead, o.conditionalRead, true)
4595           && compareDeep(conditionalUpdate, o.conditionalUpdate, true) && compareDeep(conditionalDelete, o.conditionalDelete, true)
4596           && compareDeep(referencePolicy, o.referencePolicy, true) && compareDeep(searchInclude, o.searchInclude, true)
4597           && compareDeep(searchRevInclude, o.searchRevInclude, true) && compareDeep(searchParam, o.searchParam, true)
4598          ;
4599      }
4600
4601      @Override
4602      public boolean equalsShallow(Base other_) {
4603        if (!super.equalsShallow(other_))
4604          return false;
4605        if (!(other_ instanceof CapabilityStatementRestResourceComponent))
4606          return false;
4607        CapabilityStatementRestResourceComponent o = (CapabilityStatementRestResourceComponent) other_;
4608        return compareValues(type, o.type, true) && compareValues(documentation, o.documentation, true) && compareValues(versioning, o.versioning, true)
4609           && compareValues(readHistory, o.readHistory, true) && compareValues(updateCreate, o.updateCreate, true)
4610           && compareValues(conditionalCreate, o.conditionalCreate, true) && compareValues(conditionalRead, o.conditionalRead, true)
4611           && compareValues(conditionalUpdate, o.conditionalUpdate, true) && compareValues(conditionalDelete, o.conditionalDelete, true)
4612           && compareValues(referencePolicy, o.referencePolicy, true) && compareValues(searchInclude, o.searchInclude, true)
4613           && compareValues(searchRevInclude, o.searchRevInclude, true);
4614      }
4615
4616      public boolean isEmpty() {
4617        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile, documentation
4618          , interaction, versioning, readHistory, updateCreate, conditionalCreate, conditionalRead
4619          , conditionalUpdate, conditionalDelete, referencePolicy, searchInclude, searchRevInclude
4620          , searchParam);
4621      }
4622
4623  public String fhirType() {
4624    return "CapabilityStatement.rest.resource";
4625
4626  }
4627
4628  }
4629
4630    @Block()
4631    public static class ResourceInteractionComponent extends BackboneElement implements IBaseBackboneElement {
4632        /**
4633         * Coded identifier of the operation, supported by the system resource.
4634         */
4635        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4636        @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." )
4637        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/type-restful-interaction")
4638        protected Enumeration<TypeRestfulInteraction> code;
4639
4640        /**
4641         * 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'.
4642         */
4643        @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4644        @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'." )
4645        protected StringType documentation;
4646
4647        private static final long serialVersionUID = -437507806L;
4648
4649    /**
4650     * Constructor
4651     */
4652      public ResourceInteractionComponent() {
4653        super();
4654      }
4655
4656    /**
4657     * Constructor
4658     */
4659      public ResourceInteractionComponent(Enumeration<TypeRestfulInteraction> code) {
4660        super();
4661        this.code = code;
4662      }
4663
4664        /**
4665         * @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
4666         */
4667        public Enumeration<TypeRestfulInteraction> getCodeElement() { 
4668          if (this.code == null)
4669            if (Configuration.errorOnAutoCreate())
4670              throw new Error("Attempt to auto-create ResourceInteractionComponent.code");
4671            else if (Configuration.doAutoCreate())
4672              this.code = new Enumeration<TypeRestfulInteraction>(new TypeRestfulInteractionEnumFactory()); // bb
4673          return this.code;
4674        }
4675
4676        public boolean hasCodeElement() { 
4677          return this.code != null && !this.code.isEmpty();
4678        }
4679
4680        public boolean hasCode() { 
4681          return this.code != null && !this.code.isEmpty();
4682        }
4683
4684        /**
4685         * @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
4686         */
4687        public ResourceInteractionComponent setCodeElement(Enumeration<TypeRestfulInteraction> value) { 
4688          this.code = value;
4689          return this;
4690        }
4691
4692        /**
4693         * @return Coded identifier of the operation, supported by the system resource.
4694         */
4695        public TypeRestfulInteraction getCode() { 
4696          return this.code == null ? null : this.code.getValue();
4697        }
4698
4699        /**
4700         * @param value Coded identifier of the operation, supported by the system resource.
4701         */
4702        public ResourceInteractionComponent setCode(TypeRestfulInteraction value) { 
4703            if (this.code == null)
4704              this.code = new Enumeration<TypeRestfulInteraction>(new TypeRestfulInteractionEnumFactory());
4705            this.code.setValue(value);
4706          return this;
4707        }
4708
4709        /**
4710         * @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
4711         */
4712        public StringType getDocumentationElement() { 
4713          if (this.documentation == null)
4714            if (Configuration.errorOnAutoCreate())
4715              throw new Error("Attempt to auto-create ResourceInteractionComponent.documentation");
4716            else if (Configuration.doAutoCreate())
4717              this.documentation = new StringType(); // bb
4718          return this.documentation;
4719        }
4720
4721        public boolean hasDocumentationElement() { 
4722          return this.documentation != null && !this.documentation.isEmpty();
4723        }
4724
4725        public boolean hasDocumentation() { 
4726          return this.documentation != null && !this.documentation.isEmpty();
4727        }
4728
4729        /**
4730         * @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
4731         */
4732        public ResourceInteractionComponent setDocumentationElement(StringType value) { 
4733          this.documentation = value;
4734          return this;
4735        }
4736
4737        /**
4738         * @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'.
4739         */
4740        public String getDocumentation() { 
4741          return this.documentation == null ? null : this.documentation.getValue();
4742        }
4743
4744        /**
4745         * @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'.
4746         */
4747        public ResourceInteractionComponent setDocumentation(String value) { 
4748          if (Utilities.noString(value))
4749            this.documentation = null;
4750          else {
4751            if (this.documentation == null)
4752              this.documentation = new StringType();
4753            this.documentation.setValue(value);
4754          }
4755          return this;
4756        }
4757
4758        protected void listChildren(List<Property> children) {
4759          super.listChildren(children);
4760          children.add(new Property("code", "code", "Coded identifier of the operation, supported by the system resource.", 0, 1, code));
4761          children.add(new Property("documentation", "string", "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));
4762        }
4763
4764        @Override
4765        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4766          switch (_hash) {
4767          case 3059181: /*code*/  return new Property("code", "code", "Coded identifier of the operation, supported by the system resource.", 0, 1, code);
4768          case 1587405498: /*documentation*/  return new Property("documentation", "string", "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);
4769          default: return super.getNamedProperty(_hash, _name, _checkValid);
4770          }
4771
4772        }
4773
4774      @Override
4775      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4776        switch (hash) {
4777        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<TypeRestfulInteraction>
4778        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
4779        default: return super.getProperty(hash, name, checkValid);
4780        }
4781
4782      }
4783
4784      @Override
4785      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4786        switch (hash) {
4787        case 3059181: // code
4788          value = new TypeRestfulInteractionEnumFactory().fromType(castToCode(value));
4789          this.code = (Enumeration) value; // Enumeration<TypeRestfulInteraction>
4790          return value;
4791        case 1587405498: // documentation
4792          this.documentation = castToString(value); // StringType
4793          return value;
4794        default: return super.setProperty(hash, name, value);
4795        }
4796
4797      }
4798
4799      @Override
4800      public Base setProperty(String name, Base value) throws FHIRException {
4801        if (name.equals("code")) {
4802          value = new TypeRestfulInteractionEnumFactory().fromType(castToCode(value));
4803          this.code = (Enumeration) value; // Enumeration<TypeRestfulInteraction>
4804        } else if (name.equals("documentation")) {
4805          this.documentation = castToString(value); // StringType
4806        } else
4807          return super.setProperty(name, value);
4808        return value;
4809      }
4810
4811      @Override
4812      public Base makeProperty(int hash, String name) throws FHIRException {
4813        switch (hash) {
4814        case 3059181:  return getCodeElement();
4815        case 1587405498:  return getDocumentationElement();
4816        default: return super.makeProperty(hash, name);
4817        }
4818
4819      }
4820
4821      @Override
4822      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4823        switch (hash) {
4824        case 3059181: /*code*/ return new String[] {"code"};
4825        case 1587405498: /*documentation*/ return new String[] {"string"};
4826        default: return super.getTypesForProperty(hash, name);
4827        }
4828
4829      }
4830
4831      @Override
4832      public Base addChild(String name) throws FHIRException {
4833        if (name.equals("code")) {
4834          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.code");
4835        }
4836        else if (name.equals("documentation")) {
4837          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
4838        }
4839        else
4840          return super.addChild(name);
4841      }
4842
4843      public ResourceInteractionComponent copy() {
4844        ResourceInteractionComponent dst = new ResourceInteractionComponent();
4845        copyValues(dst);
4846        dst.code = code == null ? null : code.copy();
4847        dst.documentation = documentation == null ? null : documentation.copy();
4848        return dst;
4849      }
4850
4851      @Override
4852      public boolean equalsDeep(Base other_) {
4853        if (!super.equalsDeep(other_))
4854          return false;
4855        if (!(other_ instanceof ResourceInteractionComponent))
4856          return false;
4857        ResourceInteractionComponent o = (ResourceInteractionComponent) other_;
4858        return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true);
4859      }
4860
4861      @Override
4862      public boolean equalsShallow(Base other_) {
4863        if (!super.equalsShallow(other_))
4864          return false;
4865        if (!(other_ instanceof ResourceInteractionComponent))
4866          return false;
4867        ResourceInteractionComponent o = (ResourceInteractionComponent) other_;
4868        return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true);
4869      }
4870
4871      public boolean isEmpty() {
4872        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, documentation);
4873      }
4874
4875  public String fhirType() {
4876    return "CapabilityStatement.rest.resource.interaction";
4877
4878  }
4879
4880  }
4881
4882    @Block()
4883    public static class CapabilityStatementRestResourceSearchParamComponent extends BackboneElement implements IBaseBackboneElement {
4884        /**
4885         * The name of the search parameter used in the interface.
4886         */
4887        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4888        @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the search parameter used in the interface." )
4889        protected StringType name;
4890
4891        /**
4892         * 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]]]).
4893         */
4894        @Child(name = "definition", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4895        @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]]])." )
4896        protected UriType definition;
4897
4898        /**
4899         * The type of value a search parameter refers to, and how the content is interpreted.
4900         */
4901        @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false)
4902        @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." )
4903        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-param-type")
4904        protected Enumeration<SearchParamType> type;
4905
4906        /**
4907         * This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.
4908         */
4909        @Child(name = "documentation", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
4910        @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." )
4911        protected StringType documentation;
4912
4913        private static final long serialVersionUID = 72133006L;
4914
4915    /**
4916     * Constructor
4917     */
4918      public CapabilityStatementRestResourceSearchParamComponent() {
4919        super();
4920      }
4921
4922    /**
4923     * Constructor
4924     */
4925      public CapabilityStatementRestResourceSearchParamComponent(StringType name, Enumeration<SearchParamType> type) {
4926        super();
4927        this.name = name;
4928        this.type = type;
4929      }
4930
4931        /**
4932         * @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
4933         */
4934        public StringType getNameElement() { 
4935          if (this.name == null)
4936            if (Configuration.errorOnAutoCreate())
4937              throw new Error("Attempt to auto-create CapabilityStatementRestResourceSearchParamComponent.name");
4938            else if (Configuration.doAutoCreate())
4939              this.name = new StringType(); // bb
4940          return this.name;
4941        }
4942
4943        public boolean hasNameElement() { 
4944          return this.name != null && !this.name.isEmpty();
4945        }
4946
4947        public boolean hasName() { 
4948          return this.name != null && !this.name.isEmpty();
4949        }
4950
4951        /**
4952         * @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
4953         */
4954        public CapabilityStatementRestResourceSearchParamComponent setNameElement(StringType value) { 
4955          this.name = value;
4956          return this;
4957        }
4958
4959        /**
4960         * @return The name of the search parameter used in the interface.
4961         */
4962        public String getName() { 
4963          return this.name == null ? null : this.name.getValue();
4964        }
4965
4966        /**
4967         * @param value The name of the search parameter used in the interface.
4968         */
4969        public CapabilityStatementRestResourceSearchParamComponent setName(String value) { 
4970            if (this.name == null)
4971              this.name = new StringType();
4972            this.name.setValue(value);
4973          return this;
4974        }
4975
4976        /**
4977         * @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]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
4978         */
4979        public UriType getDefinitionElement() { 
4980          if (this.definition == null)
4981            if (Configuration.errorOnAutoCreate())
4982              throw new Error("Attempt to auto-create CapabilityStatementRestResourceSearchParamComponent.definition");
4983            else if (Configuration.doAutoCreate())
4984              this.definition = new UriType(); // bb
4985          return this.definition;
4986        }
4987
4988        public boolean hasDefinitionElement() { 
4989          return this.definition != null && !this.definition.isEmpty();
4990        }
4991
4992        public boolean hasDefinition() { 
4993          return this.definition != null && !this.definition.isEmpty();
4994        }
4995
4996        /**
4997         * @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]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
4998         */
4999        public CapabilityStatementRestResourceSearchParamComponent setDefinitionElement(UriType value) { 
5000          this.definition = value;
5001          return this;
5002        }
5003
5004        /**
5005         * @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]]]).
5006         */
5007        public String getDefinition() { 
5008          return this.definition == null ? null : this.definition.getValue();
5009        }
5010
5011        /**
5012         * @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]]]).
5013         */
5014        public CapabilityStatementRestResourceSearchParamComponent setDefinition(String value) { 
5015          if (Utilities.noString(value))
5016            this.definition = null;
5017          else {
5018            if (this.definition == null)
5019              this.definition = new UriType();
5020            this.definition.setValue(value);
5021          }
5022          return this;
5023        }
5024
5025        /**
5026         * @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
5027         */
5028        public Enumeration<SearchParamType> getTypeElement() { 
5029          if (this.type == null)
5030            if (Configuration.errorOnAutoCreate())
5031              throw new Error("Attempt to auto-create CapabilityStatementRestResourceSearchParamComponent.type");
5032            else if (Configuration.doAutoCreate())
5033              this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb
5034          return this.type;
5035        }
5036
5037        public boolean hasTypeElement() { 
5038          return this.type != null && !this.type.isEmpty();
5039        }
5040
5041        public boolean hasType() { 
5042          return this.type != null && !this.type.isEmpty();
5043        }
5044
5045        /**
5046         * @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
5047         */
5048        public CapabilityStatementRestResourceSearchParamComponent setTypeElement(Enumeration<SearchParamType> value) { 
5049          this.type = value;
5050          return this;
5051        }
5052
5053        /**
5054         * @return The type of value a search parameter refers to, and how the content is interpreted.
5055         */
5056        public SearchParamType getType() { 
5057          return this.type == null ? null : this.type.getValue();
5058        }
5059
5060        /**
5061         * @param value The type of value a search parameter refers to, and how the content is interpreted.
5062         */
5063        public CapabilityStatementRestResourceSearchParamComponent setType(SearchParamType value) { 
5064            if (this.type == null)
5065              this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory());
5066            this.type.setValue(value);
5067          return this;
5068        }
5069
5070        /**
5071         * @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
5072         */
5073        public StringType getDocumentationElement() { 
5074          if (this.documentation == null)
5075            if (Configuration.errorOnAutoCreate())
5076              throw new Error("Attempt to auto-create CapabilityStatementRestResourceSearchParamComponent.documentation");
5077            else if (Configuration.doAutoCreate())
5078              this.documentation = new StringType(); // bb
5079          return this.documentation;
5080        }
5081
5082        public boolean hasDocumentationElement() { 
5083          return this.documentation != null && !this.documentation.isEmpty();
5084        }
5085
5086        public boolean hasDocumentation() { 
5087          return this.documentation != null && !this.documentation.isEmpty();
5088        }
5089
5090        /**
5091         * @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
5092         */
5093        public CapabilityStatementRestResourceSearchParamComponent setDocumentationElement(StringType value) { 
5094          this.documentation = value;
5095          return this;
5096        }
5097
5098        /**
5099         * @return This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.
5100         */
5101        public String getDocumentation() { 
5102          return this.documentation == null ? null : this.documentation.getValue();
5103        }
5104
5105        /**
5106         * @param value This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.
5107         */
5108        public CapabilityStatementRestResourceSearchParamComponent setDocumentation(String value) { 
5109          if (Utilities.noString(value))
5110            this.documentation = null;
5111          else {
5112            if (this.documentation == null)
5113              this.documentation = new StringType();
5114            this.documentation.setValue(value);
5115          }
5116          return this;
5117        }
5118
5119        protected void listChildren(List<Property> children) {
5120          super.listChildren(children);
5121          children.add(new Property("name", "string", "The name of the search parameter used in the interface.", 0, 1, name));
5122          children.add(new Property("definition", "uri", "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]]]).", 0, 1, definition));
5123          children.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, 1, type));
5124          children.add(new Property("documentation", "string", "This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.", 0, 1, documentation));
5125        }
5126
5127        @Override
5128        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5129          switch (_hash) {
5130          case 3373707: /*name*/  return new Property("name", "string", "The name of the search parameter used in the interface.", 0, 1, name);
5131          case -1014418093: /*definition*/  return new Property("definition", "uri", "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]]]).", 0, 1, definition);
5132          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);
5133          case 1587405498: /*documentation*/  return new Property("documentation", "string", "This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.", 0, 1, documentation);
5134          default: return super.getNamedProperty(_hash, _name, _checkValid);
5135          }
5136
5137        }
5138
5139      @Override
5140      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5141        switch (hash) {
5142        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
5143        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // UriType
5144        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SearchParamType>
5145        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
5146        default: return super.getProperty(hash, name, checkValid);
5147        }
5148
5149      }
5150
5151      @Override
5152      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5153        switch (hash) {
5154        case 3373707: // name
5155          this.name = castToString(value); // StringType
5156          return value;
5157        case -1014418093: // definition
5158          this.definition = castToUri(value); // UriType
5159          return value;
5160        case 3575610: // type
5161          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
5162          this.type = (Enumeration) value; // Enumeration<SearchParamType>
5163          return value;
5164        case 1587405498: // documentation
5165          this.documentation = castToString(value); // StringType
5166          return value;
5167        default: return super.setProperty(hash, name, value);
5168        }
5169
5170      }
5171
5172      @Override
5173      public Base setProperty(String name, Base value) throws FHIRException {
5174        if (name.equals("name")) {
5175          this.name = castToString(value); // StringType
5176        } else if (name.equals("definition")) {
5177          this.definition = castToUri(value); // UriType
5178        } else if (name.equals("type")) {
5179          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
5180          this.type = (Enumeration) value; // Enumeration<SearchParamType>
5181        } else if (name.equals("documentation")) {
5182          this.documentation = castToString(value); // StringType
5183        } else
5184          return super.setProperty(name, value);
5185        return value;
5186      }
5187
5188      @Override
5189      public Base makeProperty(int hash, String name) throws FHIRException {
5190        switch (hash) {
5191        case 3373707:  return getNameElement();
5192        case -1014418093:  return getDefinitionElement();
5193        case 3575610:  return getTypeElement();
5194        case 1587405498:  return getDocumentationElement();
5195        default: return super.makeProperty(hash, name);
5196        }
5197
5198      }
5199
5200      @Override
5201      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5202        switch (hash) {
5203        case 3373707: /*name*/ return new String[] {"string"};
5204        case -1014418093: /*definition*/ return new String[] {"uri"};
5205        case 3575610: /*type*/ return new String[] {"code"};
5206        case 1587405498: /*documentation*/ return new String[] {"string"};
5207        default: return super.getTypesForProperty(hash, name);
5208        }
5209
5210      }
5211
5212      @Override
5213      public Base addChild(String name) throws FHIRException {
5214        if (name.equals("name")) {
5215          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.name");
5216        }
5217        else if (name.equals("definition")) {
5218          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.definition");
5219        }
5220        else if (name.equals("type")) {
5221          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.type");
5222        }
5223        else if (name.equals("documentation")) {
5224          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
5225        }
5226        else
5227          return super.addChild(name);
5228      }
5229
5230      public CapabilityStatementRestResourceSearchParamComponent copy() {
5231        CapabilityStatementRestResourceSearchParamComponent dst = new CapabilityStatementRestResourceSearchParamComponent();
5232        copyValues(dst);
5233        dst.name = name == null ? null : name.copy();
5234        dst.definition = definition == null ? null : definition.copy();
5235        dst.type = type == null ? null : type.copy();
5236        dst.documentation = documentation == null ? null : documentation.copy();
5237        return dst;
5238      }
5239
5240      @Override
5241      public boolean equalsDeep(Base other_) {
5242        if (!super.equalsDeep(other_))
5243          return false;
5244        if (!(other_ instanceof CapabilityStatementRestResourceSearchParamComponent))
5245          return false;
5246        CapabilityStatementRestResourceSearchParamComponent o = (CapabilityStatementRestResourceSearchParamComponent) other_;
5247        return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true) && compareDeep(type, o.type, true)
5248           && compareDeep(documentation, o.documentation, true);
5249      }
5250
5251      @Override
5252      public boolean equalsShallow(Base other_) {
5253        if (!super.equalsShallow(other_))
5254          return false;
5255        if (!(other_ instanceof CapabilityStatementRestResourceSearchParamComponent))
5256          return false;
5257        CapabilityStatementRestResourceSearchParamComponent o = (CapabilityStatementRestResourceSearchParamComponent) other_;
5258        return compareValues(name, o.name, true) && compareValues(definition, o.definition, true) && compareValues(type, o.type, true)
5259           && compareValues(documentation, o.documentation, true);
5260      }
5261
5262      public boolean isEmpty() {
5263        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, definition, type, documentation
5264          );
5265      }
5266
5267  public String fhirType() {
5268    return "CapabilityStatement.rest.resource.searchParam";
5269
5270  }
5271
5272  }
5273
5274    @Block()
5275    public static class SystemInteractionComponent extends BackboneElement implements IBaseBackboneElement {
5276        /**
5277         * A coded identifier of the operation, supported by the system.
5278         */
5279        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
5280        @Description(shortDefinition="transaction | batch | search-system | history-system", formalDefinition="A coded identifier of the operation, supported by the system." )
5281        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/system-restful-interaction")
5282        protected Enumeration<SystemRestfulInteraction> code;
5283
5284        /**
5285         * 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.
5286         */
5287        @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
5288        @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." )
5289        protected StringType documentation;
5290
5291        private static final long serialVersionUID = 510675287L;
5292
5293    /**
5294     * Constructor
5295     */
5296      public SystemInteractionComponent() {
5297        super();
5298      }
5299
5300    /**
5301     * Constructor
5302     */
5303      public SystemInteractionComponent(Enumeration<SystemRestfulInteraction> code) {
5304        super();
5305        this.code = code;
5306      }
5307
5308        /**
5309         * @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
5310         */
5311        public Enumeration<SystemRestfulInteraction> getCodeElement() { 
5312          if (this.code == null)
5313            if (Configuration.errorOnAutoCreate())
5314              throw new Error("Attempt to auto-create SystemInteractionComponent.code");
5315            else if (Configuration.doAutoCreate())
5316              this.code = new Enumeration<SystemRestfulInteraction>(new SystemRestfulInteractionEnumFactory()); // bb
5317          return this.code;
5318        }
5319
5320        public boolean hasCodeElement() { 
5321          return this.code != null && !this.code.isEmpty();
5322        }
5323
5324        public boolean hasCode() { 
5325          return this.code != null && !this.code.isEmpty();
5326        }
5327
5328        /**
5329         * @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
5330         */
5331        public SystemInteractionComponent setCodeElement(Enumeration<SystemRestfulInteraction> value) { 
5332          this.code = value;
5333          return this;
5334        }
5335
5336        /**
5337         * @return A coded identifier of the operation, supported by the system.
5338         */
5339        public SystemRestfulInteraction getCode() { 
5340          return this.code == null ? null : this.code.getValue();
5341        }
5342
5343        /**
5344         * @param value A coded identifier of the operation, supported by the system.
5345         */
5346        public SystemInteractionComponent setCode(SystemRestfulInteraction value) { 
5347            if (this.code == null)
5348              this.code = new Enumeration<SystemRestfulInteraction>(new SystemRestfulInteractionEnumFactory());
5349            this.code.setValue(value);
5350          return this;
5351        }
5352
5353        /**
5354         * @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
5355         */
5356        public StringType getDocumentationElement() { 
5357          if (this.documentation == null)
5358            if (Configuration.errorOnAutoCreate())
5359              throw new Error("Attempt to auto-create SystemInteractionComponent.documentation");
5360            else if (Configuration.doAutoCreate())
5361              this.documentation = new StringType(); // bb
5362          return this.documentation;
5363        }
5364
5365        public boolean hasDocumentationElement() { 
5366          return this.documentation != null && !this.documentation.isEmpty();
5367        }
5368
5369        public boolean hasDocumentation() { 
5370          return this.documentation != null && !this.documentation.isEmpty();
5371        }
5372
5373        /**
5374         * @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
5375         */
5376        public SystemInteractionComponent setDocumentationElement(StringType value) { 
5377          this.documentation = value;
5378          return this;
5379        }
5380
5381        /**
5382         * @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.
5383         */
5384        public String getDocumentation() { 
5385          return this.documentation == null ? null : this.documentation.getValue();
5386        }
5387
5388        /**
5389         * @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.
5390         */
5391        public SystemInteractionComponent setDocumentation(String value) { 
5392          if (Utilities.noString(value))
5393            this.documentation = null;
5394          else {
5395            if (this.documentation == null)
5396              this.documentation = new StringType();
5397            this.documentation.setValue(value);
5398          }
5399          return this;
5400        }
5401
5402        protected void listChildren(List<Property> children) {
5403          super.listChildren(children);
5404          children.add(new Property("code", "code", "A coded identifier of the operation, supported by the system.", 0, 1, code));
5405          children.add(new Property("documentation", "string", "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));
5406        }
5407
5408        @Override
5409        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5410          switch (_hash) {
5411          case 3059181: /*code*/  return new Property("code", "code", "A coded identifier of the operation, supported by the system.", 0, 1, code);
5412          case 1587405498: /*documentation*/  return new Property("documentation", "string", "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);
5413          default: return super.getNamedProperty(_hash, _name, _checkValid);
5414          }
5415
5416        }
5417
5418      @Override
5419      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5420        switch (hash) {
5421        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<SystemRestfulInteraction>
5422        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
5423        default: return super.getProperty(hash, name, checkValid);
5424        }
5425
5426      }
5427
5428      @Override
5429      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5430        switch (hash) {
5431        case 3059181: // code
5432          value = new SystemRestfulInteractionEnumFactory().fromType(castToCode(value));
5433          this.code = (Enumeration) value; // Enumeration<SystemRestfulInteraction>
5434          return value;
5435        case 1587405498: // documentation
5436          this.documentation = castToString(value); // StringType
5437          return value;
5438        default: return super.setProperty(hash, name, value);
5439        }
5440
5441      }
5442
5443      @Override
5444      public Base setProperty(String name, Base value) throws FHIRException {
5445        if (name.equals("code")) {
5446          value = new SystemRestfulInteractionEnumFactory().fromType(castToCode(value));
5447          this.code = (Enumeration) value; // Enumeration<SystemRestfulInteraction>
5448        } else if (name.equals("documentation")) {
5449          this.documentation = castToString(value); // StringType
5450        } else
5451          return super.setProperty(name, value);
5452        return value;
5453      }
5454
5455      @Override
5456      public Base makeProperty(int hash, String name) throws FHIRException {
5457        switch (hash) {
5458        case 3059181:  return getCodeElement();
5459        case 1587405498:  return getDocumentationElement();
5460        default: return super.makeProperty(hash, name);
5461        }
5462
5463      }
5464
5465      @Override
5466      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5467        switch (hash) {
5468        case 3059181: /*code*/ return new String[] {"code"};
5469        case 1587405498: /*documentation*/ return new String[] {"string"};
5470        default: return super.getTypesForProperty(hash, name);
5471        }
5472
5473      }
5474
5475      @Override
5476      public Base addChild(String name) throws FHIRException {
5477        if (name.equals("code")) {
5478          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.code");
5479        }
5480        else if (name.equals("documentation")) {
5481          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
5482        }
5483        else
5484          return super.addChild(name);
5485      }
5486
5487      public SystemInteractionComponent copy() {
5488        SystemInteractionComponent dst = new SystemInteractionComponent();
5489        copyValues(dst);
5490        dst.code = code == null ? null : code.copy();
5491        dst.documentation = documentation == null ? null : documentation.copy();
5492        return dst;
5493      }
5494
5495      @Override
5496      public boolean equalsDeep(Base other_) {
5497        if (!super.equalsDeep(other_))
5498          return false;
5499        if (!(other_ instanceof SystemInteractionComponent))
5500          return false;
5501        SystemInteractionComponent o = (SystemInteractionComponent) other_;
5502        return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true);
5503      }
5504
5505      @Override
5506      public boolean equalsShallow(Base other_) {
5507        if (!super.equalsShallow(other_))
5508          return false;
5509        if (!(other_ instanceof SystemInteractionComponent))
5510          return false;
5511        SystemInteractionComponent o = (SystemInteractionComponent) other_;
5512        return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true);
5513      }
5514
5515      public boolean isEmpty() {
5516        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, documentation);
5517      }
5518
5519  public String fhirType() {
5520    return "CapabilityStatement.rest.interaction";
5521
5522  }
5523
5524  }
5525
5526    @Block()
5527    public static class CapabilityStatementRestOperationComponent extends BackboneElement implements IBaseBackboneElement {
5528        /**
5529         * 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.
5530         */
5531        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
5532        @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." )
5533        protected StringType name;
5534
5535        /**
5536         * Where the formal definition can be found.
5537         */
5538        @Child(name = "definition", type = {OperationDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true)
5539        @Description(shortDefinition="The defined operation/query", formalDefinition="Where the formal definition can be found." )
5540        protected Reference definition;
5541
5542        /**
5543         * The actual object that is the target of the reference (Where the formal definition can be found.)
5544         */
5545        protected OperationDefinition definitionTarget;
5546
5547        private static final long serialVersionUID = 122107272L;
5548
5549    /**
5550     * Constructor
5551     */
5552      public CapabilityStatementRestOperationComponent() {
5553        super();
5554      }
5555
5556    /**
5557     * Constructor
5558     */
5559      public CapabilityStatementRestOperationComponent(StringType name, Reference definition) {
5560        super();
5561        this.name = name;
5562        this.definition = definition;
5563      }
5564
5565        /**
5566         * @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
5567         */
5568        public StringType getNameElement() { 
5569          if (this.name == null)
5570            if (Configuration.errorOnAutoCreate())
5571              throw new Error("Attempt to auto-create CapabilityStatementRestOperationComponent.name");
5572            else if (Configuration.doAutoCreate())
5573              this.name = new StringType(); // bb
5574          return this.name;
5575        }
5576
5577        public boolean hasNameElement() { 
5578          return this.name != null && !this.name.isEmpty();
5579        }
5580
5581        public boolean hasName() { 
5582          return this.name != null && !this.name.isEmpty();
5583        }
5584
5585        /**
5586         * @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
5587         */
5588        public CapabilityStatementRestOperationComponent setNameElement(StringType value) { 
5589          this.name = value;
5590          return this;
5591        }
5592
5593        /**
5594         * @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.
5595         */
5596        public String getName() { 
5597          return this.name == null ? null : this.name.getValue();
5598        }
5599
5600        /**
5601         * @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.
5602         */
5603        public CapabilityStatementRestOperationComponent setName(String value) { 
5604            if (this.name == null)
5605              this.name = new StringType();
5606            this.name.setValue(value);
5607          return this;
5608        }
5609
5610        /**
5611         * @return {@link #definition} (Where the formal definition can be found.)
5612         */
5613        public Reference getDefinition() { 
5614          if (this.definition == null)
5615            if (Configuration.errorOnAutoCreate())
5616              throw new Error("Attempt to auto-create CapabilityStatementRestOperationComponent.definition");
5617            else if (Configuration.doAutoCreate())
5618              this.definition = new Reference(); // cc
5619          return this.definition;
5620        }
5621
5622        public boolean hasDefinition() { 
5623          return this.definition != null && !this.definition.isEmpty();
5624        }
5625
5626        /**
5627         * @param value {@link #definition} (Where the formal definition can be found.)
5628         */
5629        public CapabilityStatementRestOperationComponent setDefinition(Reference value)  { 
5630          this.definition = value;
5631          return this;
5632        }
5633
5634        /**
5635         * @return {@link #definition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the formal definition can be found.)
5636         */
5637        public OperationDefinition getDefinitionTarget() { 
5638          if (this.definitionTarget == null)
5639            if (Configuration.errorOnAutoCreate())
5640              throw new Error("Attempt to auto-create CapabilityStatementRestOperationComponent.definition");
5641            else if (Configuration.doAutoCreate())
5642              this.definitionTarget = new OperationDefinition(); // aa
5643          return this.definitionTarget;
5644        }
5645
5646        /**
5647         * @param value {@link #definition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the formal definition can be found.)
5648         */
5649        public CapabilityStatementRestOperationComponent setDefinitionTarget(OperationDefinition value) { 
5650          this.definitionTarget = value;
5651          return this;
5652        }
5653
5654        protected void listChildren(List<Property> children) {
5655          super.listChildren(children);
5656          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));
5657          children.add(new Property("definition", "Reference(OperationDefinition)", "Where the formal definition can be found.", 0, 1, definition));
5658        }
5659
5660        @Override
5661        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5662          switch (_hash) {
5663          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);
5664          case -1014418093: /*definition*/  return new Property("definition", "Reference(OperationDefinition)", "Where the formal definition can be found.", 0, 1, definition);
5665          default: return super.getNamedProperty(_hash, _name, _checkValid);
5666          }
5667
5668        }
5669
5670      @Override
5671      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5672        switch (hash) {
5673        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
5674        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Reference
5675        default: return super.getProperty(hash, name, checkValid);
5676        }
5677
5678      }
5679
5680      @Override
5681      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5682        switch (hash) {
5683        case 3373707: // name
5684          this.name = castToString(value); // StringType
5685          return value;
5686        case -1014418093: // definition
5687          this.definition = castToReference(value); // Reference
5688          return value;
5689        default: return super.setProperty(hash, name, value);
5690        }
5691
5692      }
5693
5694      @Override
5695      public Base setProperty(String name, Base value) throws FHIRException {
5696        if (name.equals("name")) {
5697          this.name = castToString(value); // StringType
5698        } else if (name.equals("definition")) {
5699          this.definition = castToReference(value); // Reference
5700        } else
5701          return super.setProperty(name, value);
5702        return value;
5703      }
5704
5705      @Override
5706      public Base makeProperty(int hash, String name) throws FHIRException {
5707        switch (hash) {
5708        case 3373707:  return getNameElement();
5709        case -1014418093:  return getDefinition(); 
5710        default: return super.makeProperty(hash, name);
5711        }
5712
5713      }
5714
5715      @Override
5716      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5717        switch (hash) {
5718        case 3373707: /*name*/ return new String[] {"string"};
5719        case -1014418093: /*definition*/ return new String[] {"Reference"};
5720        default: return super.getTypesForProperty(hash, name);
5721        }
5722
5723      }
5724
5725      @Override
5726      public Base addChild(String name) throws FHIRException {
5727        if (name.equals("name")) {
5728          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.name");
5729        }
5730        else if (name.equals("definition")) {
5731          this.definition = new Reference();
5732          return this.definition;
5733        }
5734        else
5735          return super.addChild(name);
5736      }
5737
5738      public CapabilityStatementRestOperationComponent copy() {
5739        CapabilityStatementRestOperationComponent dst = new CapabilityStatementRestOperationComponent();
5740        copyValues(dst);
5741        dst.name = name == null ? null : name.copy();
5742        dst.definition = definition == null ? null : definition.copy();
5743        return dst;
5744      }
5745
5746      @Override
5747      public boolean equalsDeep(Base other_) {
5748        if (!super.equalsDeep(other_))
5749          return false;
5750        if (!(other_ instanceof CapabilityStatementRestOperationComponent))
5751          return false;
5752        CapabilityStatementRestOperationComponent o = (CapabilityStatementRestOperationComponent) other_;
5753        return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true);
5754      }
5755
5756      @Override
5757      public boolean equalsShallow(Base other_) {
5758        if (!super.equalsShallow(other_))
5759          return false;
5760        if (!(other_ instanceof CapabilityStatementRestOperationComponent))
5761          return false;
5762        CapabilityStatementRestOperationComponent o = (CapabilityStatementRestOperationComponent) other_;
5763        return compareValues(name, o.name, true);
5764      }
5765
5766      public boolean isEmpty() {
5767        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, definition);
5768      }
5769
5770  public String fhirType() {
5771    return "CapabilityStatement.rest.operation";
5772
5773  }
5774
5775  }
5776
5777    @Block()
5778    public static class CapabilityStatementMessagingComponent extends BackboneElement implements IBaseBackboneElement {
5779        /**
5780         * An endpoint (network accessible address) to which messages and/or replies are to be sent.
5781         */
5782        @Child(name = "endpoint", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5783        @Description(shortDefinition="Where messages should be sent", formalDefinition="An endpoint (network accessible address) to which messages and/or replies are to be sent." )
5784        protected List<CapabilityStatementMessagingEndpointComponent> endpoint;
5785
5786        /**
5787         * Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).
5788         */
5789        @Child(name = "reliableCache", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=false)
5790        @Description(shortDefinition="Reliable Message Cache Length (min)", formalDefinition="Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)." )
5791        protected UnsignedIntType reliableCache;
5792
5793        /**
5794         * Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.
5795         */
5796        @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
5797        @Description(shortDefinition="Messaging interface behavior details", formalDefinition="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner." )
5798        protected StringType documentation;
5799
5800        /**
5801         * References to message definitions for messages this system can send or receive.
5802         */
5803        @Child(name = "supportedMessage", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5804        @Description(shortDefinition="Messages supported by this system", formalDefinition="References to message definitions for messages this system can send or receive." )
5805        protected List<CapabilityStatementMessagingSupportedMessageComponent> supportedMessage;
5806
5807        /**
5808         * A description of the solution's support for an event at this end-point.
5809         */
5810        @Child(name = "event", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5811        @Description(shortDefinition="Declare support for this event", formalDefinition="A description of the solution's support for an event at this end-point." )
5812        protected List<CapabilityStatementMessagingEventComponent> event;
5813
5814        private static final long serialVersionUID = 816243355L;
5815
5816    /**
5817     * Constructor
5818     */
5819      public CapabilityStatementMessagingComponent() {
5820        super();
5821      }
5822
5823        /**
5824         * @return {@link #endpoint} (An endpoint (network accessible address) to which messages and/or replies are to be sent.)
5825         */
5826        public List<CapabilityStatementMessagingEndpointComponent> getEndpoint() { 
5827          if (this.endpoint == null)
5828            this.endpoint = new ArrayList<CapabilityStatementMessagingEndpointComponent>();
5829          return this.endpoint;
5830        }
5831
5832        /**
5833         * @return Returns a reference to <code>this</code> for easy method chaining
5834         */
5835        public CapabilityStatementMessagingComponent setEndpoint(List<CapabilityStatementMessagingEndpointComponent> theEndpoint) { 
5836          this.endpoint = theEndpoint;
5837          return this;
5838        }
5839
5840        public boolean hasEndpoint() { 
5841          if (this.endpoint == null)
5842            return false;
5843          for (CapabilityStatementMessagingEndpointComponent item : this.endpoint)
5844            if (!item.isEmpty())
5845              return true;
5846          return false;
5847        }
5848
5849        public CapabilityStatementMessagingEndpointComponent addEndpoint() { //3
5850          CapabilityStatementMessagingEndpointComponent t = new CapabilityStatementMessagingEndpointComponent();
5851          if (this.endpoint == null)
5852            this.endpoint = new ArrayList<CapabilityStatementMessagingEndpointComponent>();
5853          this.endpoint.add(t);
5854          return t;
5855        }
5856
5857        public CapabilityStatementMessagingComponent addEndpoint(CapabilityStatementMessagingEndpointComponent t) { //3
5858          if (t == null)
5859            return this;
5860          if (this.endpoint == null)
5861            this.endpoint = new ArrayList<CapabilityStatementMessagingEndpointComponent>();
5862          this.endpoint.add(t);
5863          return this;
5864        }
5865
5866        /**
5867         * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist
5868         */
5869        public CapabilityStatementMessagingEndpointComponent getEndpointFirstRep() { 
5870          if (getEndpoint().isEmpty()) {
5871            addEndpoint();
5872          }
5873          return getEndpoint().get(0);
5874        }
5875
5876        /**
5877         * @return {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value
5878         */
5879        public UnsignedIntType getReliableCacheElement() { 
5880          if (this.reliableCache == null)
5881            if (Configuration.errorOnAutoCreate())
5882              throw new Error("Attempt to auto-create CapabilityStatementMessagingComponent.reliableCache");
5883            else if (Configuration.doAutoCreate())
5884              this.reliableCache = new UnsignedIntType(); // bb
5885          return this.reliableCache;
5886        }
5887
5888        public boolean hasReliableCacheElement() { 
5889          return this.reliableCache != null && !this.reliableCache.isEmpty();
5890        }
5891
5892        public boolean hasReliableCache() { 
5893          return this.reliableCache != null && !this.reliableCache.isEmpty();
5894        }
5895
5896        /**
5897         * @param value {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value
5898         */
5899        public CapabilityStatementMessagingComponent setReliableCacheElement(UnsignedIntType value) { 
5900          this.reliableCache = value;
5901          return this;
5902        }
5903
5904        /**
5905         * @return Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).
5906         */
5907        public int getReliableCache() { 
5908          return this.reliableCache == null || this.reliableCache.isEmpty() ? 0 : this.reliableCache.getValue();
5909        }
5910
5911        /**
5912         * @param value Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).
5913         */
5914        public CapabilityStatementMessagingComponent setReliableCache(int value) { 
5915            if (this.reliableCache == null)
5916              this.reliableCache = new UnsignedIntType();
5917            this.reliableCache.setValue(value);
5918          return this;
5919        }
5920
5921        /**
5922         * @return {@link #documentation} (Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
5923         */
5924        public StringType getDocumentationElement() { 
5925          if (this.documentation == null)
5926            if (Configuration.errorOnAutoCreate())
5927              throw new Error("Attempt to auto-create CapabilityStatementMessagingComponent.documentation");
5928            else if (Configuration.doAutoCreate())
5929              this.documentation = new StringType(); // bb
5930          return this.documentation;
5931        }
5932
5933        public boolean hasDocumentationElement() { 
5934          return this.documentation != null && !this.documentation.isEmpty();
5935        }
5936
5937        public boolean hasDocumentation() { 
5938          return this.documentation != null && !this.documentation.isEmpty();
5939        }
5940
5941        /**
5942         * @param value {@link #documentation} (Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
5943         */
5944        public CapabilityStatementMessagingComponent setDocumentationElement(StringType value) { 
5945          this.documentation = value;
5946          return this;
5947        }
5948
5949        /**
5950         * @return Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.
5951         */
5952        public String getDocumentation() { 
5953          return this.documentation == null ? null : this.documentation.getValue();
5954        }
5955
5956        /**
5957         * @param value Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.
5958         */
5959        public CapabilityStatementMessagingComponent setDocumentation(String value) { 
5960          if (Utilities.noString(value))
5961            this.documentation = null;
5962          else {
5963            if (this.documentation == null)
5964              this.documentation = new StringType();
5965            this.documentation.setValue(value);
5966          }
5967          return this;
5968        }
5969
5970        /**
5971         * @return {@link #supportedMessage} (References to message definitions for messages this system can send or receive.)
5972         */
5973        public List<CapabilityStatementMessagingSupportedMessageComponent> getSupportedMessage() { 
5974          if (this.supportedMessage == null)
5975            this.supportedMessage = new ArrayList<CapabilityStatementMessagingSupportedMessageComponent>();
5976          return this.supportedMessage;
5977        }
5978
5979        /**
5980         * @return Returns a reference to <code>this</code> for easy method chaining
5981         */
5982        public CapabilityStatementMessagingComponent setSupportedMessage(List<CapabilityStatementMessagingSupportedMessageComponent> theSupportedMessage) { 
5983          this.supportedMessage = theSupportedMessage;
5984          return this;
5985        }
5986
5987        public boolean hasSupportedMessage() { 
5988          if (this.supportedMessage == null)
5989            return false;
5990          for (CapabilityStatementMessagingSupportedMessageComponent item : this.supportedMessage)
5991            if (!item.isEmpty())
5992              return true;
5993          return false;
5994        }
5995
5996        public CapabilityStatementMessagingSupportedMessageComponent addSupportedMessage() { //3
5997          CapabilityStatementMessagingSupportedMessageComponent t = new CapabilityStatementMessagingSupportedMessageComponent();
5998          if (this.supportedMessage == null)
5999            this.supportedMessage = new ArrayList<CapabilityStatementMessagingSupportedMessageComponent>();
6000          this.supportedMessage.add(t);
6001          return t;
6002        }
6003
6004        public CapabilityStatementMessagingComponent addSupportedMessage(CapabilityStatementMessagingSupportedMessageComponent t) { //3
6005          if (t == null)
6006            return this;
6007          if (this.supportedMessage == null)
6008            this.supportedMessage = new ArrayList<CapabilityStatementMessagingSupportedMessageComponent>();
6009          this.supportedMessage.add(t);
6010          return this;
6011        }
6012
6013        /**
6014         * @return The first repetition of repeating field {@link #supportedMessage}, creating it if it does not already exist
6015         */
6016        public CapabilityStatementMessagingSupportedMessageComponent getSupportedMessageFirstRep() { 
6017          if (getSupportedMessage().isEmpty()) {
6018            addSupportedMessage();
6019          }
6020          return getSupportedMessage().get(0);
6021        }
6022
6023        /**
6024         * @return {@link #event} (A description of the solution's support for an event at this end-point.)
6025         */
6026        public List<CapabilityStatementMessagingEventComponent> getEvent() { 
6027          if (this.event == null)
6028            this.event = new ArrayList<CapabilityStatementMessagingEventComponent>();
6029          return this.event;
6030        }
6031
6032        /**
6033         * @return Returns a reference to <code>this</code> for easy method chaining
6034         */
6035        public CapabilityStatementMessagingComponent setEvent(List<CapabilityStatementMessagingEventComponent> theEvent) { 
6036          this.event = theEvent;
6037          return this;
6038        }
6039
6040        public boolean hasEvent() { 
6041          if (this.event == null)
6042            return false;
6043          for (CapabilityStatementMessagingEventComponent item : this.event)
6044            if (!item.isEmpty())
6045              return true;
6046          return false;
6047        }
6048
6049        public CapabilityStatementMessagingEventComponent addEvent() { //3
6050          CapabilityStatementMessagingEventComponent t = new CapabilityStatementMessagingEventComponent();
6051          if (this.event == null)
6052            this.event = new ArrayList<CapabilityStatementMessagingEventComponent>();
6053          this.event.add(t);
6054          return t;
6055        }
6056
6057        public CapabilityStatementMessagingComponent addEvent(CapabilityStatementMessagingEventComponent t) { //3
6058          if (t == null)
6059            return this;
6060          if (this.event == null)
6061            this.event = new ArrayList<CapabilityStatementMessagingEventComponent>();
6062          this.event.add(t);
6063          return this;
6064        }
6065
6066        /**
6067         * @return The first repetition of repeating field {@link #event}, creating it if it does not already exist
6068         */
6069        public CapabilityStatementMessagingEventComponent getEventFirstRep() { 
6070          if (getEvent().isEmpty()) {
6071            addEvent();
6072          }
6073          return getEvent().get(0);
6074        }
6075
6076        protected void listChildren(List<Property> children) {
6077          super.listChildren(children);
6078          children.add(new Property("endpoint", "", "An endpoint (network accessible address) to which messages and/or replies are to be sent.", 0, java.lang.Integer.MAX_VALUE, endpoint));
6079          children.add(new Property("reliableCache", "unsignedInt", "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", 0, 1, reliableCache));
6080          children.add(new Property("documentation", "string", "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.", 0, 1, documentation));
6081          children.add(new Property("supportedMessage", "", "References to message definitions for messages this system can send or receive.", 0, java.lang.Integer.MAX_VALUE, supportedMessage));
6082          children.add(new Property("event", "", "A description of the solution's support for an event at this end-point.", 0, java.lang.Integer.MAX_VALUE, event));
6083        }
6084
6085        @Override
6086        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6087          switch (_hash) {
6088          case 1741102485: /*endpoint*/  return new Property("endpoint", "", "An endpoint (network accessible address) to which messages and/or replies are to be sent.", 0, java.lang.Integer.MAX_VALUE, endpoint);
6089          case 897803608: /*reliableCache*/  return new Property("reliableCache", "unsignedInt", "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", 0, 1, reliableCache);
6090          case 1587405498: /*documentation*/  return new Property("documentation", "string", "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.", 0, 1, documentation);
6091          case -1805139079: /*supportedMessage*/  return new Property("supportedMessage", "", "References to message definitions for messages this system can send or receive.", 0, java.lang.Integer.MAX_VALUE, supportedMessage);
6092          case 96891546: /*event*/  return new Property("event", "", "A description of the solution's support for an event at this end-point.", 0, java.lang.Integer.MAX_VALUE, event);
6093          default: return super.getNamedProperty(_hash, _name, _checkValid);
6094          }
6095
6096        }
6097
6098      @Override
6099      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6100        switch (hash) {
6101        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // CapabilityStatementMessagingEndpointComponent
6102        case 897803608: /*reliableCache*/ return this.reliableCache == null ? new Base[0] : new Base[] {this.reliableCache}; // UnsignedIntType
6103        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
6104        case -1805139079: /*supportedMessage*/ return this.supportedMessage == null ? new Base[0] : this.supportedMessage.toArray(new Base[this.supportedMessage.size()]); // CapabilityStatementMessagingSupportedMessageComponent
6105        case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CapabilityStatementMessagingEventComponent
6106        default: return super.getProperty(hash, name, checkValid);
6107        }
6108
6109      }
6110
6111      @Override
6112      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6113        switch (hash) {
6114        case 1741102485: // endpoint
6115          this.getEndpoint().add((CapabilityStatementMessagingEndpointComponent) value); // CapabilityStatementMessagingEndpointComponent
6116          return value;
6117        case 897803608: // reliableCache
6118          this.reliableCache = castToUnsignedInt(value); // UnsignedIntType
6119          return value;
6120        case 1587405498: // documentation
6121          this.documentation = castToString(value); // StringType
6122          return value;
6123        case -1805139079: // supportedMessage
6124          this.getSupportedMessage().add((CapabilityStatementMessagingSupportedMessageComponent) value); // CapabilityStatementMessagingSupportedMessageComponent
6125          return value;
6126        case 96891546: // event
6127          this.getEvent().add((CapabilityStatementMessagingEventComponent) value); // CapabilityStatementMessagingEventComponent
6128          return value;
6129        default: return super.setProperty(hash, name, value);
6130        }
6131
6132      }
6133
6134      @Override
6135      public Base setProperty(String name, Base value) throws FHIRException {
6136        if (name.equals("endpoint")) {
6137          this.getEndpoint().add((CapabilityStatementMessagingEndpointComponent) value);
6138        } else if (name.equals("reliableCache")) {
6139          this.reliableCache = castToUnsignedInt(value); // UnsignedIntType
6140        } else if (name.equals("documentation")) {
6141          this.documentation = castToString(value); // StringType
6142        } else if (name.equals("supportedMessage")) {
6143          this.getSupportedMessage().add((CapabilityStatementMessagingSupportedMessageComponent) value);
6144        } else if (name.equals("event")) {
6145          this.getEvent().add((CapabilityStatementMessagingEventComponent) value);
6146        } else
6147          return super.setProperty(name, value);
6148        return value;
6149      }
6150
6151      @Override
6152      public Base makeProperty(int hash, String name) throws FHIRException {
6153        switch (hash) {
6154        case 1741102485:  return addEndpoint(); 
6155        case 897803608:  return getReliableCacheElement();
6156        case 1587405498:  return getDocumentationElement();
6157        case -1805139079:  return addSupportedMessage(); 
6158        case 96891546:  return addEvent(); 
6159        default: return super.makeProperty(hash, name);
6160        }
6161
6162      }
6163
6164      @Override
6165      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6166        switch (hash) {
6167        case 1741102485: /*endpoint*/ return new String[] {};
6168        case 897803608: /*reliableCache*/ return new String[] {"unsignedInt"};
6169        case 1587405498: /*documentation*/ return new String[] {"string"};
6170        case -1805139079: /*supportedMessage*/ return new String[] {};
6171        case 96891546: /*event*/ return new String[] {};
6172        default: return super.getTypesForProperty(hash, name);
6173        }
6174
6175      }
6176
6177      @Override
6178      public Base addChild(String name) throws FHIRException {
6179        if (name.equals("endpoint")) {
6180          return addEndpoint();
6181        }
6182        else if (name.equals("reliableCache")) {
6183          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.reliableCache");
6184        }
6185        else if (name.equals("documentation")) {
6186          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
6187        }
6188        else if (name.equals("supportedMessage")) {
6189          return addSupportedMessage();
6190        }
6191        else if (name.equals("event")) {
6192          return addEvent();
6193        }
6194        else
6195          return super.addChild(name);
6196      }
6197
6198      public CapabilityStatementMessagingComponent copy() {
6199        CapabilityStatementMessagingComponent dst = new CapabilityStatementMessagingComponent();
6200        copyValues(dst);
6201        if (endpoint != null) {
6202          dst.endpoint = new ArrayList<CapabilityStatementMessagingEndpointComponent>();
6203          for (CapabilityStatementMessagingEndpointComponent i : endpoint)
6204            dst.endpoint.add(i.copy());
6205        };
6206        dst.reliableCache = reliableCache == null ? null : reliableCache.copy();
6207        dst.documentation = documentation == null ? null : documentation.copy();
6208        if (supportedMessage != null) {
6209          dst.supportedMessage = new ArrayList<CapabilityStatementMessagingSupportedMessageComponent>();
6210          for (CapabilityStatementMessagingSupportedMessageComponent i : supportedMessage)
6211            dst.supportedMessage.add(i.copy());
6212        };
6213        if (event != null) {
6214          dst.event = new ArrayList<CapabilityStatementMessagingEventComponent>();
6215          for (CapabilityStatementMessagingEventComponent i : event)
6216            dst.event.add(i.copy());
6217        };
6218        return dst;
6219      }
6220
6221      @Override
6222      public boolean equalsDeep(Base other_) {
6223        if (!super.equalsDeep(other_))
6224          return false;
6225        if (!(other_ instanceof CapabilityStatementMessagingComponent))
6226          return false;
6227        CapabilityStatementMessagingComponent o = (CapabilityStatementMessagingComponent) other_;
6228        return compareDeep(endpoint, o.endpoint, true) && compareDeep(reliableCache, o.reliableCache, true)
6229           && compareDeep(documentation, o.documentation, true) && compareDeep(supportedMessage, o.supportedMessage, true)
6230           && compareDeep(event, o.event, true);
6231      }
6232
6233      @Override
6234      public boolean equalsShallow(Base other_) {
6235        if (!super.equalsShallow(other_))
6236          return false;
6237        if (!(other_ instanceof CapabilityStatementMessagingComponent))
6238          return false;
6239        CapabilityStatementMessagingComponent o = (CapabilityStatementMessagingComponent) other_;
6240        return compareValues(reliableCache, o.reliableCache, true) && compareValues(documentation, o.documentation, true)
6241          ;
6242      }
6243
6244      public boolean isEmpty() {
6245        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(endpoint, reliableCache, documentation
6246          , supportedMessage, event);
6247      }
6248
6249  public String fhirType() {
6250    return "CapabilityStatement.messaging";
6251
6252  }
6253
6254  }
6255
6256    @Block()
6257    public static class CapabilityStatementMessagingEndpointComponent extends BackboneElement implements IBaseBackboneElement {
6258        /**
6259         * A list of the messaging transport protocol(s) identifiers, supported by this endpoint.
6260         */
6261        @Child(name = "protocol", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false)
6262        @Description(shortDefinition="http | ftp | mllp +", formalDefinition="A list of the messaging transport protocol(s) identifiers, supported by this endpoint." )
6263        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-transport")
6264        protected Coding protocol;
6265
6266        /**
6267         * The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.
6268         */
6269        @Child(name = "address", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false)
6270        @Description(shortDefinition="Network address or identifier of the end-point", formalDefinition="The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier." )
6271        protected UriType address;
6272
6273        private static final long serialVersionUID = 1294656428L;
6274
6275    /**
6276     * Constructor
6277     */
6278      public CapabilityStatementMessagingEndpointComponent() {
6279        super();
6280      }
6281
6282    /**
6283     * Constructor
6284     */
6285      public CapabilityStatementMessagingEndpointComponent(Coding protocol, UriType address) {
6286        super();
6287        this.protocol = protocol;
6288        this.address = address;
6289      }
6290
6291        /**
6292         * @return {@link #protocol} (A list of the messaging transport protocol(s) identifiers, supported by this endpoint.)
6293         */
6294        public Coding getProtocol() { 
6295          if (this.protocol == null)
6296            if (Configuration.errorOnAutoCreate())
6297              throw new Error("Attempt to auto-create CapabilityStatementMessagingEndpointComponent.protocol");
6298            else if (Configuration.doAutoCreate())
6299              this.protocol = new Coding(); // cc
6300          return this.protocol;
6301        }
6302
6303        public boolean hasProtocol() { 
6304          return this.protocol != null && !this.protocol.isEmpty();
6305        }
6306
6307        /**
6308         * @param value {@link #protocol} (A list of the messaging transport protocol(s) identifiers, supported by this endpoint.)
6309         */
6310        public CapabilityStatementMessagingEndpointComponent setProtocol(Coding value)  { 
6311          this.protocol = value;
6312          return this;
6313        }
6314
6315        /**
6316         * @return {@link #address} (The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value
6317         */
6318        public UriType getAddressElement() { 
6319          if (this.address == null)
6320            if (Configuration.errorOnAutoCreate())
6321              throw new Error("Attempt to auto-create CapabilityStatementMessagingEndpointComponent.address");
6322            else if (Configuration.doAutoCreate())
6323              this.address = new UriType(); // bb
6324          return this.address;
6325        }
6326
6327        public boolean hasAddressElement() { 
6328          return this.address != null && !this.address.isEmpty();
6329        }
6330
6331        public boolean hasAddress() { 
6332          return this.address != null && !this.address.isEmpty();
6333        }
6334
6335        /**
6336         * @param value {@link #address} (The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value
6337         */
6338        public CapabilityStatementMessagingEndpointComponent setAddressElement(UriType value) { 
6339          this.address = value;
6340          return this;
6341        }
6342
6343        /**
6344         * @return The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.
6345         */
6346        public String getAddress() { 
6347          return this.address == null ? null : this.address.getValue();
6348        }
6349
6350        /**
6351         * @param value The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.
6352         */
6353        public CapabilityStatementMessagingEndpointComponent setAddress(String value) { 
6354            if (this.address == null)
6355              this.address = new UriType();
6356            this.address.setValue(value);
6357          return this;
6358        }
6359
6360        protected void listChildren(List<Property> children) {
6361          super.listChildren(children);
6362          children.add(new Property("protocol", "Coding", "A list of the messaging transport protocol(s) identifiers, supported by this endpoint.", 0, 1, protocol));
6363          children.add(new Property("address", "uri", "The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.", 0, 1, address));
6364        }
6365
6366        @Override
6367        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6368          switch (_hash) {
6369          case -989163880: /*protocol*/  return new Property("protocol", "Coding", "A list of the messaging transport protocol(s) identifiers, supported by this endpoint.", 0, 1, protocol);
6370          case -1147692044: /*address*/  return new Property("address", "uri", "The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.", 0, 1, address);
6371          default: return super.getNamedProperty(_hash, _name, _checkValid);
6372          }
6373
6374        }
6375
6376      @Override
6377      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6378        switch (hash) {
6379        case -989163880: /*protocol*/ return this.protocol == null ? new Base[0] : new Base[] {this.protocol}; // Coding
6380        case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // UriType
6381        default: return super.getProperty(hash, name, checkValid);
6382        }
6383
6384      }
6385
6386      @Override
6387      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6388        switch (hash) {
6389        case -989163880: // protocol
6390          this.protocol = castToCoding(value); // Coding
6391          return value;
6392        case -1147692044: // address
6393          this.address = castToUri(value); // UriType
6394          return value;
6395        default: return super.setProperty(hash, name, value);
6396        }
6397
6398      }
6399
6400      @Override
6401      public Base setProperty(String name, Base value) throws FHIRException {
6402        if (name.equals("protocol")) {
6403          this.protocol = castToCoding(value); // Coding
6404        } else if (name.equals("address")) {
6405          this.address = castToUri(value); // UriType
6406        } else
6407          return super.setProperty(name, value);
6408        return value;
6409      }
6410
6411      @Override
6412      public Base makeProperty(int hash, String name) throws FHIRException {
6413        switch (hash) {
6414        case -989163880:  return getProtocol(); 
6415        case -1147692044:  return getAddressElement();
6416        default: return super.makeProperty(hash, name);
6417        }
6418
6419      }
6420
6421      @Override
6422      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6423        switch (hash) {
6424        case -989163880: /*protocol*/ return new String[] {"Coding"};
6425        case -1147692044: /*address*/ return new String[] {"uri"};
6426        default: return super.getTypesForProperty(hash, name);
6427        }
6428
6429      }
6430
6431      @Override
6432      public Base addChild(String name) throws FHIRException {
6433        if (name.equals("protocol")) {
6434          this.protocol = new Coding();
6435          return this.protocol;
6436        }
6437        else if (name.equals("address")) {
6438          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.address");
6439        }
6440        else
6441          return super.addChild(name);
6442      }
6443
6444      public CapabilityStatementMessagingEndpointComponent copy() {
6445        CapabilityStatementMessagingEndpointComponent dst = new CapabilityStatementMessagingEndpointComponent();
6446        copyValues(dst);
6447        dst.protocol = protocol == null ? null : protocol.copy();
6448        dst.address = address == null ? null : address.copy();
6449        return dst;
6450      }
6451
6452      @Override
6453      public boolean equalsDeep(Base other_) {
6454        if (!super.equalsDeep(other_))
6455          return false;
6456        if (!(other_ instanceof CapabilityStatementMessagingEndpointComponent))
6457          return false;
6458        CapabilityStatementMessagingEndpointComponent o = (CapabilityStatementMessagingEndpointComponent) other_;
6459        return compareDeep(protocol, o.protocol, true) && compareDeep(address, o.address, true);
6460      }
6461
6462      @Override
6463      public boolean equalsShallow(Base other_) {
6464        if (!super.equalsShallow(other_))
6465          return false;
6466        if (!(other_ instanceof CapabilityStatementMessagingEndpointComponent))
6467          return false;
6468        CapabilityStatementMessagingEndpointComponent o = (CapabilityStatementMessagingEndpointComponent) other_;
6469        return compareValues(address, o.address, true);
6470      }
6471
6472      public boolean isEmpty() {
6473        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(protocol, address);
6474      }
6475
6476  public String fhirType() {
6477    return "CapabilityStatement.messaging.endpoint";
6478
6479  }
6480
6481  }
6482
6483    @Block()
6484    public static class CapabilityStatementMessagingSupportedMessageComponent extends BackboneElement implements IBaseBackboneElement {
6485        /**
6486         * The mode of this event declaration - whether application is sender or receiver.
6487         */
6488        @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
6489        @Description(shortDefinition="sender | receiver", formalDefinition="The mode of this event declaration - whether application is sender or receiver." )
6490        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/event-capability-mode")
6491        protected Enumeration<EventCapabilityMode> mode;
6492
6493        /**
6494         * Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.
6495         */
6496        @Child(name = "definition", type = {MessageDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true)
6497        @Description(shortDefinition="Message supported by this system", formalDefinition="Points to a message definition that identifies the messaging event, message structure, allowed responses, etc." )
6498        protected Reference definition;
6499
6500        /**
6501         * The actual object that is the target of the reference (Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.)
6502         */
6503        protected MessageDefinition definitionTarget;
6504
6505        private static final long serialVersionUID = -741523869L;
6506
6507    /**
6508     * Constructor
6509     */
6510      public CapabilityStatementMessagingSupportedMessageComponent() {
6511        super();
6512      }
6513
6514    /**
6515     * Constructor
6516     */
6517      public CapabilityStatementMessagingSupportedMessageComponent(Enumeration<EventCapabilityMode> mode, Reference definition) {
6518        super();
6519        this.mode = mode;
6520        this.definition = definition;
6521      }
6522
6523        /**
6524         * @return {@link #mode} (The mode of this event declaration - whether application is sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
6525         */
6526        public Enumeration<EventCapabilityMode> getModeElement() { 
6527          if (this.mode == null)
6528            if (Configuration.errorOnAutoCreate())
6529              throw new Error("Attempt to auto-create CapabilityStatementMessagingSupportedMessageComponent.mode");
6530            else if (Configuration.doAutoCreate())
6531              this.mode = new Enumeration<EventCapabilityMode>(new EventCapabilityModeEnumFactory()); // bb
6532          return this.mode;
6533        }
6534
6535        public boolean hasModeElement() { 
6536          return this.mode != null && !this.mode.isEmpty();
6537        }
6538
6539        public boolean hasMode() { 
6540          return this.mode != null && !this.mode.isEmpty();
6541        }
6542
6543        /**
6544         * @param value {@link #mode} (The mode of this event declaration - whether application is sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
6545         */
6546        public CapabilityStatementMessagingSupportedMessageComponent setModeElement(Enumeration<EventCapabilityMode> value) { 
6547          this.mode = value;
6548          return this;
6549        }
6550
6551        /**
6552         * @return The mode of this event declaration - whether application is sender or receiver.
6553         */
6554        public EventCapabilityMode getMode() { 
6555          return this.mode == null ? null : this.mode.getValue();
6556        }
6557
6558        /**
6559         * @param value The mode of this event declaration - whether application is sender or receiver.
6560         */
6561        public CapabilityStatementMessagingSupportedMessageComponent setMode(EventCapabilityMode value) { 
6562            if (this.mode == null)
6563              this.mode = new Enumeration<EventCapabilityMode>(new EventCapabilityModeEnumFactory());
6564            this.mode.setValue(value);
6565          return this;
6566        }
6567
6568        /**
6569         * @return {@link #definition} (Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.)
6570         */
6571        public Reference getDefinition() { 
6572          if (this.definition == null)
6573            if (Configuration.errorOnAutoCreate())
6574              throw new Error("Attempt to auto-create CapabilityStatementMessagingSupportedMessageComponent.definition");
6575            else if (Configuration.doAutoCreate())
6576              this.definition = new Reference(); // cc
6577          return this.definition;
6578        }
6579
6580        public boolean hasDefinition() { 
6581          return this.definition != null && !this.definition.isEmpty();
6582        }
6583
6584        /**
6585         * @param value {@link #definition} (Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.)
6586         */
6587        public CapabilityStatementMessagingSupportedMessageComponent setDefinition(Reference value)  { 
6588          this.definition = value;
6589          return this;
6590        }
6591
6592        /**
6593         * @return {@link #definition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.)
6594         */
6595        public MessageDefinition getDefinitionTarget() { 
6596          if (this.definitionTarget == null)
6597            if (Configuration.errorOnAutoCreate())
6598              throw new Error("Attempt to auto-create CapabilityStatementMessagingSupportedMessageComponent.definition");
6599            else if (Configuration.doAutoCreate())
6600              this.definitionTarget = new MessageDefinition(); // aa
6601          return this.definitionTarget;
6602        }
6603
6604        /**
6605         * @param value {@link #definition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.)
6606         */
6607        public CapabilityStatementMessagingSupportedMessageComponent setDefinitionTarget(MessageDefinition value) { 
6608          this.definitionTarget = value;
6609          return this;
6610        }
6611
6612        protected void listChildren(List<Property> children) {
6613          super.listChildren(children);
6614          children.add(new Property("mode", "code", "The mode of this event declaration - whether application is sender or receiver.", 0, 1, mode));
6615          children.add(new Property("definition", "Reference(MessageDefinition)", "Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.", 0, 1, definition));
6616        }
6617
6618        @Override
6619        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6620          switch (_hash) {
6621          case 3357091: /*mode*/  return new Property("mode", "code", "The mode of this event declaration - whether application is sender or receiver.", 0, 1, mode);
6622          case -1014418093: /*definition*/  return new Property("definition", "Reference(MessageDefinition)", "Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.", 0, 1, definition);
6623          default: return super.getNamedProperty(_hash, _name, _checkValid);
6624          }
6625
6626        }
6627
6628      @Override
6629      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6630        switch (hash) {
6631        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<EventCapabilityMode>
6632        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Reference
6633        default: return super.getProperty(hash, name, checkValid);
6634        }
6635
6636      }
6637
6638      @Override
6639      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6640        switch (hash) {
6641        case 3357091: // mode
6642          value = new EventCapabilityModeEnumFactory().fromType(castToCode(value));
6643          this.mode = (Enumeration) value; // Enumeration<EventCapabilityMode>
6644          return value;
6645        case -1014418093: // definition
6646          this.definition = castToReference(value); // Reference
6647          return value;
6648        default: return super.setProperty(hash, name, value);
6649        }
6650
6651      }
6652
6653      @Override
6654      public Base setProperty(String name, Base value) throws FHIRException {
6655        if (name.equals("mode")) {
6656          value = new EventCapabilityModeEnumFactory().fromType(castToCode(value));
6657          this.mode = (Enumeration) value; // Enumeration<EventCapabilityMode>
6658        } else if (name.equals("definition")) {
6659          this.definition = castToReference(value); // Reference
6660        } else
6661          return super.setProperty(name, value);
6662        return value;
6663      }
6664
6665      @Override
6666      public Base makeProperty(int hash, String name) throws FHIRException {
6667        switch (hash) {
6668        case 3357091:  return getModeElement();
6669        case -1014418093:  return getDefinition(); 
6670        default: return super.makeProperty(hash, name);
6671        }
6672
6673      }
6674
6675      @Override
6676      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6677        switch (hash) {
6678        case 3357091: /*mode*/ return new String[] {"code"};
6679        case -1014418093: /*definition*/ return new String[] {"Reference"};
6680        default: return super.getTypesForProperty(hash, name);
6681        }
6682
6683      }
6684
6685      @Override
6686      public Base addChild(String name) throws FHIRException {
6687        if (name.equals("mode")) {
6688          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.mode");
6689        }
6690        else if (name.equals("definition")) {
6691          this.definition = new Reference();
6692          return this.definition;
6693        }
6694        else
6695          return super.addChild(name);
6696      }
6697
6698      public CapabilityStatementMessagingSupportedMessageComponent copy() {
6699        CapabilityStatementMessagingSupportedMessageComponent dst = new CapabilityStatementMessagingSupportedMessageComponent();
6700        copyValues(dst);
6701        dst.mode = mode == null ? null : mode.copy();
6702        dst.definition = definition == null ? null : definition.copy();
6703        return dst;
6704      }
6705
6706      @Override
6707      public boolean equalsDeep(Base other_) {
6708        if (!super.equalsDeep(other_))
6709          return false;
6710        if (!(other_ instanceof CapabilityStatementMessagingSupportedMessageComponent))
6711          return false;
6712        CapabilityStatementMessagingSupportedMessageComponent o = (CapabilityStatementMessagingSupportedMessageComponent) other_;
6713        return compareDeep(mode, o.mode, true) && compareDeep(definition, o.definition, true);
6714      }
6715
6716      @Override
6717      public boolean equalsShallow(Base other_) {
6718        if (!super.equalsShallow(other_))
6719          return false;
6720        if (!(other_ instanceof CapabilityStatementMessagingSupportedMessageComponent))
6721          return false;
6722        CapabilityStatementMessagingSupportedMessageComponent o = (CapabilityStatementMessagingSupportedMessageComponent) other_;
6723        return compareValues(mode, o.mode, true);
6724      }
6725
6726      public boolean isEmpty() {
6727        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, definition);
6728      }
6729
6730  public String fhirType() {
6731    return "CapabilityStatement.messaging.supportedMessage";
6732
6733  }
6734
6735  }
6736
6737    @Block()
6738    public static class CapabilityStatementMessagingEventComponent extends BackboneElement implements IBaseBackboneElement {
6739        /**
6740         * A coded identifier of a supported messaging event.
6741         */
6742        @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true)
6743        @Description(shortDefinition="Event type", formalDefinition="A coded identifier of a supported messaging event." )
6744        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-events")
6745        protected Coding code;
6746
6747        /**
6748         * The impact of the content of the message.
6749         */
6750        @Child(name = "category", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
6751        @Description(shortDefinition="Consequence | Currency | Notification", formalDefinition="The impact of the content of the message." )
6752        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-significance-category")
6753        protected Enumeration<MessageSignificanceCategory> category;
6754
6755        /**
6756         * The mode of this event declaration - whether an application is a sender or receiver.
6757         */
6758        @Child(name = "mode", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false)
6759        @Description(shortDefinition="sender | receiver", formalDefinition="The mode of this event declaration - whether an application is a sender or receiver." )
6760        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/event-capability-mode")
6761        protected Enumeration<EventCapabilityMode> mode;
6762
6763        /**
6764         * A resource associated with the event.  This is the resource that defines the event.
6765         */
6766        @Child(name = "focus", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false)
6767        @Description(shortDefinition="Resource that's focus of message", formalDefinition="A resource associated with the event.  This is the resource that defines the event." )
6768        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
6769        protected CodeType focus;
6770
6771        /**
6772         * Information about the request for this event.
6773         */
6774        @Child(name = "request", type = {StructureDefinition.class}, order=5, min=1, max=1, modifier=false, summary=true)
6775        @Description(shortDefinition="Profile that describes the request", formalDefinition="Information about the request for this event." )
6776        protected Reference request;
6777
6778        /**
6779         * The actual object that is the target of the reference (Information about the request for this event.)
6780         */
6781        protected StructureDefinition requestTarget;
6782
6783        /**
6784         * Information about the response for this event.
6785         */
6786        @Child(name = "response", type = {StructureDefinition.class}, order=6, min=1, max=1, modifier=false, summary=true)
6787        @Description(shortDefinition="Profile that describes the response", formalDefinition="Information about the response for this event." )
6788        protected Reference response;
6789
6790        /**
6791         * The actual object that is the target of the reference (Information about the response for this event.)
6792         */
6793        protected StructureDefinition responseTarget;
6794
6795        /**
6796         * Guidance on how this event is handled, such as internal system trigger points, business rules, etc.
6797         */
6798        @Child(name = "documentation", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
6799        @Description(shortDefinition="Endpoint-specific event documentation", formalDefinition="Guidance on how this event is handled, such as internal system trigger points, business rules, etc." )
6800        protected StringType documentation;
6801
6802        private static final long serialVersionUID = -491306017L;
6803
6804    /**
6805     * Constructor
6806     */
6807      public CapabilityStatementMessagingEventComponent() {
6808        super();
6809      }
6810
6811    /**
6812     * Constructor
6813     */
6814      public CapabilityStatementMessagingEventComponent(Coding code, Enumeration<EventCapabilityMode> mode, CodeType focus, Reference request, Reference response) {
6815        super();
6816        this.code = code;
6817        this.mode = mode;
6818        this.focus = focus;
6819        this.request = request;
6820        this.response = response;
6821      }
6822
6823        /**
6824         * @return {@link #code} (A coded identifier of a supported messaging event.)
6825         */
6826        public Coding getCode() { 
6827          if (this.code == null)
6828            if (Configuration.errorOnAutoCreate())
6829              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.code");
6830            else if (Configuration.doAutoCreate())
6831              this.code = new Coding(); // cc
6832          return this.code;
6833        }
6834
6835        public boolean hasCode() { 
6836          return this.code != null && !this.code.isEmpty();
6837        }
6838
6839        /**
6840         * @param value {@link #code} (A coded identifier of a supported messaging event.)
6841         */
6842        public CapabilityStatementMessagingEventComponent setCode(Coding value)  { 
6843          this.code = value;
6844          return this;
6845        }
6846
6847        /**
6848         * @return {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value
6849         */
6850        public Enumeration<MessageSignificanceCategory> getCategoryElement() { 
6851          if (this.category == null)
6852            if (Configuration.errorOnAutoCreate())
6853              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.category");
6854            else if (Configuration.doAutoCreate())
6855              this.category = new Enumeration<MessageSignificanceCategory>(new MessageSignificanceCategoryEnumFactory()); // bb
6856          return this.category;
6857        }
6858
6859        public boolean hasCategoryElement() { 
6860          return this.category != null && !this.category.isEmpty();
6861        }
6862
6863        public boolean hasCategory() { 
6864          return this.category != null && !this.category.isEmpty();
6865        }
6866
6867        /**
6868         * @param value {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value
6869         */
6870        public CapabilityStatementMessagingEventComponent setCategoryElement(Enumeration<MessageSignificanceCategory> value) { 
6871          this.category = value;
6872          return this;
6873        }
6874
6875        /**
6876         * @return The impact of the content of the message.
6877         */
6878        public MessageSignificanceCategory getCategory() { 
6879          return this.category == null ? null : this.category.getValue();
6880        }
6881
6882        /**
6883         * @param value The impact of the content of the message.
6884         */
6885        public CapabilityStatementMessagingEventComponent setCategory(MessageSignificanceCategory value) { 
6886          if (value == null)
6887            this.category = null;
6888          else {
6889            if (this.category == null)
6890              this.category = new Enumeration<MessageSignificanceCategory>(new MessageSignificanceCategoryEnumFactory());
6891            this.category.setValue(value);
6892          }
6893          return this;
6894        }
6895
6896        /**
6897         * @return {@link #mode} (The mode of this event declaration - whether an application is a sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
6898         */
6899        public Enumeration<EventCapabilityMode> getModeElement() { 
6900          if (this.mode == null)
6901            if (Configuration.errorOnAutoCreate())
6902              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.mode");
6903            else if (Configuration.doAutoCreate())
6904              this.mode = new Enumeration<EventCapabilityMode>(new EventCapabilityModeEnumFactory()); // bb
6905          return this.mode;
6906        }
6907
6908        public boolean hasModeElement() { 
6909          return this.mode != null && !this.mode.isEmpty();
6910        }
6911
6912        public boolean hasMode() { 
6913          return this.mode != null && !this.mode.isEmpty();
6914        }
6915
6916        /**
6917         * @param value {@link #mode} (The mode of this event declaration - whether an application is a sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
6918         */
6919        public CapabilityStatementMessagingEventComponent setModeElement(Enumeration<EventCapabilityMode> value) { 
6920          this.mode = value;
6921          return this;
6922        }
6923
6924        /**
6925         * @return The mode of this event declaration - whether an application is a sender or receiver.
6926         */
6927        public EventCapabilityMode getMode() { 
6928          return this.mode == null ? null : this.mode.getValue();
6929        }
6930
6931        /**
6932         * @param value The mode of this event declaration - whether an application is a sender or receiver.
6933         */
6934        public CapabilityStatementMessagingEventComponent setMode(EventCapabilityMode value) { 
6935            if (this.mode == null)
6936              this.mode = new Enumeration<EventCapabilityMode>(new EventCapabilityModeEnumFactory());
6937            this.mode.setValue(value);
6938          return this;
6939        }
6940
6941        /**
6942         * @return {@link #focus} (A resource associated with the event.  This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value
6943         */
6944        public CodeType getFocusElement() { 
6945          if (this.focus == null)
6946            if (Configuration.errorOnAutoCreate())
6947              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.focus");
6948            else if (Configuration.doAutoCreate())
6949              this.focus = new CodeType(); // bb
6950          return this.focus;
6951        }
6952
6953        public boolean hasFocusElement() { 
6954          return this.focus != null && !this.focus.isEmpty();
6955        }
6956
6957        public boolean hasFocus() { 
6958          return this.focus != null && !this.focus.isEmpty();
6959        }
6960
6961        /**
6962         * @param value {@link #focus} (A resource associated with the event.  This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value
6963         */
6964        public CapabilityStatementMessagingEventComponent setFocusElement(CodeType value) { 
6965          this.focus = value;
6966          return this;
6967        }
6968
6969        /**
6970         * @return A resource associated with the event.  This is the resource that defines the event.
6971         */
6972        public String getFocus() { 
6973          return this.focus == null ? null : this.focus.getValue();
6974        }
6975
6976        /**
6977         * @param value A resource associated with the event.  This is the resource that defines the event.
6978         */
6979        public CapabilityStatementMessagingEventComponent setFocus(String value) { 
6980            if (this.focus == null)
6981              this.focus = new CodeType();
6982            this.focus.setValue(value);
6983          return this;
6984        }
6985
6986        /**
6987         * @return {@link #request} (Information about the request for this event.)
6988         */
6989        public Reference getRequest() { 
6990          if (this.request == null)
6991            if (Configuration.errorOnAutoCreate())
6992              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.request");
6993            else if (Configuration.doAutoCreate())
6994              this.request = new Reference(); // cc
6995          return this.request;
6996        }
6997
6998        public boolean hasRequest() { 
6999          return this.request != null && !this.request.isEmpty();
7000        }
7001
7002        /**
7003         * @param value {@link #request} (Information about the request for this event.)
7004         */
7005        public CapabilityStatementMessagingEventComponent setRequest(Reference value)  { 
7006          this.request = value;
7007          return this;
7008        }
7009
7010        /**
7011         * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the request for this event.)
7012         */
7013        public StructureDefinition getRequestTarget() { 
7014          if (this.requestTarget == null)
7015            if (Configuration.errorOnAutoCreate())
7016              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.request");
7017            else if (Configuration.doAutoCreate())
7018              this.requestTarget = new StructureDefinition(); // aa
7019          return this.requestTarget;
7020        }
7021
7022        /**
7023         * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the request for this event.)
7024         */
7025        public CapabilityStatementMessagingEventComponent setRequestTarget(StructureDefinition value) { 
7026          this.requestTarget = value;
7027          return this;
7028        }
7029
7030        /**
7031         * @return {@link #response} (Information about the response for this event.)
7032         */
7033        public Reference getResponse() { 
7034          if (this.response == null)
7035            if (Configuration.errorOnAutoCreate())
7036              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.response");
7037            else if (Configuration.doAutoCreate())
7038              this.response = new Reference(); // cc
7039          return this.response;
7040        }
7041
7042        public boolean hasResponse() { 
7043          return this.response != null && !this.response.isEmpty();
7044        }
7045
7046        /**
7047         * @param value {@link #response} (Information about the response for this event.)
7048         */
7049        public CapabilityStatementMessagingEventComponent setResponse(Reference value)  { 
7050          this.response = value;
7051          return this;
7052        }
7053
7054        /**
7055         * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the response for this event.)
7056         */
7057        public StructureDefinition getResponseTarget() { 
7058          if (this.responseTarget == null)
7059            if (Configuration.errorOnAutoCreate())
7060              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.response");
7061            else if (Configuration.doAutoCreate())
7062              this.responseTarget = new StructureDefinition(); // aa
7063          return this.responseTarget;
7064        }
7065
7066        /**
7067         * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the response for this event.)
7068         */
7069        public CapabilityStatementMessagingEventComponent setResponseTarget(StructureDefinition value) { 
7070          this.responseTarget = value;
7071          return this;
7072        }
7073
7074        /**
7075         * @return {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
7076         */
7077        public StringType getDocumentationElement() { 
7078          if (this.documentation == null)
7079            if (Configuration.errorOnAutoCreate())
7080              throw new Error("Attempt to auto-create CapabilityStatementMessagingEventComponent.documentation");
7081            else if (Configuration.doAutoCreate())
7082              this.documentation = new StringType(); // bb
7083          return this.documentation;
7084        }
7085
7086        public boolean hasDocumentationElement() { 
7087          return this.documentation != null && !this.documentation.isEmpty();
7088        }
7089
7090        public boolean hasDocumentation() { 
7091          return this.documentation != null && !this.documentation.isEmpty();
7092        }
7093
7094        /**
7095         * @param value {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
7096         */
7097        public CapabilityStatementMessagingEventComponent setDocumentationElement(StringType value) { 
7098          this.documentation = value;
7099          return this;
7100        }
7101
7102        /**
7103         * @return Guidance on how this event is handled, such as internal system trigger points, business rules, etc.
7104         */
7105        public String getDocumentation() { 
7106          return this.documentation == null ? null : this.documentation.getValue();
7107        }
7108
7109        /**
7110         * @param value Guidance on how this event is handled, such as internal system trigger points, business rules, etc.
7111         */
7112        public CapabilityStatementMessagingEventComponent setDocumentation(String value) { 
7113          if (Utilities.noString(value))
7114            this.documentation = null;
7115          else {
7116            if (this.documentation == null)
7117              this.documentation = new StringType();
7118            this.documentation.setValue(value);
7119          }
7120          return this;
7121        }
7122
7123        protected void listChildren(List<Property> children) {
7124          super.listChildren(children);
7125          children.add(new Property("code", "Coding", "A coded identifier of a supported messaging event.", 0, 1, code));
7126          children.add(new Property("category", "code", "The impact of the content of the message.", 0, 1, category));
7127          children.add(new Property("mode", "code", "The mode of this event declaration - whether an application is a sender or receiver.", 0, 1, mode));
7128          children.add(new Property("focus", "code", "A resource associated with the event.  This is the resource that defines the event.", 0, 1, focus));
7129          children.add(new Property("request", "Reference(StructureDefinition)", "Information about the request for this event.", 0, 1, request));
7130          children.add(new Property("response", "Reference(StructureDefinition)", "Information about the response for this event.", 0, 1, response));
7131          children.add(new Property("documentation", "string", "Guidance on how this event is handled, such as internal system trigger points, business rules, etc.", 0, 1, documentation));
7132        }
7133
7134        @Override
7135        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7136          switch (_hash) {
7137          case 3059181: /*code*/  return new Property("code", "Coding", "A coded identifier of a supported messaging event.", 0, 1, code);
7138          case 50511102: /*category*/  return new Property("category", "code", "The impact of the content of the message.", 0, 1, category);
7139          case 3357091: /*mode*/  return new Property("mode", "code", "The mode of this event declaration - whether an application is a sender or receiver.", 0, 1, mode);
7140          case 97604824: /*focus*/  return new Property("focus", "code", "A resource associated with the event.  This is the resource that defines the event.", 0, 1, focus);
7141          case 1095692943: /*request*/  return new Property("request", "Reference(StructureDefinition)", "Information about the request for this event.", 0, 1, request);
7142          case -340323263: /*response*/  return new Property("response", "Reference(StructureDefinition)", "Information about the response for this event.", 0, 1, response);
7143          case 1587405498: /*documentation*/  return new Property("documentation", "string", "Guidance on how this event is handled, such as internal system trigger points, business rules, etc.", 0, 1, documentation);
7144          default: return super.getNamedProperty(_hash, _name, _checkValid);
7145          }
7146
7147        }
7148
7149      @Override
7150      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7151        switch (hash) {
7152        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Coding
7153        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Enumeration<MessageSignificanceCategory>
7154        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<EventCapabilityMode>
7155        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // CodeType
7156        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference
7157        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Reference
7158        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
7159        default: return super.getProperty(hash, name, checkValid);
7160        }
7161
7162      }
7163
7164      @Override
7165      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7166        switch (hash) {
7167        case 3059181: // code
7168          this.code = castToCoding(value); // Coding
7169          return value;
7170        case 50511102: // category
7171          value = new MessageSignificanceCategoryEnumFactory().fromType(castToCode(value));
7172          this.category = (Enumeration) value; // Enumeration<MessageSignificanceCategory>
7173          return value;
7174        case 3357091: // mode
7175          value = new EventCapabilityModeEnumFactory().fromType(castToCode(value));
7176          this.mode = (Enumeration) value; // Enumeration<EventCapabilityMode>
7177          return value;
7178        case 97604824: // focus
7179          this.focus = castToCode(value); // CodeType
7180          return value;
7181        case 1095692943: // request
7182          this.request = castToReference(value); // Reference
7183          return value;
7184        case -340323263: // response
7185          this.response = castToReference(value); // Reference
7186          return value;
7187        case 1587405498: // documentation
7188          this.documentation = castToString(value); // StringType
7189          return value;
7190        default: return super.setProperty(hash, name, value);
7191        }
7192
7193      }
7194
7195      @Override
7196      public Base setProperty(String name, Base value) throws FHIRException {
7197        if (name.equals("code")) {
7198          this.code = castToCoding(value); // Coding
7199        } else if (name.equals("category")) {
7200          value = new MessageSignificanceCategoryEnumFactory().fromType(castToCode(value));
7201          this.category = (Enumeration) value; // Enumeration<MessageSignificanceCategory>
7202        } else if (name.equals("mode")) {
7203          value = new EventCapabilityModeEnumFactory().fromType(castToCode(value));
7204          this.mode = (Enumeration) value; // Enumeration<EventCapabilityMode>
7205        } else if (name.equals("focus")) {
7206          this.focus = castToCode(value); // CodeType
7207        } else if (name.equals("request")) {
7208          this.request = castToReference(value); // Reference
7209        } else if (name.equals("response")) {
7210          this.response = castToReference(value); // Reference
7211        } else if (name.equals("documentation")) {
7212          this.documentation = castToString(value); // StringType
7213        } else
7214          return super.setProperty(name, value);
7215        return value;
7216      }
7217
7218      @Override
7219      public Base makeProperty(int hash, String name) throws FHIRException {
7220        switch (hash) {
7221        case 3059181:  return getCode(); 
7222        case 50511102:  return getCategoryElement();
7223        case 3357091:  return getModeElement();
7224        case 97604824:  return getFocusElement();
7225        case 1095692943:  return getRequest(); 
7226        case -340323263:  return getResponse(); 
7227        case 1587405498:  return getDocumentationElement();
7228        default: return super.makeProperty(hash, name);
7229        }
7230
7231      }
7232
7233      @Override
7234      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7235        switch (hash) {
7236        case 3059181: /*code*/ return new String[] {"Coding"};
7237        case 50511102: /*category*/ return new String[] {"code"};
7238        case 3357091: /*mode*/ return new String[] {"code"};
7239        case 97604824: /*focus*/ return new String[] {"code"};
7240        case 1095692943: /*request*/ return new String[] {"Reference"};
7241        case -340323263: /*response*/ return new String[] {"Reference"};
7242        case 1587405498: /*documentation*/ return new String[] {"string"};
7243        default: return super.getTypesForProperty(hash, name);
7244        }
7245
7246      }
7247
7248      @Override
7249      public Base addChild(String name) throws FHIRException {
7250        if (name.equals("code")) {
7251          this.code = new Coding();
7252          return this.code;
7253        }
7254        else if (name.equals("category")) {
7255          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.category");
7256        }
7257        else if (name.equals("mode")) {
7258          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.mode");
7259        }
7260        else if (name.equals("focus")) {
7261          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.focus");
7262        }
7263        else if (name.equals("request")) {
7264          this.request = new Reference();
7265          return this.request;
7266        }
7267        else if (name.equals("response")) {
7268          this.response = new Reference();
7269          return this.response;
7270        }
7271        else if (name.equals("documentation")) {
7272          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
7273        }
7274        else
7275          return super.addChild(name);
7276      }
7277
7278      public CapabilityStatementMessagingEventComponent copy() {
7279        CapabilityStatementMessagingEventComponent dst = new CapabilityStatementMessagingEventComponent();
7280        copyValues(dst);
7281        dst.code = code == null ? null : code.copy();
7282        dst.category = category == null ? null : category.copy();
7283        dst.mode = mode == null ? null : mode.copy();
7284        dst.focus = focus == null ? null : focus.copy();
7285        dst.request = request == null ? null : request.copy();
7286        dst.response = response == null ? null : response.copy();
7287        dst.documentation = documentation == null ? null : documentation.copy();
7288        return dst;
7289      }
7290
7291      @Override
7292      public boolean equalsDeep(Base other_) {
7293        if (!super.equalsDeep(other_))
7294          return false;
7295        if (!(other_ instanceof CapabilityStatementMessagingEventComponent))
7296          return false;
7297        CapabilityStatementMessagingEventComponent o = (CapabilityStatementMessagingEventComponent) other_;
7298        return compareDeep(code, o.code, true) && compareDeep(category, o.category, true) && compareDeep(mode, o.mode, true)
7299           && compareDeep(focus, o.focus, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true)
7300           && compareDeep(documentation, o.documentation, true);
7301      }
7302
7303      @Override
7304      public boolean equalsShallow(Base other_) {
7305        if (!super.equalsShallow(other_))
7306          return false;
7307        if (!(other_ instanceof CapabilityStatementMessagingEventComponent))
7308          return false;
7309        CapabilityStatementMessagingEventComponent o = (CapabilityStatementMessagingEventComponent) other_;
7310        return compareValues(category, o.category, true) && compareValues(mode, o.mode, true) && compareValues(focus, o.focus, true)
7311           && compareValues(documentation, o.documentation, true);
7312      }
7313
7314      public boolean isEmpty() {
7315        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, category, mode, focus
7316          , request, response, documentation);
7317      }
7318
7319  public String fhirType() {
7320    return "CapabilityStatement.messaging.event";
7321
7322  }
7323
7324  }
7325
7326    @Block()
7327    public static class CapabilityStatementDocumentComponent extends BackboneElement implements IBaseBackboneElement {
7328        /**
7329         * Mode of this document declaration - whether an application is a producer or consumer.
7330         */
7331        @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
7332        @Description(shortDefinition="producer | consumer", formalDefinition="Mode of this document declaration - whether an application is a producer or consumer." )
7333        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/document-mode")
7334        protected Enumeration<DocumentMode> mode;
7335
7336        /**
7337         * A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.
7338         */
7339        @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
7340        @Description(shortDefinition="Description of document support", formalDefinition="A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc." )
7341        protected StringType documentation;
7342
7343        /**
7344         * A constraint on a resource used in the document.
7345         */
7346        @Child(name = "profile", type = {StructureDefinition.class}, order=3, min=1, max=1, modifier=false, summary=true)
7347        @Description(shortDefinition="Constraint on a resource used in the document", formalDefinition="A constraint on a resource used in the document." )
7348        protected Reference profile;
7349
7350        /**
7351         * The actual object that is the target of the reference (A constraint on a resource used in the document.)
7352         */
7353        protected StructureDefinition profileTarget;
7354
7355        private static final long serialVersionUID = -1059555053L;
7356
7357    /**
7358     * Constructor
7359     */
7360      public CapabilityStatementDocumentComponent() {
7361        super();
7362      }
7363
7364    /**
7365     * Constructor
7366     */
7367      public CapabilityStatementDocumentComponent(Enumeration<DocumentMode> mode, Reference profile) {
7368        super();
7369        this.mode = mode;
7370        this.profile = profile;
7371      }
7372
7373        /**
7374         * @return {@link #mode} (Mode of this document declaration - whether an application is a producer or consumer.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
7375         */
7376        public Enumeration<DocumentMode> getModeElement() { 
7377          if (this.mode == null)
7378            if (Configuration.errorOnAutoCreate())
7379              throw new Error("Attempt to auto-create CapabilityStatementDocumentComponent.mode");
7380            else if (Configuration.doAutoCreate())
7381              this.mode = new Enumeration<DocumentMode>(new DocumentModeEnumFactory()); // bb
7382          return this.mode;
7383        }
7384
7385        public boolean hasModeElement() { 
7386          return this.mode != null && !this.mode.isEmpty();
7387        }
7388
7389        public boolean hasMode() { 
7390          return this.mode != null && !this.mode.isEmpty();
7391        }
7392
7393        /**
7394         * @param value {@link #mode} (Mode of this document declaration - whether an application is a producer or consumer.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
7395         */
7396        public CapabilityStatementDocumentComponent setModeElement(Enumeration<DocumentMode> value) { 
7397          this.mode = value;
7398          return this;
7399        }
7400
7401        /**
7402         * @return Mode of this document declaration - whether an application is a producer or consumer.
7403         */
7404        public DocumentMode getMode() { 
7405          return this.mode == null ? null : this.mode.getValue();
7406        }
7407
7408        /**
7409         * @param value Mode of this document declaration - whether an application is a producer or consumer.
7410         */
7411        public CapabilityStatementDocumentComponent setMode(DocumentMode value) { 
7412            if (this.mode == null)
7413              this.mode = new Enumeration<DocumentMode>(new DocumentModeEnumFactory());
7414            this.mode.setValue(value);
7415          return this;
7416        }
7417
7418        /**
7419         * @return {@link #documentation} (A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
7420         */
7421        public StringType getDocumentationElement() { 
7422          if (this.documentation == null)
7423            if (Configuration.errorOnAutoCreate())
7424              throw new Error("Attempt to auto-create CapabilityStatementDocumentComponent.documentation");
7425            else if (Configuration.doAutoCreate())
7426              this.documentation = new StringType(); // bb
7427          return this.documentation;
7428        }
7429
7430        public boolean hasDocumentationElement() { 
7431          return this.documentation != null && !this.documentation.isEmpty();
7432        }
7433
7434        public boolean hasDocumentation() { 
7435          return this.documentation != null && !this.documentation.isEmpty();
7436        }
7437
7438        /**
7439         * @param value {@link #documentation} (A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
7440         */
7441        public CapabilityStatementDocumentComponent setDocumentationElement(StringType value) { 
7442          this.documentation = value;
7443          return this;
7444        }
7445
7446        /**
7447         * @return A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.
7448         */
7449        public String getDocumentation() { 
7450          return this.documentation == null ? null : this.documentation.getValue();
7451        }
7452
7453        /**
7454         * @param value A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.
7455         */
7456        public CapabilityStatementDocumentComponent setDocumentation(String value) { 
7457          if (Utilities.noString(value))
7458            this.documentation = null;
7459          else {
7460            if (this.documentation == null)
7461              this.documentation = new StringType();
7462            this.documentation.setValue(value);
7463          }
7464          return this;
7465        }
7466
7467        /**
7468         * @return {@link #profile} (A constraint on a resource used in the document.)
7469         */
7470        public Reference getProfile() { 
7471          if (this.profile == null)
7472            if (Configuration.errorOnAutoCreate())
7473              throw new Error("Attempt to auto-create CapabilityStatementDocumentComponent.profile");
7474            else if (Configuration.doAutoCreate())
7475              this.profile = new Reference(); // cc
7476          return this.profile;
7477        }
7478
7479        public boolean hasProfile() { 
7480          return this.profile != null && !this.profile.isEmpty();
7481        }
7482
7483        /**
7484         * @param value {@link #profile} (A constraint on a resource used in the document.)
7485         */
7486        public CapabilityStatementDocumentComponent setProfile(Reference value)  { 
7487          this.profile = value;
7488          return this;
7489        }
7490
7491        /**
7492         * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.)
7493         */
7494        public StructureDefinition getProfileTarget() { 
7495          if (this.profileTarget == null)
7496            if (Configuration.errorOnAutoCreate())
7497              throw new Error("Attempt to auto-create CapabilityStatementDocumentComponent.profile");
7498            else if (Configuration.doAutoCreate())
7499              this.profileTarget = new StructureDefinition(); // aa
7500          return this.profileTarget;
7501        }
7502
7503        /**
7504         * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.)
7505         */
7506        public CapabilityStatementDocumentComponent setProfileTarget(StructureDefinition value) { 
7507          this.profileTarget = value;
7508          return this;
7509        }
7510
7511        protected void listChildren(List<Property> children) {
7512          super.listChildren(children);
7513          children.add(new Property("mode", "code", "Mode of this document declaration - whether an application is a producer or consumer.", 0, 1, mode));
7514          children.add(new Property("documentation", "string", "A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.", 0, 1, documentation));
7515          children.add(new Property("profile", "Reference(StructureDefinition)", "A constraint on a resource used in the document.", 0, 1, profile));
7516        }
7517
7518        @Override
7519        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7520          switch (_hash) {
7521          case 3357091: /*mode*/  return new Property("mode", "code", "Mode of this document declaration - whether an application is a producer or consumer.", 0, 1, mode);
7522          case 1587405498: /*documentation*/  return new Property("documentation", "string", "A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.", 0, 1, documentation);
7523          case -309425751: /*profile*/  return new Property("profile", "Reference(StructureDefinition)", "A constraint on a resource used in the document.", 0, 1, profile);
7524          default: return super.getNamedProperty(_hash, _name, _checkValid);
7525          }
7526
7527        }
7528
7529      @Override
7530      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7531        switch (hash) {
7532        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<DocumentMode>
7533        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
7534        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
7535        default: return super.getProperty(hash, name, checkValid);
7536        }
7537
7538      }
7539
7540      @Override
7541      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7542        switch (hash) {
7543        case 3357091: // mode
7544          value = new DocumentModeEnumFactory().fromType(castToCode(value));
7545          this.mode = (Enumeration) value; // Enumeration<DocumentMode>
7546          return value;
7547        case 1587405498: // documentation
7548          this.documentation = castToString(value); // StringType
7549          return value;
7550        case -309425751: // profile
7551          this.profile = castToReference(value); // Reference
7552          return value;
7553        default: return super.setProperty(hash, name, value);
7554        }
7555
7556      }
7557
7558      @Override
7559      public Base setProperty(String name, Base value) throws FHIRException {
7560        if (name.equals("mode")) {
7561          value = new DocumentModeEnumFactory().fromType(castToCode(value));
7562          this.mode = (Enumeration) value; // Enumeration<DocumentMode>
7563        } else if (name.equals("documentation")) {
7564          this.documentation = castToString(value); // StringType
7565        } else if (name.equals("profile")) {
7566          this.profile = castToReference(value); // Reference
7567        } else
7568          return super.setProperty(name, value);
7569        return value;
7570      }
7571
7572      @Override
7573      public Base makeProperty(int hash, String name) throws FHIRException {
7574        switch (hash) {
7575        case 3357091:  return getModeElement();
7576        case 1587405498:  return getDocumentationElement();
7577        case -309425751:  return getProfile(); 
7578        default: return super.makeProperty(hash, name);
7579        }
7580
7581      }
7582
7583      @Override
7584      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7585        switch (hash) {
7586        case 3357091: /*mode*/ return new String[] {"code"};
7587        case 1587405498: /*documentation*/ return new String[] {"string"};
7588        case -309425751: /*profile*/ return new String[] {"Reference"};
7589        default: return super.getTypesForProperty(hash, name);
7590        }
7591
7592      }
7593
7594      @Override
7595      public Base addChild(String name) throws FHIRException {
7596        if (name.equals("mode")) {
7597          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.mode");
7598        }
7599        else if (name.equals("documentation")) {
7600          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.documentation");
7601        }
7602        else if (name.equals("profile")) {
7603          this.profile = new Reference();
7604          return this.profile;
7605        }
7606        else
7607          return super.addChild(name);
7608      }
7609
7610      public CapabilityStatementDocumentComponent copy() {
7611        CapabilityStatementDocumentComponent dst = new CapabilityStatementDocumentComponent();
7612        copyValues(dst);
7613        dst.mode = mode == null ? null : mode.copy();
7614        dst.documentation = documentation == null ? null : documentation.copy();
7615        dst.profile = profile == null ? null : profile.copy();
7616        return dst;
7617      }
7618
7619      @Override
7620      public boolean equalsDeep(Base other_) {
7621        if (!super.equalsDeep(other_))
7622          return false;
7623        if (!(other_ instanceof CapabilityStatementDocumentComponent))
7624          return false;
7625        CapabilityStatementDocumentComponent o = (CapabilityStatementDocumentComponent) other_;
7626        return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(profile, o.profile, true)
7627          ;
7628      }
7629
7630      @Override
7631      public boolean equalsShallow(Base other_) {
7632        if (!super.equalsShallow(other_))
7633          return false;
7634        if (!(other_ instanceof CapabilityStatementDocumentComponent))
7635          return false;
7636        CapabilityStatementDocumentComponent o = (CapabilityStatementDocumentComponent) other_;
7637        return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true);
7638      }
7639
7640      public boolean isEmpty() {
7641        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, documentation, profile
7642          );
7643      }
7644
7645  public String fhirType() {
7646    return "CapabilityStatement.document";
7647
7648  }
7649
7650  }
7651
7652    /**
7653     * Explaination of why this capability statement is needed and why it has been designed as it has.
7654     */
7655    @Child(name = "purpose", type = {MarkdownType.class}, order=0, min=0, max=1, modifier=false, summary=false)
7656    @Description(shortDefinition="Why this capability statement is defined", formalDefinition="Explaination of why this capability statement is needed and why it has been designed as it has." )
7657    protected MarkdownType purpose;
7658
7659    /**
7660     * A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.
7661     */
7662    @Child(name = "copyright", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
7663    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement." )
7664    protected MarkdownType copyright;
7665
7666    /**
7667     * 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).
7668     */
7669    @Child(name = "kind", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
7670    @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)." )
7671    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/capability-statement-kind")
7672    protected Enumeration<CapabilityStatementKind> kind;
7673
7674    /**
7675     * Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.
7676     */
7677    @Child(name = "instantiates", type = {UriType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7678    @Description(shortDefinition="Canonical URL of another capability statement this implements", formalDefinition="Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so." )
7679    protected List<UriType> instantiates;
7680
7681    /**
7682     * 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.
7683     */
7684    @Child(name = "software", type = {}, order=4, min=0, max=1, modifier=false, summary=true)
7685    @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." )
7686    protected CapabilityStatementSoftwareComponent software;
7687
7688    /**
7689     * 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.
7690     */
7691    @Child(name = "implementation", type = {}, order=5, min=0, max=1, modifier=false, summary=true)
7692    @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." )
7693    protected CapabilityStatementImplementationComponent implementation;
7694
7695    /**
7696     * The version of the FHIR specification on which this capability statement is based.
7697     */
7698    @Child(name = "fhirVersion", type = {IdType.class}, order=6, min=1, max=1, modifier=false, summary=true)
7699    @Description(shortDefinition="FHIR Version the system uses", formalDefinition="The version of the FHIR specification on which this capability statement is based." )
7700    protected IdType fhirVersion;
7701
7702    /**
7703     * A code that indicates whether the application accepts unknown elements or extensions when reading resources.
7704     */
7705    @Child(name = "acceptUnknown", type = {CodeType.class}, order=7, min=1, max=1, modifier=false, summary=true)
7706    @Description(shortDefinition="no | extensions | elements | both", formalDefinition="A code that indicates whether the application accepts unknown elements or extensions when reading resources." )
7707    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/unknown-content-code")
7708    protected Enumeration<UnknownContentCode> acceptUnknown;
7709
7710    /**
7711     * A list of the formats supported by this implementation using their content types.
7712     */
7713    @Child(name = "format", type = {CodeType.class}, order=8, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7714    @Description(shortDefinition="formats supported (xml | json | ttl | mime type)", formalDefinition="A list of the formats supported by this implementation using their content types." )
7715    protected List<CodeType> format;
7716
7717    /**
7718     * A list of the patch formats supported by this implementation using their content types.
7719     */
7720    @Child(name = "patchFormat", type = {CodeType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7721    @Description(shortDefinition="Patch formats supported", formalDefinition="A list of the patch formats supported by this implementation using their content types." )
7722    protected List<CodeType> patchFormat;
7723
7724    /**
7725     * A list of implementation guides that the server does (or should) support in their entirety.
7726     */
7727    @Child(name = "implementationGuide", type = {UriType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7728    @Description(shortDefinition="Implementation guides supported", formalDefinition="A list of implementation guides that the server does (or should) support in their entirety." )
7729    protected List<UriType> implementationGuide;
7730
7731    /**
7732     * 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).
7733     */
7734    @Child(name = "profile", type = {StructureDefinition.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7735    @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)." )
7736    protected List<Reference> profile;
7737    /**
7738     * The actual objects that are the target of the reference (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).)
7739     */
7740    protected List<StructureDefinition> profileTarget;
7741
7742
7743    /**
7744     * A definition of the restful capabilities of the solution, if any.
7745     */
7746    @Child(name = "rest", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7747    @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." )
7748    protected List<CapabilityStatementRestComponent> rest;
7749
7750    /**
7751     * A description of the messaging capabilities of the solution.
7752     */
7753    @Child(name = "messaging", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7754    @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." )
7755    protected List<CapabilityStatementMessagingComponent> messaging;
7756
7757    /**
7758     * A document definition.
7759     */
7760    @Child(name = "document", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
7761    @Description(shortDefinition="Document definition", formalDefinition="A document definition." )
7762    protected List<CapabilityStatementDocumentComponent> document;
7763
7764    private static final long serialVersionUID = 227177541L;
7765
7766  /**
7767   * Constructor
7768   */
7769    public CapabilityStatement() {
7770      super();
7771    }
7772
7773  /**
7774   * Constructor
7775   */
7776    public CapabilityStatement(Enumeration<PublicationStatus> status, DateTimeType date, Enumeration<CapabilityStatementKind> kind, IdType fhirVersion, Enumeration<UnknownContentCode> acceptUnknown) {
7777      super();
7778      this.status = status;
7779      this.date = date;
7780      this.kind = kind;
7781      this.fhirVersion = fhirVersion;
7782      this.acceptUnknown = acceptUnknown;
7783    }
7784
7785    /**
7786     * @return {@link #url} (An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
7787     */
7788    public UriType getUrlElement() { 
7789      if (this.url == null)
7790        if (Configuration.errorOnAutoCreate())
7791          throw new Error("Attempt to auto-create CapabilityStatement.url");
7792        else if (Configuration.doAutoCreate())
7793          this.url = new UriType(); // bb
7794      return this.url;
7795    }
7796
7797    public boolean hasUrlElement() { 
7798      return this.url != null && !this.url.isEmpty();
7799    }
7800
7801    public boolean hasUrl() { 
7802      return this.url != null && !this.url.isEmpty();
7803    }
7804
7805    /**
7806     * @param value {@link #url} (An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
7807     */
7808    public CapabilityStatement setUrlElement(UriType value) { 
7809      this.url = value;
7810      return this;
7811    }
7812
7813    /**
7814     * @return An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).
7815     */
7816    public String getUrl() { 
7817      return this.url == null ? null : this.url.getValue();
7818    }
7819
7820    /**
7821     * @param value An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).
7822     */
7823    public CapabilityStatement setUrl(String value) { 
7824      if (Utilities.noString(value))
7825        this.url = null;
7826      else {
7827        if (this.url == null)
7828          this.url = new UriType();
7829        this.url.setValue(value);
7830      }
7831      return this;
7832    }
7833
7834    /**
7835     * @return {@link #version} (The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement 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
7836     */
7837    public StringType getVersionElement() { 
7838      if (this.version == null)
7839        if (Configuration.errorOnAutoCreate())
7840          throw new Error("Attempt to auto-create CapabilityStatement.version");
7841        else if (Configuration.doAutoCreate())
7842          this.version = new StringType(); // bb
7843      return this.version;
7844    }
7845
7846    public boolean hasVersionElement() { 
7847      return this.version != null && !this.version.isEmpty();
7848    }
7849
7850    public boolean hasVersion() { 
7851      return this.version != null && !this.version.isEmpty();
7852    }
7853
7854    /**
7855     * @param value {@link #version} (The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement 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
7856     */
7857    public CapabilityStatement setVersionElement(StringType value) { 
7858      this.version = value;
7859      return this;
7860    }
7861
7862    /**
7863     * @return The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement 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.
7864     */
7865    public String getVersion() { 
7866      return this.version == null ? null : this.version.getValue();
7867    }
7868
7869    /**
7870     * @param value The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement 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.
7871     */
7872    public CapabilityStatement setVersion(String value) { 
7873      if (Utilities.noString(value))
7874        this.version = null;
7875      else {
7876        if (this.version == null)
7877          this.version = new StringType();
7878        this.version.setValue(value);
7879      }
7880      return this;
7881    }
7882
7883    /**
7884     * @return {@link #name} (A natural language name identifying the capability statement. 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
7885     */
7886    public StringType getNameElement() { 
7887      if (this.name == null)
7888        if (Configuration.errorOnAutoCreate())
7889          throw new Error("Attempt to auto-create CapabilityStatement.name");
7890        else if (Configuration.doAutoCreate())
7891          this.name = new StringType(); // bb
7892      return this.name;
7893    }
7894
7895    public boolean hasNameElement() { 
7896      return this.name != null && !this.name.isEmpty();
7897    }
7898
7899    public boolean hasName() { 
7900      return this.name != null && !this.name.isEmpty();
7901    }
7902
7903    /**
7904     * @param value {@link #name} (A natural language name identifying the capability statement. 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
7905     */
7906    public CapabilityStatement setNameElement(StringType value) { 
7907      this.name = value;
7908      return this;
7909    }
7910
7911    /**
7912     * @return A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.
7913     */
7914    public String getName() { 
7915      return this.name == null ? null : this.name.getValue();
7916    }
7917
7918    /**
7919     * @param value A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.
7920     */
7921    public CapabilityStatement setName(String value) { 
7922      if (Utilities.noString(value))
7923        this.name = null;
7924      else {
7925        if (this.name == null)
7926          this.name = new StringType();
7927        this.name.setValue(value);
7928      }
7929      return this;
7930    }
7931
7932    /**
7933     * @return {@link #title} (A short, descriptive, user-friendly title for the capability statement.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
7934     */
7935    public StringType getTitleElement() { 
7936      if (this.title == null)
7937        if (Configuration.errorOnAutoCreate())
7938          throw new Error("Attempt to auto-create CapabilityStatement.title");
7939        else if (Configuration.doAutoCreate())
7940          this.title = new StringType(); // bb
7941      return this.title;
7942    }
7943
7944    public boolean hasTitleElement() { 
7945      return this.title != null && !this.title.isEmpty();
7946    }
7947
7948    public boolean hasTitle() { 
7949      return this.title != null && !this.title.isEmpty();
7950    }
7951
7952    /**
7953     * @param value {@link #title} (A short, descriptive, user-friendly title for the capability statement.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
7954     */
7955    public CapabilityStatement setTitleElement(StringType value) { 
7956      this.title = value;
7957      return this;
7958    }
7959
7960    /**
7961     * @return A short, descriptive, user-friendly title for the capability statement.
7962     */
7963    public String getTitle() { 
7964      return this.title == null ? null : this.title.getValue();
7965    }
7966
7967    /**
7968     * @param value A short, descriptive, user-friendly title for the capability statement.
7969     */
7970    public CapabilityStatement setTitle(String value) { 
7971      if (Utilities.noString(value))
7972        this.title = null;
7973      else {
7974        if (this.title == null)
7975          this.title = new StringType();
7976        this.title.setValue(value);
7977      }
7978      return this;
7979    }
7980
7981    /**
7982     * @return {@link #status} (The status of this capability statement. 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
7983     */
7984    public Enumeration<PublicationStatus> getStatusElement() { 
7985      if (this.status == null)
7986        if (Configuration.errorOnAutoCreate())
7987          throw new Error("Attempt to auto-create CapabilityStatement.status");
7988        else if (Configuration.doAutoCreate())
7989          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
7990      return this.status;
7991    }
7992
7993    public boolean hasStatusElement() { 
7994      return this.status != null && !this.status.isEmpty();
7995    }
7996
7997    public boolean hasStatus() { 
7998      return this.status != null && !this.status.isEmpty();
7999    }
8000
8001    /**
8002     * @param value {@link #status} (The status of this capability statement. 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
8003     */
8004    public CapabilityStatement setStatusElement(Enumeration<PublicationStatus> value) { 
8005      this.status = value;
8006      return this;
8007    }
8008
8009    /**
8010     * @return The status of this capability statement. Enables tracking the life-cycle of the content.
8011     */
8012    public PublicationStatus getStatus() { 
8013      return this.status == null ? null : this.status.getValue();
8014    }
8015
8016    /**
8017     * @param value The status of this capability statement. Enables tracking the life-cycle of the content.
8018     */
8019    public CapabilityStatement setStatus(PublicationStatus value) { 
8020        if (this.status == null)
8021          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
8022        this.status.setValue(value);
8023      return this;
8024    }
8025
8026    /**
8027     * @return {@link #experimental} (A boolean value to indicate that this capability statement 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
8028     */
8029    public BooleanType getExperimentalElement() { 
8030      if (this.experimental == null)
8031        if (Configuration.errorOnAutoCreate())
8032          throw new Error("Attempt to auto-create CapabilityStatement.experimental");
8033        else if (Configuration.doAutoCreate())
8034          this.experimental = new BooleanType(); // bb
8035      return this.experimental;
8036    }
8037
8038    public boolean hasExperimentalElement() { 
8039      return this.experimental != null && !this.experimental.isEmpty();
8040    }
8041
8042    public boolean hasExperimental() { 
8043      return this.experimental != null && !this.experimental.isEmpty();
8044    }
8045
8046    /**
8047     * @param value {@link #experimental} (A boolean value to indicate that this capability statement 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
8048     */
8049    public CapabilityStatement setExperimentalElement(BooleanType value) { 
8050      this.experimental = value;
8051      return this;
8052    }
8053
8054    /**
8055     * @return A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
8056     */
8057    public boolean getExperimental() { 
8058      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
8059    }
8060
8061    /**
8062     * @param value A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
8063     */
8064    public CapabilityStatement setExperimental(boolean value) { 
8065        if (this.experimental == null)
8066          this.experimental = new BooleanType();
8067        this.experimental.setValue(value);
8068      return this;
8069    }
8070
8071    /**
8072     * @return {@link #date} (The date  (and optionally time) when the capability statement was published. The date must change if and 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 statement changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
8073     */
8074    public DateTimeType getDateElement() { 
8075      if (this.date == null)
8076        if (Configuration.errorOnAutoCreate())
8077          throw new Error("Attempt to auto-create CapabilityStatement.date");
8078        else if (Configuration.doAutoCreate())
8079          this.date = new DateTimeType(); // bb
8080      return this.date;
8081    }
8082
8083    public boolean hasDateElement() { 
8084      return this.date != null && !this.date.isEmpty();
8085    }
8086
8087    public boolean hasDate() { 
8088      return this.date != null && !this.date.isEmpty();
8089    }
8090
8091    /**
8092     * @param value {@link #date} (The date  (and optionally time) when the capability statement was published. The date must change if and 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 statement changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
8093     */
8094    public CapabilityStatement setDateElement(DateTimeType value) { 
8095      this.date = value;
8096      return this;
8097    }
8098
8099    /**
8100     * @return The date  (and optionally time) when the capability statement was published. The date must change if and 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 statement changes.
8101     */
8102    public Date getDate() { 
8103      return this.date == null ? null : this.date.getValue();
8104    }
8105
8106    /**
8107     * @param value The date  (and optionally time) when the capability statement was published. The date must change if and 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 statement changes.
8108     */
8109    public CapabilityStatement setDate(Date value) { 
8110        if (this.date == null)
8111          this.date = new DateTimeType();
8112        this.date.setValue(value);
8113      return this;
8114    }
8115
8116    /**
8117     * @return {@link #publisher} (The name of the individual or organization that published the capability statement.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
8118     */
8119    public StringType getPublisherElement() { 
8120      if (this.publisher == null)
8121        if (Configuration.errorOnAutoCreate())
8122          throw new Error("Attempt to auto-create CapabilityStatement.publisher");
8123        else if (Configuration.doAutoCreate())
8124          this.publisher = new StringType(); // bb
8125      return this.publisher;
8126    }
8127
8128    public boolean hasPublisherElement() { 
8129      return this.publisher != null && !this.publisher.isEmpty();
8130    }
8131
8132    public boolean hasPublisher() { 
8133      return this.publisher != null && !this.publisher.isEmpty();
8134    }
8135
8136    /**
8137     * @param value {@link #publisher} (The name of the individual or organization that published the capability statement.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
8138     */
8139    public CapabilityStatement setPublisherElement(StringType value) { 
8140      this.publisher = value;
8141      return this;
8142    }
8143
8144    /**
8145     * @return The name of the individual or organization that published the capability statement.
8146     */
8147    public String getPublisher() { 
8148      return this.publisher == null ? null : this.publisher.getValue();
8149    }
8150
8151    /**
8152     * @param value The name of the individual or organization that published the capability statement.
8153     */
8154    public CapabilityStatement setPublisher(String value) { 
8155      if (Utilities.noString(value))
8156        this.publisher = null;
8157      else {
8158        if (this.publisher == null)
8159          this.publisher = new StringType();
8160        this.publisher.setValue(value);
8161      }
8162      return this;
8163    }
8164
8165    /**
8166     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
8167     */
8168    public List<ContactDetail> getContact() { 
8169      if (this.contact == null)
8170        this.contact = new ArrayList<ContactDetail>();
8171      return this.contact;
8172    }
8173
8174    /**
8175     * @return Returns a reference to <code>this</code> for easy method chaining
8176     */
8177    public CapabilityStatement setContact(List<ContactDetail> theContact) { 
8178      this.contact = theContact;
8179      return this;
8180    }
8181
8182    public boolean hasContact() { 
8183      if (this.contact == null)
8184        return false;
8185      for (ContactDetail item : this.contact)
8186        if (!item.isEmpty())
8187          return true;
8188      return false;
8189    }
8190
8191    public ContactDetail addContact() { //3
8192      ContactDetail t = new ContactDetail();
8193      if (this.contact == null)
8194        this.contact = new ArrayList<ContactDetail>();
8195      this.contact.add(t);
8196      return t;
8197    }
8198
8199    public CapabilityStatement addContact(ContactDetail t) { //3
8200      if (t == null)
8201        return this;
8202      if (this.contact == null)
8203        this.contact = new ArrayList<ContactDetail>();
8204      this.contact.add(t);
8205      return this;
8206    }
8207
8208    /**
8209     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
8210     */
8211    public ContactDetail getContactFirstRep() { 
8212      if (getContact().isEmpty()) {
8213        addContact();
8214      }
8215      return getContact().get(0);
8216    }
8217
8218    /**
8219     * @return {@link #description} (A free text natural language description of the capability statement 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
8220     */
8221    public MarkdownType getDescriptionElement() { 
8222      if (this.description == null)
8223        if (Configuration.errorOnAutoCreate())
8224          throw new Error("Attempt to auto-create CapabilityStatement.description");
8225        else if (Configuration.doAutoCreate())
8226          this.description = new MarkdownType(); // bb
8227      return this.description;
8228    }
8229
8230    public boolean hasDescriptionElement() { 
8231      return this.description != null && !this.description.isEmpty();
8232    }
8233
8234    public boolean hasDescription() { 
8235      return this.description != null && !this.description.isEmpty();
8236    }
8237
8238    /**
8239     * @param value {@link #description} (A free text natural language description of the capability statement 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
8240     */
8241    public CapabilityStatement setDescriptionElement(MarkdownType value) { 
8242      this.description = value;
8243      return this;
8244    }
8245
8246    /**
8247     * @return A free text natural language description of the capability statement 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.
8248     */
8249    public String getDescription() { 
8250      return this.description == null ? null : this.description.getValue();
8251    }
8252
8253    /**
8254     * @param value A free text natural language description of the capability statement 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.
8255     */
8256    public CapabilityStatement setDescription(String value) { 
8257      if (value == null)
8258        this.description = null;
8259      else {
8260        if (this.description == null)
8261          this.description = new MarkdownType();
8262        this.description.setValue(value);
8263      }
8264      return this;
8265    }
8266
8267    /**
8268     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.)
8269     */
8270    public List<UsageContext> getUseContext() { 
8271      if (this.useContext == null)
8272        this.useContext = new ArrayList<UsageContext>();
8273      return this.useContext;
8274    }
8275
8276    /**
8277     * @return Returns a reference to <code>this</code> for easy method chaining
8278     */
8279    public CapabilityStatement setUseContext(List<UsageContext> theUseContext) { 
8280      this.useContext = theUseContext;
8281      return this;
8282    }
8283
8284    public boolean hasUseContext() { 
8285      if (this.useContext == null)
8286        return false;
8287      for (UsageContext item : this.useContext)
8288        if (!item.isEmpty())
8289          return true;
8290      return false;
8291    }
8292
8293    public UsageContext addUseContext() { //3
8294      UsageContext t = new UsageContext();
8295      if (this.useContext == null)
8296        this.useContext = new ArrayList<UsageContext>();
8297      this.useContext.add(t);
8298      return t;
8299    }
8300
8301    public CapabilityStatement addUseContext(UsageContext t) { //3
8302      if (t == null)
8303        return this;
8304      if (this.useContext == null)
8305        this.useContext = new ArrayList<UsageContext>();
8306      this.useContext.add(t);
8307      return this;
8308    }
8309
8310    /**
8311     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
8312     */
8313    public UsageContext getUseContextFirstRep() { 
8314      if (getUseContext().isEmpty()) {
8315        addUseContext();
8316      }
8317      return getUseContext().get(0);
8318    }
8319
8320    /**
8321     * @return {@link #jurisdiction} (A legal or geographic region in which the capability statement is intended to be used.)
8322     */
8323    public List<CodeableConcept> getJurisdiction() { 
8324      if (this.jurisdiction == null)
8325        this.jurisdiction = new ArrayList<CodeableConcept>();
8326      return this.jurisdiction;
8327    }
8328
8329    /**
8330     * @return Returns a reference to <code>this</code> for easy method chaining
8331     */
8332    public CapabilityStatement setJurisdiction(List<CodeableConcept> theJurisdiction) { 
8333      this.jurisdiction = theJurisdiction;
8334      return this;
8335    }
8336
8337    public boolean hasJurisdiction() { 
8338      if (this.jurisdiction == null)
8339        return false;
8340      for (CodeableConcept item : this.jurisdiction)
8341        if (!item.isEmpty())
8342          return true;
8343      return false;
8344    }
8345
8346    public CodeableConcept addJurisdiction() { //3
8347      CodeableConcept t = new CodeableConcept();
8348      if (this.jurisdiction == null)
8349        this.jurisdiction = new ArrayList<CodeableConcept>();
8350      this.jurisdiction.add(t);
8351      return t;
8352    }
8353
8354    public CapabilityStatement addJurisdiction(CodeableConcept t) { //3
8355      if (t == null)
8356        return this;
8357      if (this.jurisdiction == null)
8358        this.jurisdiction = new ArrayList<CodeableConcept>();
8359      this.jurisdiction.add(t);
8360      return this;
8361    }
8362
8363    /**
8364     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
8365     */
8366    public CodeableConcept getJurisdictionFirstRep() { 
8367      if (getJurisdiction().isEmpty()) {
8368        addJurisdiction();
8369      }
8370      return getJurisdiction().get(0);
8371    }
8372
8373    /**
8374     * @return {@link #purpose} (Explaination of why this capability statement 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
8375     */
8376    public MarkdownType getPurposeElement() { 
8377      if (this.purpose == null)
8378        if (Configuration.errorOnAutoCreate())
8379          throw new Error("Attempt to auto-create CapabilityStatement.purpose");
8380        else if (Configuration.doAutoCreate())
8381          this.purpose = new MarkdownType(); // bb
8382      return this.purpose;
8383    }
8384
8385    public boolean hasPurposeElement() { 
8386      return this.purpose != null && !this.purpose.isEmpty();
8387    }
8388
8389    public boolean hasPurpose() { 
8390      return this.purpose != null && !this.purpose.isEmpty();
8391    }
8392
8393    /**
8394     * @param value {@link #purpose} (Explaination of why this capability statement 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
8395     */
8396    public CapabilityStatement setPurposeElement(MarkdownType value) { 
8397      this.purpose = value;
8398      return this;
8399    }
8400
8401    /**
8402     * @return Explaination of why this capability statement is needed and why it has been designed as it has.
8403     */
8404    public String getPurpose() { 
8405      return this.purpose == null ? null : this.purpose.getValue();
8406    }
8407
8408    /**
8409     * @param value Explaination of why this capability statement is needed and why it has been designed as it has.
8410     */
8411    public CapabilityStatement setPurpose(String value) { 
8412      if (value == null)
8413        this.purpose = null;
8414      else {
8415        if (this.purpose == null)
8416          this.purpose = new MarkdownType();
8417        this.purpose.setValue(value);
8418      }
8419      return this;
8420    }
8421
8422    /**
8423     * @return {@link #copyright} (A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
8424     */
8425    public MarkdownType getCopyrightElement() { 
8426      if (this.copyright == null)
8427        if (Configuration.errorOnAutoCreate())
8428          throw new Error("Attempt to auto-create CapabilityStatement.copyright");
8429        else if (Configuration.doAutoCreate())
8430          this.copyright = new MarkdownType(); // bb
8431      return this.copyright;
8432    }
8433
8434    public boolean hasCopyrightElement() { 
8435      return this.copyright != null && !this.copyright.isEmpty();
8436    }
8437
8438    public boolean hasCopyright() { 
8439      return this.copyright != null && !this.copyright.isEmpty();
8440    }
8441
8442    /**
8443     * @param value {@link #copyright} (A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
8444     */
8445    public CapabilityStatement setCopyrightElement(MarkdownType value) { 
8446      this.copyright = value;
8447      return this;
8448    }
8449
8450    /**
8451     * @return A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.
8452     */
8453    public String getCopyright() { 
8454      return this.copyright == null ? null : this.copyright.getValue();
8455    }
8456
8457    /**
8458     * @param value A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.
8459     */
8460    public CapabilityStatement setCopyright(String value) { 
8461      if (value == null)
8462        this.copyright = null;
8463      else {
8464        if (this.copyright == null)
8465          this.copyright = new MarkdownType();
8466        this.copyright.setValue(value);
8467      }
8468      return this;
8469    }
8470
8471    /**
8472     * @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
8473     */
8474    public Enumeration<CapabilityStatementKind> getKindElement() { 
8475      if (this.kind == null)
8476        if (Configuration.errorOnAutoCreate())
8477          throw new Error("Attempt to auto-create CapabilityStatement.kind");
8478        else if (Configuration.doAutoCreate())
8479          this.kind = new Enumeration<CapabilityStatementKind>(new CapabilityStatementKindEnumFactory()); // bb
8480      return this.kind;
8481    }
8482
8483    public boolean hasKindElement() { 
8484      return this.kind != null && !this.kind.isEmpty();
8485    }
8486
8487    public boolean hasKind() { 
8488      return this.kind != null && !this.kind.isEmpty();
8489    }
8490
8491    /**
8492     * @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
8493     */
8494    public CapabilityStatement setKindElement(Enumeration<CapabilityStatementKind> value) { 
8495      this.kind = value;
8496      return this;
8497    }
8498
8499    /**
8500     * @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).
8501     */
8502    public CapabilityStatementKind getKind() { 
8503      return this.kind == null ? null : this.kind.getValue();
8504    }
8505
8506    /**
8507     * @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).
8508     */
8509    public CapabilityStatement setKind(CapabilityStatementKind value) { 
8510        if (this.kind == null)
8511          this.kind = new Enumeration<CapabilityStatementKind>(new CapabilityStatementKindEnumFactory());
8512        this.kind.setValue(value);
8513      return this;
8514    }
8515
8516    /**
8517     * @return {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.)
8518     */
8519    public List<UriType> getInstantiates() { 
8520      if (this.instantiates == null)
8521        this.instantiates = new ArrayList<UriType>();
8522      return this.instantiates;
8523    }
8524
8525    /**
8526     * @return Returns a reference to <code>this</code> for easy method chaining
8527     */
8528    public CapabilityStatement setInstantiates(List<UriType> theInstantiates) { 
8529      this.instantiates = theInstantiates;
8530      return this;
8531    }
8532
8533    public boolean hasInstantiates() { 
8534      if (this.instantiates == null)
8535        return false;
8536      for (UriType item : this.instantiates)
8537        if (!item.isEmpty())
8538          return true;
8539      return false;
8540    }
8541
8542    /**
8543     * @return {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.)
8544     */
8545    public UriType addInstantiatesElement() {//2 
8546      UriType t = new UriType();
8547      if (this.instantiates == null)
8548        this.instantiates = new ArrayList<UriType>();
8549      this.instantiates.add(t);
8550      return t;
8551    }
8552
8553    /**
8554     * @param value {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.)
8555     */
8556    public CapabilityStatement addInstantiates(String value) { //1
8557      UriType t = new UriType();
8558      t.setValue(value);
8559      if (this.instantiates == null)
8560        this.instantiates = new ArrayList<UriType>();
8561      this.instantiates.add(t);
8562      return this;
8563    }
8564
8565    /**
8566     * @param value {@link #instantiates} (Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.)
8567     */
8568    public boolean hasInstantiates(String value) { 
8569      if (this.instantiates == null)
8570        return false;
8571      for (UriType v : this.instantiates)
8572        if (v.getValue().equals(value)) // uri
8573          return true;
8574      return false;
8575    }
8576
8577    /**
8578     * @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.)
8579     */
8580    public CapabilityStatementSoftwareComponent getSoftware() { 
8581      if (this.software == null)
8582        if (Configuration.errorOnAutoCreate())
8583          throw new Error("Attempt to auto-create CapabilityStatement.software");
8584        else if (Configuration.doAutoCreate())
8585          this.software = new CapabilityStatementSoftwareComponent(); // cc
8586      return this.software;
8587    }
8588
8589    public boolean hasSoftware() { 
8590      return this.software != null && !this.software.isEmpty();
8591    }
8592
8593    /**
8594     * @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.)
8595     */
8596    public CapabilityStatement setSoftware(CapabilityStatementSoftwareComponent value)  { 
8597      this.software = value;
8598      return this;
8599    }
8600
8601    /**
8602     * @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.)
8603     */
8604    public CapabilityStatementImplementationComponent getImplementation() { 
8605      if (this.implementation == null)
8606        if (Configuration.errorOnAutoCreate())
8607          throw new Error("Attempt to auto-create CapabilityStatement.implementation");
8608        else if (Configuration.doAutoCreate())
8609          this.implementation = new CapabilityStatementImplementationComponent(); // cc
8610      return this.implementation;
8611    }
8612
8613    public boolean hasImplementation() { 
8614      return this.implementation != null && !this.implementation.isEmpty();
8615    }
8616
8617    /**
8618     * @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.)
8619     */
8620    public CapabilityStatement setImplementation(CapabilityStatementImplementationComponent value)  { 
8621      this.implementation = value;
8622      return this;
8623    }
8624
8625    /**
8626     * @return {@link #fhirVersion} (The version of the FHIR specification on which this capability statement is based.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
8627     */
8628    public IdType getFhirVersionElement() { 
8629      if (this.fhirVersion == null)
8630        if (Configuration.errorOnAutoCreate())
8631          throw new Error("Attempt to auto-create CapabilityStatement.fhirVersion");
8632        else if (Configuration.doAutoCreate())
8633          this.fhirVersion = new IdType(); // bb
8634      return this.fhirVersion;
8635    }
8636
8637    public boolean hasFhirVersionElement() { 
8638      return this.fhirVersion != null && !this.fhirVersion.isEmpty();
8639    }
8640
8641    public boolean hasFhirVersion() { 
8642      return this.fhirVersion != null && !this.fhirVersion.isEmpty();
8643    }
8644
8645    /**
8646     * @param value {@link #fhirVersion} (The version of the FHIR specification on which this capability statement is based.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
8647     */
8648    public CapabilityStatement setFhirVersionElement(IdType value) { 
8649      this.fhirVersion = value;
8650      return this;
8651    }
8652
8653    /**
8654     * @return The version of the FHIR specification on which this capability statement is based.
8655     */
8656    public String getFhirVersion() { 
8657      return this.fhirVersion == null ? null : this.fhirVersion.getValue();
8658    }
8659
8660    /**
8661     * @param value The version of the FHIR specification on which this capability statement is based.
8662     */
8663    public CapabilityStatement setFhirVersion(String value) { 
8664        if (this.fhirVersion == null)
8665          this.fhirVersion = new IdType();
8666        this.fhirVersion.setValue(value);
8667      return this;
8668    }
8669
8670    /**
8671     * @return {@link #acceptUnknown} (A code that indicates whether the application accepts unknown elements or extensions when reading resources.). This is the underlying object with id, value and extensions. The accessor "getAcceptUnknown" gives direct access to the value
8672     */
8673    public Enumeration<UnknownContentCode> getAcceptUnknownElement() { 
8674      if (this.acceptUnknown == null)
8675        if (Configuration.errorOnAutoCreate())
8676          throw new Error("Attempt to auto-create CapabilityStatement.acceptUnknown");
8677        else if (Configuration.doAutoCreate())
8678          this.acceptUnknown = new Enumeration<UnknownContentCode>(new UnknownContentCodeEnumFactory()); // bb
8679      return this.acceptUnknown;
8680    }
8681
8682    public boolean hasAcceptUnknownElement() { 
8683      return this.acceptUnknown != null && !this.acceptUnknown.isEmpty();
8684    }
8685
8686    public boolean hasAcceptUnknown() { 
8687      return this.acceptUnknown != null && !this.acceptUnknown.isEmpty();
8688    }
8689
8690    /**
8691     * @param value {@link #acceptUnknown} (A code that indicates whether the application accepts unknown elements or extensions when reading resources.). This is the underlying object with id, value and extensions. The accessor "getAcceptUnknown" gives direct access to the value
8692     */
8693    public CapabilityStatement setAcceptUnknownElement(Enumeration<UnknownContentCode> value) { 
8694      this.acceptUnknown = value;
8695      return this;
8696    }
8697
8698    /**
8699     * @return A code that indicates whether the application accepts unknown elements or extensions when reading resources.
8700     */
8701    public UnknownContentCode getAcceptUnknown() { 
8702      return this.acceptUnknown == null ? null : this.acceptUnknown.getValue();
8703    }
8704
8705    /**
8706     * @param value A code that indicates whether the application accepts unknown elements or extensions when reading resources.
8707     */
8708    public CapabilityStatement setAcceptUnknown(UnknownContentCode value) { 
8709        if (this.acceptUnknown == null)
8710          this.acceptUnknown = new Enumeration<UnknownContentCode>(new UnknownContentCodeEnumFactory());
8711        this.acceptUnknown.setValue(value);
8712      return this;
8713    }
8714
8715    /**
8716     * @return {@link #format} (A list of the formats supported by this implementation using their content types.)
8717     */
8718    public List<CodeType> getFormat() { 
8719      if (this.format == null)
8720        this.format = new ArrayList<CodeType>();
8721      return this.format;
8722    }
8723
8724    /**
8725     * @return Returns a reference to <code>this</code> for easy method chaining
8726     */
8727    public CapabilityStatement setFormat(List<CodeType> theFormat) { 
8728      this.format = theFormat;
8729      return this;
8730    }
8731
8732    public boolean hasFormat() { 
8733      if (this.format == null)
8734        return false;
8735      for (CodeType item : this.format)
8736        if (!item.isEmpty())
8737          return true;
8738      return false;
8739    }
8740
8741    /**
8742     * @return {@link #format} (A list of the formats supported by this implementation using their content types.)
8743     */
8744    public CodeType addFormatElement() {//2 
8745      CodeType t = new CodeType();
8746      if (this.format == null)
8747        this.format = new ArrayList<CodeType>();
8748      this.format.add(t);
8749      return t;
8750    }
8751
8752    /**
8753     * @param value {@link #format} (A list of the formats supported by this implementation using their content types.)
8754     */
8755    public CapabilityStatement addFormat(String value) { //1
8756      CodeType t = new CodeType();
8757      t.setValue(value);
8758      if (this.format == null)
8759        this.format = new ArrayList<CodeType>();
8760      this.format.add(t);
8761      return this;
8762    }
8763
8764    /**
8765     * @param value {@link #format} (A list of the formats supported by this implementation using their content types.)
8766     */
8767    public boolean hasFormat(String value) { 
8768      if (this.format == null)
8769        return false;
8770      for (CodeType v : this.format)
8771        if (v.getValue().equals(value)) // code
8772          return true;
8773      return false;
8774    }
8775
8776    /**
8777     * @return {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
8778     */
8779    public List<CodeType> getPatchFormat() { 
8780      if (this.patchFormat == null)
8781        this.patchFormat = new ArrayList<CodeType>();
8782      return this.patchFormat;
8783    }
8784
8785    /**
8786     * @return Returns a reference to <code>this</code> for easy method chaining
8787     */
8788    public CapabilityStatement setPatchFormat(List<CodeType> thePatchFormat) { 
8789      this.patchFormat = thePatchFormat;
8790      return this;
8791    }
8792
8793    public boolean hasPatchFormat() { 
8794      if (this.patchFormat == null)
8795        return false;
8796      for (CodeType item : this.patchFormat)
8797        if (!item.isEmpty())
8798          return true;
8799      return false;
8800    }
8801
8802    /**
8803     * @return {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
8804     */
8805    public CodeType addPatchFormatElement() {//2 
8806      CodeType t = new CodeType();
8807      if (this.patchFormat == null)
8808        this.patchFormat = new ArrayList<CodeType>();
8809      this.patchFormat.add(t);
8810      return t;
8811    }
8812
8813    /**
8814     * @param value {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
8815     */
8816    public CapabilityStatement addPatchFormat(String value) { //1
8817      CodeType t = new CodeType();
8818      t.setValue(value);
8819      if (this.patchFormat == null)
8820        this.patchFormat = new ArrayList<CodeType>();
8821      this.patchFormat.add(t);
8822      return this;
8823    }
8824
8825    /**
8826     * @param value {@link #patchFormat} (A list of the patch formats supported by this implementation using their content types.)
8827     */
8828    public boolean hasPatchFormat(String value) { 
8829      if (this.patchFormat == null)
8830        return false;
8831      for (CodeType v : this.patchFormat)
8832        if (v.getValue().equals(value)) // code
8833          return true;
8834      return false;
8835    }
8836
8837    /**
8838     * @return {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
8839     */
8840    public List<UriType> getImplementationGuide() { 
8841      if (this.implementationGuide == null)
8842        this.implementationGuide = new ArrayList<UriType>();
8843      return this.implementationGuide;
8844    }
8845
8846    /**
8847     * @return Returns a reference to <code>this</code> for easy method chaining
8848     */
8849    public CapabilityStatement setImplementationGuide(List<UriType> theImplementationGuide) { 
8850      this.implementationGuide = theImplementationGuide;
8851      return this;
8852    }
8853
8854    public boolean hasImplementationGuide() { 
8855      if (this.implementationGuide == null)
8856        return false;
8857      for (UriType item : this.implementationGuide)
8858        if (!item.isEmpty())
8859          return true;
8860      return false;
8861    }
8862
8863    /**
8864     * @return {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
8865     */
8866    public UriType addImplementationGuideElement() {//2 
8867      UriType t = new UriType();
8868      if (this.implementationGuide == null)
8869        this.implementationGuide = new ArrayList<UriType>();
8870      this.implementationGuide.add(t);
8871      return t;
8872    }
8873
8874    /**
8875     * @param value {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
8876     */
8877    public CapabilityStatement addImplementationGuide(String value) { //1
8878      UriType t = new UriType();
8879      t.setValue(value);
8880      if (this.implementationGuide == null)
8881        this.implementationGuide = new ArrayList<UriType>();
8882      this.implementationGuide.add(t);
8883      return this;
8884    }
8885
8886    /**
8887     * @param value {@link #implementationGuide} (A list of implementation guides that the server does (or should) support in their entirety.)
8888     */
8889    public boolean hasImplementationGuide(String value) { 
8890      if (this.implementationGuide == null)
8891        return false;
8892      for (UriType v : this.implementationGuide)
8893        if (v.getValue().equals(value)) // uri
8894          return true;
8895      return false;
8896    }
8897
8898    /**
8899     * @return {@link #profile} (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).)
8900     */
8901    public List<Reference> getProfile() { 
8902      if (this.profile == null)
8903        this.profile = new ArrayList<Reference>();
8904      return this.profile;
8905    }
8906
8907    /**
8908     * @return Returns a reference to <code>this</code> for easy method chaining
8909     */
8910    public CapabilityStatement setProfile(List<Reference> theProfile) { 
8911      this.profile = theProfile;
8912      return this;
8913    }
8914
8915    public boolean hasProfile() { 
8916      if (this.profile == null)
8917        return false;
8918      for (Reference item : this.profile)
8919        if (!item.isEmpty())
8920          return true;
8921      return false;
8922    }
8923
8924    public Reference addProfile() { //3
8925      Reference t = new Reference();
8926      if (this.profile == null)
8927        this.profile = new ArrayList<Reference>();
8928      this.profile.add(t);
8929      return t;
8930    }
8931
8932    public CapabilityStatement addProfile(Reference t) { //3
8933      if (t == null)
8934        return this;
8935      if (this.profile == null)
8936        this.profile = new ArrayList<Reference>();
8937      this.profile.add(t);
8938      return this;
8939    }
8940
8941    /**
8942     * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
8943     */
8944    public Reference getProfileFirstRep() { 
8945      if (getProfile().isEmpty()) {
8946        addProfile();
8947      }
8948      return getProfile().get(0);
8949    }
8950
8951    /**
8952     * @deprecated Use Reference#setResource(IBaseResource) instead
8953     */
8954    @Deprecated
8955    public List<StructureDefinition> getProfileTarget() { 
8956      if (this.profileTarget == null)
8957        this.profileTarget = new ArrayList<StructureDefinition>();
8958      return this.profileTarget;
8959    }
8960
8961    /**
8962     * @deprecated Use Reference#setResource(IBaseResource) instead
8963     */
8964    @Deprecated
8965    public StructureDefinition addProfileTarget() { 
8966      StructureDefinition r = new StructureDefinition();
8967      if (this.profileTarget == null)
8968        this.profileTarget = new ArrayList<StructureDefinition>();
8969      this.profileTarget.add(r);
8970      return r;
8971    }
8972
8973    /**
8974     * @return {@link #rest} (A definition of the restful capabilities of the solution, if any.)
8975     */
8976    public List<CapabilityStatementRestComponent> getRest() { 
8977      if (this.rest == null)
8978        this.rest = new ArrayList<CapabilityStatementRestComponent>();
8979      return this.rest;
8980    }
8981
8982    /**
8983     * @return Returns a reference to <code>this</code> for easy method chaining
8984     */
8985    public CapabilityStatement setRest(List<CapabilityStatementRestComponent> theRest) { 
8986      this.rest = theRest;
8987      return this;
8988    }
8989
8990    public boolean hasRest() { 
8991      if (this.rest == null)
8992        return false;
8993      for (CapabilityStatementRestComponent item : this.rest)
8994        if (!item.isEmpty())
8995          return true;
8996      return false;
8997    }
8998
8999    public CapabilityStatementRestComponent addRest() { //3
9000      CapabilityStatementRestComponent t = new CapabilityStatementRestComponent();
9001      if (this.rest == null)
9002        this.rest = new ArrayList<CapabilityStatementRestComponent>();
9003      this.rest.add(t);
9004      return t;
9005    }
9006
9007    public CapabilityStatement addRest(CapabilityStatementRestComponent t) { //3
9008      if (t == null)
9009        return this;
9010      if (this.rest == null)
9011        this.rest = new ArrayList<CapabilityStatementRestComponent>();
9012      this.rest.add(t);
9013      return this;
9014    }
9015
9016    /**
9017     * @return The first repetition of repeating field {@link #rest}, creating it if it does not already exist
9018     */
9019    public CapabilityStatementRestComponent getRestFirstRep() { 
9020      if (getRest().isEmpty()) {
9021        addRest();
9022      }
9023      return getRest().get(0);
9024    }
9025
9026    /**
9027     * @return {@link #messaging} (A description of the messaging capabilities of the solution.)
9028     */
9029    public List<CapabilityStatementMessagingComponent> getMessaging() { 
9030      if (this.messaging == null)
9031        this.messaging = new ArrayList<CapabilityStatementMessagingComponent>();
9032      return this.messaging;
9033    }
9034
9035    /**
9036     * @return Returns a reference to <code>this</code> for easy method chaining
9037     */
9038    public CapabilityStatement setMessaging(List<CapabilityStatementMessagingComponent> theMessaging) { 
9039      this.messaging = theMessaging;
9040      return this;
9041    }
9042
9043    public boolean hasMessaging() { 
9044      if (this.messaging == null)
9045        return false;
9046      for (CapabilityStatementMessagingComponent item : this.messaging)
9047        if (!item.isEmpty())
9048          return true;
9049      return false;
9050    }
9051
9052    public CapabilityStatementMessagingComponent addMessaging() { //3
9053      CapabilityStatementMessagingComponent t = new CapabilityStatementMessagingComponent();
9054      if (this.messaging == null)
9055        this.messaging = new ArrayList<CapabilityStatementMessagingComponent>();
9056      this.messaging.add(t);
9057      return t;
9058    }
9059
9060    public CapabilityStatement addMessaging(CapabilityStatementMessagingComponent t) { //3
9061      if (t == null)
9062        return this;
9063      if (this.messaging == null)
9064        this.messaging = new ArrayList<CapabilityStatementMessagingComponent>();
9065      this.messaging.add(t);
9066      return this;
9067    }
9068
9069    /**
9070     * @return The first repetition of repeating field {@link #messaging}, creating it if it does not already exist
9071     */
9072    public CapabilityStatementMessagingComponent getMessagingFirstRep() { 
9073      if (getMessaging().isEmpty()) {
9074        addMessaging();
9075      }
9076      return getMessaging().get(0);
9077    }
9078
9079    /**
9080     * @return {@link #document} (A document definition.)
9081     */
9082    public List<CapabilityStatementDocumentComponent> getDocument() { 
9083      if (this.document == null)
9084        this.document = new ArrayList<CapabilityStatementDocumentComponent>();
9085      return this.document;
9086    }
9087
9088    /**
9089     * @return Returns a reference to <code>this</code> for easy method chaining
9090     */
9091    public CapabilityStatement setDocument(List<CapabilityStatementDocumentComponent> theDocument) { 
9092      this.document = theDocument;
9093      return this;
9094    }
9095
9096    public boolean hasDocument() { 
9097      if (this.document == null)
9098        return false;
9099      for (CapabilityStatementDocumentComponent item : this.document)
9100        if (!item.isEmpty())
9101          return true;
9102      return false;
9103    }
9104
9105    public CapabilityStatementDocumentComponent addDocument() { //3
9106      CapabilityStatementDocumentComponent t = new CapabilityStatementDocumentComponent();
9107      if (this.document == null)
9108        this.document = new ArrayList<CapabilityStatementDocumentComponent>();
9109      this.document.add(t);
9110      return t;
9111    }
9112
9113    public CapabilityStatement addDocument(CapabilityStatementDocumentComponent t) { //3
9114      if (t == null)
9115        return this;
9116      if (this.document == null)
9117        this.document = new ArrayList<CapabilityStatementDocumentComponent>();
9118      this.document.add(t);
9119      return this;
9120    }
9121
9122    /**
9123     * @return The first repetition of repeating field {@link #document}, creating it if it does not already exist
9124     */
9125    public CapabilityStatementDocumentComponent getDocumentFirstRep() { 
9126      if (getDocument().isEmpty()) {
9127        addDocument();
9128      }
9129      return getDocument().get(0);
9130    }
9131
9132      protected void listChildren(List<Property> children) {
9133        super.listChildren(children);
9134        children.add(new Property("url", "uri", "An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url));
9135        children.add(new Property("version", "string", "The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement 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));
9136        children.add(new Property("name", "string", "A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
9137        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the capability statement.", 0, 1, title));
9138        children.add(new Property("status", "code", "The status of this capability statement. Enables tracking the life-cycle of the content.", 0, 1, status));
9139        children.add(new Property("experimental", "boolean", "A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental));
9140        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the capability statement was published. The date must change if and 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 statement changes.", 0, 1, date));
9141        children.add(new Property("publisher", "string", "The name of the individual or organization that published the capability statement.", 0, 1, publisher));
9142        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));
9143        children.add(new Property("description", "markdown", "A free text natural language description of the capability statement 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));
9144        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
9145        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the capability statement is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
9146        children.add(new Property("purpose", "markdown", "Explaination of why this capability statement is needed and why it has been designed as it has.", 0, 1, purpose));
9147        children.add(new Property("copyright", "markdown", "A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.", 0, 1, copyright));
9148        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));
9149        children.add(new Property("instantiates", "uri", "Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.", 0, java.lang.Integer.MAX_VALUE, instantiates));
9150        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));
9151        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));
9152        children.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this capability statement is based.", 0, 1, fhirVersion));
9153        children.add(new Property("acceptUnknown", "code", "A code that indicates whether the application accepts unknown elements or extensions when reading resources.", 0, 1, acceptUnknown));
9154        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));
9155        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));
9156        children.add(new Property("implementationGuide", "uri", "A list of implementation guides that the server does (or should) support in their entirety.", 0, java.lang.Integer.MAX_VALUE, implementationGuide));
9157        children.add(new Property("profile", "Reference(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, profile));
9158        children.add(new Property("rest", "", "A definition of the restful capabilities of the solution, if any.", 0, java.lang.Integer.MAX_VALUE, rest));
9159        children.add(new Property("messaging", "", "A description of the messaging capabilities of the solution.", 0, java.lang.Integer.MAX_VALUE, messaging));
9160        children.add(new Property("document", "", "A document definition.", 0, java.lang.Integer.MAX_VALUE, document));
9161      }
9162
9163      @Override
9164      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9165        switch (_hash) {
9166        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url);
9167        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement 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);
9168        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
9169        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the capability statement.", 0, 1, title);
9170        case -892481550: /*status*/  return new Property("status", "code", "The status of this capability statement. Enables tracking the life-cycle of the content.", 0, 1, status);
9171        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental);
9172        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the capability statement was published. The date must change if and 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 statement changes.", 0, 1, date);
9173        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the individual or organization that published the capability statement.", 0, 1, publisher);
9174        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);
9175        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the capability statement 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);
9176        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
9177        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the capability statement is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
9178        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explaination of why this capability statement is needed and why it has been designed as it has.", 0, 1, purpose);
9179        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.", 0, 1, copyright);
9180        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);
9181        case -246883639: /*instantiates*/  return new Property("instantiates", "uri", "Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.", 0, java.lang.Integer.MAX_VALUE, instantiates);
9182        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);
9183        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);
9184        case 461006061: /*fhirVersion*/  return new Property("fhirVersion", "id", "The version of the FHIR specification on which this capability statement is based.", 0, 1, fhirVersion);
9185        case -1862642142: /*acceptUnknown*/  return new Property("acceptUnknown", "code", "A code that indicates whether the application accepts unknown elements or extensions when reading resources.", 0, 1, acceptUnknown);
9186        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);
9187        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);
9188        case 156966506: /*implementationGuide*/  return new Property("implementationGuide", "uri", "A list of implementation guides that the server does (or should) support in their entirety.", 0, java.lang.Integer.MAX_VALUE, implementationGuide);
9189        case -309425751: /*profile*/  return new Property("profile", "Reference(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, profile);
9190        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);
9191        case -1440008444: /*messaging*/  return new Property("messaging", "", "A description of the messaging capabilities of the solution.", 0, java.lang.Integer.MAX_VALUE, messaging);
9192        case 861720859: /*document*/  return new Property("document", "", "A document definition.", 0, java.lang.Integer.MAX_VALUE, document);
9193        default: return super.getNamedProperty(_hash, _name, _checkValid);
9194        }
9195
9196      }
9197
9198      @Override
9199      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9200        switch (hash) {
9201        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
9202        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
9203        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9204        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
9205        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
9206        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
9207        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
9208        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
9209        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
9210        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
9211        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
9212        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
9213        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
9214        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
9215        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<CapabilityStatementKind>
9216        case -246883639: /*instantiates*/ return this.instantiates == null ? new Base[0] : this.instantiates.toArray(new Base[this.instantiates.size()]); // UriType
9217        case 1319330215: /*software*/ return this.software == null ? new Base[0] : new Base[] {this.software}; // CapabilityStatementSoftwareComponent
9218        case 1683336114: /*implementation*/ return this.implementation == null ? new Base[0] : new Base[] {this.implementation}; // CapabilityStatementImplementationComponent
9219        case 461006061: /*fhirVersion*/ return this.fhirVersion == null ? new Base[0] : new Base[] {this.fhirVersion}; // IdType
9220        case -1862642142: /*acceptUnknown*/ return this.acceptUnknown == null ? new Base[0] : new Base[] {this.acceptUnknown}; // Enumeration<UnknownContentCode>
9221        case -1268779017: /*format*/ return this.format == null ? new Base[0] : this.format.toArray(new Base[this.format.size()]); // CodeType
9222        case 172338783: /*patchFormat*/ return this.patchFormat == null ? new Base[0] : this.patchFormat.toArray(new Base[this.patchFormat.size()]); // CodeType
9223        case 156966506: /*implementationGuide*/ return this.implementationGuide == null ? new Base[0] : this.implementationGuide.toArray(new Base[this.implementationGuide.size()]); // UriType
9224        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
9225        case 3496916: /*rest*/ return this.rest == null ? new Base[0] : this.rest.toArray(new Base[this.rest.size()]); // CapabilityStatementRestComponent
9226        case -1440008444: /*messaging*/ return this.messaging == null ? new Base[0] : this.messaging.toArray(new Base[this.messaging.size()]); // CapabilityStatementMessagingComponent
9227        case 861720859: /*document*/ return this.document == null ? new Base[0] : this.document.toArray(new Base[this.document.size()]); // CapabilityStatementDocumentComponent
9228        default: return super.getProperty(hash, name, checkValid);
9229        }
9230
9231      }
9232
9233      @Override
9234      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9235        switch (hash) {
9236        case 116079: // url
9237          this.url = castToUri(value); // UriType
9238          return value;
9239        case 351608024: // version
9240          this.version = castToString(value); // StringType
9241          return value;
9242        case 3373707: // name
9243          this.name = castToString(value); // StringType
9244          return value;
9245        case 110371416: // title
9246          this.title = castToString(value); // StringType
9247          return value;
9248        case -892481550: // status
9249          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
9250          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
9251          return value;
9252        case -404562712: // experimental
9253          this.experimental = castToBoolean(value); // BooleanType
9254          return value;
9255        case 3076014: // date
9256          this.date = castToDateTime(value); // DateTimeType
9257          return value;
9258        case 1447404028: // publisher
9259          this.publisher = castToString(value); // StringType
9260          return value;
9261        case 951526432: // contact
9262          this.getContact().add(castToContactDetail(value)); // ContactDetail
9263          return value;
9264        case -1724546052: // description
9265          this.description = castToMarkdown(value); // MarkdownType
9266          return value;
9267        case -669707736: // useContext
9268          this.getUseContext().add(castToUsageContext(value)); // UsageContext
9269          return value;
9270        case -507075711: // jurisdiction
9271          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
9272          return value;
9273        case -220463842: // purpose
9274          this.purpose = castToMarkdown(value); // MarkdownType
9275          return value;
9276        case 1522889671: // copyright
9277          this.copyright = castToMarkdown(value); // MarkdownType
9278          return value;
9279        case 3292052: // kind
9280          value = new CapabilityStatementKindEnumFactory().fromType(castToCode(value));
9281          this.kind = (Enumeration) value; // Enumeration<CapabilityStatementKind>
9282          return value;
9283        case -246883639: // instantiates
9284          this.getInstantiates().add(castToUri(value)); // UriType
9285          return value;
9286        case 1319330215: // software
9287          this.software = (CapabilityStatementSoftwareComponent) value; // CapabilityStatementSoftwareComponent
9288          return value;
9289        case 1683336114: // implementation
9290          this.implementation = (CapabilityStatementImplementationComponent) value; // CapabilityStatementImplementationComponent
9291          return value;
9292        case 461006061: // fhirVersion
9293          this.fhirVersion = castToId(value); // IdType
9294          return value;
9295        case -1862642142: // acceptUnknown
9296          value = new UnknownContentCodeEnumFactory().fromType(castToCode(value));
9297          this.acceptUnknown = (Enumeration) value; // Enumeration<UnknownContentCode>
9298          return value;
9299        case -1268779017: // format
9300          this.getFormat().add(castToCode(value)); // CodeType
9301          return value;
9302        case 172338783: // patchFormat
9303          this.getPatchFormat().add(castToCode(value)); // CodeType
9304          return value;
9305        case 156966506: // implementationGuide
9306          this.getImplementationGuide().add(castToUri(value)); // UriType
9307          return value;
9308        case -309425751: // profile
9309          this.getProfile().add(castToReference(value)); // Reference
9310          return value;
9311        case 3496916: // rest
9312          this.getRest().add((CapabilityStatementRestComponent) value); // CapabilityStatementRestComponent
9313          return value;
9314        case -1440008444: // messaging
9315          this.getMessaging().add((CapabilityStatementMessagingComponent) value); // CapabilityStatementMessagingComponent
9316          return value;
9317        case 861720859: // document
9318          this.getDocument().add((CapabilityStatementDocumentComponent) value); // CapabilityStatementDocumentComponent
9319          return value;
9320        default: return super.setProperty(hash, name, value);
9321        }
9322
9323      }
9324
9325      @Override
9326      public Base setProperty(String name, Base value) throws FHIRException {
9327        if (name.equals("url")) {
9328          this.url = castToUri(value); // UriType
9329        } else if (name.equals("version")) {
9330          this.version = castToString(value); // StringType
9331        } else if (name.equals("name")) {
9332          this.name = castToString(value); // StringType
9333        } else if (name.equals("title")) {
9334          this.title = castToString(value); // StringType
9335        } else if (name.equals("status")) {
9336          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
9337          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
9338        } else if (name.equals("experimental")) {
9339          this.experimental = castToBoolean(value); // BooleanType
9340        } else if (name.equals("date")) {
9341          this.date = castToDateTime(value); // DateTimeType
9342        } else if (name.equals("publisher")) {
9343          this.publisher = castToString(value); // StringType
9344        } else if (name.equals("contact")) {
9345          this.getContact().add(castToContactDetail(value));
9346        } else if (name.equals("description")) {
9347          this.description = castToMarkdown(value); // MarkdownType
9348        } else if (name.equals("useContext")) {
9349          this.getUseContext().add(castToUsageContext(value));
9350        } else if (name.equals("jurisdiction")) {
9351          this.getJurisdiction().add(castToCodeableConcept(value));
9352        } else if (name.equals("purpose")) {
9353          this.purpose = castToMarkdown(value); // MarkdownType
9354        } else if (name.equals("copyright")) {
9355          this.copyright = castToMarkdown(value); // MarkdownType
9356        } else if (name.equals("kind")) {
9357          value = new CapabilityStatementKindEnumFactory().fromType(castToCode(value));
9358          this.kind = (Enumeration) value; // Enumeration<CapabilityStatementKind>
9359        } else if (name.equals("instantiates")) {
9360          this.getInstantiates().add(castToUri(value));
9361        } else if (name.equals("software")) {
9362          this.software = (CapabilityStatementSoftwareComponent) value; // CapabilityStatementSoftwareComponent
9363        } else if (name.equals("implementation")) {
9364          this.implementation = (CapabilityStatementImplementationComponent) value; // CapabilityStatementImplementationComponent
9365        } else if (name.equals("fhirVersion")) {
9366          this.fhirVersion = castToId(value); // IdType
9367        } else if (name.equals("acceptUnknown")) {
9368          value = new UnknownContentCodeEnumFactory().fromType(castToCode(value));
9369          this.acceptUnknown = (Enumeration) value; // Enumeration<UnknownContentCode>
9370        } else if (name.equals("format")) {
9371          this.getFormat().add(castToCode(value));
9372        } else if (name.equals("patchFormat")) {
9373          this.getPatchFormat().add(castToCode(value));
9374        } else if (name.equals("implementationGuide")) {
9375          this.getImplementationGuide().add(castToUri(value));
9376        } else if (name.equals("profile")) {
9377          this.getProfile().add(castToReference(value));
9378        } else if (name.equals("rest")) {
9379          this.getRest().add((CapabilityStatementRestComponent) value);
9380        } else if (name.equals("messaging")) {
9381          this.getMessaging().add((CapabilityStatementMessagingComponent) value);
9382        } else if (name.equals("document")) {
9383          this.getDocument().add((CapabilityStatementDocumentComponent) value);
9384        } else
9385          return super.setProperty(name, value);
9386        return value;
9387      }
9388
9389      @Override
9390      public Base makeProperty(int hash, String name) throws FHIRException {
9391        switch (hash) {
9392        case 116079:  return getUrlElement();
9393        case 351608024:  return getVersionElement();
9394        case 3373707:  return getNameElement();
9395        case 110371416:  return getTitleElement();
9396        case -892481550:  return getStatusElement();
9397        case -404562712:  return getExperimentalElement();
9398        case 3076014:  return getDateElement();
9399        case 1447404028:  return getPublisherElement();
9400        case 951526432:  return addContact(); 
9401        case -1724546052:  return getDescriptionElement();
9402        case -669707736:  return addUseContext(); 
9403        case -507075711:  return addJurisdiction(); 
9404        case -220463842:  return getPurposeElement();
9405        case 1522889671:  return getCopyrightElement();
9406        case 3292052:  return getKindElement();
9407        case -246883639:  return addInstantiatesElement();
9408        case 1319330215:  return getSoftware(); 
9409        case 1683336114:  return getImplementation(); 
9410        case 461006061:  return getFhirVersionElement();
9411        case -1862642142:  return getAcceptUnknownElement();
9412        case -1268779017:  return addFormatElement();
9413        case 172338783:  return addPatchFormatElement();
9414        case 156966506:  return addImplementationGuideElement();
9415        case -309425751:  return addProfile(); 
9416        case 3496916:  return addRest(); 
9417        case -1440008444:  return addMessaging(); 
9418        case 861720859:  return addDocument(); 
9419        default: return super.makeProperty(hash, name);
9420        }
9421
9422      }
9423
9424      @Override
9425      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9426        switch (hash) {
9427        case 116079: /*url*/ return new String[] {"uri"};
9428        case 351608024: /*version*/ return new String[] {"string"};
9429        case 3373707: /*name*/ return new String[] {"string"};
9430        case 110371416: /*title*/ return new String[] {"string"};
9431        case -892481550: /*status*/ return new String[] {"code"};
9432        case -404562712: /*experimental*/ return new String[] {"boolean"};
9433        case 3076014: /*date*/ return new String[] {"dateTime"};
9434        case 1447404028: /*publisher*/ return new String[] {"string"};
9435        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
9436        case -1724546052: /*description*/ return new String[] {"markdown"};
9437        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
9438        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
9439        case -220463842: /*purpose*/ return new String[] {"markdown"};
9440        case 1522889671: /*copyright*/ return new String[] {"markdown"};
9441        case 3292052: /*kind*/ return new String[] {"code"};
9442        case -246883639: /*instantiates*/ return new String[] {"uri"};
9443        case 1319330215: /*software*/ return new String[] {};
9444        case 1683336114: /*implementation*/ return new String[] {};
9445        case 461006061: /*fhirVersion*/ return new String[] {"id"};
9446        case -1862642142: /*acceptUnknown*/ return new String[] {"code"};
9447        case -1268779017: /*format*/ return new String[] {"code"};
9448        case 172338783: /*patchFormat*/ return new String[] {"code"};
9449        case 156966506: /*implementationGuide*/ return new String[] {"uri"};
9450        case -309425751: /*profile*/ return new String[] {"Reference"};
9451        case 3496916: /*rest*/ return new String[] {};
9452        case -1440008444: /*messaging*/ return new String[] {};
9453        case 861720859: /*document*/ return new String[] {};
9454        default: return super.getTypesForProperty(hash, name);
9455        }
9456
9457      }
9458
9459      @Override
9460      public Base addChild(String name) throws FHIRException {
9461        if (name.equals("url")) {
9462          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.url");
9463        }
9464        else if (name.equals("version")) {
9465          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.version");
9466        }
9467        else if (name.equals("name")) {
9468          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.name");
9469        }
9470        else if (name.equals("title")) {
9471          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.title");
9472        }
9473        else if (name.equals("status")) {
9474          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.status");
9475        }
9476        else if (name.equals("experimental")) {
9477          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.experimental");
9478        }
9479        else if (name.equals("date")) {
9480          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.date");
9481        }
9482        else if (name.equals("publisher")) {
9483          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.publisher");
9484        }
9485        else if (name.equals("contact")) {
9486          return addContact();
9487        }
9488        else if (name.equals("description")) {
9489          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.description");
9490        }
9491        else if (name.equals("useContext")) {
9492          return addUseContext();
9493        }
9494        else if (name.equals("jurisdiction")) {
9495          return addJurisdiction();
9496        }
9497        else if (name.equals("purpose")) {
9498          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.purpose");
9499        }
9500        else if (name.equals("copyright")) {
9501          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.copyright");
9502        }
9503        else if (name.equals("kind")) {
9504          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.kind");
9505        }
9506        else if (name.equals("instantiates")) {
9507          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.instantiates");
9508        }
9509        else if (name.equals("software")) {
9510          this.software = new CapabilityStatementSoftwareComponent();
9511          return this.software;
9512        }
9513        else if (name.equals("implementation")) {
9514          this.implementation = new CapabilityStatementImplementationComponent();
9515          return this.implementation;
9516        }
9517        else if (name.equals("fhirVersion")) {
9518          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.fhirVersion");
9519        }
9520        else if (name.equals("acceptUnknown")) {
9521          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.acceptUnknown");
9522        }
9523        else if (name.equals("format")) {
9524          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.format");
9525        }
9526        else if (name.equals("patchFormat")) {
9527          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.patchFormat");
9528        }
9529        else if (name.equals("implementationGuide")) {
9530          throw new FHIRException("Cannot call addChild on a primitive type CapabilityStatement.implementationGuide");
9531        }
9532        else if (name.equals("profile")) {
9533          return addProfile();
9534        }
9535        else if (name.equals("rest")) {
9536          return addRest();
9537        }
9538        else if (name.equals("messaging")) {
9539          return addMessaging();
9540        }
9541        else if (name.equals("document")) {
9542          return addDocument();
9543        }
9544        else
9545          return super.addChild(name);
9546      }
9547
9548  public String fhirType() {
9549    return "CapabilityStatement";
9550
9551  }
9552
9553      public CapabilityStatement copy() {
9554        CapabilityStatement dst = new CapabilityStatement();
9555        copyValues(dst);
9556        dst.url = url == null ? null : url.copy();
9557        dst.version = version == null ? null : version.copy();
9558        dst.name = name == null ? null : name.copy();
9559        dst.title = title == null ? null : title.copy();
9560        dst.status = status == null ? null : status.copy();
9561        dst.experimental = experimental == null ? null : experimental.copy();
9562        dst.date = date == null ? null : date.copy();
9563        dst.publisher = publisher == null ? null : publisher.copy();
9564        if (contact != null) {
9565          dst.contact = new ArrayList<ContactDetail>();
9566          for (ContactDetail i : contact)
9567            dst.contact.add(i.copy());
9568        };
9569        dst.description = description == null ? null : description.copy();
9570        if (useContext != null) {
9571          dst.useContext = new ArrayList<UsageContext>();
9572          for (UsageContext i : useContext)
9573            dst.useContext.add(i.copy());
9574        };
9575        if (jurisdiction != null) {
9576          dst.jurisdiction = new ArrayList<CodeableConcept>();
9577          for (CodeableConcept i : jurisdiction)
9578            dst.jurisdiction.add(i.copy());
9579        };
9580        dst.purpose = purpose == null ? null : purpose.copy();
9581        dst.copyright = copyright == null ? null : copyright.copy();
9582        dst.kind = kind == null ? null : kind.copy();
9583        if (instantiates != null) {
9584          dst.instantiates = new ArrayList<UriType>();
9585          for (UriType i : instantiates)
9586            dst.instantiates.add(i.copy());
9587        };
9588        dst.software = software == null ? null : software.copy();
9589        dst.implementation = implementation == null ? null : implementation.copy();
9590        dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy();
9591        dst.acceptUnknown = acceptUnknown == null ? null : acceptUnknown.copy();
9592        if (format != null) {
9593          dst.format = new ArrayList<CodeType>();
9594          for (CodeType i : format)
9595            dst.format.add(i.copy());
9596        };
9597        if (patchFormat != null) {
9598          dst.patchFormat = new ArrayList<CodeType>();
9599          for (CodeType i : patchFormat)
9600            dst.patchFormat.add(i.copy());
9601        };
9602        if (implementationGuide != null) {
9603          dst.implementationGuide = new ArrayList<UriType>();
9604          for (UriType i : implementationGuide)
9605            dst.implementationGuide.add(i.copy());
9606        };
9607        if (profile != null) {
9608          dst.profile = new ArrayList<Reference>();
9609          for (Reference i : profile)
9610            dst.profile.add(i.copy());
9611        };
9612        if (rest != null) {
9613          dst.rest = new ArrayList<CapabilityStatementRestComponent>();
9614          for (CapabilityStatementRestComponent i : rest)
9615            dst.rest.add(i.copy());
9616        };
9617        if (messaging != null) {
9618          dst.messaging = new ArrayList<CapabilityStatementMessagingComponent>();
9619          for (CapabilityStatementMessagingComponent i : messaging)
9620            dst.messaging.add(i.copy());
9621        };
9622        if (document != null) {
9623          dst.document = new ArrayList<CapabilityStatementDocumentComponent>();
9624          for (CapabilityStatementDocumentComponent i : document)
9625            dst.document.add(i.copy());
9626        };
9627        return dst;
9628      }
9629
9630      protected CapabilityStatement typedCopy() {
9631        return copy();
9632      }
9633
9634      @Override
9635      public boolean equalsDeep(Base other_) {
9636        if (!super.equalsDeep(other_))
9637          return false;
9638        if (!(other_ instanceof CapabilityStatement))
9639          return false;
9640        CapabilityStatement o = (CapabilityStatement) other_;
9641        return compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) && compareDeep(kind, o.kind, true)
9642           && compareDeep(instantiates, o.instantiates, true) && compareDeep(software, o.software, true) && compareDeep(implementation, o.implementation, true)
9643           && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(acceptUnknown, o.acceptUnknown, true)
9644           && compareDeep(format, o.format, true) && compareDeep(patchFormat, o.patchFormat, true) && compareDeep(implementationGuide, o.implementationGuide, true)
9645           && compareDeep(profile, o.profile, true) && compareDeep(rest, o.rest, true) && compareDeep(messaging, o.messaging, true)
9646           && compareDeep(document, o.document, true);
9647      }
9648
9649      @Override
9650      public boolean equalsShallow(Base other_) {
9651        if (!super.equalsShallow(other_))
9652          return false;
9653        if (!(other_ instanceof CapabilityStatement))
9654          return false;
9655        CapabilityStatement o = (CapabilityStatement) other_;
9656        return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(kind, o.kind, true)
9657           && compareValues(instantiates, o.instantiates, true) && compareValues(fhirVersion, o.fhirVersion, true)
9658           && compareValues(acceptUnknown, o.acceptUnknown, true) && compareValues(format, o.format, true) && compareValues(patchFormat, o.patchFormat, true)
9659           && compareValues(implementationGuide, o.implementationGuide, true);
9660      }
9661
9662      public boolean isEmpty() {
9663        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, copyright, kind
9664          , instantiates, software, implementation, fhirVersion, acceptUnknown, format, patchFormat
9665          , implementationGuide, profile, rest, messaging, document);
9666      }
9667
9668  @Override
9669  public ResourceType getResourceType() {
9670    return ResourceType.CapabilityStatement;
9671   }
9672
9673 /**
9674   * Search parameter: <b>date</b>
9675   * <p>
9676   * Description: <b>The capability statement publication date</b><br>
9677   * Type: <b>date</b><br>
9678   * Path: <b>CapabilityStatement.date</b><br>
9679   * </p>
9680   */
9681  @SearchParamDefinition(name="date", path="CapabilityStatement.date", description="The capability statement publication date", type="date" )
9682  public static final String SP_DATE = "date";
9683 /**
9684   * <b>Fluent Client</b> search parameter constant for <b>date</b>
9685   * <p>
9686   * Description: <b>The capability statement publication date</b><br>
9687   * Type: <b>date</b><br>
9688   * Path: <b>CapabilityStatement.date</b><br>
9689   * </p>
9690   */
9691  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
9692
9693 /**
9694   * Search parameter: <b>resource-profile</b>
9695   * <p>
9696   * Description: <b>A profile id invoked in a capability statement</b><br>
9697   * Type: <b>reference</b><br>
9698   * Path: <b>CapabilityStatement.rest.resource.profile</b><br>
9699   * </p>
9700   */
9701  @SearchParamDefinition(name="resource-profile", path="CapabilityStatement.rest.resource.profile", description="A profile id invoked in a capability statement", type="reference", target={StructureDefinition.class } )
9702  public static final String SP_RESOURCE_PROFILE = "resource-profile";
9703 /**
9704   * <b>Fluent Client</b> search parameter constant for <b>resource-profile</b>
9705   * <p>
9706   * Description: <b>A profile id invoked in a capability statement</b><br>
9707   * Type: <b>reference</b><br>
9708   * Path: <b>CapabilityStatement.rest.resource.profile</b><br>
9709   * </p>
9710   */
9711  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESOURCE_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESOURCE_PROFILE);
9712
9713/**
9714   * Constant for fluent queries to be used to add include statements. Specifies
9715   * the path value of "<b>CapabilityStatement:resource-profile</b>".
9716   */
9717  public static final ca.uhn.fhir.model.api.Include INCLUDE_RESOURCE_PROFILE = new ca.uhn.fhir.model.api.Include("CapabilityStatement:resource-profile").toLocked();
9718
9719 /**
9720   * Search parameter: <b>software</b>
9721   * <p>
9722   * Description: <b>Part of a the name of a software application</b><br>
9723   * Type: <b>string</b><br>
9724   * Path: <b>CapabilityStatement.software.name</b><br>
9725   * </p>
9726   */
9727  @SearchParamDefinition(name="software", path="CapabilityStatement.software.name", description="Part of a the name of a software application", type="string" )
9728  public static final String SP_SOFTWARE = "software";
9729 /**
9730   * <b>Fluent Client</b> search parameter constant for <b>software</b>
9731   * <p>
9732   * Description: <b>Part of a the name of a software application</b><br>
9733   * Type: <b>string</b><br>
9734   * Path: <b>CapabilityStatement.software.name</b><br>
9735   * </p>
9736   */
9737  public static final ca.uhn.fhir.rest.gclient.StringClientParam SOFTWARE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_SOFTWARE);
9738
9739 /**
9740   * Search parameter: <b>resource</b>
9741   * <p>
9742   * Description: <b>Name of a resource mentioned in a capability statement</b><br>
9743   * Type: <b>token</b><br>
9744   * Path: <b>CapabilityStatement.rest.resource.type</b><br>
9745   * </p>
9746   */
9747  @SearchParamDefinition(name="resource", path="CapabilityStatement.rest.resource.type", description="Name of a resource mentioned in a capability statement", type="token" )
9748  public static final String SP_RESOURCE = "resource";
9749 /**
9750   * <b>Fluent Client</b> search parameter constant for <b>resource</b>
9751   * <p>
9752   * Description: <b>Name of a resource mentioned in a capability statement</b><br>
9753   * Type: <b>token</b><br>
9754   * Path: <b>CapabilityStatement.rest.resource.type</b><br>
9755   * </p>
9756   */
9757  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE);
9758
9759 /**
9760   * Search parameter: <b>jurisdiction</b>
9761   * <p>
9762   * Description: <b>Intended jurisdiction for the capability statement</b><br>
9763   * Type: <b>token</b><br>
9764   * Path: <b>CapabilityStatement.jurisdiction</b><br>
9765   * </p>
9766   */
9767  @SearchParamDefinition(name="jurisdiction", path="CapabilityStatement.jurisdiction", description="Intended jurisdiction for the capability statement", type="token" )
9768  public static final String SP_JURISDICTION = "jurisdiction";
9769 /**
9770   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
9771   * <p>
9772   * Description: <b>Intended jurisdiction for the capability statement</b><br>
9773   * Type: <b>token</b><br>
9774   * Path: <b>CapabilityStatement.jurisdiction</b><br>
9775   * </p>
9776   */
9777  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
9778
9779 /**
9780   * Search parameter: <b>format</b>
9781   * <p>
9782   * Description: <b>formats supported (xml | json | ttl | mime type)</b><br>
9783   * Type: <b>token</b><br>
9784   * Path: <b>CapabilityStatement.format</b><br>
9785   * </p>
9786   */
9787  @SearchParamDefinition(name="format", path="CapabilityStatement.format", description="formats supported (xml | json | ttl | mime type)", type="token" )
9788  public static final String SP_FORMAT = "format";
9789 /**
9790   * <b>Fluent Client</b> search parameter constant for <b>format</b>
9791   * <p>
9792   * Description: <b>formats supported (xml | json | ttl | mime type)</b><br>
9793   * Type: <b>token</b><br>
9794   * Path: <b>CapabilityStatement.format</b><br>
9795   * </p>
9796   */
9797  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORMAT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FORMAT);
9798
9799 /**
9800   * Search parameter: <b>description</b>
9801   * <p>
9802   * Description: <b>The description of the capability statement</b><br>
9803   * Type: <b>string</b><br>
9804   * Path: <b>CapabilityStatement.description</b><br>
9805   * </p>
9806   */
9807  @SearchParamDefinition(name="description", path="CapabilityStatement.description", description="The description of the capability statement", type="string" )
9808  public static final String SP_DESCRIPTION = "description";
9809 /**
9810   * <b>Fluent Client</b> search parameter constant for <b>description</b>
9811   * <p>
9812   * Description: <b>The description of the capability statement</b><br>
9813   * Type: <b>string</b><br>
9814   * Path: <b>CapabilityStatement.description</b><br>
9815   * </p>
9816   */
9817  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
9818
9819 /**
9820   * Search parameter: <b>title</b>
9821   * <p>
9822   * Description: <b>The human-friendly name of the capability statement</b><br>
9823   * Type: <b>string</b><br>
9824   * Path: <b>CapabilityStatement.title</b><br>
9825   * </p>
9826   */
9827  @SearchParamDefinition(name="title", path="CapabilityStatement.title", description="The human-friendly name of the capability statement", type="string" )
9828  public static final String SP_TITLE = "title";
9829 /**
9830   * <b>Fluent Client</b> search parameter constant for <b>title</b>
9831   * <p>
9832   * Description: <b>The human-friendly name of the capability statement</b><br>
9833   * Type: <b>string</b><br>
9834   * Path: <b>CapabilityStatement.title</b><br>
9835   * </p>
9836   */
9837  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
9838
9839 /**
9840   * Search parameter: <b>fhirversion</b>
9841   * <p>
9842   * Description: <b>The version of FHIR</b><br>
9843   * Type: <b>token</b><br>
9844   * Path: <b>CapabilityStatement.version</b><br>
9845   * </p>
9846   */
9847  @SearchParamDefinition(name="fhirversion", path="CapabilityStatement.version", description="The version of FHIR", type="token" )
9848  public static final String SP_FHIRVERSION = "fhirversion";
9849 /**
9850   * <b>Fluent Client</b> search parameter constant for <b>fhirversion</b>
9851   * <p>
9852   * Description: <b>The version of FHIR</b><br>
9853   * Type: <b>token</b><br>
9854   * Path: <b>CapabilityStatement.version</b><br>
9855   * </p>
9856   */
9857  public static final ca.uhn.fhir.rest.gclient.TokenClientParam FHIRVERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FHIRVERSION);
9858
9859 /**
9860   * Search parameter: <b>version</b>
9861   * <p>
9862   * Description: <b>The business version of the capability statement</b><br>
9863   * Type: <b>token</b><br>
9864   * Path: <b>CapabilityStatement.version</b><br>
9865   * </p>
9866   */
9867  @SearchParamDefinition(name="version", path="CapabilityStatement.version", description="The business version of the capability statement", type="token" )
9868  public static final String SP_VERSION = "version";
9869 /**
9870   * <b>Fluent Client</b> search parameter constant for <b>version</b>
9871   * <p>
9872   * Description: <b>The business version of the capability statement</b><br>
9873   * Type: <b>token</b><br>
9874   * Path: <b>CapabilityStatement.version</b><br>
9875   * </p>
9876   */
9877  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
9878
9879 /**
9880   * Search parameter: <b>url</b>
9881   * <p>
9882   * Description: <b>The uri that identifies the capability statement</b><br>
9883   * Type: <b>uri</b><br>
9884   * Path: <b>CapabilityStatement.url</b><br>
9885   * </p>
9886   */
9887  @SearchParamDefinition(name="url", path="CapabilityStatement.url", description="The uri that identifies the capability statement", type="uri" )
9888  public static final String SP_URL = "url";
9889 /**
9890   * <b>Fluent Client</b> search parameter constant for <b>url</b>
9891   * <p>
9892   * Description: <b>The uri that identifies the capability statement</b><br>
9893   * Type: <b>uri</b><br>
9894   * Path: <b>CapabilityStatement.url</b><br>
9895   * </p>
9896   */
9897  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
9898
9899 /**
9900   * Search parameter: <b>supported-profile</b>
9901   * <p>
9902   * Description: <b>Profiles for use cases supported</b><br>
9903   * Type: <b>reference</b><br>
9904   * Path: <b>CapabilityStatement.profile</b><br>
9905   * </p>
9906   */
9907  @SearchParamDefinition(name="supported-profile", path="CapabilityStatement.profile", description="Profiles for use cases supported", type="reference", target={StructureDefinition.class } )
9908  public static final String SP_SUPPORTED_PROFILE = "supported-profile";
9909 /**
9910   * <b>Fluent Client</b> search parameter constant for <b>supported-profile</b>
9911   * <p>
9912   * Description: <b>Profiles for use cases supported</b><br>
9913   * Type: <b>reference</b><br>
9914   * Path: <b>CapabilityStatement.profile</b><br>
9915   * </p>
9916   */
9917  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTED_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTED_PROFILE);
9918
9919/**
9920   * Constant for fluent queries to be used to add include statements. Specifies
9921   * the path value of "<b>CapabilityStatement:supported-profile</b>".
9922   */
9923  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTED_PROFILE = new ca.uhn.fhir.model.api.Include("CapabilityStatement:supported-profile").toLocked();
9924
9925 /**
9926   * Search parameter: <b>mode</b>
9927   * <p>
9928   * Description: <b>Mode - restful (server/client) or messaging (sender/receiver)</b><br>
9929   * Type: <b>token</b><br>
9930   * Path: <b>CapabilityStatement.rest.mode</b><br>
9931   * </p>
9932   */
9933  @SearchParamDefinition(name="mode", path="CapabilityStatement.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" )
9934  public static final String SP_MODE = "mode";
9935 /**
9936   * <b>Fluent Client</b> search parameter constant for <b>mode</b>
9937   * <p>
9938   * Description: <b>Mode - restful (server/client) or messaging (sender/receiver)</b><br>
9939   * Type: <b>token</b><br>
9940   * Path: <b>CapabilityStatement.rest.mode</b><br>
9941   * </p>
9942   */
9943  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MODE);
9944
9945 /**
9946   * Search parameter: <b>security-service</b>
9947   * <p>
9948   * Description: <b>OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates</b><br>
9949   * Type: <b>token</b><br>
9950   * Path: <b>CapabilityStatement.rest.security.service</b><br>
9951   * </p>
9952   */
9953  @SearchParamDefinition(name="security-service", path="CapabilityStatement.rest.security.service", description="OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", type="token" )
9954  public static final String SP_SECURITY_SERVICE = "security-service";
9955 /**
9956   * <b>Fluent Client</b> search parameter constant for <b>security-service</b>
9957   * <p>
9958   * Description: <b>OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates</b><br>
9959   * Type: <b>token</b><br>
9960   * Path: <b>CapabilityStatement.rest.security.service</b><br>
9961   * </p>
9962   */
9963  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SECURITY_SERVICE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SECURITY_SERVICE);
9964
9965 /**
9966   * Search parameter: <b>name</b>
9967   * <p>
9968   * Description: <b>Computationally friendly name of the capability statement</b><br>
9969   * Type: <b>string</b><br>
9970   * Path: <b>CapabilityStatement.name</b><br>
9971   * </p>
9972   */
9973  @SearchParamDefinition(name="name", path="CapabilityStatement.name", description="Computationally friendly name of the capability statement", type="string" )
9974  public static final String SP_NAME = "name";
9975 /**
9976   * <b>Fluent Client</b> search parameter constant for <b>name</b>
9977   * <p>
9978   * Description: <b>Computationally friendly name of the capability statement</b><br>
9979   * Type: <b>string</b><br>
9980   * Path: <b>CapabilityStatement.name</b><br>
9981   * </p>
9982   */
9983  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
9984
9985 /**
9986   * Search parameter: <b>publisher</b>
9987   * <p>
9988   * Description: <b>Name of the publisher of the capability statement</b><br>
9989   * Type: <b>string</b><br>
9990   * Path: <b>CapabilityStatement.publisher</b><br>
9991   * </p>
9992   */
9993  @SearchParamDefinition(name="publisher", path="CapabilityStatement.publisher", description="Name of the publisher of the capability statement", type="string" )
9994  public static final String SP_PUBLISHER = "publisher";
9995 /**
9996   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
9997   * <p>
9998   * Description: <b>Name of the publisher of the capability statement</b><br>
9999   * Type: <b>string</b><br>
10000   * Path: <b>CapabilityStatement.publisher</b><br>
10001   * </p>
10002   */
10003  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
10004
10005 /**
10006   * Search parameter: <b>event</b>
10007   * <p>
10008   * Description: <b>Event code in a capability statement</b><br>
10009   * Type: <b>token</b><br>
10010   * Path: <b>CapabilityStatement.messaging.event.code</b><br>
10011   * </p>
10012   */
10013  @SearchParamDefinition(name="event", path="CapabilityStatement.messaging.event.code", description="Event code in a capability statement", type="token" )
10014  public static final String SP_EVENT = "event";
10015 /**
10016   * <b>Fluent Client</b> search parameter constant for <b>event</b>
10017   * <p>
10018   * Description: <b>Event code in a capability statement</b><br>
10019   * Type: <b>token</b><br>
10020   * Path: <b>CapabilityStatement.messaging.event.code</b><br>
10021   * </p>
10022   */
10023  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EVENT);
10024
10025 /**
10026   * Search parameter: <b>guide</b>
10027   * <p>
10028   * Description: <b>Implementation guides supported</b><br>
10029   * Type: <b>uri</b><br>
10030   * Path: <b>CapabilityStatement.implementationGuide</b><br>
10031   * </p>
10032   */
10033  @SearchParamDefinition(name="guide", path="CapabilityStatement.implementationGuide", description="Implementation guides supported", type="uri" )
10034  public static final String SP_GUIDE = "guide";
10035 /**
10036   * <b>Fluent Client</b> search parameter constant for <b>guide</b>
10037   * <p>
10038   * Description: <b>Implementation guides supported</b><br>
10039   * Type: <b>uri</b><br>
10040   * Path: <b>CapabilityStatement.implementationGuide</b><br>
10041   * </p>
10042   */
10043  public static final ca.uhn.fhir.rest.gclient.UriClientParam GUIDE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_GUIDE);
10044
10045 /**
10046   * Search parameter: <b>status</b>
10047   * <p>
10048   * Description: <b>The current status of the capability statement</b><br>
10049   * Type: <b>token</b><br>
10050   * Path: <b>CapabilityStatement.status</b><br>
10051   * </p>
10052   */
10053  @SearchParamDefinition(name="status", path="CapabilityStatement.status", description="The current status of the capability statement", type="token" )
10054  public static final String SP_STATUS = "status";
10055 /**
10056   * <b>Fluent Client</b> search parameter constant for <b>status</b>
10057   * <p>
10058   * Description: <b>The current status of the capability statement</b><br>
10059   * Type: <b>token</b><br>
10060   * Path: <b>CapabilityStatement.status</b><br>
10061   * </p>
10062   */
10063  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
10064
10065
10066}
10067