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