001package org.hl7.fhir.r4.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 Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037import org.hl7.fhir.exceptions.FHIRException;
038import org.hl7.fhir.r4.model.Enumerations.PublicationStatus;
039import org.hl7.fhir.r4.model.Enumerations.PublicationStatusEnumFactory;
040import org.hl7.fhir.utilities.Utilities;
041
042import ca.uhn.fhir.model.api.annotation.Child;
043import ca.uhn.fhir.model.api.annotation.ChildOrder;
044import ca.uhn.fhir.model.api.annotation.Description;
045import ca.uhn.fhir.model.api.annotation.ResourceDef;
046import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
047
048/**
049 * The Library resource is a general-purpose container for knowledge asset
050 * definitions. It can be used to describe and expose existing knowledge assets
051 * such as logic libraries and information model descriptions, as well as to
052 * describe a collection of knowledge assets.
053 */
054@ResourceDef(name = "Library", profile = "http://hl7.org/fhir/StructureDefinition/Library")
055@ChildOrder(names = { "url", "identifier", "version", "name", "title", "subtitle", "status", "experimental", "type",
056    "subject[x]", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "usage",
057    "copyright", "approvalDate", "lastReviewDate", "effectivePeriod", "topic", "author", "editor", "reviewer",
058    "endorser", "relatedArtifact", "parameter", "dataRequirement", "content" })
059public class Library extends MetadataResource {
060
061  /**
062   * A formal identifier that is used to identify this library when it is
063   * represented in other formats, or referenced in a specification, model, design
064   * or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that
065   * at least one identifier is required for non-experimental active artifacts.
066   */
067  @Child(name = "identifier", type = {
068      Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true)
069  @Description(shortDefinition = "Additional identifier for the library", formalDefinition = "A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.")
070  protected List<Identifier> identifier;
071
072  /**
073   * An explanatory or alternate title for the library giving additional
074   * information about its content.
075   */
076  @Child(name = "subtitle", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
077  @Description(shortDefinition = "Subordinate title of the library", formalDefinition = "An explanatory or alternate title for the library giving additional information about its content.")
078  protected StringType subtitle;
079
080  /**
081   * Identifies the type of library such as a Logic Library, Model Definition,
082   * Asset Collection, or Module Definition.
083   */
084  @Child(name = "type", type = { CodeableConcept.class }, order = 2, min = 1, max = 1, modifier = false, summary = true)
085  @Description(shortDefinition = "logic-library | model-definition | asset-collection | module-definition", formalDefinition = "Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.")
086  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/library-type")
087  protected CodeableConcept type;
088
089  /**
090   * A code or group definition that describes the intended subject of the
091   * contents of the library.
092   */
093  @Child(name = "subject", type = { CodeableConcept.class,
094      Group.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
095  @Description(shortDefinition = "Type of individual the library content is focused on", formalDefinition = "A code or group definition that describes the intended subject of the contents of the library.")
096  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/subject-type")
097  protected Type subject;
098
099  /**
100   * Explanation of why this library is needed and why it has been designed as it
101   * has.
102   */
103  @Child(name = "purpose", type = {
104      MarkdownType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
105  @Description(shortDefinition = "Why this library is defined", formalDefinition = "Explanation of why this library is needed and why it has been designed as it has.")
106  protected MarkdownType purpose;
107
108  /**
109   * A detailed description of how the library is used from a clinical
110   * perspective.
111   */
112  @Child(name = "usage", type = { StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
113  @Description(shortDefinition = "Describes the clinical usage of the library", formalDefinition = "A detailed description of how the library is used from a clinical perspective.")
114  protected StringType usage;
115
116  /**
117   * A copyright statement relating to the library and/or its contents. Copyright
118   * statements are generally legal restrictions on the use and publishing of the
119   * library.
120   */
121  @Child(name = "copyright", type = {
122      MarkdownType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
123  @Description(shortDefinition = "Use and/or publishing restrictions", formalDefinition = "A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.")
124  protected MarkdownType copyright;
125
126  /**
127   * The date on which the resource content was approved by the publisher.
128   * Approval happens once when the content is officially approved for usage.
129   */
130  @Child(name = "approvalDate", type = {
131      DateType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
132  @Description(shortDefinition = "When the library was approved by publisher", formalDefinition = "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.")
133  protected DateType approvalDate;
134
135  /**
136   * The date on which the resource content was last reviewed. Review happens
137   * periodically after approval but does not change the original approval date.
138   */
139  @Child(name = "lastReviewDate", type = {
140      DateType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false)
141  @Description(shortDefinition = "When the library was last reviewed", formalDefinition = "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.")
142  protected DateType lastReviewDate;
143
144  /**
145   * The period during which the library content was or is planned to be in active
146   * use.
147   */
148  @Child(name = "effectivePeriod", type = {
149      Period.class }, order = 9, min = 0, max = 1, modifier = false, summary = true)
150  @Description(shortDefinition = "When the library is expected to be used", formalDefinition = "The period during which the library content was or is planned to be in active use.")
151  protected Period effectivePeriod;
152
153  /**
154   * Descriptive topics related to the content of the library. Topics provide a
155   * high-level categorization of the library that can be useful for filtering and
156   * searching.
157   */
158  @Child(name = "topic", type = {
159      CodeableConcept.class }, order = 10, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
160  @Description(shortDefinition = "E.g. Education, Treatment, Assessment, etc.", formalDefinition = "Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.")
161  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/definition-topic")
162  protected List<CodeableConcept> topic;
163
164  /**
165   * An individiual or organization primarily involved in the creation and
166   * maintenance of the content.
167   */
168  @Child(name = "author", type = {
169      ContactDetail.class }, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
170  @Description(shortDefinition = "Who authored the content", formalDefinition = "An individiual or organization primarily involved in the creation and maintenance of the content.")
171  protected List<ContactDetail> author;
172
173  /**
174   * An individual or organization primarily responsible for internal coherence of
175   * the content.
176   */
177  @Child(name = "editor", type = {
178      ContactDetail.class }, order = 12, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
179  @Description(shortDefinition = "Who edited the content", formalDefinition = "An individual or organization primarily responsible for internal coherence of the content.")
180  protected List<ContactDetail> editor;
181
182  /**
183   * An individual or organization primarily responsible for review of some aspect
184   * of the content.
185   */
186  @Child(name = "reviewer", type = {
187      ContactDetail.class }, order = 13, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
188  @Description(shortDefinition = "Who reviewed the content", formalDefinition = "An individual or organization primarily responsible for review of some aspect of the content.")
189  protected List<ContactDetail> reviewer;
190
191  /**
192   * An individual or organization responsible for officially endorsing the
193   * content for use in some setting.
194   */
195  @Child(name = "endorser", type = {
196      ContactDetail.class }, order = 14, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
197  @Description(shortDefinition = "Who endorsed the content", formalDefinition = "An individual or organization responsible for officially endorsing the content for use in some setting.")
198  protected List<ContactDetail> endorser;
199
200  /**
201   * Related artifacts such as additional documentation, justification, or
202   * bibliographic references.
203   */
204  @Child(name = "relatedArtifact", type = {
205      RelatedArtifact.class }, order = 15, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
206  @Description(shortDefinition = "Additional documentation, citations, etc.", formalDefinition = "Related artifacts such as additional documentation, justification, or bibliographic references.")
207  protected List<RelatedArtifact> relatedArtifact;
208
209  /**
210   * The parameter element defines parameters used by the library.
211   */
212  @Child(name = "parameter", type = {
213      ParameterDefinition.class }, order = 16, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
214  @Description(shortDefinition = "Parameters defined by the library", formalDefinition = "The parameter element defines parameters used by the library.")
215  protected List<ParameterDefinition> parameter;
216
217  /**
218   * Describes a set of data that must be provided in order to be able to
219   * successfully perform the computations defined by the library.
220   */
221  @Child(name = "dataRequirement", type = {
222      DataRequirement.class }, order = 17, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
223  @Description(shortDefinition = "What data is referenced by this library", formalDefinition = "Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.")
224  protected List<DataRequirement> dataRequirement;
225
226  /**
227   * The content of the library as an Attachment. The content may be a reference
228   * to a url, or may be directly embedded as a base-64 string. Either way, the
229   * contentType of the attachment determines how to interpret the content.
230   */
231  @Child(name = "content", type = {
232      Attachment.class }, order = 18, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true)
233  @Description(shortDefinition = "Contents of the library, either embedded or referenced", formalDefinition = "The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.")
234  protected List<Attachment> content;
235
236  private static final long serialVersionUID = -796686369L;
237
238  /**
239   * Constructor
240   */
241  public Library() {
242    super();
243  }
244
245  /**
246   * Constructor
247   */
248  public Library(Enumeration<PublicationStatus> status, CodeableConcept type) {
249    super();
250    this.status = status;
251    this.type = type;
252  }
253
254  /**
255   * @return {@link #url} (An absolute URI that is used to identify this library
256   *         when it is referenced in a specification, model, design or an
257   *         instance; also called its canonical identifier. This SHOULD be
258   *         globally unique and SHOULD be a literal address at which at which an
259   *         authoritative instance of this library is (or will be) published.
260   *         This URL can be the target of a canonical reference. It SHALL remain
261   *         the same when the library is stored on different servers.). This is
262   *         the underlying object with id, value and extensions. The accessor
263   *         "getUrl" gives direct access to the value
264   */
265  public UriType getUrlElement() {
266    if (this.url == null)
267      if (Configuration.errorOnAutoCreate())
268        throw new Error("Attempt to auto-create Library.url");
269      else if (Configuration.doAutoCreate())
270        this.url = new UriType(); // bb
271    return this.url;
272  }
273
274  public boolean hasUrlElement() {
275    return this.url != null && !this.url.isEmpty();
276  }
277
278  public boolean hasUrl() {
279    return this.url != null && !this.url.isEmpty();
280  }
281
282  /**
283   * @param value {@link #url} (An absolute URI that is used to identify this
284   *              library when it is referenced in a specification, model, design
285   *              or an instance; also called its canonical identifier. This
286   *              SHOULD be globally unique and SHOULD be a literal address at
287   *              which at which an authoritative instance of this library is (or
288   *              will be) published. This URL can be the target of a canonical
289   *              reference. It SHALL remain the same when the library is stored
290   *              on different servers.). This is the underlying object with id,
291   *              value and extensions. The accessor "getUrl" gives direct access
292   *              to the value
293   */
294  public Library setUrlElement(UriType value) {
295    this.url = value;
296    return this;
297  }
298
299  /**
300   * @return An absolute URI that is used to identify this library when it is
301   *         referenced in a specification, model, design or an instance; also
302   *         called its canonical identifier. This SHOULD be globally unique and
303   *         SHOULD be a literal address at which at which an authoritative
304   *         instance of this library is (or will be) published. This URL can be
305   *         the target of a canonical reference. It SHALL remain the same when
306   *         the library is stored on different servers.
307   */
308  public String getUrl() {
309    return this.url == null ? null : this.url.getValue();
310  }
311
312  /**
313   * @param value An absolute URI that is used to identify this library when it is
314   *              referenced in a specification, model, design or an instance;
315   *              also called its canonical identifier. This SHOULD be globally
316   *              unique and SHOULD be a literal address at which at which an
317   *              authoritative instance of this library is (or will be)
318   *              published. This URL can be the target of a canonical reference.
319   *              It SHALL remain the same when the library is stored on different
320   *              servers.
321   */
322  public Library setUrl(String value) {
323    if (Utilities.noString(value))
324      this.url = null;
325    else {
326      if (this.url == null)
327        this.url = new UriType();
328      this.url.setValue(value);
329    }
330    return this;
331  }
332
333  /**
334   * @return {@link #identifier} (A formal identifier that is used to identify
335   *         this library when it is represented in other formats, or referenced
336   *         in a specification, model, design or an instance. e.g. CMS or NQF
337   *         identifiers for a measure artifact. Note that at least one identifier
338   *         is required for non-experimental active artifacts.)
339   */
340  public List<Identifier> getIdentifier() {
341    if (this.identifier == null)
342      this.identifier = new ArrayList<Identifier>();
343    return this.identifier;
344  }
345
346  /**
347   * @return Returns a reference to <code>this</code> for easy method chaining
348   */
349  public Library setIdentifier(List<Identifier> theIdentifier) {
350    this.identifier = theIdentifier;
351    return this;
352  }
353
354  public boolean hasIdentifier() {
355    if (this.identifier == null)
356      return false;
357    for (Identifier item : this.identifier)
358      if (!item.isEmpty())
359        return true;
360    return false;
361  }
362
363  public Identifier addIdentifier() { // 3
364    Identifier t = new Identifier();
365    if (this.identifier == null)
366      this.identifier = new ArrayList<Identifier>();
367    this.identifier.add(t);
368    return t;
369  }
370
371  public Library addIdentifier(Identifier t) { // 3
372    if (t == null)
373      return this;
374    if (this.identifier == null)
375      this.identifier = new ArrayList<Identifier>();
376    this.identifier.add(t);
377    return this;
378  }
379
380  /**
381   * @return The first repetition of repeating field {@link #identifier}, creating
382   *         it if it does not already exist
383   */
384  public Identifier getIdentifierFirstRep() {
385    if (getIdentifier().isEmpty()) {
386      addIdentifier();
387    }
388    return getIdentifier().get(0);
389  }
390
391  /**
392   * @return {@link #version} (The identifier that is used to identify this
393   *         version of the library when it is referenced in a specification,
394   *         model, design or instance. This is an arbitrary value managed by the
395   *         library author and is not expected to be globally unique. For
396   *         example, it might be a timestamp (e.g. yyyymmdd) if a managed version
397   *         is not available. There is also no expectation that versions can be
398   *         placed in a lexicographical sequence. To provide a version consistent
399   *         with the Decision Support Service specification, use the format
400   *         Major.Minor.Revision (e.g. 1.0.0). For more information on versioning
401   *         knowledge assets, refer to the Decision Support Service
402   *         specification. Note that a version is required for non-experimental
403   *         active artifacts.). This is the underlying object with id, value and
404   *         extensions. The accessor "getVersion" gives direct access to the
405   *         value
406   */
407  public StringType getVersionElement() {
408    if (this.version == null)
409      if (Configuration.errorOnAutoCreate())
410        throw new Error("Attempt to auto-create Library.version");
411      else if (Configuration.doAutoCreate())
412        this.version = new StringType(); // bb
413    return this.version;
414  }
415
416  public boolean hasVersionElement() {
417    return this.version != null && !this.version.isEmpty();
418  }
419
420  public boolean hasVersion() {
421    return this.version != null && !this.version.isEmpty();
422  }
423
424  /**
425   * @param value {@link #version} (The identifier that is used to identify this
426   *              version of the library when it is referenced in a specification,
427   *              model, design or instance. This is an arbitrary value managed by
428   *              the library author and is not expected to be globally unique.
429   *              For example, it might be a timestamp (e.g. yyyymmdd) if a
430   *              managed version is not available. There is also no expectation
431   *              that versions can be placed in a lexicographical sequence. To
432   *              provide a version consistent with the Decision Support Service
433   *              specification, use the format Major.Minor.Revision (e.g. 1.0.0).
434   *              For more information on versioning knowledge assets, refer to
435   *              the Decision Support Service specification. Note that a version
436   *              is required for non-experimental active artifacts.). This is the
437   *              underlying object with id, value and extensions. The accessor
438   *              "getVersion" gives direct access to the value
439   */
440  public Library setVersionElement(StringType value) {
441    this.version = value;
442    return this;
443  }
444
445  /**
446   * @return The identifier that is used to identify this version of the library
447   *         when it is referenced in a specification, model, design or instance.
448   *         This is an arbitrary value managed by the library author and is not
449   *         expected to be globally unique. For example, it might be a timestamp
450   *         (e.g. yyyymmdd) if a managed version is not available. There is also
451   *         no expectation that versions can be placed in a lexicographical
452   *         sequence. To provide a version consistent with the Decision Support
453   *         Service specification, use the format Major.Minor.Revision (e.g.
454   *         1.0.0). For more information on versioning knowledge assets, refer to
455   *         the Decision Support Service specification. Note that a version is
456   *         required for non-experimental active artifacts.
457   */
458  public String getVersion() {
459    return this.version == null ? null : this.version.getValue();
460  }
461
462  /**
463   * @param value The identifier that is used to identify this version of the
464   *              library when it is referenced in a specification, model, design
465   *              or instance. This is an arbitrary value managed by the library
466   *              author and is not expected to be globally unique. For example,
467   *              it might be a timestamp (e.g. yyyymmdd) if a managed version is
468   *              not available. There is also no expectation that versions can be
469   *              placed in a lexicographical sequence. To provide a version
470   *              consistent with the Decision Support Service specification, use
471   *              the format Major.Minor.Revision (e.g. 1.0.0). For more
472   *              information on versioning knowledge assets, refer to the
473   *              Decision Support Service specification. Note that a version is
474   *              required for non-experimental active artifacts.
475   */
476  public Library setVersion(String value) {
477    if (Utilities.noString(value))
478      this.version = null;
479    else {
480      if (this.version == null)
481        this.version = new StringType();
482      this.version.setValue(value);
483    }
484    return this;
485  }
486
487  /**
488   * @return {@link #name} (A natural language name identifying the library. This
489   *         name should be usable as an identifier for the module by machine
490   *         processing applications such as code generation.). This is the
491   *         underlying object with id, value and extensions. The accessor
492   *         "getName" gives direct access to the value
493   */
494  public StringType getNameElement() {
495    if (this.name == null)
496      if (Configuration.errorOnAutoCreate())
497        throw new Error("Attempt to auto-create Library.name");
498      else if (Configuration.doAutoCreate())
499        this.name = new StringType(); // bb
500    return this.name;
501  }
502
503  public boolean hasNameElement() {
504    return this.name != null && !this.name.isEmpty();
505  }
506
507  public boolean hasName() {
508    return this.name != null && !this.name.isEmpty();
509  }
510
511  /**
512   * @param value {@link #name} (A natural language name identifying the library.
513   *              This name should be usable as an identifier for the module by
514   *              machine processing applications such as code generation.). This
515   *              is the underlying object with id, value and extensions. The
516   *              accessor "getName" gives direct access to the value
517   */
518  public Library setNameElement(StringType value) {
519    this.name = value;
520    return this;
521  }
522
523  /**
524   * @return A natural language name identifying the library. This name should be
525   *         usable as an identifier for the module by machine processing
526   *         applications such as code generation.
527   */
528  public String getName() {
529    return this.name == null ? null : this.name.getValue();
530  }
531
532  /**
533   * @param value A natural language name identifying the library. This name
534   *              should be usable as an identifier for the module by machine
535   *              processing applications such as code generation.
536   */
537  public Library setName(String value) {
538    if (Utilities.noString(value))
539      this.name = null;
540    else {
541      if (this.name == null)
542        this.name = new StringType();
543      this.name.setValue(value);
544    }
545    return this;
546  }
547
548  /**
549   * @return {@link #title} (A short, descriptive, user-friendly title for the
550   *         library.). This is the underlying object with id, value and
551   *         extensions. The accessor "getTitle" gives direct access to the value
552   */
553  public StringType getTitleElement() {
554    if (this.title == null)
555      if (Configuration.errorOnAutoCreate())
556        throw new Error("Attempt to auto-create Library.title");
557      else if (Configuration.doAutoCreate())
558        this.title = new StringType(); // bb
559    return this.title;
560  }
561
562  public boolean hasTitleElement() {
563    return this.title != null && !this.title.isEmpty();
564  }
565
566  public boolean hasTitle() {
567    return this.title != null && !this.title.isEmpty();
568  }
569
570  /**
571   * @param value {@link #title} (A short, descriptive, user-friendly title for
572   *              the library.). This is the underlying object with id, value and
573   *              extensions. The accessor "getTitle" gives direct access to the
574   *              value
575   */
576  public Library setTitleElement(StringType value) {
577    this.title = value;
578    return this;
579  }
580
581  /**
582   * @return A short, descriptive, user-friendly title for the library.
583   */
584  public String getTitle() {
585    return this.title == null ? null : this.title.getValue();
586  }
587
588  /**
589   * @param value A short, descriptive, user-friendly title for the library.
590   */
591  public Library setTitle(String value) {
592    if (Utilities.noString(value))
593      this.title = null;
594    else {
595      if (this.title == null)
596        this.title = new StringType();
597      this.title.setValue(value);
598    }
599    return this;
600  }
601
602  /**
603   * @return {@link #subtitle} (An explanatory or alternate title for the library
604   *         giving additional information about its content.). This is the
605   *         underlying object with id, value and extensions. The accessor
606   *         "getSubtitle" gives direct access to the value
607   */
608  public StringType getSubtitleElement() {
609    if (this.subtitle == null)
610      if (Configuration.errorOnAutoCreate())
611        throw new Error("Attempt to auto-create Library.subtitle");
612      else if (Configuration.doAutoCreate())
613        this.subtitle = new StringType(); // bb
614    return this.subtitle;
615  }
616
617  public boolean hasSubtitleElement() {
618    return this.subtitle != null && !this.subtitle.isEmpty();
619  }
620
621  public boolean hasSubtitle() {
622    return this.subtitle != null && !this.subtitle.isEmpty();
623  }
624
625  /**
626   * @param value {@link #subtitle} (An explanatory or alternate title for the
627   *              library giving additional information about its content.). This
628   *              is the underlying object with id, value and extensions. The
629   *              accessor "getSubtitle" gives direct access to the value
630   */
631  public Library setSubtitleElement(StringType value) {
632    this.subtitle = value;
633    return this;
634  }
635
636  /**
637   * @return An explanatory or alternate title for the library giving additional
638   *         information about its content.
639   */
640  public String getSubtitle() {
641    return this.subtitle == null ? null : this.subtitle.getValue();
642  }
643
644  /**
645   * @param value An explanatory or alternate title for the library giving
646   *              additional information about its content.
647   */
648  public Library setSubtitle(String value) {
649    if (Utilities.noString(value))
650      this.subtitle = null;
651    else {
652      if (this.subtitle == null)
653        this.subtitle = new StringType();
654      this.subtitle.setValue(value);
655    }
656    return this;
657  }
658
659  /**
660   * @return {@link #status} (The status of this library. Enables tracking the
661   *         life-cycle of the content.). This is the underlying object with id,
662   *         value and extensions. The accessor "getStatus" gives direct access to
663   *         the value
664   */
665  public Enumeration<PublicationStatus> getStatusElement() {
666    if (this.status == null)
667      if (Configuration.errorOnAutoCreate())
668        throw new Error("Attempt to auto-create Library.status");
669      else if (Configuration.doAutoCreate())
670        this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
671    return this.status;
672  }
673
674  public boolean hasStatusElement() {
675    return this.status != null && !this.status.isEmpty();
676  }
677
678  public boolean hasStatus() {
679    return this.status != null && !this.status.isEmpty();
680  }
681
682  /**
683   * @param value {@link #status} (The status of this library. Enables tracking
684   *              the life-cycle of the content.). This is the underlying object
685   *              with id, value and extensions. The accessor "getStatus" gives
686   *              direct access to the value
687   */
688  public Library setStatusElement(Enumeration<PublicationStatus> value) {
689    this.status = value;
690    return this;
691  }
692
693  /**
694   * @return The status of this library. Enables tracking the life-cycle of the
695   *         content.
696   */
697  public PublicationStatus getStatus() {
698    return this.status == null ? null : this.status.getValue();
699  }
700
701  /**
702   * @param value The status of this library. Enables tracking the life-cycle of
703   *              the content.
704   */
705  public Library setStatus(PublicationStatus value) {
706    if (this.status == null)
707      this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
708    this.status.setValue(value);
709    return this;
710  }
711
712  /**
713   * @return {@link #experimental} (A Boolean value to indicate that this library
714   *         is authored for testing purposes (or education/evaluation/marketing)
715   *         and is not intended to be used for genuine usage.). This is the
716   *         underlying object with id, value and extensions. The accessor
717   *         "getExperimental" gives direct access to the value
718   */
719  public BooleanType getExperimentalElement() {
720    if (this.experimental == null)
721      if (Configuration.errorOnAutoCreate())
722        throw new Error("Attempt to auto-create Library.experimental");
723      else if (Configuration.doAutoCreate())
724        this.experimental = new BooleanType(); // bb
725    return this.experimental;
726  }
727
728  public boolean hasExperimentalElement() {
729    return this.experimental != null && !this.experimental.isEmpty();
730  }
731
732  public boolean hasExperimental() {
733    return this.experimental != null && !this.experimental.isEmpty();
734  }
735
736  /**
737   * @param value {@link #experimental} (A Boolean value to indicate that this
738   *              library is authored for testing purposes (or
739   *              education/evaluation/marketing) and is not intended to be used
740   *              for genuine usage.). This is the underlying object with id,
741   *              value and extensions. The accessor "getExperimental" gives
742   *              direct access to the value
743   */
744  public Library setExperimentalElement(BooleanType value) {
745    this.experimental = value;
746    return this;
747  }
748
749  /**
750   * @return A Boolean value to indicate that this library is authored for testing
751   *         purposes (or education/evaluation/marketing) and is not intended to
752   *         be used for genuine usage.
753   */
754  public boolean getExperimental() {
755    return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
756  }
757
758  /**
759   * @param value A Boolean value to indicate that this library is authored for
760   *              testing purposes (or education/evaluation/marketing) and is not
761   *              intended to be used for genuine usage.
762   */
763  public Library setExperimental(boolean value) {
764    if (this.experimental == null)
765      this.experimental = new BooleanType();
766    this.experimental.setValue(value);
767    return this;
768  }
769
770  /**
771   * @return {@link #type} (Identifies the type of library such as a Logic
772   *         Library, Model Definition, Asset Collection, or Module Definition.)
773   */
774  public CodeableConcept getType() {
775    if (this.type == null)
776      if (Configuration.errorOnAutoCreate())
777        throw new Error("Attempt to auto-create Library.type");
778      else if (Configuration.doAutoCreate())
779        this.type = new CodeableConcept(); // cc
780    return this.type;
781  }
782
783  public boolean hasType() {
784    return this.type != null && !this.type.isEmpty();
785  }
786
787  /**
788   * @param value {@link #type} (Identifies the type of library such as a Logic
789   *              Library, Model Definition, Asset Collection, or Module
790   *              Definition.)
791   */
792  public Library setType(CodeableConcept value) {
793    this.type = value;
794    return this;
795  }
796
797  /**
798   * @return {@link #subject} (A code or group definition that describes the
799   *         intended subject of the contents of the library.)
800   */
801  public Type getSubject() {
802    return this.subject;
803  }
804
805  /**
806   * @return {@link #subject} (A code or group definition that describes the
807   *         intended subject of the contents of the library.)
808   */
809  public CodeableConcept getSubjectCodeableConcept() throws FHIRException {
810    if (this.subject == null)
811      this.subject = new CodeableConcept();
812    if (!(this.subject instanceof CodeableConcept))
813      throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "
814          + this.subject.getClass().getName() + " was encountered");
815    return (CodeableConcept) this.subject;
816  }
817
818  public boolean hasSubjectCodeableConcept() {
819    return this != null && this.subject instanceof CodeableConcept;
820  }
821
822  /**
823   * @return {@link #subject} (A code or group definition that describes the
824   *         intended subject of the contents of the library.)
825   */
826  public Reference getSubjectReference() throws FHIRException {
827    if (this.subject == null)
828      this.subject = new Reference();
829    if (!(this.subject instanceof Reference))
830      throw new FHIRException("Type mismatch: the type Reference was expected, but " + this.subject.getClass().getName()
831          + " was encountered");
832    return (Reference) this.subject;
833  }
834
835  public boolean hasSubjectReference() {
836    return this != null && this.subject instanceof Reference;
837  }
838
839  public boolean hasSubject() {
840    return this.subject != null && !this.subject.isEmpty();
841  }
842
843  /**
844   * @param value {@link #subject} (A code or group definition that describes the
845   *              intended subject of the contents of the library.)
846   */
847  public Library setSubject(Type value) {
848    if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
849      throw new Error("Not the right type for Library.subject[x]: " + value.fhirType());
850    this.subject = value;
851    return this;
852  }
853
854  /**
855   * @return {@link #date} (The date (and optionally time) when the library was
856   *         published. The date must change when the business version changes and
857   *         it must change if the status code changes. In addition, it should
858   *         change when the substantive content of the library changes.). This is
859   *         the underlying object with id, value and extensions. The accessor
860   *         "getDate" gives direct access to the value
861   */
862  public DateTimeType getDateElement() {
863    if (this.date == null)
864      if (Configuration.errorOnAutoCreate())
865        throw new Error("Attempt to auto-create Library.date");
866      else if (Configuration.doAutoCreate())
867        this.date = new DateTimeType(); // bb
868    return this.date;
869  }
870
871  public boolean hasDateElement() {
872    return this.date != null && !this.date.isEmpty();
873  }
874
875  public boolean hasDate() {
876    return this.date != null && !this.date.isEmpty();
877  }
878
879  /**
880   * @param value {@link #date} (The date (and optionally time) when the library
881   *              was published. The date must change when the business version
882   *              changes and it must change if the status code changes. In
883   *              addition, it should change when the substantive content of the
884   *              library changes.). This is the underlying object with id, value
885   *              and extensions. The accessor "getDate" gives direct access to
886   *              the value
887   */
888  public Library setDateElement(DateTimeType value) {
889    this.date = value;
890    return this;
891  }
892
893  /**
894   * @return The date (and optionally time) when the library was published. The
895   *         date must change when the business version changes and it must change
896   *         if the status code changes. In addition, it should change when the
897   *         substantive content of the library changes.
898   */
899  public Date getDate() {
900    return this.date == null ? null : this.date.getValue();
901  }
902
903  /**
904   * @param value The date (and optionally time) when the library was published.
905   *              The date must change when the business version changes and it
906   *              must change if the status code changes. In addition, it should
907   *              change when the substantive content of the library changes.
908   */
909  public Library setDate(Date value) {
910    if (value == null)
911      this.date = null;
912    else {
913      if (this.date == null)
914        this.date = new DateTimeType();
915      this.date.setValue(value);
916    }
917    return this;
918  }
919
920  /**
921   * @return {@link #publisher} (The name of the organization or individual that
922   *         published the library.). This is the underlying object with id, value
923   *         and extensions. The accessor "getPublisher" gives direct access to
924   *         the value
925   */
926  public StringType getPublisherElement() {
927    if (this.publisher == null)
928      if (Configuration.errorOnAutoCreate())
929        throw new Error("Attempt to auto-create Library.publisher");
930      else if (Configuration.doAutoCreate())
931        this.publisher = new StringType(); // bb
932    return this.publisher;
933  }
934
935  public boolean hasPublisherElement() {
936    return this.publisher != null && !this.publisher.isEmpty();
937  }
938
939  public boolean hasPublisher() {
940    return this.publisher != null && !this.publisher.isEmpty();
941  }
942
943  /**
944   * @param value {@link #publisher} (The name of the organization or individual
945   *              that published the library.). This is the underlying object with
946   *              id, value and extensions. The accessor "getPublisher" gives
947   *              direct access to the value
948   */
949  public Library setPublisherElement(StringType value) {
950    this.publisher = value;
951    return this;
952  }
953
954  /**
955   * @return The name of the organization or individual that published the
956   *         library.
957   */
958  public String getPublisher() {
959    return this.publisher == null ? null : this.publisher.getValue();
960  }
961
962  /**
963   * @param value The name of the organization or individual that published the
964   *              library.
965   */
966  public Library setPublisher(String value) {
967    if (Utilities.noString(value))
968      this.publisher = null;
969    else {
970      if (this.publisher == null)
971        this.publisher = new StringType();
972      this.publisher.setValue(value);
973    }
974    return this;
975  }
976
977  /**
978   * @return {@link #contact} (Contact details to assist a user in finding and
979   *         communicating with the publisher.)
980   */
981  public List<ContactDetail> getContact() {
982    if (this.contact == null)
983      this.contact = new ArrayList<ContactDetail>();
984    return this.contact;
985  }
986
987  /**
988   * @return Returns a reference to <code>this</code> for easy method chaining
989   */
990  public Library setContact(List<ContactDetail> theContact) {
991    this.contact = theContact;
992    return this;
993  }
994
995  public boolean hasContact() {
996    if (this.contact == null)
997      return false;
998    for (ContactDetail item : this.contact)
999      if (!item.isEmpty())
1000        return true;
1001    return false;
1002  }
1003
1004  public ContactDetail addContact() { // 3
1005    ContactDetail t = new ContactDetail();
1006    if (this.contact == null)
1007      this.contact = new ArrayList<ContactDetail>();
1008    this.contact.add(t);
1009    return t;
1010  }
1011
1012  public Library addContact(ContactDetail t) { // 3
1013    if (t == null)
1014      return this;
1015    if (this.contact == null)
1016      this.contact = new ArrayList<ContactDetail>();
1017    this.contact.add(t);
1018    return this;
1019  }
1020
1021  /**
1022   * @return The first repetition of repeating field {@link #contact}, creating it
1023   *         if it does not already exist
1024   */
1025  public ContactDetail getContactFirstRep() {
1026    if (getContact().isEmpty()) {
1027      addContact();
1028    }
1029    return getContact().get(0);
1030  }
1031
1032  /**
1033   * @return {@link #description} (A free text natural language description of the
1034   *         library from a consumer's perspective.). This is the underlying
1035   *         object with id, value and extensions. The accessor "getDescription"
1036   *         gives direct access to the value
1037   */
1038  public MarkdownType getDescriptionElement() {
1039    if (this.description == null)
1040      if (Configuration.errorOnAutoCreate())
1041        throw new Error("Attempt to auto-create Library.description");
1042      else if (Configuration.doAutoCreate())
1043        this.description = new MarkdownType(); // bb
1044    return this.description;
1045  }
1046
1047  public boolean hasDescriptionElement() {
1048    return this.description != null && !this.description.isEmpty();
1049  }
1050
1051  public boolean hasDescription() {
1052    return this.description != null && !this.description.isEmpty();
1053  }
1054
1055  /**
1056   * @param value {@link #description} (A free text natural language description
1057   *              of the library from a consumer's perspective.). This is the
1058   *              underlying object with id, value and extensions. The accessor
1059   *              "getDescription" gives direct access to the value
1060   */
1061  public Library setDescriptionElement(MarkdownType value) {
1062    this.description = value;
1063    return this;
1064  }
1065
1066  /**
1067   * @return A free text natural language description of the library from a
1068   *         consumer's perspective.
1069   */
1070  public String getDescription() {
1071    return this.description == null ? null : this.description.getValue();
1072  }
1073
1074  /**
1075   * @param value A free text natural language description of the library from a
1076   *              consumer's perspective.
1077   */
1078  public Library setDescription(String value) {
1079    if (value == null)
1080      this.description = null;
1081    else {
1082      if (this.description == null)
1083        this.description = new MarkdownType();
1084      this.description.setValue(value);
1085    }
1086    return this;
1087  }
1088
1089  /**
1090   * @return {@link #useContext} (The content was developed with a focus and
1091   *         intent of supporting the contexts that are listed. These contexts may
1092   *         be general categories (gender, age, ...) or may be references to
1093   *         specific programs (insurance plans, studies, ...) and may be used to
1094   *         assist with indexing and searching for appropriate library
1095   *         instances.)
1096   */
1097  public List<UsageContext> getUseContext() {
1098    if (this.useContext == null)
1099      this.useContext = new ArrayList<UsageContext>();
1100    return this.useContext;
1101  }
1102
1103  /**
1104   * @return Returns a reference to <code>this</code> for easy method chaining
1105   */
1106  public Library setUseContext(List<UsageContext> theUseContext) {
1107    this.useContext = theUseContext;
1108    return this;
1109  }
1110
1111  public boolean hasUseContext() {
1112    if (this.useContext == null)
1113      return false;
1114    for (UsageContext item : this.useContext)
1115      if (!item.isEmpty())
1116        return true;
1117    return false;
1118  }
1119
1120  public UsageContext addUseContext() { // 3
1121    UsageContext t = new UsageContext();
1122    if (this.useContext == null)
1123      this.useContext = new ArrayList<UsageContext>();
1124    this.useContext.add(t);
1125    return t;
1126  }
1127
1128  public Library addUseContext(UsageContext t) { // 3
1129    if (t == null)
1130      return this;
1131    if (this.useContext == null)
1132      this.useContext = new ArrayList<UsageContext>();
1133    this.useContext.add(t);
1134    return this;
1135  }
1136
1137  /**
1138   * @return The first repetition of repeating field {@link #useContext}, creating
1139   *         it if it does not already exist
1140   */
1141  public UsageContext getUseContextFirstRep() {
1142    if (getUseContext().isEmpty()) {
1143      addUseContext();
1144    }
1145    return getUseContext().get(0);
1146  }
1147
1148  /**
1149   * @return {@link #jurisdiction} (A legal or geographic region in which the
1150   *         library is intended to be used.)
1151   */
1152  public List<CodeableConcept> getJurisdiction() {
1153    if (this.jurisdiction == null)
1154      this.jurisdiction = new ArrayList<CodeableConcept>();
1155    return this.jurisdiction;
1156  }
1157
1158  /**
1159   * @return Returns a reference to <code>this</code> for easy method chaining
1160   */
1161  public Library setJurisdiction(List<CodeableConcept> theJurisdiction) {
1162    this.jurisdiction = theJurisdiction;
1163    return this;
1164  }
1165
1166  public boolean hasJurisdiction() {
1167    if (this.jurisdiction == null)
1168      return false;
1169    for (CodeableConcept item : this.jurisdiction)
1170      if (!item.isEmpty())
1171        return true;
1172    return false;
1173  }
1174
1175  public CodeableConcept addJurisdiction() { // 3
1176    CodeableConcept t = new CodeableConcept();
1177    if (this.jurisdiction == null)
1178      this.jurisdiction = new ArrayList<CodeableConcept>();
1179    this.jurisdiction.add(t);
1180    return t;
1181  }
1182
1183  public Library addJurisdiction(CodeableConcept t) { // 3
1184    if (t == null)
1185      return this;
1186    if (this.jurisdiction == null)
1187      this.jurisdiction = new ArrayList<CodeableConcept>();
1188    this.jurisdiction.add(t);
1189    return this;
1190  }
1191
1192  /**
1193   * @return The first repetition of repeating field {@link #jurisdiction},
1194   *         creating it if it does not already exist
1195   */
1196  public CodeableConcept getJurisdictionFirstRep() {
1197    if (getJurisdiction().isEmpty()) {
1198      addJurisdiction();
1199    }
1200    return getJurisdiction().get(0);
1201  }
1202
1203  /**
1204   * @return {@link #purpose} (Explanation of why this library is needed and why
1205   *         it has been designed as it has.). This is the underlying object with
1206   *         id, value and extensions. The accessor "getPurpose" gives direct
1207   *         access to the value
1208   */
1209  public MarkdownType getPurposeElement() {
1210    if (this.purpose == null)
1211      if (Configuration.errorOnAutoCreate())
1212        throw new Error("Attempt to auto-create Library.purpose");
1213      else if (Configuration.doAutoCreate())
1214        this.purpose = new MarkdownType(); // bb
1215    return this.purpose;
1216  }
1217
1218  public boolean hasPurposeElement() {
1219    return this.purpose != null && !this.purpose.isEmpty();
1220  }
1221
1222  public boolean hasPurpose() {
1223    return this.purpose != null && !this.purpose.isEmpty();
1224  }
1225
1226  /**
1227   * @param value {@link #purpose} (Explanation of why this library is needed and
1228   *              why it has been designed as it has.). This is the underlying
1229   *              object with id, value and extensions. The accessor "getPurpose"
1230   *              gives direct access to the value
1231   */
1232  public Library setPurposeElement(MarkdownType value) {
1233    this.purpose = value;
1234    return this;
1235  }
1236
1237  /**
1238   * @return Explanation of why this library is needed and why it has been
1239   *         designed as it has.
1240   */
1241  public String getPurpose() {
1242    return this.purpose == null ? null : this.purpose.getValue();
1243  }
1244
1245  /**
1246   * @param value Explanation of why this library is needed and why it has been
1247   *              designed as it has.
1248   */
1249  public Library setPurpose(String value) {
1250    if (value == null)
1251      this.purpose = null;
1252    else {
1253      if (this.purpose == null)
1254        this.purpose = new MarkdownType();
1255      this.purpose.setValue(value);
1256    }
1257    return this;
1258  }
1259
1260  /**
1261   * @return {@link #usage} (A detailed description of how the library is used
1262   *         from a clinical perspective.). This is the underlying object with id,
1263   *         value and extensions. The accessor "getUsage" gives direct access to
1264   *         the value
1265   */
1266  public StringType getUsageElement() {
1267    if (this.usage == null)
1268      if (Configuration.errorOnAutoCreate())
1269        throw new Error("Attempt to auto-create Library.usage");
1270      else if (Configuration.doAutoCreate())
1271        this.usage = new StringType(); // bb
1272    return this.usage;
1273  }
1274
1275  public boolean hasUsageElement() {
1276    return this.usage != null && !this.usage.isEmpty();
1277  }
1278
1279  public boolean hasUsage() {
1280    return this.usage != null && !this.usage.isEmpty();
1281  }
1282
1283  /**
1284   * @param value {@link #usage} (A detailed description of how the library is
1285   *              used from a clinical perspective.). This is the underlying
1286   *              object with id, value and extensions. The accessor "getUsage"
1287   *              gives direct access to the value
1288   */
1289  public Library setUsageElement(StringType value) {
1290    this.usage = value;
1291    return this;
1292  }
1293
1294  /**
1295   * @return A detailed description of how the library is used from a clinical
1296   *         perspective.
1297   */
1298  public String getUsage() {
1299    return this.usage == null ? null : this.usage.getValue();
1300  }
1301
1302  /**
1303   * @param value A detailed description of how the library is used from a
1304   *              clinical perspective.
1305   */
1306  public Library setUsage(String value) {
1307    if (Utilities.noString(value))
1308      this.usage = null;
1309    else {
1310      if (this.usage == null)
1311        this.usage = new StringType();
1312      this.usage.setValue(value);
1313    }
1314    return this;
1315  }
1316
1317  /**
1318   * @return {@link #copyright} (A copyright statement relating to the library
1319   *         and/or its contents. Copyright statements are generally legal
1320   *         restrictions on the use and publishing of the library.). This is the
1321   *         underlying object with id, value and extensions. The accessor
1322   *         "getCopyright" gives direct access to the value
1323   */
1324  public MarkdownType getCopyrightElement() {
1325    if (this.copyright == null)
1326      if (Configuration.errorOnAutoCreate())
1327        throw new Error("Attempt to auto-create Library.copyright");
1328      else if (Configuration.doAutoCreate())
1329        this.copyright = new MarkdownType(); // bb
1330    return this.copyright;
1331  }
1332
1333  public boolean hasCopyrightElement() {
1334    return this.copyright != null && !this.copyright.isEmpty();
1335  }
1336
1337  public boolean hasCopyright() {
1338    return this.copyright != null && !this.copyright.isEmpty();
1339  }
1340
1341  /**
1342   * @param value {@link #copyright} (A copyright statement relating to the
1343   *              library and/or its contents. Copyright statements are generally
1344   *              legal restrictions on the use and publishing of the library.).
1345   *              This is the underlying object with id, value and extensions. The
1346   *              accessor "getCopyright" gives direct access to the value
1347   */
1348  public Library setCopyrightElement(MarkdownType value) {
1349    this.copyright = value;
1350    return this;
1351  }
1352
1353  /**
1354   * @return A copyright statement relating to the library and/or its contents.
1355   *         Copyright statements are generally legal restrictions on the use and
1356   *         publishing of the library.
1357   */
1358  public String getCopyright() {
1359    return this.copyright == null ? null : this.copyright.getValue();
1360  }
1361
1362  /**
1363   * @param value A copyright statement relating to the library and/or its
1364   *              contents. Copyright statements are generally legal restrictions
1365   *              on the use and publishing of the library.
1366   */
1367  public Library setCopyright(String value) {
1368    if (value == null)
1369      this.copyright = null;
1370    else {
1371      if (this.copyright == null)
1372        this.copyright = new MarkdownType();
1373      this.copyright.setValue(value);
1374    }
1375    return this;
1376  }
1377
1378  /**
1379   * @return {@link #approvalDate} (The date on which the resource content was
1380   *         approved by the publisher. Approval happens once when the content is
1381   *         officially approved for usage.). This is the underlying object with
1382   *         id, value and extensions. The accessor "getApprovalDate" gives direct
1383   *         access to the value
1384   */
1385  public DateType getApprovalDateElement() {
1386    if (this.approvalDate == null)
1387      if (Configuration.errorOnAutoCreate())
1388        throw new Error("Attempt to auto-create Library.approvalDate");
1389      else if (Configuration.doAutoCreate())
1390        this.approvalDate = new DateType(); // bb
1391    return this.approvalDate;
1392  }
1393
1394  public boolean hasApprovalDateElement() {
1395    return this.approvalDate != null && !this.approvalDate.isEmpty();
1396  }
1397
1398  public boolean hasApprovalDate() {
1399    return this.approvalDate != null && !this.approvalDate.isEmpty();
1400  }
1401
1402  /**
1403   * @param value {@link #approvalDate} (The date on which the resource content
1404   *              was approved by the publisher. Approval happens once when the
1405   *              content is officially approved for usage.). This is the
1406   *              underlying object with id, value and extensions. The accessor
1407   *              "getApprovalDate" gives direct access to the value
1408   */
1409  public Library setApprovalDateElement(DateType value) {
1410    this.approvalDate = value;
1411    return this;
1412  }
1413
1414  /**
1415   * @return The date on which the resource content was approved by the publisher.
1416   *         Approval happens once when the content is officially approved for
1417   *         usage.
1418   */
1419  public Date getApprovalDate() {
1420    return this.approvalDate == null ? null : this.approvalDate.getValue();
1421  }
1422
1423  /**
1424   * @param value The date on which the resource content was approved by the
1425   *              publisher. Approval happens once when the content is officially
1426   *              approved for usage.
1427   */
1428  public Library setApprovalDate(Date value) {
1429    if (value == null)
1430      this.approvalDate = null;
1431    else {
1432      if (this.approvalDate == null)
1433        this.approvalDate = new DateType();
1434      this.approvalDate.setValue(value);
1435    }
1436    return this;
1437  }
1438
1439  /**
1440   * @return {@link #lastReviewDate} (The date on which the resource content was
1441   *         last reviewed. Review happens periodically after approval but does
1442   *         not change the original approval date.). This is the underlying
1443   *         object with id, value and extensions. The accessor
1444   *         "getLastReviewDate" gives direct access to the value
1445   */
1446  public DateType getLastReviewDateElement() {
1447    if (this.lastReviewDate == null)
1448      if (Configuration.errorOnAutoCreate())
1449        throw new Error("Attempt to auto-create Library.lastReviewDate");
1450      else if (Configuration.doAutoCreate())
1451        this.lastReviewDate = new DateType(); // bb
1452    return this.lastReviewDate;
1453  }
1454
1455  public boolean hasLastReviewDateElement() {
1456    return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
1457  }
1458
1459  public boolean hasLastReviewDate() {
1460    return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
1461  }
1462
1463  /**
1464   * @param value {@link #lastReviewDate} (The date on which the resource content
1465   *              was last reviewed. Review happens periodically after approval
1466   *              but does not change the original approval date.). This is the
1467   *              underlying object with id, value and extensions. The accessor
1468   *              "getLastReviewDate" gives direct access to the value
1469   */
1470  public Library setLastReviewDateElement(DateType value) {
1471    this.lastReviewDate = value;
1472    return this;
1473  }
1474
1475  /**
1476   * @return The date on which the resource content was last reviewed. Review
1477   *         happens periodically after approval but does not change the original
1478   *         approval date.
1479   */
1480  public Date getLastReviewDate() {
1481    return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
1482  }
1483
1484  /**
1485   * @param value The date on which the resource content was last reviewed. Review
1486   *              happens periodically after approval but does not change the
1487   *              original approval date.
1488   */
1489  public Library setLastReviewDate(Date value) {
1490    if (value == null)
1491      this.lastReviewDate = null;
1492    else {
1493      if (this.lastReviewDate == null)
1494        this.lastReviewDate = new DateType();
1495      this.lastReviewDate.setValue(value);
1496    }
1497    return this;
1498  }
1499
1500  /**
1501   * @return {@link #effectivePeriod} (The period during which the library content
1502   *         was or is planned to be in active use.)
1503   */
1504  public Period getEffectivePeriod() {
1505    if (this.effectivePeriod == null)
1506      if (Configuration.errorOnAutoCreate())
1507        throw new Error("Attempt to auto-create Library.effectivePeriod");
1508      else if (Configuration.doAutoCreate())
1509        this.effectivePeriod = new Period(); // cc
1510    return this.effectivePeriod;
1511  }
1512
1513  public boolean hasEffectivePeriod() {
1514    return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
1515  }
1516
1517  /**
1518   * @param value {@link #effectivePeriod} (The period during which the library
1519   *              content was or is planned to be in active use.)
1520   */
1521  public Library setEffectivePeriod(Period value) {
1522    this.effectivePeriod = value;
1523    return this;
1524  }
1525
1526  /**
1527   * @return {@link #topic} (Descriptive topics related to the content of the
1528   *         library. Topics provide a high-level categorization of the library
1529   *         that can be useful for filtering and searching.)
1530   */
1531  public List<CodeableConcept> getTopic() {
1532    if (this.topic == null)
1533      this.topic = new ArrayList<CodeableConcept>();
1534    return this.topic;
1535  }
1536
1537  /**
1538   * @return Returns a reference to <code>this</code> for easy method chaining
1539   */
1540  public Library setTopic(List<CodeableConcept> theTopic) {
1541    this.topic = theTopic;
1542    return this;
1543  }
1544
1545  public boolean hasTopic() {
1546    if (this.topic == null)
1547      return false;
1548    for (CodeableConcept item : this.topic)
1549      if (!item.isEmpty())
1550        return true;
1551    return false;
1552  }
1553
1554  public CodeableConcept addTopic() { // 3
1555    CodeableConcept t = new CodeableConcept();
1556    if (this.topic == null)
1557      this.topic = new ArrayList<CodeableConcept>();
1558    this.topic.add(t);
1559    return t;
1560  }
1561
1562  public Library addTopic(CodeableConcept t) { // 3
1563    if (t == null)
1564      return this;
1565    if (this.topic == null)
1566      this.topic = new ArrayList<CodeableConcept>();
1567    this.topic.add(t);
1568    return this;
1569  }
1570
1571  /**
1572   * @return The first repetition of repeating field {@link #topic}, creating it
1573   *         if it does not already exist
1574   */
1575  public CodeableConcept getTopicFirstRep() {
1576    if (getTopic().isEmpty()) {
1577      addTopic();
1578    }
1579    return getTopic().get(0);
1580  }
1581
1582  /**
1583   * @return {@link #author} (An individiual or organization primarily involved in
1584   *         the creation and maintenance of the content.)
1585   */
1586  public List<ContactDetail> getAuthor() {
1587    if (this.author == null)
1588      this.author = new ArrayList<ContactDetail>();
1589    return this.author;
1590  }
1591
1592  /**
1593   * @return Returns a reference to <code>this</code> for easy method chaining
1594   */
1595  public Library setAuthor(List<ContactDetail> theAuthor) {
1596    this.author = theAuthor;
1597    return this;
1598  }
1599
1600  public boolean hasAuthor() {
1601    if (this.author == null)
1602      return false;
1603    for (ContactDetail item : this.author)
1604      if (!item.isEmpty())
1605        return true;
1606    return false;
1607  }
1608
1609  public ContactDetail addAuthor() { // 3
1610    ContactDetail t = new ContactDetail();
1611    if (this.author == null)
1612      this.author = new ArrayList<ContactDetail>();
1613    this.author.add(t);
1614    return t;
1615  }
1616
1617  public Library addAuthor(ContactDetail t) { // 3
1618    if (t == null)
1619      return this;
1620    if (this.author == null)
1621      this.author = new ArrayList<ContactDetail>();
1622    this.author.add(t);
1623    return this;
1624  }
1625
1626  /**
1627   * @return The first repetition of repeating field {@link #author}, creating it
1628   *         if it does not already exist
1629   */
1630  public ContactDetail getAuthorFirstRep() {
1631    if (getAuthor().isEmpty()) {
1632      addAuthor();
1633    }
1634    return getAuthor().get(0);
1635  }
1636
1637  /**
1638   * @return {@link #editor} (An individual or organization primarily responsible
1639   *         for internal coherence of the content.)
1640   */
1641  public List<ContactDetail> getEditor() {
1642    if (this.editor == null)
1643      this.editor = new ArrayList<ContactDetail>();
1644    return this.editor;
1645  }
1646
1647  /**
1648   * @return Returns a reference to <code>this</code> for easy method chaining
1649   */
1650  public Library setEditor(List<ContactDetail> theEditor) {
1651    this.editor = theEditor;
1652    return this;
1653  }
1654
1655  public boolean hasEditor() {
1656    if (this.editor == null)
1657      return false;
1658    for (ContactDetail item : this.editor)
1659      if (!item.isEmpty())
1660        return true;
1661    return false;
1662  }
1663
1664  public ContactDetail addEditor() { // 3
1665    ContactDetail t = new ContactDetail();
1666    if (this.editor == null)
1667      this.editor = new ArrayList<ContactDetail>();
1668    this.editor.add(t);
1669    return t;
1670  }
1671
1672  public Library addEditor(ContactDetail t) { // 3
1673    if (t == null)
1674      return this;
1675    if (this.editor == null)
1676      this.editor = new ArrayList<ContactDetail>();
1677    this.editor.add(t);
1678    return this;
1679  }
1680
1681  /**
1682   * @return The first repetition of repeating field {@link #editor}, creating it
1683   *         if it does not already exist
1684   */
1685  public ContactDetail getEditorFirstRep() {
1686    if (getEditor().isEmpty()) {
1687      addEditor();
1688    }
1689    return getEditor().get(0);
1690  }
1691
1692  /**
1693   * @return {@link #reviewer} (An individual or organization primarily
1694   *         responsible for review of some aspect of the content.)
1695   */
1696  public List<ContactDetail> getReviewer() {
1697    if (this.reviewer == null)
1698      this.reviewer = new ArrayList<ContactDetail>();
1699    return this.reviewer;
1700  }
1701
1702  /**
1703   * @return Returns a reference to <code>this</code> for easy method chaining
1704   */
1705  public Library setReviewer(List<ContactDetail> theReviewer) {
1706    this.reviewer = theReviewer;
1707    return this;
1708  }
1709
1710  public boolean hasReviewer() {
1711    if (this.reviewer == null)
1712      return false;
1713    for (ContactDetail item : this.reviewer)
1714      if (!item.isEmpty())
1715        return true;
1716    return false;
1717  }
1718
1719  public ContactDetail addReviewer() { // 3
1720    ContactDetail t = new ContactDetail();
1721    if (this.reviewer == null)
1722      this.reviewer = new ArrayList<ContactDetail>();
1723    this.reviewer.add(t);
1724    return t;
1725  }
1726
1727  public Library addReviewer(ContactDetail t) { // 3
1728    if (t == null)
1729      return this;
1730    if (this.reviewer == null)
1731      this.reviewer = new ArrayList<ContactDetail>();
1732    this.reviewer.add(t);
1733    return this;
1734  }
1735
1736  /**
1737   * @return The first repetition of repeating field {@link #reviewer}, creating
1738   *         it if it does not already exist
1739   */
1740  public ContactDetail getReviewerFirstRep() {
1741    if (getReviewer().isEmpty()) {
1742      addReviewer();
1743    }
1744    return getReviewer().get(0);
1745  }
1746
1747  /**
1748   * @return {@link #endorser} (An individual or organization responsible for
1749   *         officially endorsing the content for use in some setting.)
1750   */
1751  public List<ContactDetail> getEndorser() {
1752    if (this.endorser == null)
1753      this.endorser = new ArrayList<ContactDetail>();
1754    return this.endorser;
1755  }
1756
1757  /**
1758   * @return Returns a reference to <code>this</code> for easy method chaining
1759   */
1760  public Library setEndorser(List<ContactDetail> theEndorser) {
1761    this.endorser = theEndorser;
1762    return this;
1763  }
1764
1765  public boolean hasEndorser() {
1766    if (this.endorser == null)
1767      return false;
1768    for (ContactDetail item : this.endorser)
1769      if (!item.isEmpty())
1770        return true;
1771    return false;
1772  }
1773
1774  public ContactDetail addEndorser() { // 3
1775    ContactDetail t = new ContactDetail();
1776    if (this.endorser == null)
1777      this.endorser = new ArrayList<ContactDetail>();
1778    this.endorser.add(t);
1779    return t;
1780  }
1781
1782  public Library addEndorser(ContactDetail t) { // 3
1783    if (t == null)
1784      return this;
1785    if (this.endorser == null)
1786      this.endorser = new ArrayList<ContactDetail>();
1787    this.endorser.add(t);
1788    return this;
1789  }
1790
1791  /**
1792   * @return The first repetition of repeating field {@link #endorser}, creating
1793   *         it if it does not already exist
1794   */
1795  public ContactDetail getEndorserFirstRep() {
1796    if (getEndorser().isEmpty()) {
1797      addEndorser();
1798    }
1799    return getEndorser().get(0);
1800  }
1801
1802  /**
1803   * @return {@link #relatedArtifact} (Related artifacts such as additional
1804   *         documentation, justification, or bibliographic references.)
1805   */
1806  public List<RelatedArtifact> getRelatedArtifact() {
1807    if (this.relatedArtifact == null)
1808      this.relatedArtifact = new ArrayList<RelatedArtifact>();
1809    return this.relatedArtifact;
1810  }
1811
1812  /**
1813   * @return Returns a reference to <code>this</code> for easy method chaining
1814   */
1815  public Library setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) {
1816    this.relatedArtifact = theRelatedArtifact;
1817    return this;
1818  }
1819
1820  public boolean hasRelatedArtifact() {
1821    if (this.relatedArtifact == null)
1822      return false;
1823    for (RelatedArtifact item : this.relatedArtifact)
1824      if (!item.isEmpty())
1825        return true;
1826    return false;
1827  }
1828
1829  public RelatedArtifact addRelatedArtifact() { // 3
1830    RelatedArtifact t = new RelatedArtifact();
1831    if (this.relatedArtifact == null)
1832      this.relatedArtifact = new ArrayList<RelatedArtifact>();
1833    this.relatedArtifact.add(t);
1834    return t;
1835  }
1836
1837  public Library addRelatedArtifact(RelatedArtifact t) { // 3
1838    if (t == null)
1839      return this;
1840    if (this.relatedArtifact == null)
1841      this.relatedArtifact = new ArrayList<RelatedArtifact>();
1842    this.relatedArtifact.add(t);
1843    return this;
1844  }
1845
1846  /**
1847   * @return The first repetition of repeating field {@link #relatedArtifact},
1848   *         creating it if it does not already exist
1849   */
1850  public RelatedArtifact getRelatedArtifactFirstRep() {
1851    if (getRelatedArtifact().isEmpty()) {
1852      addRelatedArtifact();
1853    }
1854    return getRelatedArtifact().get(0);
1855  }
1856
1857  /**
1858   * @return {@link #parameter} (The parameter element defines parameters used by
1859   *         the library.)
1860   */
1861  public List<ParameterDefinition> getParameter() {
1862    if (this.parameter == null)
1863      this.parameter = new ArrayList<ParameterDefinition>();
1864    return this.parameter;
1865  }
1866
1867  /**
1868   * @return Returns a reference to <code>this</code> for easy method chaining
1869   */
1870  public Library setParameter(List<ParameterDefinition> theParameter) {
1871    this.parameter = theParameter;
1872    return this;
1873  }
1874
1875  public boolean hasParameter() {
1876    if (this.parameter == null)
1877      return false;
1878    for (ParameterDefinition item : this.parameter)
1879      if (!item.isEmpty())
1880        return true;
1881    return false;
1882  }
1883
1884  public ParameterDefinition addParameter() { // 3
1885    ParameterDefinition t = new ParameterDefinition();
1886    if (this.parameter == null)
1887      this.parameter = new ArrayList<ParameterDefinition>();
1888    this.parameter.add(t);
1889    return t;
1890  }
1891
1892  public Library addParameter(ParameterDefinition t) { // 3
1893    if (t == null)
1894      return this;
1895    if (this.parameter == null)
1896      this.parameter = new ArrayList<ParameterDefinition>();
1897    this.parameter.add(t);
1898    return this;
1899  }
1900
1901  /**
1902   * @return The first repetition of repeating field {@link #parameter}, creating
1903   *         it if it does not already exist
1904   */
1905  public ParameterDefinition getParameterFirstRep() {
1906    if (getParameter().isEmpty()) {
1907      addParameter();
1908    }
1909    return getParameter().get(0);
1910  }
1911
1912  /**
1913   * @return {@link #dataRequirement} (Describes a set of data that must be
1914   *         provided in order to be able to successfully perform the computations
1915   *         defined by the library.)
1916   */
1917  public List<DataRequirement> getDataRequirement() {
1918    if (this.dataRequirement == null)
1919      this.dataRequirement = new ArrayList<DataRequirement>();
1920    return this.dataRequirement;
1921  }
1922
1923  /**
1924   * @return Returns a reference to <code>this</code> for easy method chaining
1925   */
1926  public Library setDataRequirement(List<DataRequirement> theDataRequirement) {
1927    this.dataRequirement = theDataRequirement;
1928    return this;
1929  }
1930
1931  public boolean hasDataRequirement() {
1932    if (this.dataRequirement == null)
1933      return false;
1934    for (DataRequirement item : this.dataRequirement)
1935      if (!item.isEmpty())
1936        return true;
1937    return false;
1938  }
1939
1940  public DataRequirement addDataRequirement() { // 3
1941    DataRequirement t = new DataRequirement();
1942    if (this.dataRequirement == null)
1943      this.dataRequirement = new ArrayList<DataRequirement>();
1944    this.dataRequirement.add(t);
1945    return t;
1946  }
1947
1948  public Library addDataRequirement(DataRequirement t) { // 3
1949    if (t == null)
1950      return this;
1951    if (this.dataRequirement == null)
1952      this.dataRequirement = new ArrayList<DataRequirement>();
1953    this.dataRequirement.add(t);
1954    return this;
1955  }
1956
1957  /**
1958   * @return The first repetition of repeating field {@link #dataRequirement},
1959   *         creating it if it does not already exist
1960   */
1961  public DataRequirement getDataRequirementFirstRep() {
1962    if (getDataRequirement().isEmpty()) {
1963      addDataRequirement();
1964    }
1965    return getDataRequirement().get(0);
1966  }
1967
1968  /**
1969   * @return {@link #content} (The content of the library as an Attachment. The
1970   *         content may be a reference to a url, or may be directly embedded as a
1971   *         base-64 string. Either way, the contentType of the attachment
1972   *         determines how to interpret the content.)
1973   */
1974  public List<Attachment> getContent() {
1975    if (this.content == null)
1976      this.content = new ArrayList<Attachment>();
1977    return this.content;
1978  }
1979
1980  /**
1981   * @return Returns a reference to <code>this</code> for easy method chaining
1982   */
1983  public Library setContent(List<Attachment> theContent) {
1984    this.content = theContent;
1985    return this;
1986  }
1987
1988  public boolean hasContent() {
1989    if (this.content == null)
1990      return false;
1991    for (Attachment item : this.content)
1992      if (!item.isEmpty())
1993        return true;
1994    return false;
1995  }
1996
1997  public Attachment addContent() { // 3
1998    Attachment t = new Attachment();
1999    if (this.content == null)
2000      this.content = new ArrayList<Attachment>();
2001    this.content.add(t);
2002    return t;
2003  }
2004
2005  public Library addContent(Attachment t) { // 3
2006    if (t == null)
2007      return this;
2008    if (this.content == null)
2009      this.content = new ArrayList<Attachment>();
2010    this.content.add(t);
2011    return this;
2012  }
2013
2014  /**
2015   * @return The first repetition of repeating field {@link #content}, creating it
2016   *         if it does not already exist
2017   */
2018  public Attachment getContentFirstRep() {
2019    if (getContent().isEmpty()) {
2020      addContent();
2021    }
2022    return getContent().get(0);
2023  }
2024
2025  protected void listChildren(List<Property> children) {
2026    super.listChildren(children);
2027    children.add(new Property("url", "uri",
2028        "An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.",
2029        0, 1, url));
2030    children.add(new Property("identifier", "Identifier",
2031        "A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.",
2032        0, java.lang.Integer.MAX_VALUE, identifier));
2033    children.add(new Property("version", "string",
2034        "The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.",
2035        0, 1, version));
2036    children.add(new Property("name", "string",
2037        "A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
2038        0, 1, name));
2039    children.add(
2040        new Property("title", "string", "A short, descriptive, user-friendly title for the library.", 0, 1, title));
2041    children.add(new Property("subtitle", "string",
2042        "An explanatory or alternate title for the library giving additional information about its content.", 0, 1,
2043        subtitle));
2044    children.add(new Property("status", "code",
2045        "The status of this library. Enables tracking the life-cycle of the content.", 0, 1, status));
2046    children.add(new Property("experimental", "boolean",
2047        "A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
2048        0, 1, experimental));
2049    children.add(new Property("type", "CodeableConcept",
2050        "Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.",
2051        0, 1, type));
2052    children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)",
2053        "A code or group definition that describes the intended subject of the contents of the library.", 0, 1,
2054        subject));
2055    children.add(new Property("date", "dateTime",
2056        "The date  (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.",
2057        0, 1, date));
2058    children.add(new Property("publisher", "string",
2059        "The name of the organization or individual that published the library.", 0, 1, publisher));
2060    children.add(new Property("contact", "ContactDetail",
2061        "Contact details to assist a user in finding and communicating with the publisher.", 0,
2062        java.lang.Integer.MAX_VALUE, contact));
2063    children.add(new Property("description", "markdown",
2064        "A free text natural language description of the library from a consumer's perspective.", 0, 1, description));
2065    children.add(new Property("useContext", "UsageContext",
2066        "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.",
2067        0, java.lang.Integer.MAX_VALUE, useContext));
2068    children.add(new Property("jurisdiction", "CodeableConcept",
2069        "A legal or geographic region in which the library is intended to be used.", 0, java.lang.Integer.MAX_VALUE,
2070        jurisdiction));
2071    children.add(new Property("purpose", "markdown",
2072        "Explanation of why this library is needed and why it has been designed as it has.", 0, 1, purpose));
2073    children.add(new Property("usage", "string",
2074        "A detailed description of how the library is used from a clinical perspective.", 0, 1, usage));
2075    children.add(new Property("copyright", "markdown",
2076        "A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.",
2077        0, 1, copyright));
2078    children.add(new Property("approvalDate", "date",
2079        "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.",
2080        0, 1, approvalDate));
2081    children.add(new Property("lastReviewDate", "date",
2082        "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.",
2083        0, 1, lastReviewDate));
2084    children.add(new Property("effectivePeriod", "Period",
2085        "The period during which the library content was or is planned to be in active use.", 0, 1, effectivePeriod));
2086    children.add(new Property("topic", "CodeableConcept",
2087        "Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.",
2088        0, java.lang.Integer.MAX_VALUE, topic));
2089    children.add(new Property("author", "ContactDetail",
2090        "An individiual or organization primarily involved in the creation and maintenance of the content.", 0,
2091        java.lang.Integer.MAX_VALUE, author));
2092    children.add(new Property("editor", "ContactDetail",
2093        "An individual or organization primarily responsible for internal coherence of the content.", 0,
2094        java.lang.Integer.MAX_VALUE, editor));
2095    children.add(new Property("reviewer", "ContactDetail",
2096        "An individual or organization primarily responsible for review of some aspect of the content.", 0,
2097        java.lang.Integer.MAX_VALUE, reviewer));
2098    children.add(new Property("endorser", "ContactDetail",
2099        "An individual or organization responsible for officially endorsing the content for use in some setting.", 0,
2100        java.lang.Integer.MAX_VALUE, endorser));
2101    children.add(new Property("relatedArtifact", "RelatedArtifact",
2102        "Related artifacts such as additional documentation, justification, or bibliographic references.", 0,
2103        java.lang.Integer.MAX_VALUE, relatedArtifact));
2104    children.add(new Property("parameter", "ParameterDefinition",
2105        "The parameter element defines parameters used by the library.", 0, java.lang.Integer.MAX_VALUE, parameter));
2106    children.add(new Property("dataRequirement", "DataRequirement",
2107        "Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.",
2108        0, java.lang.Integer.MAX_VALUE, dataRequirement));
2109    children.add(new Property("content", "Attachment",
2110        "The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.",
2111        0, java.lang.Integer.MAX_VALUE, content));
2112  }
2113
2114  @Override
2115  public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2116    switch (_hash) {
2117    case 116079:
2118      /* url */ return new Property("url", "uri",
2119          "An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.",
2120          0, 1, url);
2121    case -1618432855:
2122      /* identifier */ return new Property("identifier", "Identifier",
2123          "A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.",
2124          0, java.lang.Integer.MAX_VALUE, identifier);
2125    case 351608024:
2126      /* version */ return new Property("version", "string",
2127          "The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.",
2128          0, 1, version);
2129    case 3373707:
2130      /* name */ return new Property("name", "string",
2131          "A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
2132          0, 1, name);
2133    case 110371416:
2134      /* title */ return new Property("title", "string", "A short, descriptive, user-friendly title for the library.",
2135          0, 1, title);
2136    case -2060497896:
2137      /* subtitle */ return new Property("subtitle", "string",
2138          "An explanatory or alternate title for the library giving additional information about its content.", 0, 1,
2139          subtitle);
2140    case -892481550:
2141      /* status */ return new Property("status", "code",
2142          "The status of this library. Enables tracking the life-cycle of the content.", 0, 1, status);
2143    case -404562712:
2144      /* experimental */ return new Property("experimental", "boolean",
2145          "A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
2146          0, 1, experimental);
2147    case 3575610:
2148      /* type */ return new Property("type", "CodeableConcept",
2149          "Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.",
2150          0, 1, type);
2151    case -573640748:
2152      /* subject[x] */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
2153          "A code or group definition that describes the intended subject of the contents of the library.", 0, 1,
2154          subject);
2155    case -1867885268:
2156      /* subject */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
2157          "A code or group definition that describes the intended subject of the contents of the library.", 0, 1,
2158          subject);
2159    case -1257122603:
2160      /* subjectCodeableConcept */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
2161          "A code or group definition that describes the intended subject of the contents of the library.", 0, 1,
2162          subject);
2163    case 772938623:
2164      /* subjectReference */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
2165          "A code or group definition that describes the intended subject of the contents of the library.", 0, 1,
2166          subject);
2167    case 3076014:
2168      /* date */ return new Property("date", "dateTime",
2169          "The date  (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.",
2170          0, 1, date);
2171    case 1447404028:
2172      /* publisher */ return new Property("publisher", "string",
2173          "The name of the organization or individual that published the library.", 0, 1, publisher);
2174    case 951526432:
2175      /* contact */ return new Property("contact", "ContactDetail",
2176          "Contact details to assist a user in finding and communicating with the publisher.", 0,
2177          java.lang.Integer.MAX_VALUE, contact);
2178    case -1724546052:
2179      /* description */ return new Property("description", "markdown",
2180          "A free text natural language description of the library from a consumer's perspective.", 0, 1, description);
2181    case -669707736:
2182      /* useContext */ return new Property("useContext", "UsageContext",
2183          "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.",
2184          0, java.lang.Integer.MAX_VALUE, useContext);
2185    case -507075711:
2186      /* jurisdiction */ return new Property("jurisdiction", "CodeableConcept",
2187          "A legal or geographic region in which the library is intended to be used.", 0, java.lang.Integer.MAX_VALUE,
2188          jurisdiction);
2189    case -220463842:
2190      /* purpose */ return new Property("purpose", "markdown",
2191          "Explanation of why this library is needed and why it has been designed as it has.", 0, 1, purpose);
2192    case 111574433:
2193      /* usage */ return new Property("usage", "string",
2194          "A detailed description of how the library is used from a clinical perspective.", 0, 1, usage);
2195    case 1522889671:
2196      /* copyright */ return new Property("copyright", "markdown",
2197          "A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.",
2198          0, 1, copyright);
2199    case 223539345:
2200      /* approvalDate */ return new Property("approvalDate", "date",
2201          "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.",
2202          0, 1, approvalDate);
2203    case -1687512484:
2204      /* lastReviewDate */ return new Property("lastReviewDate", "date",
2205          "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.",
2206          0, 1, lastReviewDate);
2207    case -403934648:
2208      /* effectivePeriod */ return new Property("effectivePeriod", "Period",
2209          "The period during which the library content was or is planned to be in active use.", 0, 1, effectivePeriod);
2210    case 110546223:
2211      /* topic */ return new Property("topic", "CodeableConcept",
2212          "Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.",
2213          0, java.lang.Integer.MAX_VALUE, topic);
2214    case -1406328437:
2215      /* author */ return new Property("author", "ContactDetail",
2216          "An individiual or organization primarily involved in the creation and maintenance of the content.", 0,
2217          java.lang.Integer.MAX_VALUE, author);
2218    case -1307827859:
2219      /* editor */ return new Property("editor", "ContactDetail",
2220          "An individual or organization primarily responsible for internal coherence of the content.", 0,
2221          java.lang.Integer.MAX_VALUE, editor);
2222    case -261190139:
2223      /* reviewer */ return new Property("reviewer", "ContactDetail",
2224          "An individual or organization primarily responsible for review of some aspect of the content.", 0,
2225          java.lang.Integer.MAX_VALUE, reviewer);
2226    case 1740277666:
2227      /* endorser */ return new Property("endorser", "ContactDetail",
2228          "An individual or organization responsible for officially endorsing the content for use in some setting.", 0,
2229          java.lang.Integer.MAX_VALUE, endorser);
2230    case 666807069:
2231      /* relatedArtifact */ return new Property("relatedArtifact", "RelatedArtifact",
2232          "Related artifacts such as additional documentation, justification, or bibliographic references.", 0,
2233          java.lang.Integer.MAX_VALUE, relatedArtifact);
2234    case 1954460585:
2235      /* parameter */ return new Property("parameter", "ParameterDefinition",
2236          "The parameter element defines parameters used by the library.", 0, java.lang.Integer.MAX_VALUE, parameter);
2237    case 629147193:
2238      /* dataRequirement */ return new Property("dataRequirement", "DataRequirement",
2239          "Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.",
2240          0, java.lang.Integer.MAX_VALUE, dataRequirement);
2241    case 951530617:
2242      /* content */ return new Property("content", "Attachment",
2243          "The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.",
2244          0, java.lang.Integer.MAX_VALUE, content);
2245    default:
2246      return super.getNamedProperty(_hash, _name, _checkValid);
2247    }
2248
2249  }
2250
2251  @Override
2252  public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2253    switch (hash) {
2254    case 116079:
2255      /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType
2256    case -1618432855:
2257      /* identifier */ return this.identifier == null ? new Base[0]
2258          : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2259    case 351608024:
2260      /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType
2261    case 3373707:
2262      /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
2263    case 110371416:
2264      /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType
2265    case -2060497896:
2266      /* subtitle */ return this.subtitle == null ? new Base[0] : new Base[] { this.subtitle }; // StringType
2267    case -892481550:
2268      /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<PublicationStatus>
2269    case -404562712:
2270      /* experimental */ return this.experimental == null ? new Base[0] : new Base[] { this.experimental }; // BooleanType
2271    case 3575610:
2272      /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept
2273    case -1867885268:
2274      /* subject */ return this.subject == null ? new Base[0] : new Base[] { this.subject }; // Type
2275    case 3076014:
2276      /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType
2277    case 1447404028:
2278      /* publisher */ return this.publisher == null ? new Base[0] : new Base[] { this.publisher }; // StringType
2279    case 951526432:
2280      /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2281    case -1724546052:
2282      /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // MarkdownType
2283    case -669707736:
2284      /* useContext */ return this.useContext == null ? new Base[0]
2285          : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2286    case -507075711:
2287      /* jurisdiction */ return this.jurisdiction == null ? new Base[0]
2288          : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
2289    case -220463842:
2290      /* purpose */ return this.purpose == null ? new Base[0] : new Base[] { this.purpose }; // MarkdownType
2291    case 111574433:
2292      /* usage */ return this.usage == null ? new Base[0] : new Base[] { this.usage }; // StringType
2293    case 1522889671:
2294      /* copyright */ return this.copyright == null ? new Base[0] : new Base[] { this.copyright }; // MarkdownType
2295    case 223539345:
2296      /* approvalDate */ return this.approvalDate == null ? new Base[0] : new Base[] { this.approvalDate }; // DateType
2297    case -1687512484:
2298      /* lastReviewDate */ return this.lastReviewDate == null ? new Base[0] : new Base[] { this.lastReviewDate }; // DateType
2299    case -403934648:
2300      /* effectivePeriod */ return this.effectivePeriod == null ? new Base[0] : new Base[] { this.effectivePeriod }; // Period
2301    case 110546223:
2302      /* topic */ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
2303    case -1406328437:
2304      /* author */ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
2305    case -1307827859:
2306      /* editor */ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
2307    case -261190139:
2308      /* reviewer */ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
2309    case 1740277666:
2310      /* endorser */ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
2311    case 666807069:
2312      /* relatedArtifact */ return this.relatedArtifact == null ? new Base[0]
2313          : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
2314    case 1954460585:
2315      /* parameter */ return this.parameter == null ? new Base[0]
2316          : this.parameter.toArray(new Base[this.parameter.size()]); // ParameterDefinition
2317    case 629147193:
2318      /* dataRequirement */ return this.dataRequirement == null ? new Base[0]
2319          : this.dataRequirement.toArray(new Base[this.dataRequirement.size()]); // DataRequirement
2320    case 951530617:
2321      /* content */ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // Attachment
2322    default:
2323      return super.getProperty(hash, name, checkValid);
2324    }
2325
2326  }
2327
2328  @Override
2329  public Base setProperty(int hash, String name, Base value) throws FHIRException {
2330    switch (hash) {
2331    case 116079: // url
2332      this.url = castToUri(value); // UriType
2333      return value;
2334    case -1618432855: // identifier
2335      this.getIdentifier().add(castToIdentifier(value)); // Identifier
2336      return value;
2337    case 351608024: // version
2338      this.version = castToString(value); // StringType
2339      return value;
2340    case 3373707: // name
2341      this.name = castToString(value); // StringType
2342      return value;
2343    case 110371416: // title
2344      this.title = castToString(value); // StringType
2345      return value;
2346    case -2060497896: // subtitle
2347      this.subtitle = castToString(value); // StringType
2348      return value;
2349    case -892481550: // status
2350      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2351      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2352      return value;
2353    case -404562712: // experimental
2354      this.experimental = castToBoolean(value); // BooleanType
2355      return value;
2356    case 3575610: // type
2357      this.type = castToCodeableConcept(value); // CodeableConcept
2358      return value;
2359    case -1867885268: // subject
2360      this.subject = castToType(value); // Type
2361      return value;
2362    case 3076014: // date
2363      this.date = castToDateTime(value); // DateTimeType
2364      return value;
2365    case 1447404028: // publisher
2366      this.publisher = castToString(value); // StringType
2367      return value;
2368    case 951526432: // contact
2369      this.getContact().add(castToContactDetail(value)); // ContactDetail
2370      return value;
2371    case -1724546052: // description
2372      this.description = castToMarkdown(value); // MarkdownType
2373      return value;
2374    case -669707736: // useContext
2375      this.getUseContext().add(castToUsageContext(value)); // UsageContext
2376      return value;
2377    case -507075711: // jurisdiction
2378      this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
2379      return value;
2380    case -220463842: // purpose
2381      this.purpose = castToMarkdown(value); // MarkdownType
2382      return value;
2383    case 111574433: // usage
2384      this.usage = castToString(value); // StringType
2385      return value;
2386    case 1522889671: // copyright
2387      this.copyright = castToMarkdown(value); // MarkdownType
2388      return value;
2389    case 223539345: // approvalDate
2390      this.approvalDate = castToDate(value); // DateType
2391      return value;
2392    case -1687512484: // lastReviewDate
2393      this.lastReviewDate = castToDate(value); // DateType
2394      return value;
2395    case -403934648: // effectivePeriod
2396      this.effectivePeriod = castToPeriod(value); // Period
2397      return value;
2398    case 110546223: // topic
2399      this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept
2400      return value;
2401    case -1406328437: // author
2402      this.getAuthor().add(castToContactDetail(value)); // ContactDetail
2403      return value;
2404    case -1307827859: // editor
2405      this.getEditor().add(castToContactDetail(value)); // ContactDetail
2406      return value;
2407    case -261190139: // reviewer
2408      this.getReviewer().add(castToContactDetail(value)); // ContactDetail
2409      return value;
2410    case 1740277666: // endorser
2411      this.getEndorser().add(castToContactDetail(value)); // ContactDetail
2412      return value;
2413    case 666807069: // relatedArtifact
2414      this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact
2415      return value;
2416    case 1954460585: // parameter
2417      this.getParameter().add(castToParameterDefinition(value)); // ParameterDefinition
2418      return value;
2419    case 629147193: // dataRequirement
2420      this.getDataRequirement().add(castToDataRequirement(value)); // DataRequirement
2421      return value;
2422    case 951530617: // content
2423      this.getContent().add(castToAttachment(value)); // Attachment
2424      return value;
2425    default:
2426      return super.setProperty(hash, name, value);
2427    }
2428
2429  }
2430
2431  @Override
2432  public Base setProperty(String name, Base value) throws FHIRException {
2433    if (name.equals("url")) {
2434      this.url = castToUri(value); // UriType
2435    } else if (name.equals("identifier")) {
2436      this.getIdentifier().add(castToIdentifier(value));
2437    } else if (name.equals("version")) {
2438      this.version = castToString(value); // StringType
2439    } else if (name.equals("name")) {
2440      this.name = castToString(value); // StringType
2441    } else if (name.equals("title")) {
2442      this.title = castToString(value); // StringType
2443    } else if (name.equals("subtitle")) {
2444      this.subtitle = castToString(value); // StringType
2445    } else if (name.equals("status")) {
2446      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2447      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2448    } else if (name.equals("experimental")) {
2449      this.experimental = castToBoolean(value); // BooleanType
2450    } else if (name.equals("type")) {
2451      this.type = castToCodeableConcept(value); // CodeableConcept
2452    } else if (name.equals("subject[x]")) {
2453      this.subject = castToType(value); // Type
2454    } else if (name.equals("date")) {
2455      this.date = castToDateTime(value); // DateTimeType
2456    } else if (name.equals("publisher")) {
2457      this.publisher = castToString(value); // StringType
2458    } else if (name.equals("contact")) {
2459      this.getContact().add(castToContactDetail(value));
2460    } else if (name.equals("description")) {
2461      this.description = castToMarkdown(value); // MarkdownType
2462    } else if (name.equals("useContext")) {
2463      this.getUseContext().add(castToUsageContext(value));
2464    } else if (name.equals("jurisdiction")) {
2465      this.getJurisdiction().add(castToCodeableConcept(value));
2466    } else if (name.equals("purpose")) {
2467      this.purpose = castToMarkdown(value); // MarkdownType
2468    } else if (name.equals("usage")) {
2469      this.usage = castToString(value); // StringType
2470    } else if (name.equals("copyright")) {
2471      this.copyright = castToMarkdown(value); // MarkdownType
2472    } else if (name.equals("approvalDate")) {
2473      this.approvalDate = castToDate(value); // DateType
2474    } else if (name.equals("lastReviewDate")) {
2475      this.lastReviewDate = castToDate(value); // DateType
2476    } else if (name.equals("effectivePeriod")) {
2477      this.effectivePeriod = castToPeriod(value); // Period
2478    } else if (name.equals("topic")) {
2479      this.getTopic().add(castToCodeableConcept(value));
2480    } else if (name.equals("author")) {
2481      this.getAuthor().add(castToContactDetail(value));
2482    } else if (name.equals("editor")) {
2483      this.getEditor().add(castToContactDetail(value));
2484    } else if (name.equals("reviewer")) {
2485      this.getReviewer().add(castToContactDetail(value));
2486    } else if (name.equals("endorser")) {
2487      this.getEndorser().add(castToContactDetail(value));
2488    } else if (name.equals("relatedArtifact")) {
2489      this.getRelatedArtifact().add(castToRelatedArtifact(value));
2490    } else if (name.equals("parameter")) {
2491      this.getParameter().add(castToParameterDefinition(value));
2492    } else if (name.equals("dataRequirement")) {
2493      this.getDataRequirement().add(castToDataRequirement(value));
2494    } else if (name.equals("content")) {
2495      this.getContent().add(castToAttachment(value));
2496    } else
2497      return super.setProperty(name, value);
2498    return value;
2499  }
2500
2501  @Override
2502  public Base makeProperty(int hash, String name) throws FHIRException {
2503    switch (hash) {
2504    case 116079:
2505      return getUrlElement();
2506    case -1618432855:
2507      return addIdentifier();
2508    case 351608024:
2509      return getVersionElement();
2510    case 3373707:
2511      return getNameElement();
2512    case 110371416:
2513      return getTitleElement();
2514    case -2060497896:
2515      return getSubtitleElement();
2516    case -892481550:
2517      return getStatusElement();
2518    case -404562712:
2519      return getExperimentalElement();
2520    case 3575610:
2521      return getType();
2522    case -573640748:
2523      return getSubject();
2524    case -1867885268:
2525      return getSubject();
2526    case 3076014:
2527      return getDateElement();
2528    case 1447404028:
2529      return getPublisherElement();
2530    case 951526432:
2531      return addContact();
2532    case -1724546052:
2533      return getDescriptionElement();
2534    case -669707736:
2535      return addUseContext();
2536    case -507075711:
2537      return addJurisdiction();
2538    case -220463842:
2539      return getPurposeElement();
2540    case 111574433:
2541      return getUsageElement();
2542    case 1522889671:
2543      return getCopyrightElement();
2544    case 223539345:
2545      return getApprovalDateElement();
2546    case -1687512484:
2547      return getLastReviewDateElement();
2548    case -403934648:
2549      return getEffectivePeriod();
2550    case 110546223:
2551      return addTopic();
2552    case -1406328437:
2553      return addAuthor();
2554    case -1307827859:
2555      return addEditor();
2556    case -261190139:
2557      return addReviewer();
2558    case 1740277666:
2559      return addEndorser();
2560    case 666807069:
2561      return addRelatedArtifact();
2562    case 1954460585:
2563      return addParameter();
2564    case 629147193:
2565      return addDataRequirement();
2566    case 951530617:
2567      return addContent();
2568    default:
2569      return super.makeProperty(hash, name);
2570    }
2571
2572  }
2573
2574  @Override
2575  public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2576    switch (hash) {
2577    case 116079:
2578      /* url */ return new String[] { "uri" };
2579    case -1618432855:
2580      /* identifier */ return new String[] { "Identifier" };
2581    case 351608024:
2582      /* version */ return new String[] { "string" };
2583    case 3373707:
2584      /* name */ return new String[] { "string" };
2585    case 110371416:
2586      /* title */ return new String[] { "string" };
2587    case -2060497896:
2588      /* subtitle */ return new String[] { "string" };
2589    case -892481550:
2590      /* status */ return new String[] { "code" };
2591    case -404562712:
2592      /* experimental */ return new String[] { "boolean" };
2593    case 3575610:
2594      /* type */ return new String[] { "CodeableConcept" };
2595    case -1867885268:
2596      /* subject */ return new String[] { "CodeableConcept", "Reference" };
2597    case 3076014:
2598      /* date */ return new String[] { "dateTime" };
2599    case 1447404028:
2600      /* publisher */ return new String[] { "string" };
2601    case 951526432:
2602      /* contact */ return new String[] { "ContactDetail" };
2603    case -1724546052:
2604      /* description */ return new String[] { "markdown" };
2605    case -669707736:
2606      /* useContext */ return new String[] { "UsageContext" };
2607    case -507075711:
2608      /* jurisdiction */ return new String[] { "CodeableConcept" };
2609    case -220463842:
2610      /* purpose */ return new String[] { "markdown" };
2611    case 111574433:
2612      /* usage */ return new String[] { "string" };
2613    case 1522889671:
2614      /* copyright */ return new String[] { "markdown" };
2615    case 223539345:
2616      /* approvalDate */ return new String[] { "date" };
2617    case -1687512484:
2618      /* lastReviewDate */ return new String[] { "date" };
2619    case -403934648:
2620      /* effectivePeriod */ return new String[] { "Period" };
2621    case 110546223:
2622      /* topic */ return new String[] { "CodeableConcept" };
2623    case -1406328437:
2624      /* author */ return new String[] { "ContactDetail" };
2625    case -1307827859:
2626      /* editor */ return new String[] { "ContactDetail" };
2627    case -261190139:
2628      /* reviewer */ return new String[] { "ContactDetail" };
2629    case 1740277666:
2630      /* endorser */ return new String[] { "ContactDetail" };
2631    case 666807069:
2632      /* relatedArtifact */ return new String[] { "RelatedArtifact" };
2633    case 1954460585:
2634      /* parameter */ return new String[] { "ParameterDefinition" };
2635    case 629147193:
2636      /* dataRequirement */ return new String[] { "DataRequirement" };
2637    case 951530617:
2638      /* content */ return new String[] { "Attachment" };
2639    default:
2640      return super.getTypesForProperty(hash, name);
2641    }
2642
2643  }
2644
2645  @Override
2646  public Base addChild(String name) throws FHIRException {
2647    if (name.equals("url")) {
2648      throw new FHIRException("Cannot call addChild on a singleton property Library.url");
2649    } else if (name.equals("identifier")) {
2650      return addIdentifier();
2651    } else if (name.equals("version")) {
2652      throw new FHIRException("Cannot call addChild on a singleton property Library.version");
2653    } else if (name.equals("name")) {
2654      throw new FHIRException("Cannot call addChild on a singleton property Library.name");
2655    } else if (name.equals("title")) {
2656      throw new FHIRException("Cannot call addChild on a singleton property Library.title");
2657    } else if (name.equals("subtitle")) {
2658      throw new FHIRException("Cannot call addChild on a singleton property Library.subtitle");
2659    } else if (name.equals("status")) {
2660      throw new FHIRException("Cannot call addChild on a singleton property Library.status");
2661    } else if (name.equals("experimental")) {
2662      throw new FHIRException("Cannot call addChild on a singleton property Library.experimental");
2663    } else if (name.equals("type")) {
2664      this.type = new CodeableConcept();
2665      return this.type;
2666    } else if (name.equals("subjectCodeableConcept")) {
2667      this.subject = new CodeableConcept();
2668      return this.subject;
2669    } else if (name.equals("subjectReference")) {
2670      this.subject = new Reference();
2671      return this.subject;
2672    } else if (name.equals("date")) {
2673      throw new FHIRException("Cannot call addChild on a singleton property Library.date");
2674    } else if (name.equals("publisher")) {
2675      throw new FHIRException("Cannot call addChild on a singleton property Library.publisher");
2676    } else if (name.equals("contact")) {
2677      return addContact();
2678    } else if (name.equals("description")) {
2679      throw new FHIRException("Cannot call addChild on a singleton property Library.description");
2680    } else if (name.equals("useContext")) {
2681      return addUseContext();
2682    } else if (name.equals("jurisdiction")) {
2683      return addJurisdiction();
2684    } else if (name.equals("purpose")) {
2685      throw new FHIRException("Cannot call addChild on a singleton property Library.purpose");
2686    } else if (name.equals("usage")) {
2687      throw new FHIRException("Cannot call addChild on a singleton property Library.usage");
2688    } else if (name.equals("copyright")) {
2689      throw new FHIRException("Cannot call addChild on a singleton property Library.copyright");
2690    } else if (name.equals("approvalDate")) {
2691      throw new FHIRException("Cannot call addChild on a singleton property Library.approvalDate");
2692    } else if (name.equals("lastReviewDate")) {
2693      throw new FHIRException("Cannot call addChild on a singleton property Library.lastReviewDate");
2694    } else if (name.equals("effectivePeriod")) {
2695      this.effectivePeriod = new Period();
2696      return this.effectivePeriod;
2697    } else if (name.equals("topic")) {
2698      return addTopic();
2699    } else if (name.equals("author")) {
2700      return addAuthor();
2701    } else if (name.equals("editor")) {
2702      return addEditor();
2703    } else if (name.equals("reviewer")) {
2704      return addReviewer();
2705    } else if (name.equals("endorser")) {
2706      return addEndorser();
2707    } else if (name.equals("relatedArtifact")) {
2708      return addRelatedArtifact();
2709    } else if (name.equals("parameter")) {
2710      return addParameter();
2711    } else if (name.equals("dataRequirement")) {
2712      return addDataRequirement();
2713    } else if (name.equals("content")) {
2714      return addContent();
2715    } else
2716      return super.addChild(name);
2717  }
2718
2719  public String fhirType() {
2720    return "Library";
2721
2722  }
2723
2724  public Library copy() {
2725    Library dst = new Library();
2726    copyValues(dst);
2727    return dst;
2728  }
2729
2730  public void copyValues(Library dst) {
2731    super.copyValues(dst);
2732    dst.url = url == null ? null : url.copy();
2733    if (identifier != null) {
2734      dst.identifier = new ArrayList<Identifier>();
2735      for (Identifier i : identifier)
2736        dst.identifier.add(i.copy());
2737    }
2738    ;
2739    dst.version = version == null ? null : version.copy();
2740    dst.name = name == null ? null : name.copy();
2741    dst.title = title == null ? null : title.copy();
2742    dst.subtitle = subtitle == null ? null : subtitle.copy();
2743    dst.status = status == null ? null : status.copy();
2744    dst.experimental = experimental == null ? null : experimental.copy();
2745    dst.type = type == null ? null : type.copy();
2746    dst.subject = subject == null ? null : subject.copy();
2747    dst.date = date == null ? null : date.copy();
2748    dst.publisher = publisher == null ? null : publisher.copy();
2749    if (contact != null) {
2750      dst.contact = new ArrayList<ContactDetail>();
2751      for (ContactDetail i : contact)
2752        dst.contact.add(i.copy());
2753    }
2754    ;
2755    dst.description = description == null ? null : description.copy();
2756    if (useContext != null) {
2757      dst.useContext = new ArrayList<UsageContext>();
2758      for (UsageContext i : useContext)
2759        dst.useContext.add(i.copy());
2760    }
2761    ;
2762    if (jurisdiction != null) {
2763      dst.jurisdiction = new ArrayList<CodeableConcept>();
2764      for (CodeableConcept i : jurisdiction)
2765        dst.jurisdiction.add(i.copy());
2766    }
2767    ;
2768    dst.purpose = purpose == null ? null : purpose.copy();
2769    dst.usage = usage == null ? null : usage.copy();
2770    dst.copyright = copyright == null ? null : copyright.copy();
2771    dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
2772    dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
2773    dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
2774    if (topic != null) {
2775      dst.topic = new ArrayList<CodeableConcept>();
2776      for (CodeableConcept i : topic)
2777        dst.topic.add(i.copy());
2778    }
2779    ;
2780    if (author != null) {
2781      dst.author = new ArrayList<ContactDetail>();
2782      for (ContactDetail i : author)
2783        dst.author.add(i.copy());
2784    }
2785    ;
2786    if (editor != null) {
2787      dst.editor = new ArrayList<ContactDetail>();
2788      for (ContactDetail i : editor)
2789        dst.editor.add(i.copy());
2790    }
2791    ;
2792    if (reviewer != null) {
2793      dst.reviewer = new ArrayList<ContactDetail>();
2794      for (ContactDetail i : reviewer)
2795        dst.reviewer.add(i.copy());
2796    }
2797    ;
2798    if (endorser != null) {
2799      dst.endorser = new ArrayList<ContactDetail>();
2800      for (ContactDetail i : endorser)
2801        dst.endorser.add(i.copy());
2802    }
2803    ;
2804    if (relatedArtifact != null) {
2805      dst.relatedArtifact = new ArrayList<RelatedArtifact>();
2806      for (RelatedArtifact i : relatedArtifact)
2807        dst.relatedArtifact.add(i.copy());
2808    }
2809    ;
2810    if (parameter != null) {
2811      dst.parameter = new ArrayList<ParameterDefinition>();
2812      for (ParameterDefinition i : parameter)
2813        dst.parameter.add(i.copy());
2814    }
2815    ;
2816    if (dataRequirement != null) {
2817      dst.dataRequirement = new ArrayList<DataRequirement>();
2818      for (DataRequirement i : dataRequirement)
2819        dst.dataRequirement.add(i.copy());
2820    }
2821    ;
2822    if (content != null) {
2823      dst.content = new ArrayList<Attachment>();
2824      for (Attachment i : content)
2825        dst.content.add(i.copy());
2826    }
2827    ;
2828  }
2829
2830  protected Library typedCopy() {
2831    return copy();
2832  }
2833
2834  @Override
2835  public boolean equalsDeep(Base other_) {
2836    if (!super.equalsDeep(other_))
2837      return false;
2838    if (!(other_ instanceof Library))
2839      return false;
2840    Library o = (Library) other_;
2841    return compareDeep(identifier, o.identifier, true) && compareDeep(subtitle, o.subtitle, true)
2842        && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true)
2843        && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true)
2844        && compareDeep(copyright, o.copyright, true) && compareDeep(approvalDate, o.approvalDate, true)
2845        && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true)
2846        && compareDeep(topic, o.topic, true) && compareDeep(author, o.author, true)
2847        && compareDeep(editor, o.editor, true) && compareDeep(reviewer, o.reviewer, true)
2848        && compareDeep(endorser, o.endorser, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
2849        && compareDeep(parameter, o.parameter, true) && compareDeep(dataRequirement, o.dataRequirement, true)
2850        && compareDeep(content, o.content, true);
2851  }
2852
2853  @Override
2854  public boolean equalsShallow(Base other_) {
2855    if (!super.equalsShallow(other_))
2856      return false;
2857    if (!(other_ instanceof Library))
2858      return false;
2859    Library o = (Library) other_;
2860    return compareValues(subtitle, o.subtitle, true) && compareValues(purpose, o.purpose, true)
2861        && compareValues(usage, o.usage, true) && compareValues(copyright, o.copyright, true)
2862        && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true);
2863  }
2864
2865  public boolean isEmpty() {
2866    return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subtitle, type, subject, purpose, usage,
2867        copyright, approvalDate, lastReviewDate, effectivePeriod, topic, author, editor, reviewer, endorser,
2868        relatedArtifact, parameter, dataRequirement, content);
2869  }
2870
2871  @Override
2872  public ResourceType getResourceType() {
2873    return ResourceType.Library;
2874  }
2875
2876  /**
2877   * Search parameter: <b>date</b>
2878   * <p>
2879   * Description: <b>The library publication date</b><br>
2880   * Type: <b>date</b><br>
2881   * Path: <b>Library.date</b><br>
2882   * </p>
2883   */
2884  @SearchParamDefinition(name = "date", path = "Library.date", description = "The library publication date", type = "date")
2885  public static final String SP_DATE = "date";
2886  /**
2887   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2888   * <p>
2889   * Description: <b>The library publication date</b><br>
2890   * Type: <b>date</b><br>
2891   * Path: <b>Library.date</b><br>
2892   * </p>
2893   */
2894  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(
2895      SP_DATE);
2896
2897  /**
2898   * Search parameter: <b>identifier</b>
2899   * <p>
2900   * Description: <b>External identifier for the library</b><br>
2901   * Type: <b>token</b><br>
2902   * Path: <b>Library.identifier</b><br>
2903   * </p>
2904   */
2905  @SearchParamDefinition(name = "identifier", path = "Library.identifier", description = "External identifier for the library", type = "token")
2906  public static final String SP_IDENTIFIER = "identifier";
2907  /**
2908   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2909   * <p>
2910   * Description: <b>External identifier for the library</b><br>
2911   * Type: <b>token</b><br>
2912   * Path: <b>Library.identifier</b><br>
2913   * </p>
2914   */
2915  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(
2916      SP_IDENTIFIER);
2917
2918  /**
2919   * Search parameter: <b>successor</b>
2920   * <p>
2921   * Description: <b>What resource is being referenced</b><br>
2922   * Type: <b>reference</b><br>
2923   * Path: <b>Library.relatedArtifact.resource</b><br>
2924   * </p>
2925   */
2926  @SearchParamDefinition(name = "successor", path = "Library.relatedArtifact.where(type='successor').resource", description = "What resource is being referenced", type = "reference")
2927  public static final String SP_SUCCESSOR = "successor";
2928  /**
2929   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
2930   * <p>
2931   * Description: <b>What resource is being referenced</b><br>
2932   * Type: <b>reference</b><br>
2933   * Path: <b>Library.relatedArtifact.resource</b><br>
2934   * </p>
2935   */
2936  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
2937      SP_SUCCESSOR);
2938
2939  /**
2940   * Constant for fluent queries to be used to add include statements. Specifies
2941   * the path value of "<b>Library:successor</b>".
2942   */
2943  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include(
2944      "Library:successor").toLocked();
2945
2946  /**
2947   * Search parameter: <b>context-type-value</b>
2948   * <p>
2949   * Description: <b>A use context type and value assigned to the library</b><br>
2950   * Type: <b>composite</b><br>
2951   * Path: <b></b><br>
2952   * </p>
2953   */
2954  @SearchParamDefinition(name = "context-type-value", path = "Library.useContext", description = "A use context type and value assigned to the library", type = "composite", compositeOf = {
2955      "context-type", "context" })
2956  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
2957  /**
2958   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
2959   * <p>
2960   * Description: <b>A use context type and value assigned to the library</b><br>
2961   * Type: <b>composite</b><br>
2962   * Path: <b></b><br>
2963   * </p>
2964   */
2965  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(
2966      SP_CONTEXT_TYPE_VALUE);
2967
2968  /**
2969   * Search parameter: <b>jurisdiction</b>
2970   * <p>
2971   * Description: <b>Intended jurisdiction for the library</b><br>
2972   * Type: <b>token</b><br>
2973   * Path: <b>Library.jurisdiction</b><br>
2974   * </p>
2975   */
2976  @SearchParamDefinition(name = "jurisdiction", path = "Library.jurisdiction", description = "Intended jurisdiction for the library", type = "token")
2977  public static final String SP_JURISDICTION = "jurisdiction";
2978  /**
2979   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
2980   * <p>
2981   * Description: <b>Intended jurisdiction for the library</b><br>
2982   * Type: <b>token</b><br>
2983   * Path: <b>Library.jurisdiction</b><br>
2984   * </p>
2985   */
2986  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
2987      SP_JURISDICTION);
2988
2989  /**
2990   * Search parameter: <b>description</b>
2991   * <p>
2992   * Description: <b>The description of the library</b><br>
2993   * Type: <b>string</b><br>
2994   * Path: <b>Library.description</b><br>
2995   * </p>
2996   */
2997  @SearchParamDefinition(name = "description", path = "Library.description", description = "The description of the library", type = "string")
2998  public static final String SP_DESCRIPTION = "description";
2999  /**
3000   * <b>Fluent Client</b> search parameter constant for <b>description</b>
3001   * <p>
3002   * Description: <b>The description of the library</b><br>
3003   * Type: <b>string</b><br>
3004   * Path: <b>Library.description</b><br>
3005   * </p>
3006   */
3007  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(
3008      SP_DESCRIPTION);
3009
3010  /**
3011   * Search parameter: <b>derived-from</b>
3012   * <p>
3013   * Description: <b>What resource is being referenced</b><br>
3014   * Type: <b>reference</b><br>
3015   * Path: <b>Library.relatedArtifact.resource</b><br>
3016   * </p>
3017   */
3018  @SearchParamDefinition(name = "derived-from", path = "Library.relatedArtifact.where(type='derived-from').resource", description = "What resource is being referenced", type = "reference")
3019  public static final String SP_DERIVED_FROM = "derived-from";
3020  /**
3021   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
3022   * <p>
3023   * Description: <b>What resource is being referenced</b><br>
3024   * Type: <b>reference</b><br>
3025   * Path: <b>Library.relatedArtifact.resource</b><br>
3026   * </p>
3027   */
3028  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
3029      SP_DERIVED_FROM);
3030
3031  /**
3032   * Constant for fluent queries to be used to add include statements. Specifies
3033   * the path value of "<b>Library:derived-from</b>".
3034   */
3035  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include(
3036      "Library:derived-from").toLocked();
3037
3038  /**
3039   * Search parameter: <b>context-type</b>
3040   * <p>
3041   * Description: <b>A type of use context assigned to the library</b><br>
3042   * Type: <b>token</b><br>
3043   * Path: <b>Library.useContext.code</b><br>
3044   * </p>
3045   */
3046  @SearchParamDefinition(name = "context-type", path = "Library.useContext.code", description = "A type of use context assigned to the library", type = "token")
3047  public static final String SP_CONTEXT_TYPE = "context-type";
3048  /**
3049   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
3050   * <p>
3051   * Description: <b>A type of use context assigned to the library</b><br>
3052   * Type: <b>token</b><br>
3053   * Path: <b>Library.useContext.code</b><br>
3054   * </p>
3055   */
3056  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3057      SP_CONTEXT_TYPE);
3058
3059  /**
3060   * Search parameter: <b>predecessor</b>
3061   * <p>
3062   * Description: <b>What resource is being referenced</b><br>
3063   * Type: <b>reference</b><br>
3064   * Path: <b>Library.relatedArtifact.resource</b><br>
3065   * </p>
3066   */
3067  @SearchParamDefinition(name = "predecessor", path = "Library.relatedArtifact.where(type='predecessor').resource", description = "What resource is being referenced", type = "reference")
3068  public static final String SP_PREDECESSOR = "predecessor";
3069  /**
3070   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
3071   * <p>
3072   * Description: <b>What resource is being referenced</b><br>
3073   * Type: <b>reference</b><br>
3074   * Path: <b>Library.relatedArtifact.resource</b><br>
3075   * </p>
3076   */
3077  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
3078      SP_PREDECESSOR);
3079
3080  /**
3081   * Constant for fluent queries to be used to add include statements. Specifies
3082   * the path value of "<b>Library:predecessor</b>".
3083   */
3084  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include(
3085      "Library:predecessor").toLocked();
3086
3087  /**
3088   * Search parameter: <b>title</b>
3089   * <p>
3090   * Description: <b>The human-friendly name of the library</b><br>
3091   * Type: <b>string</b><br>
3092   * Path: <b>Library.title</b><br>
3093   * </p>
3094   */
3095  @SearchParamDefinition(name = "title", path = "Library.title", description = "The human-friendly name of the library", type = "string")
3096  public static final String SP_TITLE = "title";
3097  /**
3098   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3099   * <p>
3100   * Description: <b>The human-friendly name of the library</b><br>
3101   * Type: <b>string</b><br>
3102   * Path: <b>Library.title</b><br>
3103   * </p>
3104   */
3105  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(
3106      SP_TITLE);
3107
3108  /**
3109   * Search parameter: <b>composed-of</b>
3110   * <p>
3111   * Description: <b>What resource is being referenced</b><br>
3112   * Type: <b>reference</b><br>
3113   * Path: <b>Library.relatedArtifact.resource</b><br>
3114   * </p>
3115   */
3116  @SearchParamDefinition(name = "composed-of", path = "Library.relatedArtifact.where(type='composed-of').resource", description = "What resource is being referenced", type = "reference")
3117  public static final String SP_COMPOSED_OF = "composed-of";
3118  /**
3119   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
3120   * <p>
3121   * Description: <b>What resource is being referenced</b><br>
3122   * Type: <b>reference</b><br>
3123   * Path: <b>Library.relatedArtifact.resource</b><br>
3124   * </p>
3125   */
3126  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
3127      SP_COMPOSED_OF);
3128
3129  /**
3130   * Constant for fluent queries to be used to add include statements. Specifies
3131   * the path value of "<b>Library:composed-of</b>".
3132   */
3133  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include(
3134      "Library:composed-of").toLocked();
3135
3136  /**
3137   * Search parameter: <b>type</b>
3138   * <p>
3139   * Description: <b>The type of the library (e.g. logic-library,
3140   * model-definition, asset-collection, module-definition)</b><br>
3141   * Type: <b>token</b><br>
3142   * Path: <b>Library.type</b><br>
3143   * </p>
3144   */
3145  @SearchParamDefinition(name = "type", path = "Library.type", description = "The type of the library (e.g. logic-library, model-definition, asset-collection, module-definition)", type = "token")
3146  public static final String SP_TYPE = "type";
3147  /**
3148   * <b>Fluent Client</b> search parameter constant for <b>type</b>
3149   * <p>
3150   * Description: <b>The type of the library (e.g. logic-library,
3151   * model-definition, asset-collection, module-definition)</b><br>
3152   * Type: <b>token</b><br>
3153   * Path: <b>Library.type</b><br>
3154   * </p>
3155   */
3156  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3157      SP_TYPE);
3158
3159  /**
3160   * Search parameter: <b>version</b>
3161   * <p>
3162   * Description: <b>The business version of the library</b><br>
3163   * Type: <b>token</b><br>
3164   * Path: <b>Library.version</b><br>
3165   * </p>
3166   */
3167  @SearchParamDefinition(name = "version", path = "Library.version", description = "The business version of the library", type = "token")
3168  public static final String SP_VERSION = "version";
3169  /**
3170   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3171   * <p>
3172   * Description: <b>The business version of the library</b><br>
3173   * Type: <b>token</b><br>
3174   * Path: <b>Library.version</b><br>
3175   * </p>
3176   */
3177  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3178      SP_VERSION);
3179
3180  /**
3181   * Search parameter: <b>url</b>
3182   * <p>
3183   * Description: <b>The uri that identifies the library</b><br>
3184   * Type: <b>uri</b><br>
3185   * Path: <b>Library.url</b><br>
3186   * </p>
3187   */
3188  @SearchParamDefinition(name = "url", path = "Library.url", description = "The uri that identifies the library", type = "uri")
3189  public static final String SP_URL = "url";
3190  /**
3191   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3192   * <p>
3193   * Description: <b>The uri that identifies the library</b><br>
3194   * Type: <b>uri</b><br>
3195   * Path: <b>Library.url</b><br>
3196   * </p>
3197   */
3198  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3199
3200  /**
3201   * Search parameter: <b>context-quantity</b>
3202   * <p>
3203   * Description: <b>A quantity- or range-valued use context assigned to the
3204   * library</b><br>
3205   * Type: <b>quantity</b><br>
3206   * Path: <b>Library.useContext.valueQuantity,
3207   * Library.useContext.valueRange</b><br>
3208   * </p>
3209   */
3210  @SearchParamDefinition(name = "context-quantity", path = "(Library.useContext.value as Quantity) | (Library.useContext.value as Range)", description = "A quantity- or range-valued use context assigned to the library", type = "quantity")
3211  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
3212  /**
3213   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
3214   * <p>
3215   * Description: <b>A quantity- or range-valued use context assigned to the
3216   * library</b><br>
3217   * Type: <b>quantity</b><br>
3218   * Path: <b>Library.useContext.valueQuantity,
3219   * Library.useContext.valueRange</b><br>
3220   * </p>
3221   */
3222  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(
3223      SP_CONTEXT_QUANTITY);
3224
3225  /**
3226   * Search parameter: <b>effective</b>
3227   * <p>
3228   * Description: <b>The time during which the library is intended to be in
3229   * use</b><br>
3230   * Type: <b>date</b><br>
3231   * Path: <b>Library.effectivePeriod</b><br>
3232   * </p>
3233   */
3234  @SearchParamDefinition(name = "effective", path = "Library.effectivePeriod", description = "The time during which the library is intended to be in use", type = "date")
3235  public static final String SP_EFFECTIVE = "effective";
3236  /**
3237   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
3238   * <p>
3239   * Description: <b>The time during which the library is intended to be in
3240   * use</b><br>
3241   * Type: <b>date</b><br>
3242   * Path: <b>Library.effectivePeriod</b><br>
3243   * </p>
3244   */
3245  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(
3246      SP_EFFECTIVE);
3247
3248  /**
3249   * Search parameter: <b>depends-on</b>
3250   * <p>
3251   * Description: <b>What resource is being referenced</b><br>
3252   * Type: <b>reference</b><br>
3253   * Path: <b>Library.relatedArtifact.resource</b><br>
3254   * </p>
3255   */
3256  @SearchParamDefinition(name = "depends-on", path = "Library.relatedArtifact.where(type='depends-on').resource", description = "What resource is being referenced", type = "reference")
3257  public static final String SP_DEPENDS_ON = "depends-on";
3258  /**
3259   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
3260   * <p>
3261   * Description: <b>What resource is being referenced</b><br>
3262   * Type: <b>reference</b><br>
3263   * Path: <b>Library.relatedArtifact.resource</b><br>
3264   * </p>
3265   */
3266  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
3267      SP_DEPENDS_ON);
3268
3269  /**
3270   * Constant for fluent queries to be used to add include statements. Specifies
3271   * the path value of "<b>Library:depends-on</b>".
3272   */
3273  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include(
3274      "Library:depends-on").toLocked();
3275
3276  /**
3277   * Search parameter: <b>name</b>
3278   * <p>
3279   * Description: <b>Computationally friendly name of the library</b><br>
3280   * Type: <b>string</b><br>
3281   * Path: <b>Library.name</b><br>
3282   * </p>
3283   */
3284  @SearchParamDefinition(name = "name", path = "Library.name", description = "Computationally friendly name of the library", type = "string")
3285  public static final String SP_NAME = "name";
3286  /**
3287   * <b>Fluent Client</b> search parameter constant for <b>name</b>
3288   * <p>
3289   * Description: <b>Computationally friendly name of the library</b><br>
3290   * Type: <b>string</b><br>
3291   * Path: <b>Library.name</b><br>
3292   * </p>
3293   */
3294  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(
3295      SP_NAME);
3296
3297  /**
3298   * Search parameter: <b>context</b>
3299   * <p>
3300   * Description: <b>A use context assigned to the library</b><br>
3301   * Type: <b>token</b><br>
3302   * Path: <b>Library.useContext.valueCodeableConcept</b><br>
3303   * </p>
3304   */
3305  @SearchParamDefinition(name = "context", path = "(Library.useContext.value as CodeableConcept)", description = "A use context assigned to the library", type = "token")
3306  public static final String SP_CONTEXT = "context";
3307  /**
3308   * <b>Fluent Client</b> search parameter constant for <b>context</b>
3309   * <p>
3310   * Description: <b>A use context assigned to the library</b><br>
3311   * Type: <b>token</b><br>
3312   * Path: <b>Library.useContext.valueCodeableConcept</b><br>
3313   * </p>
3314   */
3315  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3316      SP_CONTEXT);
3317
3318  /**
3319   * Search parameter: <b>publisher</b>
3320   * <p>
3321   * Description: <b>Name of the publisher of the library</b><br>
3322   * Type: <b>string</b><br>
3323   * Path: <b>Library.publisher</b><br>
3324   * </p>
3325   */
3326  @SearchParamDefinition(name = "publisher", path = "Library.publisher", description = "Name of the publisher of the library", type = "string")
3327  public static final String SP_PUBLISHER = "publisher";
3328  /**
3329   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3330   * <p>
3331   * Description: <b>Name of the publisher of the library</b><br>
3332   * Type: <b>string</b><br>
3333   * Path: <b>Library.publisher</b><br>
3334   * </p>
3335   */
3336  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(
3337      SP_PUBLISHER);
3338
3339  /**
3340   * Search parameter: <b>topic</b>
3341   * <p>
3342   * Description: <b>Topics associated with the module</b><br>
3343   * Type: <b>token</b><br>
3344   * Path: <b>Library.topic</b><br>
3345   * </p>
3346   */
3347  @SearchParamDefinition(name = "topic", path = "Library.topic", description = "Topics associated with the module", type = "token")
3348  public static final String SP_TOPIC = "topic";
3349  /**
3350   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
3351   * <p>
3352   * Description: <b>Topics associated with the module</b><br>
3353   * Type: <b>token</b><br>
3354   * Path: <b>Library.topic</b><br>
3355   * </p>
3356   */
3357  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3358      SP_TOPIC);
3359
3360  /**
3361   * Search parameter: <b>content-type</b>
3362   * <p>
3363   * Description: <b>The type of content in the library (e.g. text/cql)</b><br>
3364   * Type: <b>token</b><br>
3365   * Path: <b>Library.content.contentType</b><br>
3366   * </p>
3367   */
3368  @SearchParamDefinition(name = "content-type", path = "Library.content.contentType", description = "The type of content in the library (e.g. text/cql)", type = "token")
3369  public static final String SP_CONTENT_TYPE = "content-type";
3370  /**
3371   * <b>Fluent Client</b> search parameter constant for <b>content-type</b>
3372   * <p>
3373   * Description: <b>The type of content in the library (e.g. text/cql)</b><br>
3374   * Type: <b>token</b><br>
3375   * Path: <b>Library.content.contentType</b><br>
3376   * </p>
3377   */
3378  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTENT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3379      SP_CONTENT_TYPE);
3380
3381  /**
3382   * Search parameter: <b>context-type-quantity</b>
3383   * <p>
3384   * Description: <b>A use context type and quantity- or range-based value
3385   * assigned to the library</b><br>
3386   * Type: <b>composite</b><br>
3387   * Path: <b></b><br>
3388   * </p>
3389   */
3390  @SearchParamDefinition(name = "context-type-quantity", path = "Library.useContext", description = "A use context type and quantity- or range-based value assigned to the library", type = "composite", compositeOf = {
3391      "context-type", "context-quantity" })
3392  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
3393  /**
3394   * <b>Fluent Client</b> search parameter constant for
3395   * <b>context-type-quantity</b>
3396   * <p>
3397   * Description: <b>A use context type and quantity- or range-based value
3398   * assigned to the library</b><br>
3399   * Type: <b>composite</b><br>
3400   * Path: <b></b><br>
3401   * </p>
3402   */
3403  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(
3404      SP_CONTEXT_TYPE_QUANTITY);
3405
3406  /**
3407   * Search parameter: <b>status</b>
3408   * <p>
3409   * Description: <b>The current status of the library</b><br>
3410   * Type: <b>token</b><br>
3411   * Path: <b>Library.status</b><br>
3412   * </p>
3413   */
3414  @SearchParamDefinition(name = "status", path = "Library.status", description = "The current status of the library", type = "token")
3415  public static final String SP_STATUS = "status";
3416  /**
3417   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3418   * <p>
3419   * Description: <b>The current status of the library</b><br>
3420   * Type: <b>token</b><br>
3421   * Path: <b>Library.status</b><br>
3422   * </p>
3423   */
3424  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(
3425      SP_STATUS);
3426
3427}