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