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