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