001package org.hl7.fhir.dstu3.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.dstu3.model.Enumerations.*;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046/**
047 * A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.
048 */
049@ResourceDef(name="ImplementationGuide", profile="http://hl7.org/fhir/Profile/ImplementationGuide")
050@ChildOrder(names={"url", "version", "name", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "copyright", "fhirVersion", "dependency", "package", "global", "binary", "page"})
051public class ImplementationGuide extends MetadataResource {
052
053    public enum GuideDependencyType {
054        /**
055         * The guide is referred to by URL.
056         */
057        REFERENCE, 
058        /**
059         * The guide is embedded in this guide when published.
060         */
061        INCLUSION, 
062        /**
063         * added to help the parsers with the generic types
064         */
065        NULL;
066        public static GuideDependencyType fromCode(String codeString) throws FHIRException {
067            if (codeString == null || "".equals(codeString))
068                return null;
069        if ("reference".equals(codeString))
070          return REFERENCE;
071        if ("inclusion".equals(codeString))
072          return INCLUSION;
073        if (Configuration.isAcceptInvalidEnums())
074          return null;
075        else
076          throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'");
077        }
078        public String toCode() {
079          switch (this) {
080            case REFERENCE: return "reference";
081            case INCLUSION: return "inclusion";
082            default: return "?";
083          }
084        }
085        public String getSystem() {
086          switch (this) {
087            case REFERENCE: return "http://hl7.org/fhir/guide-dependency-type";
088            case INCLUSION: return "http://hl7.org/fhir/guide-dependency-type";
089            default: return "?";
090          }
091        }
092        public String getDefinition() {
093          switch (this) {
094            case REFERENCE: return "The guide is referred to by URL.";
095            case INCLUSION: return "The guide is embedded in this guide when published.";
096            default: return "?";
097          }
098        }
099        public String getDisplay() {
100          switch (this) {
101            case REFERENCE: return "Reference";
102            case INCLUSION: return "Inclusion";
103            default: return "?";
104          }
105        }
106    }
107
108  public static class GuideDependencyTypeEnumFactory implements EnumFactory<GuideDependencyType> {
109    public GuideDependencyType fromCode(String codeString) throws IllegalArgumentException {
110      if (codeString == null || "".equals(codeString))
111            if (codeString == null || "".equals(codeString))
112                return null;
113        if ("reference".equals(codeString))
114          return GuideDependencyType.REFERENCE;
115        if ("inclusion".equals(codeString))
116          return GuideDependencyType.INCLUSION;
117        throw new IllegalArgumentException("Unknown GuideDependencyType code '"+codeString+"'");
118        }
119        public Enumeration<GuideDependencyType> fromType(Base code) throws FHIRException {
120          if (code == null)
121            return null;
122          if (code.isEmpty())
123            return new Enumeration<GuideDependencyType>(this);
124          String codeString = ((PrimitiveType) code).asStringValue();
125          if (codeString == null || "".equals(codeString))
126            return null;
127        if ("reference".equals(codeString))
128          return new Enumeration<GuideDependencyType>(this, GuideDependencyType.REFERENCE);
129        if ("inclusion".equals(codeString))
130          return new Enumeration<GuideDependencyType>(this, GuideDependencyType.INCLUSION);
131        throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'");
132        }
133    public String toCode(GuideDependencyType code) {
134      if (code == GuideDependencyType.REFERENCE)
135        return "reference";
136      if (code == GuideDependencyType.INCLUSION)
137        return "inclusion";
138      return "?";
139      }
140    public String toSystem(GuideDependencyType code) {
141      return code.getSystem();
142      }
143    }
144
145    public enum GuidePageKind {
146        /**
147         * This is a page of content that is included in the implementation guide. It has no particular function.
148         */
149        PAGE, 
150        /**
151         * This is a page that represents a human readable rendering of an example.
152         */
153        EXAMPLE, 
154        /**
155         * This is a page that represents a list of resources of one or more types.
156         */
157        LIST, 
158        /**
159         * This is a page showing where an included guide is injected.
160         */
161        INCLUDE, 
162        /**
163         * This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section.
164         */
165        DIRECTORY, 
166        /**
167         * This is a page that creates the listed resources as a dictionary.
168         */
169        DICTIONARY, 
170        /**
171         * This is a generated page that contains the table of contents.
172         */
173        TOC, 
174        /**
175         * This is a page that represents a presented resource. This is typically used for generated conformance resource presentations.
176         */
177        RESOURCE, 
178        /**
179         * added to help the parsers with the generic types
180         */
181        NULL;
182        public static GuidePageKind fromCode(String codeString) throws FHIRException {
183            if (codeString == null || "".equals(codeString))
184                return null;
185        if ("page".equals(codeString))
186          return PAGE;
187        if ("example".equals(codeString))
188          return EXAMPLE;
189        if ("list".equals(codeString))
190          return LIST;
191        if ("include".equals(codeString))
192          return INCLUDE;
193        if ("directory".equals(codeString))
194          return DIRECTORY;
195        if ("dictionary".equals(codeString))
196          return DICTIONARY;
197        if ("toc".equals(codeString))
198          return TOC;
199        if ("resource".equals(codeString))
200          return RESOURCE;
201        if (Configuration.isAcceptInvalidEnums())
202          return null;
203        else
204          throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'");
205        }
206        public String toCode() {
207          switch (this) {
208            case PAGE: return "page";
209            case EXAMPLE: return "example";
210            case LIST: return "list";
211            case INCLUDE: return "include";
212            case DIRECTORY: return "directory";
213            case DICTIONARY: return "dictionary";
214            case TOC: return "toc";
215            case RESOURCE: return "resource";
216            default: return "?";
217          }
218        }
219        public String getSystem() {
220          switch (this) {
221            case PAGE: return "http://hl7.org/fhir/guide-page-kind";
222            case EXAMPLE: return "http://hl7.org/fhir/guide-page-kind";
223            case LIST: return "http://hl7.org/fhir/guide-page-kind";
224            case INCLUDE: return "http://hl7.org/fhir/guide-page-kind";
225            case DIRECTORY: return "http://hl7.org/fhir/guide-page-kind";
226            case DICTIONARY: return "http://hl7.org/fhir/guide-page-kind";
227            case TOC: return "http://hl7.org/fhir/guide-page-kind";
228            case RESOURCE: return "http://hl7.org/fhir/guide-page-kind";
229            default: return "?";
230          }
231        }
232        public String getDefinition() {
233          switch (this) {
234            case PAGE: return "This is a page of content that is included in the implementation guide. It has no particular function.";
235            case EXAMPLE: return "This is a page that represents a human readable rendering of an example.";
236            case LIST: return "This is a page that represents a list of resources of one or more types.";
237            case INCLUDE: return "This is a page showing where an included guide is injected.";
238            case DIRECTORY: return "This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section.";
239            case DICTIONARY: return "This is a page that creates the listed resources as a dictionary.";
240            case TOC: return "This is a generated page that contains the table of contents.";
241            case RESOURCE: return "This is a page that represents a presented resource. This is typically used for generated conformance resource presentations.";
242            default: return "?";
243          }
244        }
245        public String getDisplay() {
246          switch (this) {
247            case PAGE: return "Page";
248            case EXAMPLE: return "Example";
249            case LIST: return "List";
250            case INCLUDE: return "Include";
251            case DIRECTORY: return "Directory";
252            case DICTIONARY: return "Dictionary";
253            case TOC: return "Table Of Contents";
254            case RESOURCE: return "Resource";
255            default: return "?";
256          }
257        }
258    }
259
260  public static class GuidePageKindEnumFactory implements EnumFactory<GuidePageKind> {
261    public GuidePageKind fromCode(String codeString) throws IllegalArgumentException {
262      if (codeString == null || "".equals(codeString))
263            if (codeString == null || "".equals(codeString))
264                return null;
265        if ("page".equals(codeString))
266          return GuidePageKind.PAGE;
267        if ("example".equals(codeString))
268          return GuidePageKind.EXAMPLE;
269        if ("list".equals(codeString))
270          return GuidePageKind.LIST;
271        if ("include".equals(codeString))
272          return GuidePageKind.INCLUDE;
273        if ("directory".equals(codeString))
274          return GuidePageKind.DIRECTORY;
275        if ("dictionary".equals(codeString))
276          return GuidePageKind.DICTIONARY;
277        if ("toc".equals(codeString))
278          return GuidePageKind.TOC;
279        if ("resource".equals(codeString))
280          return GuidePageKind.RESOURCE;
281        throw new IllegalArgumentException("Unknown GuidePageKind code '"+codeString+"'");
282        }
283        public Enumeration<GuidePageKind> fromType(Base code) throws FHIRException {
284          if (code == null)
285            return null;
286          if (code.isEmpty())
287            return new Enumeration<GuidePageKind>(this);
288          String codeString = ((PrimitiveType) code).asStringValue();
289          if (codeString == null || "".equals(codeString))
290            return null;
291        if ("page".equals(codeString))
292          return new Enumeration<GuidePageKind>(this, GuidePageKind.PAGE);
293        if ("example".equals(codeString))
294          return new Enumeration<GuidePageKind>(this, GuidePageKind.EXAMPLE);
295        if ("list".equals(codeString))
296          return new Enumeration<GuidePageKind>(this, GuidePageKind.LIST);
297        if ("include".equals(codeString))
298          return new Enumeration<GuidePageKind>(this, GuidePageKind.INCLUDE);
299        if ("directory".equals(codeString))
300          return new Enumeration<GuidePageKind>(this, GuidePageKind.DIRECTORY);
301        if ("dictionary".equals(codeString))
302          return new Enumeration<GuidePageKind>(this, GuidePageKind.DICTIONARY);
303        if ("toc".equals(codeString))
304          return new Enumeration<GuidePageKind>(this, GuidePageKind.TOC);
305        if ("resource".equals(codeString))
306          return new Enumeration<GuidePageKind>(this, GuidePageKind.RESOURCE);
307        throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'");
308        }
309    public String toCode(GuidePageKind code) {
310      if (code == GuidePageKind.PAGE)
311        return "page";
312      if (code == GuidePageKind.EXAMPLE)
313        return "example";
314      if (code == GuidePageKind.LIST)
315        return "list";
316      if (code == GuidePageKind.INCLUDE)
317        return "include";
318      if (code == GuidePageKind.DIRECTORY)
319        return "directory";
320      if (code == GuidePageKind.DICTIONARY)
321        return "dictionary";
322      if (code == GuidePageKind.TOC)
323        return "toc";
324      if (code == GuidePageKind.RESOURCE)
325        return "resource";
326      return "?";
327      }
328    public String toSystem(GuidePageKind code) {
329      return code.getSystem();
330      }
331    }
332
333    @Block()
334    public static class ImplementationGuideDependencyComponent extends BackboneElement implements IBaseBackboneElement {
335        /**
336         * How the dependency is represented when the guide is published.
337         */
338        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
339        @Description(shortDefinition="reference | inclusion", formalDefinition="How the dependency is represented when the guide is published." )
340        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/guide-dependency-type")
341        protected Enumeration<GuideDependencyType> type;
342
343        /**
344         * Where the dependency is located.
345         */
346        @Child(name = "uri", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true)
347        @Description(shortDefinition="Where to find dependency", formalDefinition="Where the dependency is located." )
348        protected UriType uri;
349
350        private static final long serialVersionUID = 162447098L;
351
352    /**
353     * Constructor
354     */
355      public ImplementationGuideDependencyComponent() {
356        super();
357      }
358
359    /**
360     * Constructor
361     */
362      public ImplementationGuideDependencyComponent(Enumeration<GuideDependencyType> type, UriType uri) {
363        super();
364        this.type = type;
365        this.uri = uri;
366      }
367
368        /**
369         * @return {@link #type} (How the dependency is represented when the guide is published.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
370         */
371        public Enumeration<GuideDependencyType> getTypeElement() { 
372          if (this.type == null)
373            if (Configuration.errorOnAutoCreate())
374              throw new Error("Attempt to auto-create ImplementationGuideDependencyComponent.type");
375            else if (Configuration.doAutoCreate())
376              this.type = new Enumeration<GuideDependencyType>(new GuideDependencyTypeEnumFactory()); // bb
377          return this.type;
378        }
379
380        public boolean hasTypeElement() { 
381          return this.type != null && !this.type.isEmpty();
382        }
383
384        public boolean hasType() { 
385          return this.type != null && !this.type.isEmpty();
386        }
387
388        /**
389         * @param value {@link #type} (How the dependency is represented when the guide is published.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
390         */
391        public ImplementationGuideDependencyComponent setTypeElement(Enumeration<GuideDependencyType> value) { 
392          this.type = value;
393          return this;
394        }
395
396        /**
397         * @return How the dependency is represented when the guide is published.
398         */
399        public GuideDependencyType getType() { 
400          return this.type == null ? null : this.type.getValue();
401        }
402
403        /**
404         * @param value How the dependency is represented when the guide is published.
405         */
406        public ImplementationGuideDependencyComponent setType(GuideDependencyType value) { 
407            if (this.type == null)
408              this.type = new Enumeration<GuideDependencyType>(new GuideDependencyTypeEnumFactory());
409            this.type.setValue(value);
410          return this;
411        }
412
413        /**
414         * @return {@link #uri} (Where the dependency is located.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value
415         */
416        public UriType getUriElement() { 
417          if (this.uri == null)
418            if (Configuration.errorOnAutoCreate())
419              throw new Error("Attempt to auto-create ImplementationGuideDependencyComponent.uri");
420            else if (Configuration.doAutoCreate())
421              this.uri = new UriType(); // bb
422          return this.uri;
423        }
424
425        public boolean hasUriElement() { 
426          return this.uri != null && !this.uri.isEmpty();
427        }
428
429        public boolean hasUri() { 
430          return this.uri != null && !this.uri.isEmpty();
431        }
432
433        /**
434         * @param value {@link #uri} (Where the dependency is located.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value
435         */
436        public ImplementationGuideDependencyComponent setUriElement(UriType value) { 
437          this.uri = value;
438          return this;
439        }
440
441        /**
442         * @return Where the dependency is located.
443         */
444        public String getUri() { 
445          return this.uri == null ? null : this.uri.getValue();
446        }
447
448        /**
449         * @param value Where the dependency is located.
450         */
451        public ImplementationGuideDependencyComponent setUri(String value) { 
452            if (this.uri == null)
453              this.uri = new UriType();
454            this.uri.setValue(value);
455          return this;
456        }
457
458        protected void listChildren(List<Property> childrenList) {
459          super.listChildren(childrenList);
460          childrenList.add(new Property("type", "code", "How the dependency is represented when the guide is published.", 0, java.lang.Integer.MAX_VALUE, type));
461          childrenList.add(new Property("uri", "uri", "Where the dependency is located.", 0, java.lang.Integer.MAX_VALUE, uri));
462        }
463
464      @Override
465      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
466        switch (hash) {
467        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<GuideDependencyType>
468        case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // UriType
469        default: return super.getProperty(hash, name, checkValid);
470        }
471
472      }
473
474      @Override
475      public Base setProperty(int hash, String name, Base value) throws FHIRException {
476        switch (hash) {
477        case 3575610: // type
478          value = new GuideDependencyTypeEnumFactory().fromType(castToCode(value));
479          this.type = (Enumeration) value; // Enumeration<GuideDependencyType>
480          return value;
481        case 116076: // uri
482          this.uri = castToUri(value); // UriType
483          return value;
484        default: return super.setProperty(hash, name, value);
485        }
486
487      }
488
489      @Override
490      public Base setProperty(String name, Base value) throws FHIRException {
491        if (name.equals("type")) {
492          value = new GuideDependencyTypeEnumFactory().fromType(castToCode(value));
493          this.type = (Enumeration) value; // Enumeration<GuideDependencyType>
494        } else if (name.equals("uri")) {
495          this.uri = castToUri(value); // UriType
496        } else
497          return super.setProperty(name, value);
498        return value;
499      }
500
501      @Override
502      public Base makeProperty(int hash, String name) throws FHIRException {
503        switch (hash) {
504        case 3575610:  return getTypeElement();
505        case 116076:  return getUriElement();
506        default: return super.makeProperty(hash, name);
507        }
508
509      }
510
511      @Override
512      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
513        switch (hash) {
514        case 3575610: /*type*/ return new String[] {"code"};
515        case 116076: /*uri*/ return new String[] {"uri"};
516        default: return super.getTypesForProperty(hash, name);
517        }
518
519      }
520
521      @Override
522      public Base addChild(String name) throws FHIRException {
523        if (name.equals("type")) {
524          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type");
525        }
526        else if (name.equals("uri")) {
527          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.uri");
528        }
529        else
530          return super.addChild(name);
531      }
532
533      public ImplementationGuideDependencyComponent copy() {
534        ImplementationGuideDependencyComponent dst = new ImplementationGuideDependencyComponent();
535        copyValues(dst);
536        dst.type = type == null ? null : type.copy();
537        dst.uri = uri == null ? null : uri.copy();
538        return dst;
539      }
540
541      @Override
542      public boolean equalsDeep(Base other) {
543        if (!super.equalsDeep(other))
544          return false;
545        if (!(other instanceof ImplementationGuideDependencyComponent))
546          return false;
547        ImplementationGuideDependencyComponent o = (ImplementationGuideDependencyComponent) other;
548        return compareDeep(type, o.type, true) && compareDeep(uri, o.uri, true);
549      }
550
551      @Override
552      public boolean equalsShallow(Base other) {
553        if (!super.equalsShallow(other))
554          return false;
555        if (!(other instanceof ImplementationGuideDependencyComponent))
556          return false;
557        ImplementationGuideDependencyComponent o = (ImplementationGuideDependencyComponent) other;
558        return compareValues(type, o.type, true) && compareValues(uri, o.uri, true);
559      }
560
561      public boolean isEmpty() {
562        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, uri);
563      }
564
565  public String fhirType() {
566    return "ImplementationGuide.dependency";
567
568  }
569
570  }
571
572    @Block()
573    public static class ImplementationGuidePackageComponent extends BackboneElement implements IBaseBackboneElement {
574        /**
575         * The name for the group, as used in page.package.
576         */
577        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
578        @Description(shortDefinition="Name used .page.package", formalDefinition="The name for the group, as used in page.package." )
579        protected StringType name;
580
581        /**
582         * Human readable text describing the package.
583         */
584        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
585        @Description(shortDefinition="Human readable text describing the package", formalDefinition="Human readable text describing the package." )
586        protected StringType description;
587
588        /**
589         * A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.
590         */
591        @Child(name = "resource", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
592        @Description(shortDefinition="Resource in the implementation guide", formalDefinition="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource." )
593        protected List<ImplementationGuidePackageResourceComponent> resource;
594
595        private static final long serialVersionUID = -701846580L;
596
597    /**
598     * Constructor
599     */
600      public ImplementationGuidePackageComponent() {
601        super();
602      }
603
604    /**
605     * Constructor
606     */
607      public ImplementationGuidePackageComponent(StringType name) {
608        super();
609        this.name = name;
610      }
611
612        /**
613         * @return {@link #name} (The name for the group, as used in page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
614         */
615        public StringType getNameElement() { 
616          if (this.name == null)
617            if (Configuration.errorOnAutoCreate())
618              throw new Error("Attempt to auto-create ImplementationGuidePackageComponent.name");
619            else if (Configuration.doAutoCreate())
620              this.name = new StringType(); // bb
621          return this.name;
622        }
623
624        public boolean hasNameElement() { 
625          return this.name != null && !this.name.isEmpty();
626        }
627
628        public boolean hasName() { 
629          return this.name != null && !this.name.isEmpty();
630        }
631
632        /**
633         * @param value {@link #name} (The name for the group, as used in page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
634         */
635        public ImplementationGuidePackageComponent setNameElement(StringType value) { 
636          this.name = value;
637          return this;
638        }
639
640        /**
641         * @return The name for the group, as used in page.package.
642         */
643        public String getName() { 
644          return this.name == null ? null : this.name.getValue();
645        }
646
647        /**
648         * @param value The name for the group, as used in page.package.
649         */
650        public ImplementationGuidePackageComponent setName(String value) { 
651            if (this.name == null)
652              this.name = new StringType();
653            this.name.setValue(value);
654          return this;
655        }
656
657        /**
658         * @return {@link #description} (Human readable text describing the package.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
659         */
660        public StringType getDescriptionElement() { 
661          if (this.description == null)
662            if (Configuration.errorOnAutoCreate())
663              throw new Error("Attempt to auto-create ImplementationGuidePackageComponent.description");
664            else if (Configuration.doAutoCreate())
665              this.description = new StringType(); // bb
666          return this.description;
667        }
668
669        public boolean hasDescriptionElement() { 
670          return this.description != null && !this.description.isEmpty();
671        }
672
673        public boolean hasDescription() { 
674          return this.description != null && !this.description.isEmpty();
675        }
676
677        /**
678         * @param value {@link #description} (Human readable text describing the package.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
679         */
680        public ImplementationGuidePackageComponent setDescriptionElement(StringType value) { 
681          this.description = value;
682          return this;
683        }
684
685        /**
686         * @return Human readable text describing the package.
687         */
688        public String getDescription() { 
689          return this.description == null ? null : this.description.getValue();
690        }
691
692        /**
693         * @param value Human readable text describing the package.
694         */
695        public ImplementationGuidePackageComponent setDescription(String value) { 
696          if (Utilities.noString(value))
697            this.description = null;
698          else {
699            if (this.description == null)
700              this.description = new StringType();
701            this.description.setValue(value);
702          }
703          return this;
704        }
705
706        /**
707         * @return {@link #resource} (A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.)
708         */
709        public List<ImplementationGuidePackageResourceComponent> getResource() { 
710          if (this.resource == null)
711            this.resource = new ArrayList<ImplementationGuidePackageResourceComponent>();
712          return this.resource;
713        }
714
715        /**
716         * @return Returns a reference to <code>this</code> for easy method chaining
717         */
718        public ImplementationGuidePackageComponent setResource(List<ImplementationGuidePackageResourceComponent> theResource) { 
719          this.resource = theResource;
720          return this;
721        }
722
723        public boolean hasResource() { 
724          if (this.resource == null)
725            return false;
726          for (ImplementationGuidePackageResourceComponent item : this.resource)
727            if (!item.isEmpty())
728              return true;
729          return false;
730        }
731
732        public ImplementationGuidePackageResourceComponent addResource() { //3
733          ImplementationGuidePackageResourceComponent t = new ImplementationGuidePackageResourceComponent();
734          if (this.resource == null)
735            this.resource = new ArrayList<ImplementationGuidePackageResourceComponent>();
736          this.resource.add(t);
737          return t;
738        }
739
740        public ImplementationGuidePackageComponent addResource(ImplementationGuidePackageResourceComponent t) { //3
741          if (t == null)
742            return this;
743          if (this.resource == null)
744            this.resource = new ArrayList<ImplementationGuidePackageResourceComponent>();
745          this.resource.add(t);
746          return this;
747        }
748
749        /**
750         * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist
751         */
752        public ImplementationGuidePackageResourceComponent getResourceFirstRep() { 
753          if (getResource().isEmpty()) {
754            addResource();
755          }
756          return getResource().get(0);
757        }
758
759        protected void listChildren(List<Property> childrenList) {
760          super.listChildren(childrenList);
761          childrenList.add(new Property("name", "string", "The name for the group, as used in page.package.", 0, java.lang.Integer.MAX_VALUE, name));
762          childrenList.add(new Property("description", "string", "Human readable text describing the package.", 0, java.lang.Integer.MAX_VALUE, description));
763          childrenList.add(new Property("resource", "", "A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.", 0, java.lang.Integer.MAX_VALUE, resource));
764        }
765
766      @Override
767      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
768        switch (hash) {
769        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
770        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
771        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // ImplementationGuidePackageResourceComponent
772        default: return super.getProperty(hash, name, checkValid);
773        }
774
775      }
776
777      @Override
778      public Base setProperty(int hash, String name, Base value) throws FHIRException {
779        switch (hash) {
780        case 3373707: // name
781          this.name = castToString(value); // StringType
782          return value;
783        case -1724546052: // description
784          this.description = castToString(value); // StringType
785          return value;
786        case -341064690: // resource
787          this.getResource().add((ImplementationGuidePackageResourceComponent) value); // ImplementationGuidePackageResourceComponent
788          return value;
789        default: return super.setProperty(hash, name, value);
790        }
791
792      }
793
794      @Override
795      public Base setProperty(String name, Base value) throws FHIRException {
796        if (name.equals("name")) {
797          this.name = castToString(value); // StringType
798        } else if (name.equals("description")) {
799          this.description = castToString(value); // StringType
800        } else if (name.equals("resource")) {
801          this.getResource().add((ImplementationGuidePackageResourceComponent) value);
802        } else
803          return super.setProperty(name, value);
804        return value;
805      }
806
807      @Override
808      public Base makeProperty(int hash, String name) throws FHIRException {
809        switch (hash) {
810        case 3373707:  return getNameElement();
811        case -1724546052:  return getDescriptionElement();
812        case -341064690:  return addResource(); 
813        default: return super.makeProperty(hash, name);
814        }
815
816      }
817
818      @Override
819      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
820        switch (hash) {
821        case 3373707: /*name*/ return new String[] {"string"};
822        case -1724546052: /*description*/ return new String[] {"string"};
823        case -341064690: /*resource*/ return new String[] {};
824        default: return super.getTypesForProperty(hash, name);
825        }
826
827      }
828
829      @Override
830      public Base addChild(String name) throws FHIRException {
831        if (name.equals("name")) {
832          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name");
833        }
834        else if (name.equals("description")) {
835          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description");
836        }
837        else if (name.equals("resource")) {
838          return addResource();
839        }
840        else
841          return super.addChild(name);
842      }
843
844      public ImplementationGuidePackageComponent copy() {
845        ImplementationGuidePackageComponent dst = new ImplementationGuidePackageComponent();
846        copyValues(dst);
847        dst.name = name == null ? null : name.copy();
848        dst.description = description == null ? null : description.copy();
849        if (resource != null) {
850          dst.resource = new ArrayList<ImplementationGuidePackageResourceComponent>();
851          for (ImplementationGuidePackageResourceComponent i : resource)
852            dst.resource.add(i.copy());
853        };
854        return dst;
855      }
856
857      @Override
858      public boolean equalsDeep(Base other) {
859        if (!super.equalsDeep(other))
860          return false;
861        if (!(other instanceof ImplementationGuidePackageComponent))
862          return false;
863        ImplementationGuidePackageComponent o = (ImplementationGuidePackageComponent) other;
864        return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(resource, o.resource, true)
865          ;
866      }
867
868      @Override
869      public boolean equalsShallow(Base other) {
870        if (!super.equalsShallow(other))
871          return false;
872        if (!(other instanceof ImplementationGuidePackageComponent))
873          return false;
874        ImplementationGuidePackageComponent o = (ImplementationGuidePackageComponent) other;
875        return compareValues(name, o.name, true) && compareValues(description, o.description, true);
876      }
877
878      public boolean isEmpty() {
879        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, resource
880          );
881      }
882
883  public String fhirType() {
884    return "ImplementationGuide.package";
885
886  }
887
888  }
889
890    @Block()
891    public static class ImplementationGuidePackageResourceComponent extends BackboneElement implements IBaseBackboneElement {
892        /**
893         * Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.
894         */
895        @Child(name = "example", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true)
896        @Description(shortDefinition="If not an example, has its normal meaning", formalDefinition="Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide." )
897        protected BooleanType example;
898
899        /**
900         * A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).
901         */
902        @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
903        @Description(shortDefinition="Human Name for the resource", formalDefinition="A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name)." )
904        protected StringType name;
905
906        /**
907         * A description of the reason that a resource has been included in the implementation guide.
908         */
909        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
910        @Description(shortDefinition="Reason why included in guide", formalDefinition="A description of the reason that a resource has been included in the implementation guide." )
911        protected StringType description;
912
913        /**
914         * A short code that may be used to identify the resource throughout the implementation guide.
915         */
916        @Child(name = "acronym", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
917        @Description(shortDefinition="Short code to identify the resource", formalDefinition="A short code that may be used to identify the resource throughout the implementation guide." )
918        protected StringType acronym;
919
920        /**
921         * Where this resource is found.
922         */
923        @Child(name = "source", type = {UriType.class, Reference.class}, order=5, min=1, max=1, modifier=false, summary=true)
924        @Description(shortDefinition="Location of the resource", formalDefinition="Where this resource is found." )
925        protected Type source;
926
927        /**
928         * Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.
929         */
930        @Child(name = "exampleFor", type = {StructureDefinition.class}, order=6, min=0, max=1, modifier=false, summary=false)
931        @Description(shortDefinition="Resource this is an example of (if applicable)", formalDefinition="Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions." )
932        protected Reference exampleFor;
933
934        /**
935         * The actual object that is the target of the reference (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.)
936         */
937        protected StructureDefinition exampleForTarget;
938
939        private static final long serialVersionUID = 2085404852L;
940
941    /**
942     * Constructor
943     */
944      public ImplementationGuidePackageResourceComponent() {
945        super();
946      }
947
948    /**
949     * Constructor
950     */
951      public ImplementationGuidePackageResourceComponent(BooleanType example, Type source) {
952        super();
953        this.example = example;
954        this.source = source;
955      }
956
957        /**
958         * @return {@link #example} (Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.). This is the underlying object with id, value and extensions. The accessor "getExample" gives direct access to the value
959         */
960        public BooleanType getExampleElement() { 
961          if (this.example == null)
962            if (Configuration.errorOnAutoCreate())
963              throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.example");
964            else if (Configuration.doAutoCreate())
965              this.example = new BooleanType(); // bb
966          return this.example;
967        }
968
969        public boolean hasExampleElement() { 
970          return this.example != null && !this.example.isEmpty();
971        }
972
973        public boolean hasExample() { 
974          return this.example != null && !this.example.isEmpty();
975        }
976
977        /**
978         * @param value {@link #example} (Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.). This is the underlying object with id, value and extensions. The accessor "getExample" gives direct access to the value
979         */
980        public ImplementationGuidePackageResourceComponent setExampleElement(BooleanType value) { 
981          this.example = value;
982          return this;
983        }
984
985        /**
986         * @return Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.
987         */
988        public boolean getExample() { 
989          return this.example == null || this.example.isEmpty() ? false : this.example.getValue();
990        }
991
992        /**
993         * @param value Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.
994         */
995        public ImplementationGuidePackageResourceComponent setExample(boolean value) { 
996            if (this.example == null)
997              this.example = new BooleanType();
998            this.example.setValue(value);
999          return this;
1000        }
1001
1002        /**
1003         * @return {@link #name} (A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1004         */
1005        public StringType getNameElement() { 
1006          if (this.name == null)
1007            if (Configuration.errorOnAutoCreate())
1008              throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.name");
1009            else if (Configuration.doAutoCreate())
1010              this.name = new StringType(); // bb
1011          return this.name;
1012        }
1013
1014        public boolean hasNameElement() { 
1015          return this.name != null && !this.name.isEmpty();
1016        }
1017
1018        public boolean hasName() { 
1019          return this.name != null && !this.name.isEmpty();
1020        }
1021
1022        /**
1023         * @param value {@link #name} (A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1024         */
1025        public ImplementationGuidePackageResourceComponent setNameElement(StringType value) { 
1026          this.name = value;
1027          return this;
1028        }
1029
1030        /**
1031         * @return A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).
1032         */
1033        public String getName() { 
1034          return this.name == null ? null : this.name.getValue();
1035        }
1036
1037        /**
1038         * @param value A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).
1039         */
1040        public ImplementationGuidePackageResourceComponent setName(String value) { 
1041          if (Utilities.noString(value))
1042            this.name = null;
1043          else {
1044            if (this.name == null)
1045              this.name = new StringType();
1046            this.name.setValue(value);
1047          }
1048          return this;
1049        }
1050
1051        /**
1052         * @return {@link #description} (A description of the reason that a resource has been included in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1053         */
1054        public StringType getDescriptionElement() { 
1055          if (this.description == null)
1056            if (Configuration.errorOnAutoCreate())
1057              throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.description");
1058            else if (Configuration.doAutoCreate())
1059              this.description = new StringType(); // bb
1060          return this.description;
1061        }
1062
1063        public boolean hasDescriptionElement() { 
1064          return this.description != null && !this.description.isEmpty();
1065        }
1066
1067        public boolean hasDescription() { 
1068          return this.description != null && !this.description.isEmpty();
1069        }
1070
1071        /**
1072         * @param value {@link #description} (A description of the reason that a resource has been included in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1073         */
1074        public ImplementationGuidePackageResourceComponent setDescriptionElement(StringType value) { 
1075          this.description = value;
1076          return this;
1077        }
1078
1079        /**
1080         * @return A description of the reason that a resource has been included in the implementation guide.
1081         */
1082        public String getDescription() { 
1083          return this.description == null ? null : this.description.getValue();
1084        }
1085
1086        /**
1087         * @param value A description of the reason that a resource has been included in the implementation guide.
1088         */
1089        public ImplementationGuidePackageResourceComponent setDescription(String value) { 
1090          if (Utilities.noString(value))
1091            this.description = null;
1092          else {
1093            if (this.description == null)
1094              this.description = new StringType();
1095            this.description.setValue(value);
1096          }
1097          return this;
1098        }
1099
1100        /**
1101         * @return {@link #acronym} (A short code that may be used to identify the resource throughout the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getAcronym" gives direct access to the value
1102         */
1103        public StringType getAcronymElement() { 
1104          if (this.acronym == null)
1105            if (Configuration.errorOnAutoCreate())
1106              throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.acronym");
1107            else if (Configuration.doAutoCreate())
1108              this.acronym = new StringType(); // bb
1109          return this.acronym;
1110        }
1111
1112        public boolean hasAcronymElement() { 
1113          return this.acronym != null && !this.acronym.isEmpty();
1114        }
1115
1116        public boolean hasAcronym() { 
1117          return this.acronym != null && !this.acronym.isEmpty();
1118        }
1119
1120        /**
1121         * @param value {@link #acronym} (A short code that may be used to identify the resource throughout the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getAcronym" gives direct access to the value
1122         */
1123        public ImplementationGuidePackageResourceComponent setAcronymElement(StringType value) { 
1124          this.acronym = value;
1125          return this;
1126        }
1127
1128        /**
1129         * @return A short code that may be used to identify the resource throughout the implementation guide.
1130         */
1131        public String getAcronym() { 
1132          return this.acronym == null ? null : this.acronym.getValue();
1133        }
1134
1135        /**
1136         * @param value A short code that may be used to identify the resource throughout the implementation guide.
1137         */
1138        public ImplementationGuidePackageResourceComponent setAcronym(String value) { 
1139          if (Utilities.noString(value))
1140            this.acronym = null;
1141          else {
1142            if (this.acronym == null)
1143              this.acronym = new StringType();
1144            this.acronym.setValue(value);
1145          }
1146          return this;
1147        }
1148
1149        /**
1150         * @return {@link #source} (Where this resource is found.)
1151         */
1152        public Type getSource() { 
1153          return this.source;
1154        }
1155
1156        /**
1157         * @return {@link #source} (Where this resource is found.)
1158         */
1159        public UriType getSourceUriType() throws FHIRException { 
1160          if (!(this.source instanceof UriType))
1161            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.source.getClass().getName()+" was encountered");
1162          return (UriType) this.source;
1163        }
1164
1165        public boolean hasSourceUriType() { 
1166          return this.source instanceof UriType;
1167        }
1168
1169        /**
1170         * @return {@link #source} (Where this resource is found.)
1171         */
1172        public Reference getSourceReference() throws FHIRException { 
1173          if (!(this.source instanceof Reference))
1174            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.source.getClass().getName()+" was encountered");
1175          return (Reference) this.source;
1176        }
1177
1178        public boolean hasSourceReference() { 
1179          return this.source instanceof Reference;
1180        }
1181
1182        public boolean hasSource() { 
1183          return this.source != null && !this.source.isEmpty();
1184        }
1185
1186        /**
1187         * @param value {@link #source} (Where this resource is found.)
1188         */
1189        public ImplementationGuidePackageResourceComponent setSource(Type value) { 
1190          this.source = value;
1191          return this;
1192        }
1193
1194        /**
1195         * @return {@link #exampleFor} (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.)
1196         */
1197        public Reference getExampleFor() { 
1198          if (this.exampleFor == null)
1199            if (Configuration.errorOnAutoCreate())
1200              throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.exampleFor");
1201            else if (Configuration.doAutoCreate())
1202              this.exampleFor = new Reference(); // cc
1203          return this.exampleFor;
1204        }
1205
1206        public boolean hasExampleFor() { 
1207          return this.exampleFor != null && !this.exampleFor.isEmpty();
1208        }
1209
1210        /**
1211         * @param value {@link #exampleFor} (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.)
1212         */
1213        public ImplementationGuidePackageResourceComponent setExampleFor(Reference value) { 
1214          this.exampleFor = value;
1215          return this;
1216        }
1217
1218        /**
1219         * @return {@link #exampleFor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.)
1220         */
1221        public StructureDefinition getExampleForTarget() { 
1222          if (this.exampleForTarget == null)
1223            if (Configuration.errorOnAutoCreate())
1224              throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.exampleFor");
1225            else if (Configuration.doAutoCreate())
1226              this.exampleForTarget = new StructureDefinition(); // aa
1227          return this.exampleForTarget;
1228        }
1229
1230        /**
1231         * @param value {@link #exampleFor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.)
1232         */
1233        public ImplementationGuidePackageResourceComponent setExampleForTarget(StructureDefinition value) { 
1234          this.exampleForTarget = value;
1235          return this;
1236        }
1237
1238        protected void listChildren(List<Property> childrenList) {
1239          super.listChildren(childrenList);
1240          childrenList.add(new Property("example", "boolean", "Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.", 0, java.lang.Integer.MAX_VALUE, example));
1241          childrenList.add(new Property("name", "string", "A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).", 0, java.lang.Integer.MAX_VALUE, name));
1242          childrenList.add(new Property("description", "string", "A description of the reason that a resource has been included in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, description));
1243          childrenList.add(new Property("acronym", "string", "A short code that may be used to identify the resource throughout the implementation guide.", 0, java.lang.Integer.MAX_VALUE, acronym));
1244          childrenList.add(new Property("source[x]", "uri|Reference(Any)", "Where this resource is found.", 0, java.lang.Integer.MAX_VALUE, source));
1245          childrenList.add(new Property("exampleFor", "Reference(StructureDefinition)", "Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.", 0, java.lang.Integer.MAX_VALUE, exampleFor));
1246        }
1247
1248      @Override
1249      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1250        switch (hash) {
1251        case -1322970774: /*example*/ return this.example == null ? new Base[0] : new Base[] {this.example}; // BooleanType
1252        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1253        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1254        case -1163472445: /*acronym*/ return this.acronym == null ? new Base[0] : new Base[] {this.acronym}; // StringType
1255        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Type
1256        case -2002349313: /*exampleFor*/ return this.exampleFor == null ? new Base[0] : new Base[] {this.exampleFor}; // Reference
1257        default: return super.getProperty(hash, name, checkValid);
1258        }
1259
1260      }
1261
1262      @Override
1263      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1264        switch (hash) {
1265        case -1322970774: // example
1266          this.example = castToBoolean(value); // BooleanType
1267          return value;
1268        case 3373707: // name
1269          this.name = castToString(value); // StringType
1270          return value;
1271        case -1724546052: // description
1272          this.description = castToString(value); // StringType
1273          return value;
1274        case -1163472445: // acronym
1275          this.acronym = castToString(value); // StringType
1276          return value;
1277        case -896505829: // source
1278          this.source = castToType(value); // Type
1279          return value;
1280        case -2002349313: // exampleFor
1281          this.exampleFor = castToReference(value); // Reference
1282          return value;
1283        default: return super.setProperty(hash, name, value);
1284        }
1285
1286      }
1287
1288      @Override
1289      public Base setProperty(String name, Base value) throws FHIRException {
1290        if (name.equals("example")) {
1291          this.example = castToBoolean(value); // BooleanType
1292        } else if (name.equals("name")) {
1293          this.name = castToString(value); // StringType
1294        } else if (name.equals("description")) {
1295          this.description = castToString(value); // StringType
1296        } else if (name.equals("acronym")) {
1297          this.acronym = castToString(value); // StringType
1298        } else if (name.equals("source[x]")) {
1299          this.source = castToType(value); // Type
1300        } else if (name.equals("exampleFor")) {
1301          this.exampleFor = castToReference(value); // Reference
1302        } else
1303          return super.setProperty(name, value);
1304        return value;
1305      }
1306
1307      @Override
1308      public Base makeProperty(int hash, String name) throws FHIRException {
1309        switch (hash) {
1310        case -1322970774:  return getExampleElement();
1311        case 3373707:  return getNameElement();
1312        case -1724546052:  return getDescriptionElement();
1313        case -1163472445:  return getAcronymElement();
1314        case -1698413947:  return getSource(); 
1315        case -896505829:  return getSource(); 
1316        case -2002349313:  return getExampleFor(); 
1317        default: return super.makeProperty(hash, name);
1318        }
1319
1320      }
1321
1322      @Override
1323      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1324        switch (hash) {
1325        case -1322970774: /*example*/ return new String[] {"boolean"};
1326        case 3373707: /*name*/ return new String[] {"string"};
1327        case -1724546052: /*description*/ return new String[] {"string"};
1328        case -1163472445: /*acronym*/ return new String[] {"string"};
1329        case -896505829: /*source*/ return new String[] {"uri", "Reference"};
1330        case -2002349313: /*exampleFor*/ return new String[] {"Reference"};
1331        default: return super.getTypesForProperty(hash, name);
1332        }
1333
1334      }
1335
1336      @Override
1337      public Base addChild(String name) throws FHIRException {
1338        if (name.equals("example")) {
1339          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.example");
1340        }
1341        else if (name.equals("name")) {
1342          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name");
1343        }
1344        else if (name.equals("description")) {
1345          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description");
1346        }
1347        else if (name.equals("acronym")) {
1348          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.acronym");
1349        }
1350        else if (name.equals("sourceUri")) {
1351          this.source = new UriType();
1352          return this.source;
1353        }
1354        else if (name.equals("sourceReference")) {
1355          this.source = new Reference();
1356          return this.source;
1357        }
1358        else if (name.equals("exampleFor")) {
1359          this.exampleFor = new Reference();
1360          return this.exampleFor;
1361        }
1362        else
1363          return super.addChild(name);
1364      }
1365
1366      public ImplementationGuidePackageResourceComponent copy() {
1367        ImplementationGuidePackageResourceComponent dst = new ImplementationGuidePackageResourceComponent();
1368        copyValues(dst);
1369        dst.example = example == null ? null : example.copy();
1370        dst.name = name == null ? null : name.copy();
1371        dst.description = description == null ? null : description.copy();
1372        dst.acronym = acronym == null ? null : acronym.copy();
1373        dst.source = source == null ? null : source.copy();
1374        dst.exampleFor = exampleFor == null ? null : exampleFor.copy();
1375        return dst;
1376      }
1377
1378      @Override
1379      public boolean equalsDeep(Base other) {
1380        if (!super.equalsDeep(other))
1381          return false;
1382        if (!(other instanceof ImplementationGuidePackageResourceComponent))
1383          return false;
1384        ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other;
1385        return compareDeep(example, o.example, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true)
1386           && compareDeep(acronym, o.acronym, true) && compareDeep(source, o.source, true) && compareDeep(exampleFor, o.exampleFor, true)
1387          ;
1388      }
1389
1390      @Override
1391      public boolean equalsShallow(Base other) {
1392        if (!super.equalsShallow(other))
1393          return false;
1394        if (!(other instanceof ImplementationGuidePackageResourceComponent))
1395          return false;
1396        ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other;
1397        return compareValues(example, o.example, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true)
1398           && compareValues(acronym, o.acronym, true);
1399      }
1400
1401      public boolean isEmpty() {
1402        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(example, name, description
1403          , acronym, source, exampleFor);
1404      }
1405
1406  public String fhirType() {
1407    return "ImplementationGuide.package.resource";
1408
1409  }
1410
1411  }
1412
1413    @Block()
1414    public static class ImplementationGuideGlobalComponent extends BackboneElement implements IBaseBackboneElement {
1415        /**
1416         * The type of resource that all instances must conform to.
1417         */
1418        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1419        @Description(shortDefinition="Type this profiles applies to", formalDefinition="The type of resource that all instances must conform to." )
1420        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
1421        protected CodeType type;
1422
1423        /**
1424         * A reference to the profile that all instances must conform to.
1425         */
1426        @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true)
1427        @Description(shortDefinition="Profile that all resources must conform to", formalDefinition="A reference to the profile that all instances must conform to." )
1428        protected Reference profile;
1429
1430        /**
1431         * The actual object that is the target of the reference (A reference to the profile that all instances must conform to.)
1432         */
1433        protected StructureDefinition profileTarget;
1434
1435        private static final long serialVersionUID = 2011731959L;
1436
1437    /**
1438     * Constructor
1439     */
1440      public ImplementationGuideGlobalComponent() {
1441        super();
1442      }
1443
1444    /**
1445     * Constructor
1446     */
1447      public ImplementationGuideGlobalComponent(CodeType type, Reference profile) {
1448        super();
1449        this.type = type;
1450        this.profile = profile;
1451      }
1452
1453        /**
1454         * @return {@link #type} (The type of resource that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1455         */
1456        public CodeType getTypeElement() { 
1457          if (this.type == null)
1458            if (Configuration.errorOnAutoCreate())
1459              throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.type");
1460            else if (Configuration.doAutoCreate())
1461              this.type = new CodeType(); // bb
1462          return this.type;
1463        }
1464
1465        public boolean hasTypeElement() { 
1466          return this.type != null && !this.type.isEmpty();
1467        }
1468
1469        public boolean hasType() { 
1470          return this.type != null && !this.type.isEmpty();
1471        }
1472
1473        /**
1474         * @param value {@link #type} (The type of resource that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1475         */
1476        public ImplementationGuideGlobalComponent setTypeElement(CodeType value) { 
1477          this.type = value;
1478          return this;
1479        }
1480
1481        /**
1482         * @return The type of resource that all instances must conform to.
1483         */
1484        public String getType() { 
1485          return this.type == null ? null : this.type.getValue();
1486        }
1487
1488        /**
1489         * @param value The type of resource that all instances must conform to.
1490         */
1491        public ImplementationGuideGlobalComponent setType(String value) { 
1492            if (this.type == null)
1493              this.type = new CodeType();
1494            this.type.setValue(value);
1495          return this;
1496        }
1497
1498        /**
1499         * @return {@link #profile} (A reference to the profile that all instances must conform to.)
1500         */
1501        public Reference getProfile() { 
1502          if (this.profile == null)
1503            if (Configuration.errorOnAutoCreate())
1504              throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile");
1505            else if (Configuration.doAutoCreate())
1506              this.profile = new Reference(); // cc
1507          return this.profile;
1508        }
1509
1510        public boolean hasProfile() { 
1511          return this.profile != null && !this.profile.isEmpty();
1512        }
1513
1514        /**
1515         * @param value {@link #profile} (A reference to the profile that all instances must conform to.)
1516         */
1517        public ImplementationGuideGlobalComponent setProfile(Reference value) { 
1518          this.profile = value;
1519          return this;
1520        }
1521
1522        /**
1523         * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the profile that all instances must conform to.)
1524         */
1525        public StructureDefinition getProfileTarget() { 
1526          if (this.profileTarget == null)
1527            if (Configuration.errorOnAutoCreate())
1528              throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile");
1529            else if (Configuration.doAutoCreate())
1530              this.profileTarget = new StructureDefinition(); // aa
1531          return this.profileTarget;
1532        }
1533
1534        /**
1535         * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the profile that all instances must conform to.)
1536         */
1537        public ImplementationGuideGlobalComponent setProfileTarget(StructureDefinition value) { 
1538          this.profileTarget = value;
1539          return this;
1540        }
1541
1542        protected void listChildren(List<Property> childrenList) {
1543          super.listChildren(childrenList);
1544          childrenList.add(new Property("type", "code", "The type of resource that all instances must conform to.", 0, java.lang.Integer.MAX_VALUE, type));
1545          childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A reference to the profile that all instances must conform to.", 0, java.lang.Integer.MAX_VALUE, profile));
1546        }
1547
1548      @Override
1549      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1550        switch (hash) {
1551        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
1552        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
1553        default: return super.getProperty(hash, name, checkValid);
1554        }
1555
1556      }
1557
1558      @Override
1559      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1560        switch (hash) {
1561        case 3575610: // type
1562          this.type = castToCode(value); // CodeType
1563          return value;
1564        case -309425751: // profile
1565          this.profile = castToReference(value); // Reference
1566          return value;
1567        default: return super.setProperty(hash, name, value);
1568        }
1569
1570      }
1571
1572      @Override
1573      public Base setProperty(String name, Base value) throws FHIRException {
1574        if (name.equals("type")) {
1575          this.type = castToCode(value); // CodeType
1576        } else if (name.equals("profile")) {
1577          this.profile = castToReference(value); // Reference
1578        } else
1579          return super.setProperty(name, value);
1580        return value;
1581      }
1582
1583      @Override
1584      public Base makeProperty(int hash, String name) throws FHIRException {
1585        switch (hash) {
1586        case 3575610:  return getTypeElement();
1587        case -309425751:  return getProfile(); 
1588        default: return super.makeProperty(hash, name);
1589        }
1590
1591      }
1592
1593      @Override
1594      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1595        switch (hash) {
1596        case 3575610: /*type*/ return new String[] {"code"};
1597        case -309425751: /*profile*/ return new String[] {"Reference"};
1598        default: return super.getTypesForProperty(hash, name);
1599        }
1600
1601      }
1602
1603      @Override
1604      public Base addChild(String name) throws FHIRException {
1605        if (name.equals("type")) {
1606          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type");
1607        }
1608        else if (name.equals("profile")) {
1609          this.profile = new Reference();
1610          return this.profile;
1611        }
1612        else
1613          return super.addChild(name);
1614      }
1615
1616      public ImplementationGuideGlobalComponent copy() {
1617        ImplementationGuideGlobalComponent dst = new ImplementationGuideGlobalComponent();
1618        copyValues(dst);
1619        dst.type = type == null ? null : type.copy();
1620        dst.profile = profile == null ? null : profile.copy();
1621        return dst;
1622      }
1623
1624      @Override
1625      public boolean equalsDeep(Base other) {
1626        if (!super.equalsDeep(other))
1627          return false;
1628        if (!(other instanceof ImplementationGuideGlobalComponent))
1629          return false;
1630        ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other;
1631        return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true);
1632      }
1633
1634      @Override
1635      public boolean equalsShallow(Base other) {
1636        if (!super.equalsShallow(other))
1637          return false;
1638        if (!(other instanceof ImplementationGuideGlobalComponent))
1639          return false;
1640        ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other;
1641        return compareValues(type, o.type, true);
1642      }
1643
1644      public boolean isEmpty() {
1645        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile);
1646      }
1647
1648  public String fhirType() {
1649    return "ImplementationGuide.global";
1650
1651  }
1652
1653  }
1654
1655    @Block()
1656    public static class ImplementationGuidePageComponent extends BackboneElement implements IBaseBackboneElement {
1657        /**
1658         * The source address for the page.
1659         */
1660        @Child(name = "source", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1661        @Description(shortDefinition="Where to find that page", formalDefinition="The source address for the page." )
1662        protected UriType source;
1663
1664        /**
1665         * A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.
1666         */
1667        @Child(name = "title", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1668        @Description(shortDefinition="Short title shown for navigational assistance", formalDefinition="A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc." )
1669        protected StringType title;
1670
1671        /**
1672         * The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.
1673         */
1674        @Child(name = "kind", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1675        @Description(shortDefinition="page | example | list | include | directory | dictionary | toc | resource", formalDefinition="The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest." )
1676        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/guide-page-kind")
1677        protected Enumeration<GuidePageKind> kind;
1678
1679        /**
1680         * For constructed pages, what kind of resources to include in the list.
1681         */
1682        @Child(name = "type", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1683        @Description(shortDefinition="Kind of resource to include in the list", formalDefinition="For constructed pages, what kind of resources to include in the list." )
1684        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
1685        protected List<CodeType> type;
1686
1687        /**
1688         * For constructed pages, a list of packages to include in the page (or else empty for everything).
1689         */
1690        @Child(name = "package", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1691        @Description(shortDefinition="Name of package to include", formalDefinition="For constructed pages, a list of packages to include in the page (or else empty for everything)." )
1692        protected List<StringType> package_;
1693
1694        /**
1695         * The format of the page.
1696         */
1697        @Child(name = "format", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
1698        @Description(shortDefinition="Format of the page (e.g. html, markdown, etc.)", formalDefinition="The format of the page." )
1699        protected CodeType format;
1700
1701        /**
1702         * Nested Pages/Sections under this page.
1703         */
1704        @Child(name = "page", type = {ImplementationGuidePageComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1705        @Description(shortDefinition="Nested Pages / Sections", formalDefinition="Nested Pages/Sections under this page." )
1706        protected List<ImplementationGuidePageComponent> page;
1707
1708        private static final long serialVersionUID = -687763908L;
1709
1710    /**
1711     * Constructor
1712     */
1713      public ImplementationGuidePageComponent() {
1714        super();
1715      }
1716
1717    /**
1718     * Constructor
1719     */
1720      public ImplementationGuidePageComponent(UriType source, StringType title, Enumeration<GuidePageKind> kind) {
1721        super();
1722        this.source = source;
1723        this.title = title;
1724        this.kind = kind;
1725      }
1726
1727        /**
1728         * @return {@link #source} (The source address for the page.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
1729         */
1730        public UriType getSourceElement() { 
1731          if (this.source == null)
1732            if (Configuration.errorOnAutoCreate())
1733              throw new Error("Attempt to auto-create ImplementationGuidePageComponent.source");
1734            else if (Configuration.doAutoCreate())
1735              this.source = new UriType(); // bb
1736          return this.source;
1737        }
1738
1739        public boolean hasSourceElement() { 
1740          return this.source != null && !this.source.isEmpty();
1741        }
1742
1743        public boolean hasSource() { 
1744          return this.source != null && !this.source.isEmpty();
1745        }
1746
1747        /**
1748         * @param value {@link #source} (The source address for the page.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
1749         */
1750        public ImplementationGuidePageComponent setSourceElement(UriType value) { 
1751          this.source = value;
1752          return this;
1753        }
1754
1755        /**
1756         * @return The source address for the page.
1757         */
1758        public String getSource() { 
1759          return this.source == null ? null : this.source.getValue();
1760        }
1761
1762        /**
1763         * @param value The source address for the page.
1764         */
1765        public ImplementationGuidePageComponent setSource(String value) { 
1766            if (this.source == null)
1767              this.source = new UriType();
1768            this.source.setValue(value);
1769          return this;
1770        }
1771
1772        /**
1773         * @return {@link #title} (A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1774         */
1775        public StringType getTitleElement() { 
1776          if (this.title == null)
1777            if (Configuration.errorOnAutoCreate())
1778              throw new Error("Attempt to auto-create ImplementationGuidePageComponent.title");
1779            else if (Configuration.doAutoCreate())
1780              this.title = new StringType(); // bb
1781          return this.title;
1782        }
1783
1784        public boolean hasTitleElement() { 
1785          return this.title != null && !this.title.isEmpty();
1786        }
1787
1788        public boolean hasTitle() { 
1789          return this.title != null && !this.title.isEmpty();
1790        }
1791
1792        /**
1793         * @param value {@link #title} (A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1794         */
1795        public ImplementationGuidePageComponent setTitleElement(StringType value) { 
1796          this.title = value;
1797          return this;
1798        }
1799
1800        /**
1801         * @return A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.
1802         */
1803        public String getTitle() { 
1804          return this.title == null ? null : this.title.getValue();
1805        }
1806
1807        /**
1808         * @param value A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.
1809         */
1810        public ImplementationGuidePageComponent setTitle(String value) { 
1811            if (this.title == null)
1812              this.title = new StringType();
1813            this.title.setValue(value);
1814          return this;
1815        }
1816
1817        /**
1818         * @return {@link #kind} (The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
1819         */
1820        public Enumeration<GuidePageKind> getKindElement() { 
1821          if (this.kind == null)
1822            if (Configuration.errorOnAutoCreate())
1823              throw new Error("Attempt to auto-create ImplementationGuidePageComponent.kind");
1824            else if (Configuration.doAutoCreate())
1825              this.kind = new Enumeration<GuidePageKind>(new GuidePageKindEnumFactory()); // bb
1826          return this.kind;
1827        }
1828
1829        public boolean hasKindElement() { 
1830          return this.kind != null && !this.kind.isEmpty();
1831        }
1832
1833        public boolean hasKind() { 
1834          return this.kind != null && !this.kind.isEmpty();
1835        }
1836
1837        /**
1838         * @param value {@link #kind} (The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
1839         */
1840        public ImplementationGuidePageComponent setKindElement(Enumeration<GuidePageKind> value) { 
1841          this.kind = value;
1842          return this;
1843        }
1844
1845        /**
1846         * @return The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.
1847         */
1848        public GuidePageKind getKind() { 
1849          return this.kind == null ? null : this.kind.getValue();
1850        }
1851
1852        /**
1853         * @param value The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.
1854         */
1855        public ImplementationGuidePageComponent setKind(GuidePageKind value) { 
1856            if (this.kind == null)
1857              this.kind = new Enumeration<GuidePageKind>(new GuidePageKindEnumFactory());
1858            this.kind.setValue(value);
1859          return this;
1860        }
1861
1862        /**
1863         * @return {@link #type} (For constructed pages, what kind of resources to include in the list.)
1864         */
1865        public List<CodeType> getType() { 
1866          if (this.type == null)
1867            this.type = new ArrayList<CodeType>();
1868          return this.type;
1869        }
1870
1871        /**
1872         * @return Returns a reference to <code>this</code> for easy method chaining
1873         */
1874        public ImplementationGuidePageComponent setType(List<CodeType> theType) { 
1875          this.type = theType;
1876          return this;
1877        }
1878
1879        public boolean hasType() { 
1880          if (this.type == null)
1881            return false;
1882          for (CodeType item : this.type)
1883            if (!item.isEmpty())
1884              return true;
1885          return false;
1886        }
1887
1888        /**
1889         * @return {@link #type} (For constructed pages, what kind of resources to include in the list.)
1890         */
1891        public CodeType addTypeElement() {//2 
1892          CodeType t = new CodeType();
1893          if (this.type == null)
1894            this.type = new ArrayList<CodeType>();
1895          this.type.add(t);
1896          return t;
1897        }
1898
1899        /**
1900         * @param value {@link #type} (For constructed pages, what kind of resources to include in the list.)
1901         */
1902        public ImplementationGuidePageComponent addType(String value) { //1
1903          CodeType t = new CodeType();
1904          t.setValue(value);
1905          if (this.type == null)
1906            this.type = new ArrayList<CodeType>();
1907          this.type.add(t);
1908          return this;
1909        }
1910
1911        /**
1912         * @param value {@link #type} (For constructed pages, what kind of resources to include in the list.)
1913         */
1914        public boolean hasType(String value) { 
1915          if (this.type == null)
1916            return false;
1917          for (CodeType v : this.type)
1918            if (v.equals(value)) // code
1919              return true;
1920          return false;
1921        }
1922
1923        /**
1924         * @return {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).)
1925         */
1926        public List<StringType> getPackage() { 
1927          if (this.package_ == null)
1928            this.package_ = new ArrayList<StringType>();
1929          return this.package_;
1930        }
1931
1932        /**
1933         * @return Returns a reference to <code>this</code> for easy method chaining
1934         */
1935        public ImplementationGuidePageComponent setPackage(List<StringType> thePackage) { 
1936          this.package_ = thePackage;
1937          return this;
1938        }
1939
1940        public boolean hasPackage() { 
1941          if (this.package_ == null)
1942            return false;
1943          for (StringType item : this.package_)
1944            if (!item.isEmpty())
1945              return true;
1946          return false;
1947        }
1948
1949        /**
1950         * @return {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).)
1951         */
1952        public StringType addPackageElement() {//2 
1953          StringType t = new StringType();
1954          if (this.package_ == null)
1955            this.package_ = new ArrayList<StringType>();
1956          this.package_.add(t);
1957          return t;
1958        }
1959
1960        /**
1961         * @param value {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).)
1962         */
1963        public ImplementationGuidePageComponent addPackage(String value) { //1
1964          StringType t = new StringType();
1965          t.setValue(value);
1966          if (this.package_ == null)
1967            this.package_ = new ArrayList<StringType>();
1968          this.package_.add(t);
1969          return this;
1970        }
1971
1972        /**
1973         * @param value {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).)
1974         */
1975        public boolean hasPackage(String value) { 
1976          if (this.package_ == null)
1977            return false;
1978          for (StringType v : this.package_)
1979            if (v.equals(value)) // string
1980              return true;
1981          return false;
1982        }
1983
1984        /**
1985         * @return {@link #format} (The format of the page.). This is the underlying object with id, value and extensions. The accessor "getFormat" gives direct access to the value
1986         */
1987        public CodeType getFormatElement() { 
1988          if (this.format == null)
1989            if (Configuration.errorOnAutoCreate())
1990              throw new Error("Attempt to auto-create ImplementationGuidePageComponent.format");
1991            else if (Configuration.doAutoCreate())
1992              this.format = new CodeType(); // bb
1993          return this.format;
1994        }
1995
1996        public boolean hasFormatElement() { 
1997          return this.format != null && !this.format.isEmpty();
1998        }
1999
2000        public boolean hasFormat() { 
2001          return this.format != null && !this.format.isEmpty();
2002        }
2003
2004        /**
2005         * @param value {@link #format} (The format of the page.). This is the underlying object with id, value and extensions. The accessor "getFormat" gives direct access to the value
2006         */
2007        public ImplementationGuidePageComponent setFormatElement(CodeType value) { 
2008          this.format = value;
2009          return this;
2010        }
2011
2012        /**
2013         * @return The format of the page.
2014         */
2015        public String getFormat() { 
2016          return this.format == null ? null : this.format.getValue();
2017        }
2018
2019        /**
2020         * @param value The format of the page.
2021         */
2022        public ImplementationGuidePageComponent setFormat(String value) { 
2023          if (Utilities.noString(value))
2024            this.format = null;
2025          else {
2026            if (this.format == null)
2027              this.format = new CodeType();
2028            this.format.setValue(value);
2029          }
2030          return this;
2031        }
2032
2033        /**
2034         * @return {@link #page} (Nested Pages/Sections under this page.)
2035         */
2036        public List<ImplementationGuidePageComponent> getPage() { 
2037          if (this.page == null)
2038            this.page = new ArrayList<ImplementationGuidePageComponent>();
2039          return this.page;
2040        }
2041
2042        /**
2043         * @return Returns a reference to <code>this</code> for easy method chaining
2044         */
2045        public ImplementationGuidePageComponent setPage(List<ImplementationGuidePageComponent> thePage) { 
2046          this.page = thePage;
2047          return this;
2048        }
2049
2050        public boolean hasPage() { 
2051          if (this.page == null)
2052            return false;
2053          for (ImplementationGuidePageComponent item : this.page)
2054            if (!item.isEmpty())
2055              return true;
2056          return false;
2057        }
2058
2059        public ImplementationGuidePageComponent addPage() { //3
2060          ImplementationGuidePageComponent t = new ImplementationGuidePageComponent();
2061          if (this.page == null)
2062            this.page = new ArrayList<ImplementationGuidePageComponent>();
2063          this.page.add(t);
2064          return t;
2065        }
2066
2067        public ImplementationGuidePageComponent addPage(ImplementationGuidePageComponent t) { //3
2068          if (t == null)
2069            return this;
2070          if (this.page == null)
2071            this.page = new ArrayList<ImplementationGuidePageComponent>();
2072          this.page.add(t);
2073          return this;
2074        }
2075
2076        /**
2077         * @return The first repetition of repeating field {@link #page}, creating it if it does not already exist
2078         */
2079        public ImplementationGuidePageComponent getPageFirstRep() { 
2080          if (getPage().isEmpty()) {
2081            addPage();
2082          }
2083          return getPage().get(0);
2084        }
2085
2086        protected void listChildren(List<Property> childrenList) {
2087          super.listChildren(childrenList);
2088          childrenList.add(new Property("source", "uri", "The source address for the page.", 0, java.lang.Integer.MAX_VALUE, source));
2089          childrenList.add(new Property("title", "string", "A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.", 0, java.lang.Integer.MAX_VALUE, title));
2090          childrenList.add(new Property("kind", "code", "The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.", 0, java.lang.Integer.MAX_VALUE, kind));
2091          childrenList.add(new Property("type", "code", "For constructed pages, what kind of resources to include in the list.", 0, java.lang.Integer.MAX_VALUE, type));
2092          childrenList.add(new Property("package", "string", "For constructed pages, a list of packages to include in the page (or else empty for everything).", 0, java.lang.Integer.MAX_VALUE, package_));
2093          childrenList.add(new Property("format", "code", "The format of the page.", 0, java.lang.Integer.MAX_VALUE, format));
2094          childrenList.add(new Property("page", "@ImplementationGuide.page", "Nested Pages/Sections under this page.", 0, java.lang.Integer.MAX_VALUE, page));
2095        }
2096
2097      @Override
2098      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2099        switch (hash) {
2100        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType
2101        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2102        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<GuidePageKind>
2103        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeType
2104        case -807062458: /*package*/ return this.package_ == null ? new Base[0] : this.package_.toArray(new Base[this.package_.size()]); // StringType
2105        case -1268779017: /*format*/ return this.format == null ? new Base[0] : new Base[] {this.format}; // CodeType
2106        case 3433103: /*page*/ return this.page == null ? new Base[0] : this.page.toArray(new Base[this.page.size()]); // ImplementationGuidePageComponent
2107        default: return super.getProperty(hash, name, checkValid);
2108        }
2109
2110      }
2111
2112      @Override
2113      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2114        switch (hash) {
2115        case -896505829: // source
2116          this.source = castToUri(value); // UriType
2117          return value;
2118        case 110371416: // title
2119          this.title = castToString(value); // StringType
2120          return value;
2121        case 3292052: // kind
2122          value = new GuidePageKindEnumFactory().fromType(castToCode(value));
2123          this.kind = (Enumeration) value; // Enumeration<GuidePageKind>
2124          return value;
2125        case 3575610: // type
2126          this.getType().add(castToCode(value)); // CodeType
2127          return value;
2128        case -807062458: // package
2129          this.getPackage().add(castToString(value)); // StringType
2130          return value;
2131        case -1268779017: // format
2132          this.format = castToCode(value); // CodeType
2133          return value;
2134        case 3433103: // page
2135          this.getPage().add((ImplementationGuidePageComponent) value); // ImplementationGuidePageComponent
2136          return value;
2137        default: return super.setProperty(hash, name, value);
2138        }
2139
2140      }
2141
2142      @Override
2143      public Base setProperty(String name, Base value) throws FHIRException {
2144        if (name.equals("source")) {
2145          this.source = castToUri(value); // UriType
2146        } else if (name.equals("title")) {
2147          this.title = castToString(value); // StringType
2148        } else if (name.equals("kind")) {
2149          value = new GuidePageKindEnumFactory().fromType(castToCode(value));
2150          this.kind = (Enumeration) value; // Enumeration<GuidePageKind>
2151        } else if (name.equals("type")) {
2152          this.getType().add(castToCode(value));
2153        } else if (name.equals("package")) {
2154          this.getPackage().add(castToString(value));
2155        } else if (name.equals("format")) {
2156          this.format = castToCode(value); // CodeType
2157        } else if (name.equals("page")) {
2158          this.getPage().add((ImplementationGuidePageComponent) value);
2159        } else
2160          return super.setProperty(name, value);
2161        return value;
2162      }
2163
2164      @Override
2165      public Base makeProperty(int hash, String name) throws FHIRException {
2166        switch (hash) {
2167        case -896505829:  return getSourceElement();
2168        case 110371416:  return getTitleElement();
2169        case 3292052:  return getKindElement();
2170        case 3575610:  return addTypeElement();
2171        case -807062458:  return addPackageElement();
2172        case -1268779017:  return getFormatElement();
2173        case 3433103:  return addPage(); 
2174        default: return super.makeProperty(hash, name);
2175        }
2176
2177      }
2178
2179      @Override
2180      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2181        switch (hash) {
2182        case -896505829: /*source*/ return new String[] {"uri"};
2183        case 110371416: /*title*/ return new String[] {"string"};
2184        case 3292052: /*kind*/ return new String[] {"code"};
2185        case 3575610: /*type*/ return new String[] {"code"};
2186        case -807062458: /*package*/ return new String[] {"string"};
2187        case -1268779017: /*format*/ return new String[] {"code"};
2188        case 3433103: /*page*/ return new String[] {"@ImplementationGuide.page"};
2189        default: return super.getTypesForProperty(hash, name);
2190        }
2191
2192      }
2193
2194      @Override
2195      public Base addChild(String name) throws FHIRException {
2196        if (name.equals("source")) {
2197          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.source");
2198        }
2199        else if (name.equals("title")) {
2200          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.title");
2201        }
2202        else if (name.equals("kind")) {
2203          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.kind");
2204        }
2205        else if (name.equals("type")) {
2206          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type");
2207        }
2208        else if (name.equals("package")) {
2209          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.package");
2210        }
2211        else if (name.equals("format")) {
2212          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.format");
2213        }
2214        else if (name.equals("page")) {
2215          return addPage();
2216        }
2217        else
2218          return super.addChild(name);
2219      }
2220
2221      public ImplementationGuidePageComponent copy() {
2222        ImplementationGuidePageComponent dst = new ImplementationGuidePageComponent();
2223        copyValues(dst);
2224        dst.source = source == null ? null : source.copy();
2225        dst.title = title == null ? null : title.copy();
2226        dst.kind = kind == null ? null : kind.copy();
2227        if (type != null) {
2228          dst.type = new ArrayList<CodeType>();
2229          for (CodeType i : type)
2230            dst.type.add(i.copy());
2231        };
2232        if (package_ != null) {
2233          dst.package_ = new ArrayList<StringType>();
2234          for (StringType i : package_)
2235            dst.package_.add(i.copy());
2236        };
2237        dst.format = format == null ? null : format.copy();
2238        if (page != null) {
2239          dst.page = new ArrayList<ImplementationGuidePageComponent>();
2240          for (ImplementationGuidePageComponent i : page)
2241            dst.page.add(i.copy());
2242        };
2243        return dst;
2244      }
2245
2246      @Override
2247      public boolean equalsDeep(Base other) {
2248        if (!super.equalsDeep(other))
2249          return false;
2250        if (!(other instanceof ImplementationGuidePageComponent))
2251          return false;
2252        ImplementationGuidePageComponent o = (ImplementationGuidePageComponent) other;
2253        return compareDeep(source, o.source, true) && compareDeep(title, o.title, true) && compareDeep(kind, o.kind, true)
2254           && compareDeep(type, o.type, true) && compareDeep(package_, o.package_, true) && compareDeep(format, o.format, true)
2255           && compareDeep(page, o.page, true);
2256      }
2257
2258      @Override
2259      public boolean equalsShallow(Base other) {
2260        if (!super.equalsShallow(other))
2261          return false;
2262        if (!(other instanceof ImplementationGuidePageComponent))
2263          return false;
2264        ImplementationGuidePageComponent o = (ImplementationGuidePageComponent) other;
2265        return compareValues(source, o.source, true) && compareValues(title, o.title, true) && compareValues(kind, o.kind, true)
2266           && compareValues(type, o.type, true) && compareValues(package_, o.package_, true) && compareValues(format, o.format, true)
2267          ;
2268      }
2269
2270      public boolean isEmpty() {
2271        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(source, title, kind, type
2272          , package_, format, page);
2273      }
2274
2275  public String fhirType() {
2276    return "ImplementationGuide.page";
2277
2278  }
2279
2280  }
2281
2282    /**
2283     * A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.
2284     */
2285    @Child(name = "copyright", type = {MarkdownType.class}, order=0, min=0, max=1, modifier=false, summary=false)
2286    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide." )
2287    protected MarkdownType copyright;
2288
2289    /**
2290     * The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.
2291     */
2292    @Child(name = "fhirVersion", type = {IdType.class}, order=1, min=0, max=1, modifier=false, summary=true)
2293    @Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version." )
2294    protected IdType fhirVersion;
2295
2296    /**
2297     * Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.
2298     */
2299    @Child(name = "dependency", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2300    @Description(shortDefinition="Another Implementation guide this depends on", formalDefinition="Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides." )
2301    protected List<ImplementationGuideDependencyComponent> dependency;
2302
2303    /**
2304     * A logical group of resources. Logical groups can be used when building pages.
2305     */
2306    @Child(name = "package", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2307    @Description(shortDefinition="Group of resources as used in .page.package", formalDefinition="A logical group of resources. Logical groups can be used when building pages." )
2308    protected List<ImplementationGuidePackageComponent> package_;
2309
2310    /**
2311     * A set of profiles that all resources covered by this implementation guide must conform to.
2312     */
2313    @Child(name = "global", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2314    @Description(shortDefinition="Profiles that apply globally", formalDefinition="A set of profiles that all resources covered by this implementation guide must conform to." )
2315    protected List<ImplementationGuideGlobalComponent> global;
2316
2317    /**
2318     * A binary file that is included in the  implementation guide when it is published.
2319     */
2320    @Child(name = "binary", type = {UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2321    @Description(shortDefinition="Image, css, script, etc.", formalDefinition="A binary file that is included in the  implementation guide when it is published." )
2322    protected List<UriType> binary;
2323
2324    /**
2325     * A page / section in the implementation guide. The root page is the implementation guide home page.
2326     */
2327    @Child(name = "page", type = {}, order=6, min=0, max=1, modifier=false, summary=true)
2328    @Description(shortDefinition="Page/Section in the Guide", formalDefinition="A page / section in the implementation guide. The root page is the implementation guide home page." )
2329    protected ImplementationGuidePageComponent page;
2330
2331    private static final long serialVersionUID = -1252164384L;
2332
2333  /**
2334   * Constructor
2335   */
2336    public ImplementationGuide() {
2337      super();
2338    }
2339
2340  /**
2341   * Constructor
2342   */
2343    public ImplementationGuide(UriType url, StringType name, Enumeration<PublicationStatus> status) {
2344      super();
2345      this.url = url;
2346      this.name = name;
2347      this.status = status;
2348    }
2349
2350    /**
2351     * @return {@link #url} (An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2352     */
2353    public UriType getUrlElement() { 
2354      if (this.url == null)
2355        if (Configuration.errorOnAutoCreate())
2356          throw new Error("Attempt to auto-create ImplementationGuide.url");
2357        else if (Configuration.doAutoCreate())
2358          this.url = new UriType(); // bb
2359      return this.url;
2360    }
2361
2362    public boolean hasUrlElement() { 
2363      return this.url != null && !this.url.isEmpty();
2364    }
2365
2366    public boolean hasUrl() { 
2367      return this.url != null && !this.url.isEmpty();
2368    }
2369
2370    /**
2371     * @param value {@link #url} (An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2372     */
2373    public ImplementationGuide setUrlElement(UriType value) { 
2374      this.url = value;
2375      return this;
2376    }
2377
2378    /**
2379     * @return An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).
2380     */
2381    public String getUrl() { 
2382      return this.url == null ? null : this.url.getValue();
2383    }
2384
2385    /**
2386     * @param value An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).
2387     */
2388    public ImplementationGuide setUrl(String value) { 
2389        if (this.url == null)
2390          this.url = new UriType();
2391        this.url.setValue(value);
2392      return this;
2393    }
2394
2395    /**
2396     * @return {@link #version} (The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide 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
2397     */
2398    public StringType getVersionElement() { 
2399      if (this.version == null)
2400        if (Configuration.errorOnAutoCreate())
2401          throw new Error("Attempt to auto-create ImplementationGuide.version");
2402        else if (Configuration.doAutoCreate())
2403          this.version = new StringType(); // bb
2404      return this.version;
2405    }
2406
2407    public boolean hasVersionElement() { 
2408      return this.version != null && !this.version.isEmpty();
2409    }
2410
2411    public boolean hasVersion() { 
2412      return this.version != null && !this.version.isEmpty();
2413    }
2414
2415    /**
2416     * @param value {@link #version} (The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide 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
2417     */
2418    public ImplementationGuide setVersionElement(StringType value) { 
2419      this.version = value;
2420      return this;
2421    }
2422
2423    /**
2424     * @return The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide 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.
2425     */
2426    public String getVersion() { 
2427      return this.version == null ? null : this.version.getValue();
2428    }
2429
2430    /**
2431     * @param value The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide 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.
2432     */
2433    public ImplementationGuide setVersion(String value) { 
2434      if (Utilities.noString(value))
2435        this.version = null;
2436      else {
2437        if (this.version == null)
2438          this.version = new StringType();
2439        this.version.setValue(value);
2440      }
2441      return this;
2442    }
2443
2444    /**
2445     * @return {@link #name} (A natural language name identifying the implementation guide. 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
2446     */
2447    public StringType getNameElement() { 
2448      if (this.name == null)
2449        if (Configuration.errorOnAutoCreate())
2450          throw new Error("Attempt to auto-create ImplementationGuide.name");
2451        else if (Configuration.doAutoCreate())
2452          this.name = new StringType(); // bb
2453      return this.name;
2454    }
2455
2456    public boolean hasNameElement() { 
2457      return this.name != null && !this.name.isEmpty();
2458    }
2459
2460    public boolean hasName() { 
2461      return this.name != null && !this.name.isEmpty();
2462    }
2463
2464    /**
2465     * @param value {@link #name} (A natural language name identifying the implementation guide. 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
2466     */
2467    public ImplementationGuide setNameElement(StringType value) { 
2468      this.name = value;
2469      return this;
2470    }
2471
2472    /**
2473     * @return A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2474     */
2475    public String getName() { 
2476      return this.name == null ? null : this.name.getValue();
2477    }
2478
2479    /**
2480     * @param value A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2481     */
2482    public ImplementationGuide setName(String value) { 
2483        if (this.name == null)
2484          this.name = new StringType();
2485        this.name.setValue(value);
2486      return this;
2487    }
2488
2489    /**
2490     * @return {@link #status} (The status of this implementation guide. 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
2491     */
2492    public Enumeration<PublicationStatus> getStatusElement() { 
2493      if (this.status == null)
2494        if (Configuration.errorOnAutoCreate())
2495          throw new Error("Attempt to auto-create ImplementationGuide.status");
2496        else if (Configuration.doAutoCreate())
2497          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2498      return this.status;
2499    }
2500
2501    public boolean hasStatusElement() { 
2502      return this.status != null && !this.status.isEmpty();
2503    }
2504
2505    public boolean hasStatus() { 
2506      return this.status != null && !this.status.isEmpty();
2507    }
2508
2509    /**
2510     * @param value {@link #status} (The status of this implementation guide. 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
2511     */
2512    public ImplementationGuide setStatusElement(Enumeration<PublicationStatus> value) { 
2513      this.status = value;
2514      return this;
2515    }
2516
2517    /**
2518     * @return The status of this implementation guide. Enables tracking the life-cycle of the content.
2519     */
2520    public PublicationStatus getStatus() { 
2521      return this.status == null ? null : this.status.getValue();
2522    }
2523
2524    /**
2525     * @param value The status of this implementation guide. Enables tracking the life-cycle of the content.
2526     */
2527    public ImplementationGuide setStatus(PublicationStatus value) { 
2528        if (this.status == null)
2529          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2530        this.status.setValue(value);
2531      return this;
2532    }
2533
2534    /**
2535     * @return {@link #experimental} (A boolean value to indicate that this implementation guide 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
2536     */
2537    public BooleanType getExperimentalElement() { 
2538      if (this.experimental == null)
2539        if (Configuration.errorOnAutoCreate())
2540          throw new Error("Attempt to auto-create ImplementationGuide.experimental");
2541        else if (Configuration.doAutoCreate())
2542          this.experimental = new BooleanType(); // bb
2543      return this.experimental;
2544    }
2545
2546    public boolean hasExperimentalElement() { 
2547      return this.experimental != null && !this.experimental.isEmpty();
2548    }
2549
2550    public boolean hasExperimental() { 
2551      return this.experimental != null && !this.experimental.isEmpty();
2552    }
2553
2554    /**
2555     * @param value {@link #experimental} (A boolean value to indicate that this implementation guide 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
2556     */
2557    public ImplementationGuide setExperimentalElement(BooleanType value) { 
2558      this.experimental = value;
2559      return this;
2560    }
2561
2562    /**
2563     * @return A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
2564     */
2565    public boolean getExperimental() { 
2566      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2567    }
2568
2569    /**
2570     * @param value A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
2571     */
2572    public ImplementationGuide setExperimental(boolean value) { 
2573        if (this.experimental == null)
2574          this.experimental = new BooleanType();
2575        this.experimental.setValue(value);
2576      return this;
2577    }
2578
2579    /**
2580     * @return {@link #date} (The date  (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2581     */
2582    public DateTimeType getDateElement() { 
2583      if (this.date == null)
2584        if (Configuration.errorOnAutoCreate())
2585          throw new Error("Attempt to auto-create ImplementationGuide.date");
2586        else if (Configuration.doAutoCreate())
2587          this.date = new DateTimeType(); // bb
2588      return this.date;
2589    }
2590
2591    public boolean hasDateElement() { 
2592      return this.date != null && !this.date.isEmpty();
2593    }
2594
2595    public boolean hasDate() { 
2596      return this.date != null && !this.date.isEmpty();
2597    }
2598
2599    /**
2600     * @param value {@link #date} (The date  (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2601     */
2602    public ImplementationGuide setDateElement(DateTimeType value) { 
2603      this.date = value;
2604      return this;
2605    }
2606
2607    /**
2608     * @return The date  (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.
2609     */
2610    public Date getDate() { 
2611      return this.date == null ? null : this.date.getValue();
2612    }
2613
2614    /**
2615     * @param value The date  (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.
2616     */
2617    public ImplementationGuide setDate(Date value) { 
2618      if (value == null)
2619        this.date = null;
2620      else {
2621        if (this.date == null)
2622          this.date = new DateTimeType();
2623        this.date.setValue(value);
2624      }
2625      return this;
2626    }
2627
2628    /**
2629     * @return {@link #publisher} (The name of the individual or organization that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2630     */
2631    public StringType getPublisherElement() { 
2632      if (this.publisher == null)
2633        if (Configuration.errorOnAutoCreate())
2634          throw new Error("Attempt to auto-create ImplementationGuide.publisher");
2635        else if (Configuration.doAutoCreate())
2636          this.publisher = new StringType(); // bb
2637      return this.publisher;
2638    }
2639
2640    public boolean hasPublisherElement() { 
2641      return this.publisher != null && !this.publisher.isEmpty();
2642    }
2643
2644    public boolean hasPublisher() { 
2645      return this.publisher != null && !this.publisher.isEmpty();
2646    }
2647
2648    /**
2649     * @param value {@link #publisher} (The name of the individual or organization that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2650     */
2651    public ImplementationGuide setPublisherElement(StringType value) { 
2652      this.publisher = value;
2653      return this;
2654    }
2655
2656    /**
2657     * @return The name of the individual or organization that published the implementation guide.
2658     */
2659    public String getPublisher() { 
2660      return this.publisher == null ? null : this.publisher.getValue();
2661    }
2662
2663    /**
2664     * @param value The name of the individual or organization that published the implementation guide.
2665     */
2666    public ImplementationGuide setPublisher(String value) { 
2667      if (Utilities.noString(value))
2668        this.publisher = null;
2669      else {
2670        if (this.publisher == null)
2671          this.publisher = new StringType();
2672        this.publisher.setValue(value);
2673      }
2674      return this;
2675    }
2676
2677    /**
2678     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2679     */
2680    public List<ContactDetail> getContact() { 
2681      if (this.contact == null)
2682        this.contact = new ArrayList<ContactDetail>();
2683      return this.contact;
2684    }
2685
2686    /**
2687     * @return Returns a reference to <code>this</code> for easy method chaining
2688     */
2689    public ImplementationGuide setContact(List<ContactDetail> theContact) { 
2690      this.contact = theContact;
2691      return this;
2692    }
2693
2694    public boolean hasContact() { 
2695      if (this.contact == null)
2696        return false;
2697      for (ContactDetail item : this.contact)
2698        if (!item.isEmpty())
2699          return true;
2700      return false;
2701    }
2702
2703    public ContactDetail addContact() { //3
2704      ContactDetail t = new ContactDetail();
2705      if (this.contact == null)
2706        this.contact = new ArrayList<ContactDetail>();
2707      this.contact.add(t);
2708      return t;
2709    }
2710
2711    public ImplementationGuide addContact(ContactDetail t) { //3
2712      if (t == null)
2713        return this;
2714      if (this.contact == null)
2715        this.contact = new ArrayList<ContactDetail>();
2716      this.contact.add(t);
2717      return this;
2718    }
2719
2720    /**
2721     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
2722     */
2723    public ContactDetail getContactFirstRep() { 
2724      if (getContact().isEmpty()) {
2725        addContact();
2726      }
2727      return getContact().get(0);
2728    }
2729
2730    /**
2731     * @return {@link #description} (A free text natural language description of the implementation guide from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2732     */
2733    public MarkdownType getDescriptionElement() { 
2734      if (this.description == null)
2735        if (Configuration.errorOnAutoCreate())
2736          throw new Error("Attempt to auto-create ImplementationGuide.description");
2737        else if (Configuration.doAutoCreate())
2738          this.description = new MarkdownType(); // bb
2739      return this.description;
2740    }
2741
2742    public boolean hasDescriptionElement() { 
2743      return this.description != null && !this.description.isEmpty();
2744    }
2745
2746    public boolean hasDescription() { 
2747      return this.description != null && !this.description.isEmpty();
2748    }
2749
2750    /**
2751     * @param value {@link #description} (A free text natural language description of the implementation guide from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2752     */
2753    public ImplementationGuide setDescriptionElement(MarkdownType value) { 
2754      this.description = value;
2755      return this;
2756    }
2757
2758    /**
2759     * @return A free text natural language description of the implementation guide from a consumer's perspective.
2760     */
2761    public String getDescription() { 
2762      return this.description == null ? null : this.description.getValue();
2763    }
2764
2765    /**
2766     * @param value A free text natural language description of the implementation guide from a consumer's perspective.
2767     */
2768    public ImplementationGuide setDescription(String value) { 
2769      if (value == null)
2770        this.description = null;
2771      else {
2772        if (this.description == null)
2773          this.description = new MarkdownType();
2774        this.description.setValue(value);
2775      }
2776      return this;
2777    }
2778
2779    /**
2780     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate implementation guide instances.)
2781     */
2782    public List<UsageContext> getUseContext() { 
2783      if (this.useContext == null)
2784        this.useContext = new ArrayList<UsageContext>();
2785      return this.useContext;
2786    }
2787
2788    /**
2789     * @return Returns a reference to <code>this</code> for easy method chaining
2790     */
2791    public ImplementationGuide setUseContext(List<UsageContext> theUseContext) { 
2792      this.useContext = theUseContext;
2793      return this;
2794    }
2795
2796    public boolean hasUseContext() { 
2797      if (this.useContext == null)
2798        return false;
2799      for (UsageContext item : this.useContext)
2800        if (!item.isEmpty())
2801          return true;
2802      return false;
2803    }
2804
2805    public UsageContext addUseContext() { //3
2806      UsageContext t = new UsageContext();
2807      if (this.useContext == null)
2808        this.useContext = new ArrayList<UsageContext>();
2809      this.useContext.add(t);
2810      return t;
2811    }
2812
2813    public ImplementationGuide addUseContext(UsageContext t) { //3
2814      if (t == null)
2815        return this;
2816      if (this.useContext == null)
2817        this.useContext = new ArrayList<UsageContext>();
2818      this.useContext.add(t);
2819      return this;
2820    }
2821
2822    /**
2823     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
2824     */
2825    public UsageContext getUseContextFirstRep() { 
2826      if (getUseContext().isEmpty()) {
2827        addUseContext();
2828      }
2829      return getUseContext().get(0);
2830    }
2831
2832    /**
2833     * @return {@link #jurisdiction} (A legal or geographic region in which the implementation guide is intended to be used.)
2834     */
2835    public List<CodeableConcept> getJurisdiction() { 
2836      if (this.jurisdiction == null)
2837        this.jurisdiction = new ArrayList<CodeableConcept>();
2838      return this.jurisdiction;
2839    }
2840
2841    /**
2842     * @return Returns a reference to <code>this</code> for easy method chaining
2843     */
2844    public ImplementationGuide setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2845      this.jurisdiction = theJurisdiction;
2846      return this;
2847    }
2848
2849    public boolean hasJurisdiction() { 
2850      if (this.jurisdiction == null)
2851        return false;
2852      for (CodeableConcept item : this.jurisdiction)
2853        if (!item.isEmpty())
2854          return true;
2855      return false;
2856    }
2857
2858    public CodeableConcept addJurisdiction() { //3
2859      CodeableConcept t = new CodeableConcept();
2860      if (this.jurisdiction == null)
2861        this.jurisdiction = new ArrayList<CodeableConcept>();
2862      this.jurisdiction.add(t);
2863      return t;
2864    }
2865
2866    public ImplementationGuide addJurisdiction(CodeableConcept t) { //3
2867      if (t == null)
2868        return this;
2869      if (this.jurisdiction == null)
2870        this.jurisdiction = new ArrayList<CodeableConcept>();
2871      this.jurisdiction.add(t);
2872      return this;
2873    }
2874
2875    /**
2876     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
2877     */
2878    public CodeableConcept getJurisdictionFirstRep() { 
2879      if (getJurisdiction().isEmpty()) {
2880        addJurisdiction();
2881      }
2882      return getJurisdiction().get(0);
2883    }
2884
2885    /**
2886     * @return {@link #copyright} (A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2887     */
2888    public MarkdownType getCopyrightElement() { 
2889      if (this.copyright == null)
2890        if (Configuration.errorOnAutoCreate())
2891          throw new Error("Attempt to auto-create ImplementationGuide.copyright");
2892        else if (Configuration.doAutoCreate())
2893          this.copyright = new MarkdownType(); // bb
2894      return this.copyright;
2895    }
2896
2897    public boolean hasCopyrightElement() { 
2898      return this.copyright != null && !this.copyright.isEmpty();
2899    }
2900
2901    public boolean hasCopyright() { 
2902      return this.copyright != null && !this.copyright.isEmpty();
2903    }
2904
2905    /**
2906     * @param value {@link #copyright} (A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2907     */
2908    public ImplementationGuide setCopyrightElement(MarkdownType value) { 
2909      this.copyright = value;
2910      return this;
2911    }
2912
2913    /**
2914     * @return A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.
2915     */
2916    public String getCopyright() { 
2917      return this.copyright == null ? null : this.copyright.getValue();
2918    }
2919
2920    /**
2921     * @param value A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.
2922     */
2923    public ImplementationGuide setCopyright(String value) { 
2924      if (value == null)
2925        this.copyright = null;
2926      else {
2927        if (this.copyright == null)
2928          this.copyright = new MarkdownType();
2929        this.copyright.setValue(value);
2930      }
2931      return this;
2932    }
2933
2934    /**
2935     * @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
2936     */
2937    public IdType getFhirVersionElement() { 
2938      if (this.fhirVersion == null)
2939        if (Configuration.errorOnAutoCreate())
2940          throw new Error("Attempt to auto-create ImplementationGuide.fhirVersion");
2941        else if (Configuration.doAutoCreate())
2942          this.fhirVersion = new IdType(); // bb
2943      return this.fhirVersion;
2944    }
2945
2946    public boolean hasFhirVersionElement() { 
2947      return this.fhirVersion != null && !this.fhirVersion.isEmpty();
2948    }
2949
2950    public boolean hasFhirVersion() { 
2951      return this.fhirVersion != null && !this.fhirVersion.isEmpty();
2952    }
2953
2954    /**
2955     * @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
2956     */
2957    public ImplementationGuide setFhirVersionElement(IdType value) { 
2958      this.fhirVersion = value;
2959      return this;
2960    }
2961
2962    /**
2963     * @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.
2964     */
2965    public String getFhirVersion() { 
2966      return this.fhirVersion == null ? null : this.fhirVersion.getValue();
2967    }
2968
2969    /**
2970     * @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.
2971     */
2972    public ImplementationGuide setFhirVersion(String value) { 
2973      if (Utilities.noString(value))
2974        this.fhirVersion = null;
2975      else {
2976        if (this.fhirVersion == null)
2977          this.fhirVersion = new IdType();
2978        this.fhirVersion.setValue(value);
2979      }
2980      return this;
2981    }
2982
2983    /**
2984     * @return {@link #dependency} (Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.)
2985     */
2986    public List<ImplementationGuideDependencyComponent> getDependency() { 
2987      if (this.dependency == null)
2988        this.dependency = new ArrayList<ImplementationGuideDependencyComponent>();
2989      return this.dependency;
2990    }
2991
2992    /**
2993     * @return Returns a reference to <code>this</code> for easy method chaining
2994     */
2995    public ImplementationGuide setDependency(List<ImplementationGuideDependencyComponent> theDependency) { 
2996      this.dependency = theDependency;
2997      return this;
2998    }
2999
3000    public boolean hasDependency() { 
3001      if (this.dependency == null)
3002        return false;
3003      for (ImplementationGuideDependencyComponent item : this.dependency)
3004        if (!item.isEmpty())
3005          return true;
3006      return false;
3007    }
3008
3009    public ImplementationGuideDependencyComponent addDependency() { //3
3010      ImplementationGuideDependencyComponent t = new ImplementationGuideDependencyComponent();
3011      if (this.dependency == null)
3012        this.dependency = new ArrayList<ImplementationGuideDependencyComponent>();
3013      this.dependency.add(t);
3014      return t;
3015    }
3016
3017    public ImplementationGuide addDependency(ImplementationGuideDependencyComponent t) { //3
3018      if (t == null)
3019        return this;
3020      if (this.dependency == null)
3021        this.dependency = new ArrayList<ImplementationGuideDependencyComponent>();
3022      this.dependency.add(t);
3023      return this;
3024    }
3025
3026    /**
3027     * @return The first repetition of repeating field {@link #dependency}, creating it if it does not already exist
3028     */
3029    public ImplementationGuideDependencyComponent getDependencyFirstRep() { 
3030      if (getDependency().isEmpty()) {
3031        addDependency();
3032      }
3033      return getDependency().get(0);
3034    }
3035
3036    /**
3037     * @return {@link #package_} (A logical group of resources. Logical groups can be used when building pages.)
3038     */
3039    public List<ImplementationGuidePackageComponent> getPackage() { 
3040      if (this.package_ == null)
3041        this.package_ = new ArrayList<ImplementationGuidePackageComponent>();
3042      return this.package_;
3043    }
3044
3045    /**
3046     * @return Returns a reference to <code>this</code> for easy method chaining
3047     */
3048    public ImplementationGuide setPackage(List<ImplementationGuidePackageComponent> thePackage) { 
3049      this.package_ = thePackage;
3050      return this;
3051    }
3052
3053    public boolean hasPackage() { 
3054      if (this.package_ == null)
3055        return false;
3056      for (ImplementationGuidePackageComponent item : this.package_)
3057        if (!item.isEmpty())
3058          return true;
3059      return false;
3060    }
3061
3062    public ImplementationGuidePackageComponent addPackage() { //3
3063      ImplementationGuidePackageComponent t = new ImplementationGuidePackageComponent();
3064      if (this.package_ == null)
3065        this.package_ = new ArrayList<ImplementationGuidePackageComponent>();
3066      this.package_.add(t);
3067      return t;
3068    }
3069
3070    public ImplementationGuide addPackage(ImplementationGuidePackageComponent t) { //3
3071      if (t == null)
3072        return this;
3073      if (this.package_ == null)
3074        this.package_ = new ArrayList<ImplementationGuidePackageComponent>();
3075      this.package_.add(t);
3076      return this;
3077    }
3078
3079    /**
3080     * @return The first repetition of repeating field {@link #package_}, creating it if it does not already exist
3081     */
3082    public ImplementationGuidePackageComponent getPackageFirstRep() { 
3083      if (getPackage().isEmpty()) {
3084        addPackage();
3085      }
3086      return getPackage().get(0);
3087    }
3088
3089    /**
3090     * @return {@link #global} (A set of profiles that all resources covered by this implementation guide must conform to.)
3091     */
3092    public List<ImplementationGuideGlobalComponent> getGlobal() { 
3093      if (this.global == null)
3094        this.global = new ArrayList<ImplementationGuideGlobalComponent>();
3095      return this.global;
3096    }
3097
3098    /**
3099     * @return Returns a reference to <code>this</code> for easy method chaining
3100     */
3101    public ImplementationGuide setGlobal(List<ImplementationGuideGlobalComponent> theGlobal) { 
3102      this.global = theGlobal;
3103      return this;
3104    }
3105
3106    public boolean hasGlobal() { 
3107      if (this.global == null)
3108        return false;
3109      for (ImplementationGuideGlobalComponent item : this.global)
3110        if (!item.isEmpty())
3111          return true;
3112      return false;
3113    }
3114
3115    public ImplementationGuideGlobalComponent addGlobal() { //3
3116      ImplementationGuideGlobalComponent t = new ImplementationGuideGlobalComponent();
3117      if (this.global == null)
3118        this.global = new ArrayList<ImplementationGuideGlobalComponent>();
3119      this.global.add(t);
3120      return t;
3121    }
3122
3123    public ImplementationGuide addGlobal(ImplementationGuideGlobalComponent t) { //3
3124      if (t == null)
3125        return this;
3126      if (this.global == null)
3127        this.global = new ArrayList<ImplementationGuideGlobalComponent>();
3128      this.global.add(t);
3129      return this;
3130    }
3131
3132    /**
3133     * @return The first repetition of repeating field {@link #global}, creating it if it does not already exist
3134     */
3135    public ImplementationGuideGlobalComponent getGlobalFirstRep() { 
3136      if (getGlobal().isEmpty()) {
3137        addGlobal();
3138      }
3139      return getGlobal().get(0);
3140    }
3141
3142    /**
3143     * @return {@link #binary} (A binary file that is included in the  implementation guide when it is published.)
3144     */
3145    public List<UriType> getBinary() { 
3146      if (this.binary == null)
3147        this.binary = new ArrayList<UriType>();
3148      return this.binary;
3149    }
3150
3151    /**
3152     * @return Returns a reference to <code>this</code> for easy method chaining
3153     */
3154    public ImplementationGuide setBinary(List<UriType> theBinary) { 
3155      this.binary = theBinary;
3156      return this;
3157    }
3158
3159    public boolean hasBinary() { 
3160      if (this.binary == null)
3161        return false;
3162      for (UriType item : this.binary)
3163        if (!item.isEmpty())
3164          return true;
3165      return false;
3166    }
3167
3168    /**
3169     * @return {@link #binary} (A binary file that is included in the  implementation guide when it is published.)
3170     */
3171    public UriType addBinaryElement() {//2 
3172      UriType t = new UriType();
3173      if (this.binary == null)
3174        this.binary = new ArrayList<UriType>();
3175      this.binary.add(t);
3176      return t;
3177    }
3178
3179    /**
3180     * @param value {@link #binary} (A binary file that is included in the  implementation guide when it is published.)
3181     */
3182    public ImplementationGuide addBinary(String value) { //1
3183      UriType t = new UriType();
3184      t.setValue(value);
3185      if (this.binary == null)
3186        this.binary = new ArrayList<UriType>();
3187      this.binary.add(t);
3188      return this;
3189    }
3190
3191    /**
3192     * @param value {@link #binary} (A binary file that is included in the  implementation guide when it is published.)
3193     */
3194    public boolean hasBinary(String value) { 
3195      if (this.binary == null)
3196        return false;
3197      for (UriType v : this.binary)
3198        if (v.equals(value)) // uri
3199          return true;
3200      return false;
3201    }
3202
3203    /**
3204     * @return {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.)
3205     */
3206    public ImplementationGuidePageComponent getPage() { 
3207      if (this.page == null)
3208        if (Configuration.errorOnAutoCreate())
3209          throw new Error("Attempt to auto-create ImplementationGuide.page");
3210        else if (Configuration.doAutoCreate())
3211          this.page = new ImplementationGuidePageComponent(); // cc
3212      return this.page;
3213    }
3214
3215    public boolean hasPage() { 
3216      return this.page != null && !this.page.isEmpty();
3217    }
3218
3219    /**
3220     * @param value {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.)
3221     */
3222    public ImplementationGuide setPage(ImplementationGuidePageComponent value) { 
3223      this.page = value;
3224      return this;
3225    }
3226
3227      protected void listChildren(List<Property> childrenList) {
3228        super.listChildren(childrenList);
3229        childrenList.add(new Property("url", "uri", "An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).", 0, java.lang.Integer.MAX_VALUE, url));
3230        childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide 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, java.lang.Integer.MAX_VALUE, version));
3231        childrenList.add(new Property("name", "string", "A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, java.lang.Integer.MAX_VALUE, name));
3232        childrenList.add(new Property("status", "code", "The status of this implementation guide. Enables tracking the life-cycle of the content.", 0, java.lang.Integer.MAX_VALUE, status));
3233        childrenList.add(new Property("experimental", "boolean", "A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental));
3234        childrenList.add(new Property("date", "dateTime", "The date  (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.", 0, java.lang.Integer.MAX_VALUE, date));
3235        childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the implementation guide.", 0, java.lang.Integer.MAX_VALUE, publisher));
3236        childrenList.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));
3237        childrenList.add(new Property("description", "markdown", "A free text natural language description of the implementation guide from a consumer's perspective.", 0, java.lang.Integer.MAX_VALUE, description));
3238        childrenList.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate implementation guide instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
3239        childrenList.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the implementation guide is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3240        childrenList.add(new Property("copyright", "markdown", "A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.", 0, java.lang.Integer.MAX_VALUE, copyright));
3241        childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion));
3242        childrenList.add(new Property("dependency", "", "Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.", 0, java.lang.Integer.MAX_VALUE, dependency));
3243        childrenList.add(new Property("package", "", "A logical group of resources. Logical groups can be used when building pages.", 0, java.lang.Integer.MAX_VALUE, package_));
3244        childrenList.add(new Property("global", "", "A set of profiles that all resources covered by this implementation guide must conform to.", 0, java.lang.Integer.MAX_VALUE, global));
3245        childrenList.add(new Property("binary", "uri", "A binary file that is included in the  implementation guide when it is published.", 0, java.lang.Integer.MAX_VALUE, binary));
3246        childrenList.add(new Property("page", "", "A page / section in the implementation guide. The root page is the implementation guide home page.", 0, java.lang.Integer.MAX_VALUE, page));
3247      }
3248
3249      @Override
3250      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3251        switch (hash) {
3252        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3253        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3254        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3255        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3256        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3257        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3258        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3259        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3260        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3261        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3262        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3263        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
3264        case 461006061: /*fhirVersion*/ return this.fhirVersion == null ? new Base[0] : new Base[] {this.fhirVersion}; // IdType
3265        case -26291381: /*dependency*/ return this.dependency == null ? new Base[0] : this.dependency.toArray(new Base[this.dependency.size()]); // ImplementationGuideDependencyComponent
3266        case -807062458: /*package*/ return this.package_ == null ? new Base[0] : this.package_.toArray(new Base[this.package_.size()]); // ImplementationGuidePackageComponent
3267        case -1243020381: /*global*/ return this.global == null ? new Base[0] : this.global.toArray(new Base[this.global.size()]); // ImplementationGuideGlobalComponent
3268        case -1388966911: /*binary*/ return this.binary == null ? new Base[0] : this.binary.toArray(new Base[this.binary.size()]); // UriType
3269        case 3433103: /*page*/ return this.page == null ? new Base[0] : new Base[] {this.page}; // ImplementationGuidePageComponent
3270        default: return super.getProperty(hash, name, checkValid);
3271        }
3272
3273      }
3274
3275      @Override
3276      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3277        switch (hash) {
3278        case 116079: // url
3279          this.url = castToUri(value); // UriType
3280          return value;
3281        case 351608024: // version
3282          this.version = castToString(value); // StringType
3283          return value;
3284        case 3373707: // name
3285          this.name = castToString(value); // StringType
3286          return value;
3287        case -892481550: // status
3288          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3289          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3290          return value;
3291        case -404562712: // experimental
3292          this.experimental = castToBoolean(value); // BooleanType
3293          return value;
3294        case 3076014: // date
3295          this.date = castToDateTime(value); // DateTimeType
3296          return value;
3297        case 1447404028: // publisher
3298          this.publisher = castToString(value); // StringType
3299          return value;
3300        case 951526432: // contact
3301          this.getContact().add(castToContactDetail(value)); // ContactDetail
3302          return value;
3303        case -1724546052: // description
3304          this.description = castToMarkdown(value); // MarkdownType
3305          return value;
3306        case -669707736: // useContext
3307          this.getUseContext().add(castToUsageContext(value)); // UsageContext
3308          return value;
3309        case -507075711: // jurisdiction
3310          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
3311          return value;
3312        case 1522889671: // copyright
3313          this.copyright = castToMarkdown(value); // MarkdownType
3314          return value;
3315        case 461006061: // fhirVersion
3316          this.fhirVersion = castToId(value); // IdType
3317          return value;
3318        case -26291381: // dependency
3319          this.getDependency().add((ImplementationGuideDependencyComponent) value); // ImplementationGuideDependencyComponent
3320          return value;
3321        case -807062458: // package
3322          this.getPackage().add((ImplementationGuidePackageComponent) value); // ImplementationGuidePackageComponent
3323          return value;
3324        case -1243020381: // global
3325          this.getGlobal().add((ImplementationGuideGlobalComponent) value); // ImplementationGuideGlobalComponent
3326          return value;
3327        case -1388966911: // binary
3328          this.getBinary().add(castToUri(value)); // UriType
3329          return value;
3330        case 3433103: // page
3331          this.page = (ImplementationGuidePageComponent) value; // ImplementationGuidePageComponent
3332          return value;
3333        default: return super.setProperty(hash, name, value);
3334        }
3335
3336      }
3337
3338      @Override
3339      public Base setProperty(String name, Base value) throws FHIRException {
3340        if (name.equals("url")) {
3341          this.url = castToUri(value); // UriType
3342        } else if (name.equals("version")) {
3343          this.version = castToString(value); // StringType
3344        } else if (name.equals("name")) {
3345          this.name = castToString(value); // StringType
3346        } else if (name.equals("status")) {
3347          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3348          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3349        } else if (name.equals("experimental")) {
3350          this.experimental = castToBoolean(value); // BooleanType
3351        } else if (name.equals("date")) {
3352          this.date = castToDateTime(value); // DateTimeType
3353        } else if (name.equals("publisher")) {
3354          this.publisher = castToString(value); // StringType
3355        } else if (name.equals("contact")) {
3356          this.getContact().add(castToContactDetail(value));
3357        } else if (name.equals("description")) {
3358          this.description = castToMarkdown(value); // MarkdownType
3359        } else if (name.equals("useContext")) {
3360          this.getUseContext().add(castToUsageContext(value));
3361        } else if (name.equals("jurisdiction")) {
3362          this.getJurisdiction().add(castToCodeableConcept(value));
3363        } else if (name.equals("copyright")) {
3364          this.copyright = castToMarkdown(value); // MarkdownType
3365        } else if (name.equals("fhirVersion")) {
3366          this.fhirVersion = castToId(value); // IdType
3367        } else if (name.equals("dependency")) {
3368          this.getDependency().add((ImplementationGuideDependencyComponent) value);
3369        } else if (name.equals("package")) {
3370          this.getPackage().add((ImplementationGuidePackageComponent) value);
3371        } else if (name.equals("global")) {
3372          this.getGlobal().add((ImplementationGuideGlobalComponent) value);
3373        } else if (name.equals("binary")) {
3374          this.getBinary().add(castToUri(value));
3375        } else if (name.equals("page")) {
3376          this.page = (ImplementationGuidePageComponent) value; // ImplementationGuidePageComponent
3377        } else
3378          return super.setProperty(name, value);
3379        return value;
3380      }
3381
3382      @Override
3383      public Base makeProperty(int hash, String name) throws FHIRException {
3384        switch (hash) {
3385        case 116079:  return getUrlElement();
3386        case 351608024:  return getVersionElement();
3387        case 3373707:  return getNameElement();
3388        case -892481550:  return getStatusElement();
3389        case -404562712:  return getExperimentalElement();
3390        case 3076014:  return getDateElement();
3391        case 1447404028:  return getPublisherElement();
3392        case 951526432:  return addContact(); 
3393        case -1724546052:  return getDescriptionElement();
3394        case -669707736:  return addUseContext(); 
3395        case -507075711:  return addJurisdiction(); 
3396        case 1522889671:  return getCopyrightElement();
3397        case 461006061:  return getFhirVersionElement();
3398        case -26291381:  return addDependency(); 
3399        case -807062458:  return addPackage(); 
3400        case -1243020381:  return addGlobal(); 
3401        case -1388966911:  return addBinaryElement();
3402        case 3433103:  return getPage(); 
3403        default: return super.makeProperty(hash, name);
3404        }
3405
3406      }
3407
3408      @Override
3409      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3410        switch (hash) {
3411        case 116079: /*url*/ return new String[] {"uri"};
3412        case 351608024: /*version*/ return new String[] {"string"};
3413        case 3373707: /*name*/ return new String[] {"string"};
3414        case -892481550: /*status*/ return new String[] {"code"};
3415        case -404562712: /*experimental*/ return new String[] {"boolean"};
3416        case 3076014: /*date*/ return new String[] {"dateTime"};
3417        case 1447404028: /*publisher*/ return new String[] {"string"};
3418        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3419        case -1724546052: /*description*/ return new String[] {"markdown"};
3420        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3421        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3422        case 1522889671: /*copyright*/ return new String[] {"markdown"};
3423        case 461006061: /*fhirVersion*/ return new String[] {"id"};
3424        case -26291381: /*dependency*/ return new String[] {};
3425        case -807062458: /*package*/ return new String[] {};
3426        case -1243020381: /*global*/ return new String[] {};
3427        case -1388966911: /*binary*/ return new String[] {"uri"};
3428        case 3433103: /*page*/ return new String[] {};
3429        default: return super.getTypesForProperty(hash, name);
3430        }
3431
3432      }
3433
3434      @Override
3435      public Base addChild(String name) throws FHIRException {
3436        if (name.equals("url")) {
3437          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.url");
3438        }
3439        else if (name.equals("version")) {
3440          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.version");
3441        }
3442        else if (name.equals("name")) {
3443          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name");
3444        }
3445        else if (name.equals("status")) {
3446          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.status");
3447        }
3448        else if (name.equals("experimental")) {
3449          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.experimental");
3450        }
3451        else if (name.equals("date")) {
3452          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.date");
3453        }
3454        else if (name.equals("publisher")) {
3455          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.publisher");
3456        }
3457        else if (name.equals("contact")) {
3458          return addContact();
3459        }
3460        else if (name.equals("description")) {
3461          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description");
3462        }
3463        else if (name.equals("useContext")) {
3464          return addUseContext();
3465        }
3466        else if (name.equals("jurisdiction")) {
3467          return addJurisdiction();
3468        }
3469        else if (name.equals("copyright")) {
3470          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.copyright");
3471        }
3472        else if (name.equals("fhirVersion")) {
3473          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.fhirVersion");
3474        }
3475        else if (name.equals("dependency")) {
3476          return addDependency();
3477        }
3478        else if (name.equals("package")) {
3479          return addPackage();
3480        }
3481        else if (name.equals("global")) {
3482          return addGlobal();
3483        }
3484        else if (name.equals("binary")) {
3485          throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.binary");
3486        }
3487        else if (name.equals("page")) {
3488          this.page = new ImplementationGuidePageComponent();
3489          return this.page;
3490        }
3491        else
3492          return super.addChild(name);
3493      }
3494
3495  public String fhirType() {
3496    return "ImplementationGuide";
3497
3498  }
3499
3500      public ImplementationGuide copy() {
3501        ImplementationGuide dst = new ImplementationGuide();
3502        copyValues(dst);
3503        dst.url = url == null ? null : url.copy();
3504        dst.version = version == null ? null : version.copy();
3505        dst.name = name == null ? null : name.copy();
3506        dst.status = status == null ? null : status.copy();
3507        dst.experimental = experimental == null ? null : experimental.copy();
3508        dst.date = date == null ? null : date.copy();
3509        dst.publisher = publisher == null ? null : publisher.copy();
3510        if (contact != null) {
3511          dst.contact = new ArrayList<ContactDetail>();
3512          for (ContactDetail i : contact)
3513            dst.contact.add(i.copy());
3514        };
3515        dst.description = description == null ? null : description.copy();
3516        if (useContext != null) {
3517          dst.useContext = new ArrayList<UsageContext>();
3518          for (UsageContext i : useContext)
3519            dst.useContext.add(i.copy());
3520        };
3521        if (jurisdiction != null) {
3522          dst.jurisdiction = new ArrayList<CodeableConcept>();
3523          for (CodeableConcept i : jurisdiction)
3524            dst.jurisdiction.add(i.copy());
3525        };
3526        dst.copyright = copyright == null ? null : copyright.copy();
3527        dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy();
3528        if (dependency != null) {
3529          dst.dependency = new ArrayList<ImplementationGuideDependencyComponent>();
3530          for (ImplementationGuideDependencyComponent i : dependency)
3531            dst.dependency.add(i.copy());
3532        };
3533        if (package_ != null) {
3534          dst.package_ = new ArrayList<ImplementationGuidePackageComponent>();
3535          for (ImplementationGuidePackageComponent i : package_)
3536            dst.package_.add(i.copy());
3537        };
3538        if (global != null) {
3539          dst.global = new ArrayList<ImplementationGuideGlobalComponent>();
3540          for (ImplementationGuideGlobalComponent i : global)
3541            dst.global.add(i.copy());
3542        };
3543        if (binary != null) {
3544          dst.binary = new ArrayList<UriType>();
3545          for (UriType i : binary)
3546            dst.binary.add(i.copy());
3547        };
3548        dst.page = page == null ? null : page.copy();
3549        return dst;
3550      }
3551
3552      protected ImplementationGuide typedCopy() {
3553        return copy();
3554      }
3555
3556      @Override
3557      public boolean equalsDeep(Base other) {
3558        if (!super.equalsDeep(other))
3559          return false;
3560        if (!(other instanceof ImplementationGuide))
3561          return false;
3562        ImplementationGuide o = (ImplementationGuide) other;
3563        return compareDeep(copyright, o.copyright, true) && compareDeep(fhirVersion, o.fhirVersion, true)
3564           && compareDeep(dependency, o.dependency, true) && compareDeep(package_, o.package_, true) && compareDeep(global, o.global, true)
3565           && compareDeep(binary, o.binary, true) && compareDeep(page, o.page, true);
3566      }
3567
3568      @Override
3569      public boolean equalsShallow(Base other) {
3570        if (!super.equalsShallow(other))
3571          return false;
3572        if (!(other instanceof ImplementationGuide))
3573          return false;
3574        ImplementationGuide o = (ImplementationGuide) other;
3575        return compareValues(copyright, o.copyright, true) && compareValues(fhirVersion, o.fhirVersion, true)
3576           && compareValues(binary, o.binary, true);
3577      }
3578
3579      public boolean isEmpty() {
3580        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(copyright, fhirVersion, dependency
3581          , package_, global, binary, page);
3582      }
3583
3584  @Override
3585  public ResourceType getResourceType() {
3586    return ResourceType.ImplementationGuide;
3587   }
3588
3589 /**
3590   * Search parameter: <b>date</b>
3591   * <p>
3592   * Description: <b>The implementation guide publication date</b><br>
3593   * Type: <b>date</b><br>
3594   * Path: <b>ImplementationGuide.date</b><br>
3595   * </p>
3596   */
3597  @SearchParamDefinition(name="date", path="ImplementationGuide.date", description="The implementation guide publication date", type="date" )
3598  public static final String SP_DATE = "date";
3599 /**
3600   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3601   * <p>
3602   * Description: <b>The implementation guide publication date</b><br>
3603   * Type: <b>date</b><br>
3604   * Path: <b>ImplementationGuide.date</b><br>
3605   * </p>
3606   */
3607  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3608
3609 /**
3610   * Search parameter: <b>dependency</b>
3611   * <p>
3612   * Description: <b>Where to find dependency</b><br>
3613   * Type: <b>uri</b><br>
3614   * Path: <b>ImplementationGuide.dependency.uri</b><br>
3615   * </p>
3616   */
3617  @SearchParamDefinition(name="dependency", path="ImplementationGuide.dependency.uri", description="Where to find dependency", type="uri" )
3618  public static final String SP_DEPENDENCY = "dependency";
3619 /**
3620   * <b>Fluent Client</b> search parameter constant for <b>dependency</b>
3621   * <p>
3622   * Description: <b>Where to find dependency</b><br>
3623   * Type: <b>uri</b><br>
3624   * Path: <b>ImplementationGuide.dependency.uri</b><br>
3625   * </p>
3626   */
3627  public static final ca.uhn.fhir.rest.gclient.UriClientParam DEPENDENCY = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DEPENDENCY);
3628
3629 /**
3630   * Search parameter: <b>resource</b>
3631   * <p>
3632   * Description: <b>Location of the resource</b><br>
3633   * Type: <b>reference</b><br>
3634   * Path: <b>ImplementationGuide.package.resource.source[x]</b><br>
3635   * </p>
3636   */
3637  @SearchParamDefinition(name="resource", path="ImplementationGuide.package.resource.source", description="Location of the resource", type="reference" )
3638  public static final String SP_RESOURCE = "resource";
3639 /**
3640   * <b>Fluent Client</b> search parameter constant for <b>resource</b>
3641   * <p>
3642   * Description: <b>Location of the resource</b><br>
3643   * Type: <b>reference</b><br>
3644   * Path: <b>ImplementationGuide.package.resource.source[x]</b><br>
3645   * </p>
3646   */
3647  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESOURCE);
3648
3649/**
3650   * Constant for fluent queries to be used to add include statements. Specifies
3651   * the path value of "<b>ImplementationGuide:resource</b>".
3652   */
3653  public static final ca.uhn.fhir.model.api.Include INCLUDE_RESOURCE = new ca.uhn.fhir.model.api.Include("ImplementationGuide:resource").toLocked();
3654
3655 /**
3656   * Search parameter: <b>jurisdiction</b>
3657   * <p>
3658   * Description: <b>Intended jurisdiction for the implementation guide</b><br>
3659   * Type: <b>token</b><br>
3660   * Path: <b>ImplementationGuide.jurisdiction</b><br>
3661   * </p>
3662   */
3663  @SearchParamDefinition(name="jurisdiction", path="ImplementationGuide.jurisdiction", description="Intended jurisdiction for the implementation guide", type="token" )
3664  public static final String SP_JURISDICTION = "jurisdiction";
3665 /**
3666   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
3667   * <p>
3668   * Description: <b>Intended jurisdiction for the implementation guide</b><br>
3669   * Type: <b>token</b><br>
3670   * Path: <b>ImplementationGuide.jurisdiction</b><br>
3671   * </p>
3672   */
3673  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
3674
3675 /**
3676   * Search parameter: <b>name</b>
3677   * <p>
3678   * Description: <b>Computationally friendly name of the implementation guide</b><br>
3679   * Type: <b>string</b><br>
3680   * Path: <b>ImplementationGuide.name</b><br>
3681   * </p>
3682   */
3683  @SearchParamDefinition(name="name", path="ImplementationGuide.name", description="Computationally friendly name of the implementation guide", type="string" )
3684  public static final String SP_NAME = "name";
3685 /**
3686   * <b>Fluent Client</b> search parameter constant for <b>name</b>
3687   * <p>
3688   * Description: <b>Computationally friendly name of the implementation guide</b><br>
3689   * Type: <b>string</b><br>
3690   * Path: <b>ImplementationGuide.name</b><br>
3691   * </p>
3692   */
3693  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
3694
3695 /**
3696   * Search parameter: <b>description</b>
3697   * <p>
3698   * Description: <b>The description of the implementation guide</b><br>
3699   * Type: <b>string</b><br>
3700   * Path: <b>ImplementationGuide.description</b><br>
3701   * </p>
3702   */
3703  @SearchParamDefinition(name="description", path="ImplementationGuide.description", description="The description of the implementation guide", type="string" )
3704  public static final String SP_DESCRIPTION = "description";
3705 /**
3706   * <b>Fluent Client</b> search parameter constant for <b>description</b>
3707   * <p>
3708   * Description: <b>The description of the implementation guide</b><br>
3709   * Type: <b>string</b><br>
3710   * Path: <b>ImplementationGuide.description</b><br>
3711   * </p>
3712   */
3713  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
3714
3715 /**
3716   * Search parameter: <b>publisher</b>
3717   * <p>
3718   * Description: <b>Name of the publisher of the implementation guide</b><br>
3719   * Type: <b>string</b><br>
3720   * Path: <b>ImplementationGuide.publisher</b><br>
3721   * </p>
3722   */
3723  @SearchParamDefinition(name="publisher", path="ImplementationGuide.publisher", description="Name of the publisher of the implementation guide", type="string" )
3724  public static final String SP_PUBLISHER = "publisher";
3725 /**
3726   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3727   * <p>
3728   * Description: <b>Name of the publisher of the implementation guide</b><br>
3729   * Type: <b>string</b><br>
3730   * Path: <b>ImplementationGuide.publisher</b><br>
3731   * </p>
3732   */
3733  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
3734
3735 /**
3736   * Search parameter: <b>experimental</b>
3737   * <p>
3738   * Description: <b>For testing purposes, not real usage</b><br>
3739   * Type: <b>token</b><br>
3740   * Path: <b>ImplementationGuide.experimental</b><br>
3741   * </p>
3742   */
3743  @SearchParamDefinition(name="experimental", path="ImplementationGuide.experimental", description="For testing purposes, not real usage", type="token" )
3744  public static final String SP_EXPERIMENTAL = "experimental";
3745 /**
3746   * <b>Fluent Client</b> search parameter constant for <b>experimental</b>
3747   * <p>
3748   * Description: <b>For testing purposes, not real usage</b><br>
3749   * Type: <b>token</b><br>
3750   * Path: <b>ImplementationGuide.experimental</b><br>
3751   * </p>
3752   */
3753  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXPERIMENTAL);
3754
3755 /**
3756   * Search parameter: <b>version</b>
3757   * <p>
3758   * Description: <b>The business version of the implementation guide</b><br>
3759   * Type: <b>token</b><br>
3760   * Path: <b>ImplementationGuide.version</b><br>
3761   * </p>
3762   */
3763  @SearchParamDefinition(name="version", path="ImplementationGuide.version", description="The business version of the implementation guide", type="token" )
3764  public static final String SP_VERSION = "version";
3765 /**
3766   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3767   * <p>
3768   * Description: <b>The business version of the implementation guide</b><br>
3769   * Type: <b>token</b><br>
3770   * Path: <b>ImplementationGuide.version</b><br>
3771   * </p>
3772   */
3773  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3774
3775 /**
3776   * Search parameter: <b>url</b>
3777   * <p>
3778   * Description: <b>The uri that identifies the implementation guide</b><br>
3779   * Type: <b>uri</b><br>
3780   * Path: <b>ImplementationGuide.url</b><br>
3781   * </p>
3782   */
3783  @SearchParamDefinition(name="url", path="ImplementationGuide.url", description="The uri that identifies the implementation guide", type="uri" )
3784  public static final String SP_URL = "url";
3785 /**
3786   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3787   * <p>
3788   * Description: <b>The uri that identifies the implementation guide</b><br>
3789   * Type: <b>uri</b><br>
3790   * Path: <b>ImplementationGuide.url</b><br>
3791   * </p>
3792   */
3793  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3794
3795 /**
3796   * Search parameter: <b>status</b>
3797   * <p>
3798   * Description: <b>The current status of the implementation guide</b><br>
3799   * Type: <b>token</b><br>
3800   * Path: <b>ImplementationGuide.status</b><br>
3801   * </p>
3802   */
3803  @SearchParamDefinition(name="status", path="ImplementationGuide.status", description="The current status of the implementation guide", type="token" )
3804  public static final String SP_STATUS = "status";
3805 /**
3806   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3807   * <p>
3808   * Description: <b>The current status of the implementation guide</b><br>
3809   * Type: <b>token</b><br>
3810   * Path: <b>ImplementationGuide.status</b><br>
3811   * </p>
3812   */
3813  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3814
3815
3816}
3817