001package org.hl7.fhir.dstu2016may.model;
002
003import java.math.BigDecimal;
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
035import java.util.ArrayList;
036import java.util.List;
037
038import org.hl7.fhir.exceptions.FHIRException;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.utilities.Utilities;
041
042import ca.uhn.fhir.model.api.annotation.Block;
043import ca.uhn.fhir.model.api.annotation.Child;
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 * Variation and Sequence data.
049 */
050@ResourceDef(name="Sequence", profile="http://hl7.org/fhir/Profile/Sequence")
051public class Sequence extends DomainResource {
052
053    public enum SequenceType {
054        /**
055         * Amino acid sequence
056         */
057        AA, 
058        /**
059         * DNA Sequence
060         */
061        DNA, 
062        /**
063         * RNA Sequence
064         */
065        RNA, 
066        /**
067         * added to help the parsers
068         */
069        NULL;
070        public static SequenceType fromCode(String codeString) throws FHIRException {
071            if (codeString == null || "".equals(codeString))
072                return null;
073        if ("AA".equals(codeString))
074          return AA;
075        if ("DNA".equals(codeString))
076          return DNA;
077        if ("RNA".equals(codeString))
078          return RNA;
079        throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case AA: return "AA";
084            case DNA: return "DNA";
085            case RNA: return "RNA";
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case AA: return "http://hl7.org/fhir/sequence-type";
092            case DNA: return "http://hl7.org/fhir/sequence-type";
093            case RNA: return "http://hl7.org/fhir/sequence-type";
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case AA: return "Amino acid sequence";
100            case DNA: return "DNA Sequence";
101            case RNA: return "RNA Sequence";
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case AA: return "AA Sequence";
108            case DNA: return "DNA Sequence";
109            case RNA: return "RNA Sequence";
110            default: return "?";
111          }
112        }
113    }
114
115  public static class SequenceTypeEnumFactory implements EnumFactory<SequenceType> {
116    public SequenceType fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("AA".equals(codeString))
121          return SequenceType.AA;
122        if ("DNA".equals(codeString))
123          return SequenceType.DNA;
124        if ("RNA".equals(codeString))
125          return SequenceType.RNA;
126        throw new IllegalArgumentException("Unknown SequenceType code '"+codeString+"'");
127        }
128        public Enumeration<SequenceType> fromType(Base code) throws FHIRException {
129          if (code == null || code.isEmpty())
130            return null;
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return null;
134        if ("AA".equals(codeString))
135          return new Enumeration<SequenceType>(this, SequenceType.AA);
136        if ("DNA".equals(codeString))
137          return new Enumeration<SequenceType>(this, SequenceType.DNA);
138        if ("RNA".equals(codeString))
139          return new Enumeration<SequenceType>(this, SequenceType.RNA);
140        throw new FHIRException("Unknown SequenceType code '"+codeString+"'");
141        }
142    public String toCode(SequenceType code) {
143      if (code == SequenceType.AA)
144        return "AA";
145      if (code == SequenceType.DNA)
146        return "DNA";
147      if (code == SequenceType.RNA)
148        return "RNA";
149      return "?";
150      }
151    public String toSystem(SequenceType code) {
152      return code.getSystem();
153      }
154    }
155
156    @Block()
157    public static class SequenceReferenceSeqComponent extends BackboneElement implements IBaseBackboneElement {
158        /**
159         * The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise,  NCBI-Gene code system should be used.
160         */
161        @Child(name = "chromosome", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
162        @Description(shortDefinition="The chromosome containing the genetic finding", formalDefinition="The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise,  NCBI-Gene code system should be used." )
163        protected CodeableConcept chromosome;
164
165        /**
166         * The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.
167         */
168        @Child(name = "genomeBuild", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
169        @Description(shortDefinition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'", formalDefinition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used." )
170        protected StringType genomeBuild;
171
172        /**
173         * Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.
174         */
175        @Child(name = "referenceSeqId", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true)
176        @Description(shortDefinition="Reference identifier", formalDefinition="Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences." )
177        protected CodeableConcept referenceSeqId;
178
179        /**
180         * A Pointer to another Sequence entity as refence sequence.
181         */
182        @Child(name = "referenceSeqPointer", type = {Sequence.class}, order=4, min=0, max=1, modifier=false, summary=true)
183        @Description(shortDefinition="A Pointer to another Sequence entity as refence sequence", formalDefinition="A Pointer to another Sequence entity as refence sequence." )
184        protected Reference referenceSeqPointer;
185
186        /**
187         * The actual object that is the target of the reference (A Pointer to another Sequence entity as refence sequence.)
188         */
189        protected Sequence referenceSeqPointerTarget;
190
191        /**
192         * A Reference Sequence string.
193         */
194        @Child(name = "referenceSeqString", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
195        @Description(shortDefinition="A Reference Sequence string", formalDefinition="A Reference Sequence string." )
196        protected StringType referenceSeqString;
197
198        /**
199         * 0-based start position (inclusive) of the window on the reference sequence.
200         */
201        @Child(name = "windowStart", type = {IntegerType.class}, order=6, min=1, max=1, modifier=false, summary=true)
202        @Description(shortDefinition="0-based start position (inclusive) of the window on the  reference sequence", formalDefinition="0-based start position (inclusive) of the window on the reference sequence." )
203        protected IntegerType windowStart;
204
205        /**
206         * 0-based end position (exclusive) of the window on the reference sequence.
207         */
208        @Child(name = "windowEnd", type = {IntegerType.class}, order=7, min=1, max=1, modifier=false, summary=true)
209        @Description(shortDefinition="0-based end position (exclusive) of the window on the reference sequence", formalDefinition="0-based end position (exclusive) of the window on the reference sequence." )
210        protected IntegerType windowEnd;
211
212        private static final long serialVersionUID = -165922935L;
213
214    /**
215     * Constructor
216     */
217      public SequenceReferenceSeqComponent() {
218        super();
219      }
220
221    /**
222     * Constructor
223     */
224      public SequenceReferenceSeqComponent(CodeableConcept referenceSeqId, IntegerType windowStart, IntegerType windowEnd) {
225        super();
226        this.referenceSeqId = referenceSeqId;
227        this.windowStart = windowStart;
228        this.windowEnd = windowEnd;
229      }
230
231        /**
232         * @return {@link #chromosome} (The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise,  NCBI-Gene code system should be used.)
233         */
234        public CodeableConcept getChromosome() { 
235          if (this.chromosome == null)
236            if (Configuration.errorOnAutoCreate())
237              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.chromosome");
238            else if (Configuration.doAutoCreate())
239              this.chromosome = new CodeableConcept(); // cc
240          return this.chromosome;
241        }
242
243        public boolean hasChromosome() { 
244          return this.chromosome != null && !this.chromosome.isEmpty();
245        }
246
247        /**
248         * @param value {@link #chromosome} (The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise,  NCBI-Gene code system should be used.)
249         */
250        public SequenceReferenceSeqComponent setChromosome(CodeableConcept value) { 
251          this.chromosome = value;
252          return this;
253        }
254
255        /**
256         * @return {@link #genomeBuild} (The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.). This is the underlying object with id, value and extensions. The accessor "getGenomeBuild" gives direct access to the value
257         */
258        public StringType getGenomeBuildElement() { 
259          if (this.genomeBuild == null)
260            if (Configuration.errorOnAutoCreate())
261              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.genomeBuild");
262            else if (Configuration.doAutoCreate())
263              this.genomeBuild = new StringType(); // bb
264          return this.genomeBuild;
265        }
266
267        public boolean hasGenomeBuildElement() { 
268          return this.genomeBuild != null && !this.genomeBuild.isEmpty();
269        }
270
271        public boolean hasGenomeBuild() { 
272          return this.genomeBuild != null && !this.genomeBuild.isEmpty();
273        }
274
275        /**
276         * @param value {@link #genomeBuild} (The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.). This is the underlying object with id, value and extensions. The accessor "getGenomeBuild" gives direct access to the value
277         */
278        public SequenceReferenceSeqComponent setGenomeBuildElement(StringType value) { 
279          this.genomeBuild = value;
280          return this;
281        }
282
283        /**
284         * @return The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.
285         */
286        public String getGenomeBuild() { 
287          return this.genomeBuild == null ? null : this.genomeBuild.getValue();
288        }
289
290        /**
291         * @param value The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.
292         */
293        public SequenceReferenceSeqComponent setGenomeBuild(String value) { 
294          if (Utilities.noString(value))
295            this.genomeBuild = null;
296          else {
297            if (this.genomeBuild == null)
298              this.genomeBuild = new StringType();
299            this.genomeBuild.setValue(value);
300          }
301          return this;
302        }
303
304        /**
305         * @return {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.)
306         */
307        public CodeableConcept getReferenceSeqId() { 
308          if (this.referenceSeqId == null)
309            if (Configuration.errorOnAutoCreate())
310              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqId");
311            else if (Configuration.doAutoCreate())
312              this.referenceSeqId = new CodeableConcept(); // cc
313          return this.referenceSeqId;
314        }
315
316        public boolean hasReferenceSeqId() { 
317          return this.referenceSeqId != null && !this.referenceSeqId.isEmpty();
318        }
319
320        /**
321         * @param value {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.)
322         */
323        public SequenceReferenceSeqComponent setReferenceSeqId(CodeableConcept value) { 
324          this.referenceSeqId = value;
325          return this;
326        }
327
328        /**
329         * @return {@link #referenceSeqPointer} (A Pointer to another Sequence entity as refence sequence.)
330         */
331        public Reference getReferenceSeqPointer() { 
332          if (this.referenceSeqPointer == null)
333            if (Configuration.errorOnAutoCreate())
334              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqPointer");
335            else if (Configuration.doAutoCreate())
336              this.referenceSeqPointer = new Reference(); // cc
337          return this.referenceSeqPointer;
338        }
339
340        public boolean hasReferenceSeqPointer() { 
341          return this.referenceSeqPointer != null && !this.referenceSeqPointer.isEmpty();
342        }
343
344        /**
345         * @param value {@link #referenceSeqPointer} (A Pointer to another Sequence entity as refence sequence.)
346         */
347        public SequenceReferenceSeqComponent setReferenceSeqPointer(Reference value) { 
348          this.referenceSeqPointer = value;
349          return this;
350        }
351
352        /**
353         * @return {@link #referenceSeqPointer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A Pointer to another Sequence entity as refence sequence.)
354         */
355        public Sequence getReferenceSeqPointerTarget() { 
356          if (this.referenceSeqPointerTarget == null)
357            if (Configuration.errorOnAutoCreate())
358              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqPointer");
359            else if (Configuration.doAutoCreate())
360              this.referenceSeqPointerTarget = new Sequence(); // aa
361          return this.referenceSeqPointerTarget;
362        }
363
364        /**
365         * @param value {@link #referenceSeqPointer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A Pointer to another Sequence entity as refence sequence.)
366         */
367        public SequenceReferenceSeqComponent setReferenceSeqPointerTarget(Sequence value) { 
368          this.referenceSeqPointerTarget = value;
369          return this;
370        }
371
372        /**
373         * @return {@link #referenceSeqString} (A Reference Sequence string.). This is the underlying object with id, value and extensions. The accessor "getReferenceSeqString" gives direct access to the value
374         */
375        public StringType getReferenceSeqStringElement() { 
376          if (this.referenceSeqString == null)
377            if (Configuration.errorOnAutoCreate())
378              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqString");
379            else if (Configuration.doAutoCreate())
380              this.referenceSeqString = new StringType(); // bb
381          return this.referenceSeqString;
382        }
383
384        public boolean hasReferenceSeqStringElement() { 
385          return this.referenceSeqString != null && !this.referenceSeqString.isEmpty();
386        }
387
388        public boolean hasReferenceSeqString() { 
389          return this.referenceSeqString != null && !this.referenceSeqString.isEmpty();
390        }
391
392        /**
393         * @param value {@link #referenceSeqString} (A Reference Sequence string.). This is the underlying object with id, value and extensions. The accessor "getReferenceSeqString" gives direct access to the value
394         */
395        public SequenceReferenceSeqComponent setReferenceSeqStringElement(StringType value) { 
396          this.referenceSeqString = value;
397          return this;
398        }
399
400        /**
401         * @return A Reference Sequence string.
402         */
403        public String getReferenceSeqString() { 
404          return this.referenceSeqString == null ? null : this.referenceSeqString.getValue();
405        }
406
407        /**
408         * @param value A Reference Sequence string.
409         */
410        public SequenceReferenceSeqComponent setReferenceSeqString(String value) { 
411          if (Utilities.noString(value))
412            this.referenceSeqString = null;
413          else {
414            if (this.referenceSeqString == null)
415              this.referenceSeqString = new StringType();
416            this.referenceSeqString.setValue(value);
417          }
418          return this;
419        }
420
421        /**
422         * @return {@link #windowStart} (0-based start position (inclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowStart" gives direct access to the value
423         */
424        public IntegerType getWindowStartElement() { 
425          if (this.windowStart == null)
426            if (Configuration.errorOnAutoCreate())
427              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.windowStart");
428            else if (Configuration.doAutoCreate())
429              this.windowStart = new IntegerType(); // bb
430          return this.windowStart;
431        }
432
433        public boolean hasWindowStartElement() { 
434          return this.windowStart != null && !this.windowStart.isEmpty();
435        }
436
437        public boolean hasWindowStart() { 
438          return this.windowStart != null && !this.windowStart.isEmpty();
439        }
440
441        /**
442         * @param value {@link #windowStart} (0-based start position (inclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowStart" gives direct access to the value
443         */
444        public SequenceReferenceSeqComponent setWindowStartElement(IntegerType value) { 
445          this.windowStart = value;
446          return this;
447        }
448
449        /**
450         * @return 0-based start position (inclusive) of the window on the reference sequence.
451         */
452        public int getWindowStart() { 
453          return this.windowStart == null || this.windowStart.isEmpty() ? 0 : this.windowStart.getValue();
454        }
455
456        /**
457         * @param value 0-based start position (inclusive) of the window on the reference sequence.
458         */
459        public SequenceReferenceSeqComponent setWindowStart(int value) { 
460            if (this.windowStart == null)
461              this.windowStart = new IntegerType();
462            this.windowStart.setValue(value);
463          return this;
464        }
465
466        /**
467         * @return {@link #windowEnd} (0-based end position (exclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value
468         */
469        public IntegerType getWindowEndElement() { 
470          if (this.windowEnd == null)
471            if (Configuration.errorOnAutoCreate())
472              throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.windowEnd");
473            else if (Configuration.doAutoCreate())
474              this.windowEnd = new IntegerType(); // bb
475          return this.windowEnd;
476        }
477
478        public boolean hasWindowEndElement() { 
479          return this.windowEnd != null && !this.windowEnd.isEmpty();
480        }
481
482        public boolean hasWindowEnd() { 
483          return this.windowEnd != null && !this.windowEnd.isEmpty();
484        }
485
486        /**
487         * @param value {@link #windowEnd} (0-based end position (exclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value
488         */
489        public SequenceReferenceSeqComponent setWindowEndElement(IntegerType value) { 
490          this.windowEnd = value;
491          return this;
492        }
493
494        /**
495         * @return 0-based end position (exclusive) of the window on the reference sequence.
496         */
497        public int getWindowEnd() { 
498          return this.windowEnd == null || this.windowEnd.isEmpty() ? 0 : this.windowEnd.getValue();
499        }
500
501        /**
502         * @param value 0-based end position (exclusive) of the window on the reference sequence.
503         */
504        public SequenceReferenceSeqComponent setWindowEnd(int value) { 
505            if (this.windowEnd == null)
506              this.windowEnd = new IntegerType();
507            this.windowEnd.setValue(value);
508          return this;
509        }
510
511        protected void listChildren(List<Property> childrenList) {
512          super.listChildren(childrenList);
513          childrenList.add(new Property("chromosome", "CodeableConcept", "The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise,  NCBI-Gene code system should be used.", 0, java.lang.Integer.MAX_VALUE, chromosome));
514          childrenList.add(new Property("genomeBuild", "string", "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used.", 0, java.lang.Integer.MAX_VALUE, genomeBuild));
515          childrenList.add(new Property("referenceSeqId", "CodeableConcept", "Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.", 0, java.lang.Integer.MAX_VALUE, referenceSeqId));
516          childrenList.add(new Property("referenceSeqPointer", "Reference(Sequence)", "A Pointer to another Sequence entity as refence sequence.", 0, java.lang.Integer.MAX_VALUE, referenceSeqPointer));
517          childrenList.add(new Property("referenceSeqString", "string", "A Reference Sequence string.", 0, java.lang.Integer.MAX_VALUE, referenceSeqString));
518          childrenList.add(new Property("windowStart", "integer", "0-based start position (inclusive) of the window on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, windowStart));
519          childrenList.add(new Property("windowEnd", "integer", "0-based end position (exclusive) of the window on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, windowEnd));
520        }
521
522      @Override
523      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
524        switch (hash) {
525        case -1499470472: /*chromosome*/ return this.chromosome == null ? new Base[0] : new Base[] {this.chromosome}; // CodeableConcept
526        case 1061239735: /*genomeBuild*/ return this.genomeBuild == null ? new Base[0] : new Base[] {this.genomeBuild}; // StringType
527        case -1911500465: /*referenceSeqId*/ return this.referenceSeqId == null ? new Base[0] : new Base[] {this.referenceSeqId}; // CodeableConcept
528        case 1923414665: /*referenceSeqPointer*/ return this.referenceSeqPointer == null ? new Base[0] : new Base[] {this.referenceSeqPointer}; // Reference
529        case -1648301499: /*referenceSeqString*/ return this.referenceSeqString == null ? new Base[0] : new Base[] {this.referenceSeqString}; // StringType
530        case 1903685202: /*windowStart*/ return this.windowStart == null ? new Base[0] : new Base[] {this.windowStart}; // IntegerType
531        case -217026869: /*windowEnd*/ return this.windowEnd == null ? new Base[0] : new Base[] {this.windowEnd}; // IntegerType
532        default: return super.getProperty(hash, name, checkValid);
533        }
534
535      }
536
537      @Override
538      public void setProperty(int hash, String name, Base value) throws FHIRException {
539        switch (hash) {
540        case -1499470472: // chromosome
541          this.chromosome = castToCodeableConcept(value); // CodeableConcept
542          break;
543        case 1061239735: // genomeBuild
544          this.genomeBuild = castToString(value); // StringType
545          break;
546        case -1911500465: // referenceSeqId
547          this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept
548          break;
549        case 1923414665: // referenceSeqPointer
550          this.referenceSeqPointer = castToReference(value); // Reference
551          break;
552        case -1648301499: // referenceSeqString
553          this.referenceSeqString = castToString(value); // StringType
554          break;
555        case 1903685202: // windowStart
556          this.windowStart = castToInteger(value); // IntegerType
557          break;
558        case -217026869: // windowEnd
559          this.windowEnd = castToInteger(value); // IntegerType
560          break;
561        default: super.setProperty(hash, name, value);
562        }
563
564      }
565
566      @Override
567      public void setProperty(String name, Base value) throws FHIRException {
568        if (name.equals("chromosome"))
569          this.chromosome = castToCodeableConcept(value); // CodeableConcept
570        else if (name.equals("genomeBuild"))
571          this.genomeBuild = castToString(value); // StringType
572        else if (name.equals("referenceSeqId"))
573          this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept
574        else if (name.equals("referenceSeqPointer"))
575          this.referenceSeqPointer = castToReference(value); // Reference
576        else if (name.equals("referenceSeqString"))
577          this.referenceSeqString = castToString(value); // StringType
578        else if (name.equals("windowStart"))
579          this.windowStart = castToInteger(value); // IntegerType
580        else if (name.equals("windowEnd"))
581          this.windowEnd = castToInteger(value); // IntegerType
582        else
583          super.setProperty(name, value);
584      }
585
586      @Override
587      public Base makeProperty(int hash, String name) throws FHIRException {
588        switch (hash) {
589        case -1499470472:  return getChromosome(); // CodeableConcept
590        case 1061239735: throw new FHIRException("Cannot make property genomeBuild as it is not a complex type"); // StringType
591        case -1911500465:  return getReferenceSeqId(); // CodeableConcept
592        case 1923414665:  return getReferenceSeqPointer(); // Reference
593        case -1648301499: throw new FHIRException("Cannot make property referenceSeqString as it is not a complex type"); // StringType
594        case 1903685202: throw new FHIRException("Cannot make property windowStart as it is not a complex type"); // IntegerType
595        case -217026869: throw new FHIRException("Cannot make property windowEnd as it is not a complex type"); // IntegerType
596        default: return super.makeProperty(hash, name);
597        }
598
599      }
600
601      @Override
602      public Base addChild(String name) throws FHIRException {
603        if (name.equals("chromosome")) {
604          this.chromosome = new CodeableConcept();
605          return this.chromosome;
606        }
607        else if (name.equals("genomeBuild")) {
608          throw new FHIRException("Cannot call addChild on a primitive type Sequence.genomeBuild");
609        }
610        else if (name.equals("referenceSeqId")) {
611          this.referenceSeqId = new CodeableConcept();
612          return this.referenceSeqId;
613        }
614        else if (name.equals("referenceSeqPointer")) {
615          this.referenceSeqPointer = new Reference();
616          return this.referenceSeqPointer;
617        }
618        else if (name.equals("referenceSeqString")) {
619          throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceSeqString");
620        }
621        else if (name.equals("windowStart")) {
622          throw new FHIRException("Cannot call addChild on a primitive type Sequence.windowStart");
623        }
624        else if (name.equals("windowEnd")) {
625          throw new FHIRException("Cannot call addChild on a primitive type Sequence.windowEnd");
626        }
627        else
628          return super.addChild(name);
629      }
630
631      public SequenceReferenceSeqComponent copy() {
632        SequenceReferenceSeqComponent dst = new SequenceReferenceSeqComponent();
633        copyValues(dst);
634        dst.chromosome = chromosome == null ? null : chromosome.copy();
635        dst.genomeBuild = genomeBuild == null ? null : genomeBuild.copy();
636        dst.referenceSeqId = referenceSeqId == null ? null : referenceSeqId.copy();
637        dst.referenceSeqPointer = referenceSeqPointer == null ? null : referenceSeqPointer.copy();
638        dst.referenceSeqString = referenceSeqString == null ? null : referenceSeqString.copy();
639        dst.windowStart = windowStart == null ? null : windowStart.copy();
640        dst.windowEnd = windowEnd == null ? null : windowEnd.copy();
641        return dst;
642      }
643
644      @Override
645      public boolean equalsDeep(Base other) {
646        if (!super.equalsDeep(other))
647          return false;
648        if (!(other instanceof SequenceReferenceSeqComponent))
649          return false;
650        SequenceReferenceSeqComponent o = (SequenceReferenceSeqComponent) other;
651        return compareDeep(chromosome, o.chromosome, true) && compareDeep(genomeBuild, o.genomeBuild, true)
652           && compareDeep(referenceSeqId, o.referenceSeqId, true) && compareDeep(referenceSeqPointer, o.referenceSeqPointer, true)
653           && compareDeep(referenceSeqString, o.referenceSeqString, true) && compareDeep(windowStart, o.windowStart, true)
654           && compareDeep(windowEnd, o.windowEnd, true);
655      }
656
657      @Override
658      public boolean equalsShallow(Base other) {
659        if (!super.equalsShallow(other))
660          return false;
661        if (!(other instanceof SequenceReferenceSeqComponent))
662          return false;
663        SequenceReferenceSeqComponent o = (SequenceReferenceSeqComponent) other;
664        return compareValues(genomeBuild, o.genomeBuild, true) && compareValues(referenceSeqString, o.referenceSeqString, true)
665           && compareValues(windowStart, o.windowStart, true) && compareValues(windowEnd, o.windowEnd, true);
666      }
667
668      public boolean isEmpty() {
669        return super.isEmpty() && (chromosome == null || chromosome.isEmpty()) && (genomeBuild == null || genomeBuild.isEmpty())
670           && (referenceSeqId == null || referenceSeqId.isEmpty()) && (referenceSeqPointer == null || referenceSeqPointer.isEmpty())
671           && (referenceSeqString == null || referenceSeqString.isEmpty()) && (windowStart == null || windowStart.isEmpty())
672           && (windowEnd == null || windowEnd.isEmpty());
673      }
674
675  public String fhirType() {
676    return "Sequence.referenceSeq";
677
678  }
679
680  }
681
682    @Block()
683    public static class SequenceVariationComponent extends BackboneElement implements IBaseBackboneElement {
684        /**
685         * 0-based start position (inclusive) of the variation on the  reference sequence.
686         */
687        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
688        @Description(shortDefinition="0-based start position (inclusive) of the variation on the  reference sequence", formalDefinition="0-based start position (inclusive) of the variation on the  reference sequence." )
689        protected IntegerType start;
690
691        /**
692         * 0-based end position (exclusive) of the variation on the reference sequence.
693         */
694        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
695        @Description(shortDefinition="0-based end position (exclusive) of the variation on the reference sequence", formalDefinition="0-based end position (exclusive) of the variation on the reference sequence." )
696        protected IntegerType end;
697
698        /**
699         * Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.
700         */
701        @Child(name = "observedAllele", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
702        @Description(shortDefinition="Nucleotide(s)/amino acids from start position to stop position of observed variation", formalDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand." )
703        protected StringType observedAllele;
704
705        /**
706         * Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.
707         */
708        @Child(name = "referenceAllele", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
709        @Description(shortDefinition="Nucleotide(s)/amino acids from start position to stop position of reference variation", formalDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand." )
710        protected StringType referenceAllele;
711
712        /**
713         * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
714         */
715        @Child(name = "cigar", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
716        @Description(shortDefinition="Extended CIGAR string for aligning the sequence with reference bases", formalDefinition="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm)." )
717        protected StringType cigar;
718
719        private static final long serialVersionUID = 913298829L;
720
721    /**
722     * Constructor
723     */
724      public SequenceVariationComponent() {
725        super();
726      }
727
728        /**
729         * @return {@link #start} (0-based start position (inclusive) of the variation on the  reference sequence.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
730         */
731        public IntegerType getStartElement() { 
732          if (this.start == null)
733            if (Configuration.errorOnAutoCreate())
734              throw new Error("Attempt to auto-create SequenceVariationComponent.start");
735            else if (Configuration.doAutoCreate())
736              this.start = new IntegerType(); // bb
737          return this.start;
738        }
739
740        public boolean hasStartElement() { 
741          return this.start != null && !this.start.isEmpty();
742        }
743
744        public boolean hasStart() { 
745          return this.start != null && !this.start.isEmpty();
746        }
747
748        /**
749         * @param value {@link #start} (0-based start position (inclusive) of the variation on the  reference sequence.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
750         */
751        public SequenceVariationComponent setStartElement(IntegerType value) { 
752          this.start = value;
753          return this;
754        }
755
756        /**
757         * @return 0-based start position (inclusive) of the variation on the  reference sequence.
758         */
759        public int getStart() { 
760          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
761        }
762
763        /**
764         * @param value 0-based start position (inclusive) of the variation on the  reference sequence.
765         */
766        public SequenceVariationComponent setStart(int value) { 
767            if (this.start == null)
768              this.start = new IntegerType();
769            this.start.setValue(value);
770          return this;
771        }
772
773        /**
774         * @return {@link #end} (0-based end position (exclusive) of the variation on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
775         */
776        public IntegerType getEndElement() { 
777          if (this.end == null)
778            if (Configuration.errorOnAutoCreate())
779              throw new Error("Attempt to auto-create SequenceVariationComponent.end");
780            else if (Configuration.doAutoCreate())
781              this.end = new IntegerType(); // bb
782          return this.end;
783        }
784
785        public boolean hasEndElement() { 
786          return this.end != null && !this.end.isEmpty();
787        }
788
789        public boolean hasEnd() { 
790          return this.end != null && !this.end.isEmpty();
791        }
792
793        /**
794         * @param value {@link #end} (0-based end position (exclusive) of the variation on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
795         */
796        public SequenceVariationComponent setEndElement(IntegerType value) { 
797          this.end = value;
798          return this;
799        }
800
801        /**
802         * @return 0-based end position (exclusive) of the variation on the reference sequence.
803         */
804        public int getEnd() { 
805          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
806        }
807
808        /**
809         * @param value 0-based end position (exclusive) of the variation on the reference sequence.
810         */
811        public SequenceVariationComponent setEnd(int value) { 
812            if (this.end == null)
813              this.end = new IntegerType();
814            this.end.setValue(value);
815          return this;
816        }
817
818        /**
819         * @return {@link #observedAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getObservedAllele" gives direct access to the value
820         */
821        public StringType getObservedAlleleElement() { 
822          if (this.observedAllele == null)
823            if (Configuration.errorOnAutoCreate())
824              throw new Error("Attempt to auto-create SequenceVariationComponent.observedAllele");
825            else if (Configuration.doAutoCreate())
826              this.observedAllele = new StringType(); // bb
827          return this.observedAllele;
828        }
829
830        public boolean hasObservedAlleleElement() { 
831          return this.observedAllele != null && !this.observedAllele.isEmpty();
832        }
833
834        public boolean hasObservedAllele() { 
835          return this.observedAllele != null && !this.observedAllele.isEmpty();
836        }
837
838        /**
839         * @param value {@link #observedAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getObservedAllele" gives direct access to the value
840         */
841        public SequenceVariationComponent setObservedAlleleElement(StringType value) { 
842          this.observedAllele = value;
843          return this;
844        }
845
846        /**
847         * @return Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.
848         */
849        public String getObservedAllele() { 
850          return this.observedAllele == null ? null : this.observedAllele.getValue();
851        }
852
853        /**
854         * @param value Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.
855         */
856        public SequenceVariationComponent setObservedAllele(String value) { 
857          if (Utilities.noString(value))
858            this.observedAllele = null;
859          else {
860            if (this.observedAllele == null)
861              this.observedAllele = new StringType();
862            this.observedAllele.setValue(value);
863          }
864          return this;
865        }
866
867        /**
868         * @return {@link #referenceAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getReferenceAllele" gives direct access to the value
869         */
870        public StringType getReferenceAlleleElement() { 
871          if (this.referenceAllele == null)
872            if (Configuration.errorOnAutoCreate())
873              throw new Error("Attempt to auto-create SequenceVariationComponent.referenceAllele");
874            else if (Configuration.doAutoCreate())
875              this.referenceAllele = new StringType(); // bb
876          return this.referenceAllele;
877        }
878
879        public boolean hasReferenceAlleleElement() { 
880          return this.referenceAllele != null && !this.referenceAllele.isEmpty();
881        }
882
883        public boolean hasReferenceAllele() { 
884          return this.referenceAllele != null && !this.referenceAllele.isEmpty();
885        }
886
887        /**
888         * @param value {@link #referenceAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getReferenceAllele" gives direct access to the value
889         */
890        public SequenceVariationComponent setReferenceAlleleElement(StringType value) { 
891          this.referenceAllele = value;
892          return this;
893        }
894
895        /**
896         * @return Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.
897         */
898        public String getReferenceAllele() { 
899          return this.referenceAllele == null ? null : this.referenceAllele.getValue();
900        }
901
902        /**
903         * @param value Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.
904         */
905        public SequenceVariationComponent setReferenceAllele(String value) { 
906          if (Utilities.noString(value))
907            this.referenceAllele = null;
908          else {
909            if (this.referenceAllele == null)
910              this.referenceAllele = new StringType();
911            this.referenceAllele.setValue(value);
912          }
913          return this;
914        }
915
916        /**
917         * @return {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value
918         */
919        public StringType getCigarElement() { 
920          if (this.cigar == null)
921            if (Configuration.errorOnAutoCreate())
922              throw new Error("Attempt to auto-create SequenceVariationComponent.cigar");
923            else if (Configuration.doAutoCreate())
924              this.cigar = new StringType(); // bb
925          return this.cigar;
926        }
927
928        public boolean hasCigarElement() { 
929          return this.cigar != null && !this.cigar.isEmpty();
930        }
931
932        public boolean hasCigar() { 
933          return this.cigar != null && !this.cigar.isEmpty();
934        }
935
936        /**
937         * @param value {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value
938         */
939        public SequenceVariationComponent setCigarElement(StringType value) { 
940          this.cigar = value;
941          return this;
942        }
943
944        /**
945         * @return Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
946         */
947        public String getCigar() { 
948          return this.cigar == null ? null : this.cigar.getValue();
949        }
950
951        /**
952         * @param value Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
953         */
954        public SequenceVariationComponent setCigar(String value) { 
955          if (Utilities.noString(value))
956            this.cigar = null;
957          else {
958            if (this.cigar == null)
959              this.cigar = new StringType();
960            this.cigar.setValue(value);
961          }
962          return this;
963        }
964
965        protected void listChildren(List<Property> childrenList) {
966          super.listChildren(childrenList);
967          childrenList.add(new Property("start", "integer", "0-based start position (inclusive) of the variation on the  reference sequence.", 0, java.lang.Integer.MAX_VALUE, start));
968          childrenList.add(new Property("end", "integer", "0-based end position (exclusive) of the variation on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, end));
969          childrenList.add(new Property("observedAllele", "string", "Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.", 0, java.lang.Integer.MAX_VALUE, observedAllele));
970          childrenList.add(new Property("referenceAllele", "string", "Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand.", 0, java.lang.Integer.MAX_VALUE, referenceAllele));
971          childrenList.add(new Property("cigar", "string", "Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).", 0, java.lang.Integer.MAX_VALUE, cigar));
972        }
973
974      @Override
975      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
976        switch (hash) {
977        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
978        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
979        case -1418745787: /*observedAllele*/ return this.observedAllele == null ? new Base[0] : new Base[] {this.observedAllele}; // StringType
980        case 364045960: /*referenceAllele*/ return this.referenceAllele == null ? new Base[0] : new Base[] {this.referenceAllele}; // StringType
981        case 94658738: /*cigar*/ return this.cigar == null ? new Base[0] : new Base[] {this.cigar}; // StringType
982        default: return super.getProperty(hash, name, checkValid);
983        }
984
985      }
986
987      @Override
988      public void setProperty(int hash, String name, Base value) throws FHIRException {
989        switch (hash) {
990        case 109757538: // start
991          this.start = castToInteger(value); // IntegerType
992          break;
993        case 100571: // end
994          this.end = castToInteger(value); // IntegerType
995          break;
996        case -1418745787: // observedAllele
997          this.observedAllele = castToString(value); // StringType
998          break;
999        case 364045960: // referenceAllele
1000          this.referenceAllele = castToString(value); // StringType
1001          break;
1002        case 94658738: // cigar
1003          this.cigar = castToString(value); // StringType
1004          break;
1005        default: super.setProperty(hash, name, value);
1006        }
1007
1008      }
1009
1010      @Override
1011      public void setProperty(String name, Base value) throws FHIRException {
1012        if (name.equals("start"))
1013          this.start = castToInteger(value); // IntegerType
1014        else if (name.equals("end"))
1015          this.end = castToInteger(value); // IntegerType
1016        else if (name.equals("observedAllele"))
1017          this.observedAllele = castToString(value); // StringType
1018        else if (name.equals("referenceAllele"))
1019          this.referenceAllele = castToString(value); // StringType
1020        else if (name.equals("cigar"))
1021          this.cigar = castToString(value); // StringType
1022        else
1023          super.setProperty(name, value);
1024      }
1025
1026      @Override
1027      public Base makeProperty(int hash, String name) throws FHIRException {
1028        switch (hash) {
1029        case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // IntegerType
1030        case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // IntegerType
1031        case -1418745787: throw new FHIRException("Cannot make property observedAllele as it is not a complex type"); // StringType
1032        case 364045960: throw new FHIRException("Cannot make property referenceAllele as it is not a complex type"); // StringType
1033        case 94658738: throw new FHIRException("Cannot make property cigar as it is not a complex type"); // StringType
1034        default: return super.makeProperty(hash, name);
1035        }
1036
1037      }
1038
1039      @Override
1040      public Base addChild(String name) throws FHIRException {
1041        if (name.equals("start")) {
1042          throw new FHIRException("Cannot call addChild on a primitive type Sequence.start");
1043        }
1044        else if (name.equals("end")) {
1045          throw new FHIRException("Cannot call addChild on a primitive type Sequence.end");
1046        }
1047        else if (name.equals("observedAllele")) {
1048          throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedAllele");
1049        }
1050        else if (name.equals("referenceAllele")) {
1051          throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceAllele");
1052        }
1053        else if (name.equals("cigar")) {
1054          throw new FHIRException("Cannot call addChild on a primitive type Sequence.cigar");
1055        }
1056        else
1057          return super.addChild(name);
1058      }
1059
1060      public SequenceVariationComponent copy() {
1061        SequenceVariationComponent dst = new SequenceVariationComponent();
1062        copyValues(dst);
1063        dst.start = start == null ? null : start.copy();
1064        dst.end = end == null ? null : end.copy();
1065        dst.observedAllele = observedAllele == null ? null : observedAllele.copy();
1066        dst.referenceAllele = referenceAllele == null ? null : referenceAllele.copy();
1067        dst.cigar = cigar == null ? null : cigar.copy();
1068        return dst;
1069      }
1070
1071      @Override
1072      public boolean equalsDeep(Base other) {
1073        if (!super.equalsDeep(other))
1074          return false;
1075        if (!(other instanceof SequenceVariationComponent))
1076          return false;
1077        SequenceVariationComponent o = (SequenceVariationComponent) other;
1078        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(observedAllele, o.observedAllele, true)
1079           && compareDeep(referenceAllele, o.referenceAllele, true) && compareDeep(cigar, o.cigar, true);
1080      }
1081
1082      @Override
1083      public boolean equalsShallow(Base other) {
1084        if (!super.equalsShallow(other))
1085          return false;
1086        if (!(other instanceof SequenceVariationComponent))
1087          return false;
1088        SequenceVariationComponent o = (SequenceVariationComponent) other;
1089        return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(observedAllele, o.observedAllele, true)
1090           && compareValues(referenceAllele, o.referenceAllele, true) && compareValues(cigar, o.cigar, true);
1091      }
1092
1093      public boolean isEmpty() {
1094        return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty())
1095           && (observedAllele == null || observedAllele.isEmpty()) && (referenceAllele == null || referenceAllele.isEmpty())
1096           && (cigar == null || cigar.isEmpty());
1097      }
1098
1099  public String fhirType() {
1100    return "Sequence.variation";
1101
1102  }
1103
1104  }
1105
1106    @Block()
1107    public static class SequenceQualityComponent extends BackboneElement implements IBaseBackboneElement {
1108        /**
1109         * 0-based start position (inclusive) of the sequence.
1110         */
1111        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1112        @Description(shortDefinition="0-based start position (inclusive) of the sequence", formalDefinition="0-based start position (inclusive) of the sequence." )
1113        protected IntegerType start;
1114
1115        /**
1116         * 0-based end position (exclusive) of the sequence.
1117         */
1118        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1119        @Description(shortDefinition="0-based end position (exclusive) of the sequence", formalDefinition="0-based end position (exclusive) of the sequence." )
1120        protected IntegerType end;
1121
1122        /**
1123         * Quality score.
1124         */
1125        @Child(name = "score", type = {Quantity.class}, order=3, min=0, max=1, modifier=false, summary=true)
1126        @Description(shortDefinition="Quality score", formalDefinition="Quality score." )
1127        protected Quantity score;
1128
1129        /**
1130         * Method for quality.
1131         */
1132        @Child(name = "method", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1133        @Description(shortDefinition="Method for quality", formalDefinition="Method for quality." )
1134        protected StringType method;
1135
1136        private static final long serialVersionUID = -1046665930L;
1137
1138    /**
1139     * Constructor
1140     */
1141      public SequenceQualityComponent() {
1142        super();
1143      }
1144
1145        /**
1146         * @return {@link #start} (0-based start position (inclusive) of the sequence.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
1147         */
1148        public IntegerType getStartElement() { 
1149          if (this.start == null)
1150            if (Configuration.errorOnAutoCreate())
1151              throw new Error("Attempt to auto-create SequenceQualityComponent.start");
1152            else if (Configuration.doAutoCreate())
1153              this.start = new IntegerType(); // bb
1154          return this.start;
1155        }
1156
1157        public boolean hasStartElement() { 
1158          return this.start != null && !this.start.isEmpty();
1159        }
1160
1161        public boolean hasStart() { 
1162          return this.start != null && !this.start.isEmpty();
1163        }
1164
1165        /**
1166         * @param value {@link #start} (0-based start position (inclusive) of the sequence.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
1167         */
1168        public SequenceQualityComponent setStartElement(IntegerType value) { 
1169          this.start = value;
1170          return this;
1171        }
1172
1173        /**
1174         * @return 0-based start position (inclusive) of the sequence.
1175         */
1176        public int getStart() { 
1177          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
1178        }
1179
1180        /**
1181         * @param value 0-based start position (inclusive) of the sequence.
1182         */
1183        public SequenceQualityComponent setStart(int value) { 
1184            if (this.start == null)
1185              this.start = new IntegerType();
1186            this.start.setValue(value);
1187          return this;
1188        }
1189
1190        /**
1191         * @return {@link #end} (0-based end position (exclusive) of the sequence.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1192         */
1193        public IntegerType getEndElement() { 
1194          if (this.end == null)
1195            if (Configuration.errorOnAutoCreate())
1196              throw new Error("Attempt to auto-create SequenceQualityComponent.end");
1197            else if (Configuration.doAutoCreate())
1198              this.end = new IntegerType(); // bb
1199          return this.end;
1200        }
1201
1202        public boolean hasEndElement() { 
1203          return this.end != null && !this.end.isEmpty();
1204        }
1205
1206        public boolean hasEnd() { 
1207          return this.end != null && !this.end.isEmpty();
1208        }
1209
1210        /**
1211         * @param value {@link #end} (0-based end position (exclusive) of the sequence.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1212         */
1213        public SequenceQualityComponent setEndElement(IntegerType value) { 
1214          this.end = value;
1215          return this;
1216        }
1217
1218        /**
1219         * @return 0-based end position (exclusive) of the sequence.
1220         */
1221        public int getEnd() { 
1222          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
1223        }
1224
1225        /**
1226         * @param value 0-based end position (exclusive) of the sequence.
1227         */
1228        public SequenceQualityComponent setEnd(int value) { 
1229            if (this.end == null)
1230              this.end = new IntegerType();
1231            this.end.setValue(value);
1232          return this;
1233        }
1234
1235        /**
1236         * @return {@link #score} (Quality score.)
1237         */
1238        public Quantity getScore() { 
1239          if (this.score == null)
1240            if (Configuration.errorOnAutoCreate())
1241              throw new Error("Attempt to auto-create SequenceQualityComponent.score");
1242            else if (Configuration.doAutoCreate())
1243              this.score = new Quantity(); // cc
1244          return this.score;
1245        }
1246
1247        public boolean hasScore() { 
1248          return this.score != null && !this.score.isEmpty();
1249        }
1250
1251        /**
1252         * @param value {@link #score} (Quality score.)
1253         */
1254        public SequenceQualityComponent setScore(Quantity value) { 
1255          this.score = value;
1256          return this;
1257        }
1258
1259        /**
1260         * @return {@link #method} (Method for quality.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value
1261         */
1262        public StringType getMethodElement() { 
1263          if (this.method == null)
1264            if (Configuration.errorOnAutoCreate())
1265              throw new Error("Attempt to auto-create SequenceQualityComponent.method");
1266            else if (Configuration.doAutoCreate())
1267              this.method = new StringType(); // bb
1268          return this.method;
1269        }
1270
1271        public boolean hasMethodElement() { 
1272          return this.method != null && !this.method.isEmpty();
1273        }
1274
1275        public boolean hasMethod() { 
1276          return this.method != null && !this.method.isEmpty();
1277        }
1278
1279        /**
1280         * @param value {@link #method} (Method for quality.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value
1281         */
1282        public SequenceQualityComponent setMethodElement(StringType value) { 
1283          this.method = value;
1284          return this;
1285        }
1286
1287        /**
1288         * @return Method for quality.
1289         */
1290        public String getMethod() { 
1291          return this.method == null ? null : this.method.getValue();
1292        }
1293
1294        /**
1295         * @param value Method for quality.
1296         */
1297        public SequenceQualityComponent setMethod(String value) { 
1298          if (Utilities.noString(value))
1299            this.method = null;
1300          else {
1301            if (this.method == null)
1302              this.method = new StringType();
1303            this.method.setValue(value);
1304          }
1305          return this;
1306        }
1307
1308        protected void listChildren(List<Property> childrenList) {
1309          super.listChildren(childrenList);
1310          childrenList.add(new Property("start", "integer", "0-based start position (inclusive) of the sequence.", 0, java.lang.Integer.MAX_VALUE, start));
1311          childrenList.add(new Property("end", "integer", "0-based end position (exclusive) of the sequence.", 0, java.lang.Integer.MAX_VALUE, end));
1312          childrenList.add(new Property("score", "Quantity", "Quality score.", 0, java.lang.Integer.MAX_VALUE, score));
1313          childrenList.add(new Property("method", "string", "Method for quality.", 0, java.lang.Integer.MAX_VALUE, method));
1314        }
1315
1316      @Override
1317      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1318        switch (hash) {
1319        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
1320        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
1321        case 109264530: /*score*/ return this.score == null ? new Base[0] : new Base[] {this.score}; // Quantity
1322        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // StringType
1323        default: return super.getProperty(hash, name, checkValid);
1324        }
1325
1326      }
1327
1328      @Override
1329      public void setProperty(int hash, String name, Base value) throws FHIRException {
1330        switch (hash) {
1331        case 109757538: // start
1332          this.start = castToInteger(value); // IntegerType
1333          break;
1334        case 100571: // end
1335          this.end = castToInteger(value); // IntegerType
1336          break;
1337        case 109264530: // score
1338          this.score = castToQuantity(value); // Quantity
1339          break;
1340        case -1077554975: // method
1341          this.method = castToString(value); // StringType
1342          break;
1343        default: super.setProperty(hash, name, value);
1344        }
1345
1346      }
1347
1348      @Override
1349      public void setProperty(String name, Base value) throws FHIRException {
1350        if (name.equals("start"))
1351          this.start = castToInteger(value); // IntegerType
1352        else if (name.equals("end"))
1353          this.end = castToInteger(value); // IntegerType
1354        else if (name.equals("score"))
1355          this.score = castToQuantity(value); // Quantity
1356        else if (name.equals("method"))
1357          this.method = castToString(value); // StringType
1358        else
1359          super.setProperty(name, value);
1360      }
1361
1362      @Override
1363      public Base makeProperty(int hash, String name) throws FHIRException {
1364        switch (hash) {
1365        case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // IntegerType
1366        case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // IntegerType
1367        case 109264530:  return getScore(); // Quantity
1368        case -1077554975: throw new FHIRException("Cannot make property method as it is not a complex type"); // StringType
1369        default: return super.makeProperty(hash, name);
1370        }
1371
1372      }
1373
1374      @Override
1375      public Base addChild(String name) throws FHIRException {
1376        if (name.equals("start")) {
1377          throw new FHIRException("Cannot call addChild on a primitive type Sequence.start");
1378        }
1379        else if (name.equals("end")) {
1380          throw new FHIRException("Cannot call addChild on a primitive type Sequence.end");
1381        }
1382        else if (name.equals("score")) {
1383          this.score = new Quantity();
1384          return this.score;
1385        }
1386        else if (name.equals("method")) {
1387          throw new FHIRException("Cannot call addChild on a primitive type Sequence.method");
1388        }
1389        else
1390          return super.addChild(name);
1391      }
1392
1393      public SequenceQualityComponent copy() {
1394        SequenceQualityComponent dst = new SequenceQualityComponent();
1395        copyValues(dst);
1396        dst.start = start == null ? null : start.copy();
1397        dst.end = end == null ? null : end.copy();
1398        dst.score = score == null ? null : score.copy();
1399        dst.method = method == null ? null : method.copy();
1400        return dst;
1401      }
1402
1403      @Override
1404      public boolean equalsDeep(Base other) {
1405        if (!super.equalsDeep(other))
1406          return false;
1407        if (!(other instanceof SequenceQualityComponent))
1408          return false;
1409        SequenceQualityComponent o = (SequenceQualityComponent) other;
1410        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(score, o.score, true)
1411           && compareDeep(method, o.method, true);
1412      }
1413
1414      @Override
1415      public boolean equalsShallow(Base other) {
1416        if (!super.equalsShallow(other))
1417          return false;
1418        if (!(other instanceof SequenceQualityComponent))
1419          return false;
1420        SequenceQualityComponent o = (SequenceQualityComponent) other;
1421        return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(method, o.method, true)
1422          ;
1423      }
1424
1425      public boolean isEmpty() {
1426        return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty())
1427           && (score == null || score.isEmpty()) && (method == null || method.isEmpty());
1428      }
1429
1430  public String fhirType() {
1431    return "Sequence.quality";
1432
1433  }
1434
1435  }
1436
1437    @Block()
1438    public static class SequenceRepositoryComponent extends BackboneElement implements IBaseBackboneElement {
1439        /**
1440         * URI of an external repository which contains further details about the genetics data.
1441         */
1442        @Child(name = "url", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1443        @Description(shortDefinition="URI of the repository", formalDefinition="URI of an external repository which contains further details about the genetics data." )
1444        protected UriType url;
1445
1446        /**
1447         * URI of an external repository which contains further details about the genetics data.
1448         */
1449        @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1450        @Description(shortDefinition="Name of the repository", formalDefinition="URI of an external repository which contains further details about the genetics data." )
1451        protected StringType name;
1452
1453        /**
1454         * Id of the variation in this external repository.
1455         */
1456        @Child(name = "variantId", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1457        @Description(shortDefinition="Id of the variant", formalDefinition="Id of the variation in this external repository." )
1458        protected StringType variantId;
1459
1460        /**
1461         * Id of the read in this external repository.
1462         */
1463        @Child(name = "readId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1464        @Description(shortDefinition="Id of the read", formalDefinition="Id of the read in this external repository." )
1465        protected StringType readId;
1466
1467        private static final long serialVersionUID = 1218159360L;
1468
1469    /**
1470     * Constructor
1471     */
1472      public SequenceRepositoryComponent() {
1473        super();
1474      }
1475
1476        /**
1477         * @return {@link #url} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1478         */
1479        public UriType getUrlElement() { 
1480          if (this.url == null)
1481            if (Configuration.errorOnAutoCreate())
1482              throw new Error("Attempt to auto-create SequenceRepositoryComponent.url");
1483            else if (Configuration.doAutoCreate())
1484              this.url = new UriType(); // bb
1485          return this.url;
1486        }
1487
1488        public boolean hasUrlElement() { 
1489          return this.url != null && !this.url.isEmpty();
1490        }
1491
1492        public boolean hasUrl() { 
1493          return this.url != null && !this.url.isEmpty();
1494        }
1495
1496        /**
1497         * @param value {@link #url} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1498         */
1499        public SequenceRepositoryComponent setUrlElement(UriType value) { 
1500          this.url = value;
1501          return this;
1502        }
1503
1504        /**
1505         * @return URI of an external repository which contains further details about the genetics data.
1506         */
1507        public String getUrl() { 
1508          return this.url == null ? null : this.url.getValue();
1509        }
1510
1511        /**
1512         * @param value URI of an external repository which contains further details about the genetics data.
1513         */
1514        public SequenceRepositoryComponent setUrl(String value) { 
1515          if (Utilities.noString(value))
1516            this.url = null;
1517          else {
1518            if (this.url == null)
1519              this.url = new UriType();
1520            this.url.setValue(value);
1521          }
1522          return this;
1523        }
1524
1525        /**
1526         * @return {@link #name} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1527         */
1528        public StringType getNameElement() { 
1529          if (this.name == null)
1530            if (Configuration.errorOnAutoCreate())
1531              throw new Error("Attempt to auto-create SequenceRepositoryComponent.name");
1532            else if (Configuration.doAutoCreate())
1533              this.name = new StringType(); // bb
1534          return this.name;
1535        }
1536
1537        public boolean hasNameElement() { 
1538          return this.name != null && !this.name.isEmpty();
1539        }
1540
1541        public boolean hasName() { 
1542          return this.name != null && !this.name.isEmpty();
1543        }
1544
1545        /**
1546         * @param value {@link #name} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1547         */
1548        public SequenceRepositoryComponent setNameElement(StringType value) { 
1549          this.name = value;
1550          return this;
1551        }
1552
1553        /**
1554         * @return URI of an external repository which contains further details about the genetics data.
1555         */
1556        public String getName() { 
1557          return this.name == null ? null : this.name.getValue();
1558        }
1559
1560        /**
1561         * @param value URI of an external repository which contains further details about the genetics data.
1562         */
1563        public SequenceRepositoryComponent setName(String value) { 
1564          if (Utilities.noString(value))
1565            this.name = null;
1566          else {
1567            if (this.name == null)
1568              this.name = new StringType();
1569            this.name.setValue(value);
1570          }
1571          return this;
1572        }
1573
1574        /**
1575         * @return {@link #variantId} (Id of the variation in this external repository.). This is the underlying object with id, value and extensions. The accessor "getVariantId" gives direct access to the value
1576         */
1577        public StringType getVariantIdElement() { 
1578          if (this.variantId == null)
1579            if (Configuration.errorOnAutoCreate())
1580              throw new Error("Attempt to auto-create SequenceRepositoryComponent.variantId");
1581            else if (Configuration.doAutoCreate())
1582              this.variantId = new StringType(); // bb
1583          return this.variantId;
1584        }
1585
1586        public boolean hasVariantIdElement() { 
1587          return this.variantId != null && !this.variantId.isEmpty();
1588        }
1589
1590        public boolean hasVariantId() { 
1591          return this.variantId != null && !this.variantId.isEmpty();
1592        }
1593
1594        /**
1595         * @param value {@link #variantId} (Id of the variation in this external repository.). This is the underlying object with id, value and extensions. The accessor "getVariantId" gives direct access to the value
1596         */
1597        public SequenceRepositoryComponent setVariantIdElement(StringType value) { 
1598          this.variantId = value;
1599          return this;
1600        }
1601
1602        /**
1603         * @return Id of the variation in this external repository.
1604         */
1605        public String getVariantId() { 
1606          return this.variantId == null ? null : this.variantId.getValue();
1607        }
1608
1609        /**
1610         * @param value Id of the variation in this external repository.
1611         */
1612        public SequenceRepositoryComponent setVariantId(String value) { 
1613          if (Utilities.noString(value))
1614            this.variantId = null;
1615          else {
1616            if (this.variantId == null)
1617              this.variantId = new StringType();
1618            this.variantId.setValue(value);
1619          }
1620          return this;
1621        }
1622
1623        /**
1624         * @return {@link #readId} (Id of the read in this external repository.). This is the underlying object with id, value and extensions. The accessor "getReadId" gives direct access to the value
1625         */
1626        public StringType getReadIdElement() { 
1627          if (this.readId == null)
1628            if (Configuration.errorOnAutoCreate())
1629              throw new Error("Attempt to auto-create SequenceRepositoryComponent.readId");
1630            else if (Configuration.doAutoCreate())
1631              this.readId = new StringType(); // bb
1632          return this.readId;
1633        }
1634
1635        public boolean hasReadIdElement() { 
1636          return this.readId != null && !this.readId.isEmpty();
1637        }
1638
1639        public boolean hasReadId() { 
1640          return this.readId != null && !this.readId.isEmpty();
1641        }
1642
1643        /**
1644         * @param value {@link #readId} (Id of the read in this external repository.). This is the underlying object with id, value and extensions. The accessor "getReadId" gives direct access to the value
1645         */
1646        public SequenceRepositoryComponent setReadIdElement(StringType value) { 
1647          this.readId = value;
1648          return this;
1649        }
1650
1651        /**
1652         * @return Id of the read in this external repository.
1653         */
1654        public String getReadId() { 
1655          return this.readId == null ? null : this.readId.getValue();
1656        }
1657
1658        /**
1659         * @param value Id of the read in this external repository.
1660         */
1661        public SequenceRepositoryComponent setReadId(String value) { 
1662          if (Utilities.noString(value))
1663            this.readId = null;
1664          else {
1665            if (this.readId == null)
1666              this.readId = new StringType();
1667            this.readId.setValue(value);
1668          }
1669          return this;
1670        }
1671
1672        protected void listChildren(List<Property> childrenList) {
1673          super.listChildren(childrenList);
1674          childrenList.add(new Property("url", "uri", "URI of an external repository which contains further details about the genetics data.", 0, java.lang.Integer.MAX_VALUE, url));
1675          childrenList.add(new Property("name", "string", "URI of an external repository which contains further details about the genetics data.", 0, java.lang.Integer.MAX_VALUE, name));
1676          childrenList.add(new Property("variantId", "string", "Id of the variation in this external repository.", 0, java.lang.Integer.MAX_VALUE, variantId));
1677          childrenList.add(new Property("readId", "string", "Id of the read in this external repository.", 0, java.lang.Integer.MAX_VALUE, readId));
1678        }
1679
1680      @Override
1681      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1682        switch (hash) {
1683        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1684        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1685        case -82113408: /*variantId*/ return this.variantId == null ? new Base[0] : new Base[] {this.variantId}; // StringType
1686        case -934980271: /*readId*/ return this.readId == null ? new Base[0] : new Base[] {this.readId}; // StringType
1687        default: return super.getProperty(hash, name, checkValid);
1688        }
1689
1690      }
1691
1692      @Override
1693      public void setProperty(int hash, String name, Base value) throws FHIRException {
1694        switch (hash) {
1695        case 116079: // url
1696          this.url = castToUri(value); // UriType
1697          break;
1698        case 3373707: // name
1699          this.name = castToString(value); // StringType
1700          break;
1701        case -82113408: // variantId
1702          this.variantId = castToString(value); // StringType
1703          break;
1704        case -934980271: // readId
1705          this.readId = castToString(value); // StringType
1706          break;
1707        default: super.setProperty(hash, name, value);
1708        }
1709
1710      }
1711
1712      @Override
1713      public void setProperty(String name, Base value) throws FHIRException {
1714        if (name.equals("url"))
1715          this.url = castToUri(value); // UriType
1716        else if (name.equals("name"))
1717          this.name = castToString(value); // StringType
1718        else if (name.equals("variantId"))
1719          this.variantId = castToString(value); // StringType
1720        else if (name.equals("readId"))
1721          this.readId = castToString(value); // StringType
1722        else
1723          super.setProperty(name, value);
1724      }
1725
1726      @Override
1727      public Base makeProperty(int hash, String name) throws FHIRException {
1728        switch (hash) {
1729        case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
1730        case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
1731        case -82113408: throw new FHIRException("Cannot make property variantId as it is not a complex type"); // StringType
1732        case -934980271: throw new FHIRException("Cannot make property readId as it is not a complex type"); // StringType
1733        default: return super.makeProperty(hash, name);
1734        }
1735
1736      }
1737
1738      @Override
1739      public Base addChild(String name) throws FHIRException {
1740        if (name.equals("url")) {
1741          throw new FHIRException("Cannot call addChild on a primitive type Sequence.url");
1742        }
1743        else if (name.equals("name")) {
1744          throw new FHIRException("Cannot call addChild on a primitive type Sequence.name");
1745        }
1746        else if (name.equals("variantId")) {
1747          throw new FHIRException("Cannot call addChild on a primitive type Sequence.variantId");
1748        }
1749        else if (name.equals("readId")) {
1750          throw new FHIRException("Cannot call addChild on a primitive type Sequence.readId");
1751        }
1752        else
1753          return super.addChild(name);
1754      }
1755
1756      public SequenceRepositoryComponent copy() {
1757        SequenceRepositoryComponent dst = new SequenceRepositoryComponent();
1758        copyValues(dst);
1759        dst.url = url == null ? null : url.copy();
1760        dst.name = name == null ? null : name.copy();
1761        dst.variantId = variantId == null ? null : variantId.copy();
1762        dst.readId = readId == null ? null : readId.copy();
1763        return dst;
1764      }
1765
1766      @Override
1767      public boolean equalsDeep(Base other) {
1768        if (!super.equalsDeep(other))
1769          return false;
1770        if (!(other instanceof SequenceRepositoryComponent))
1771          return false;
1772        SequenceRepositoryComponent o = (SequenceRepositoryComponent) other;
1773        return compareDeep(url, o.url, true) && compareDeep(name, o.name, true) && compareDeep(variantId, o.variantId, true)
1774           && compareDeep(readId, o.readId, true);
1775      }
1776
1777      @Override
1778      public boolean equalsShallow(Base other) {
1779        if (!super.equalsShallow(other))
1780          return false;
1781        if (!(other instanceof SequenceRepositoryComponent))
1782          return false;
1783        SequenceRepositoryComponent o = (SequenceRepositoryComponent) other;
1784        return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(variantId, o.variantId, true)
1785           && compareValues(readId, o.readId, true);
1786      }
1787
1788      public boolean isEmpty() {
1789        return super.isEmpty() && (url == null || url.isEmpty()) && (name == null || name.isEmpty())
1790           && (variantId == null || variantId.isEmpty()) && (readId == null || readId.isEmpty());
1791      }
1792
1793  public String fhirType() {
1794    return "Sequence.repository";
1795
1796  }
1797
1798  }
1799
1800    @Block()
1801    public static class SequenceStructureVariationComponent extends BackboneElement implements IBaseBackboneElement {
1802        /**
1803         * Precision of boundaries.
1804         */
1805        @Child(name = "precisionOfBoundaries", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1806        @Description(shortDefinition="Precision of boundaries", formalDefinition="Precision of boundaries." )
1807        protected StringType precisionOfBoundaries;
1808
1809        /**
1810         * Structural Variant reported aCGH ratio.
1811         */
1812        @Child(name = "reportedaCGHRatio", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1813        @Description(shortDefinition="Structural Variant reported aCGH ratio", formalDefinition="Structural Variant reported aCGH ratio." )
1814        protected DecimalType reportedaCGHRatio;
1815
1816        /**
1817         * Structural Variant Length.
1818         */
1819        @Child(name = "length", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1820        @Description(shortDefinition="Structural Variant Length", formalDefinition="Structural Variant Length." )
1821        protected IntegerType length;
1822
1823        /**
1824         * Structural variant outer.
1825         */
1826        @Child(name = "outer", type = {}, order=4, min=0, max=1, modifier=false, summary=true)
1827        @Description(shortDefinition="", formalDefinition="Structural variant outer." )
1828        protected SequenceStructureVariationOuterComponent outer;
1829
1830        /**
1831         * Structural variant inner.
1832         */
1833        @Child(name = "inner", type = {}, order=5, min=0, max=1, modifier=false, summary=true)
1834        @Description(shortDefinition="", formalDefinition="Structural variant inner." )
1835        protected SequenceStructureVariationInnerComponent inner;
1836
1837        private static final long serialVersionUID = -1615654736L;
1838
1839    /**
1840     * Constructor
1841     */
1842      public SequenceStructureVariationComponent() {
1843        super();
1844      }
1845
1846        /**
1847         * @return {@link #precisionOfBoundaries} (Precision of boundaries.). This is the underlying object with id, value and extensions. The accessor "getPrecisionOfBoundaries" gives direct access to the value
1848         */
1849        public StringType getPrecisionOfBoundariesElement() { 
1850          if (this.precisionOfBoundaries == null)
1851            if (Configuration.errorOnAutoCreate())
1852              throw new Error("Attempt to auto-create SequenceStructureVariationComponent.precisionOfBoundaries");
1853            else if (Configuration.doAutoCreate())
1854              this.precisionOfBoundaries = new StringType(); // bb
1855          return this.precisionOfBoundaries;
1856        }
1857
1858        public boolean hasPrecisionOfBoundariesElement() { 
1859          return this.precisionOfBoundaries != null && !this.precisionOfBoundaries.isEmpty();
1860        }
1861
1862        public boolean hasPrecisionOfBoundaries() { 
1863          return this.precisionOfBoundaries != null && !this.precisionOfBoundaries.isEmpty();
1864        }
1865
1866        /**
1867         * @param value {@link #precisionOfBoundaries} (Precision of boundaries.). This is the underlying object with id, value and extensions. The accessor "getPrecisionOfBoundaries" gives direct access to the value
1868         */
1869        public SequenceStructureVariationComponent setPrecisionOfBoundariesElement(StringType value) { 
1870          this.precisionOfBoundaries = value;
1871          return this;
1872        }
1873
1874        /**
1875         * @return Precision of boundaries.
1876         */
1877        public String getPrecisionOfBoundaries() { 
1878          return this.precisionOfBoundaries == null ? null : this.precisionOfBoundaries.getValue();
1879        }
1880
1881        /**
1882         * @param value Precision of boundaries.
1883         */
1884        public SequenceStructureVariationComponent setPrecisionOfBoundaries(String value) { 
1885          if (Utilities.noString(value))
1886            this.precisionOfBoundaries = null;
1887          else {
1888            if (this.precisionOfBoundaries == null)
1889              this.precisionOfBoundaries = new StringType();
1890            this.precisionOfBoundaries.setValue(value);
1891          }
1892          return this;
1893        }
1894
1895        /**
1896         * @return {@link #reportedaCGHRatio} (Structural Variant reported aCGH ratio.). This is the underlying object with id, value and extensions. The accessor "getReportedaCGHRatio" gives direct access to the value
1897         */
1898        public DecimalType getReportedaCGHRatioElement() { 
1899          if (this.reportedaCGHRatio == null)
1900            if (Configuration.errorOnAutoCreate())
1901              throw new Error("Attempt to auto-create SequenceStructureVariationComponent.reportedaCGHRatio");
1902            else if (Configuration.doAutoCreate())
1903              this.reportedaCGHRatio = new DecimalType(); // bb
1904          return this.reportedaCGHRatio;
1905        }
1906
1907        public boolean hasReportedaCGHRatioElement() { 
1908          return this.reportedaCGHRatio != null && !this.reportedaCGHRatio.isEmpty();
1909        }
1910
1911        public boolean hasReportedaCGHRatio() { 
1912          return this.reportedaCGHRatio != null && !this.reportedaCGHRatio.isEmpty();
1913        }
1914
1915        /**
1916         * @param value {@link #reportedaCGHRatio} (Structural Variant reported aCGH ratio.). This is the underlying object with id, value and extensions. The accessor "getReportedaCGHRatio" gives direct access to the value
1917         */
1918        public SequenceStructureVariationComponent setReportedaCGHRatioElement(DecimalType value) { 
1919          this.reportedaCGHRatio = value;
1920          return this;
1921        }
1922
1923        /**
1924         * @return Structural Variant reported aCGH ratio.
1925         */
1926        public BigDecimal getReportedaCGHRatio() { 
1927          return this.reportedaCGHRatio == null ? null : this.reportedaCGHRatio.getValue();
1928        }
1929
1930        /**
1931         * @param value Structural Variant reported aCGH ratio.
1932         */
1933        public SequenceStructureVariationComponent setReportedaCGHRatio(BigDecimal value) { 
1934          if (value == null)
1935            this.reportedaCGHRatio = null;
1936          else {
1937            if (this.reportedaCGHRatio == null)
1938              this.reportedaCGHRatio = new DecimalType();
1939            this.reportedaCGHRatio.setValue(value);
1940          }
1941          return this;
1942        }
1943
1944        /**
1945         * @param value Structural Variant reported aCGH ratio.
1946         */
1947        public SequenceStructureVariationComponent setReportedaCGHRatio(long value) { 
1948              this.reportedaCGHRatio = new DecimalType();
1949            this.reportedaCGHRatio.setValue(value);
1950          return this;
1951        }
1952
1953        /**
1954         * @param value Structural Variant reported aCGH ratio.
1955         */
1956        public SequenceStructureVariationComponent setReportedaCGHRatio(double value) { 
1957              this.reportedaCGHRatio = new DecimalType();
1958            this.reportedaCGHRatio.setValue(value);
1959          return this;
1960        }
1961
1962        /**
1963         * @return {@link #length} (Structural Variant Length.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value
1964         */
1965        public IntegerType getLengthElement() { 
1966          if (this.length == null)
1967            if (Configuration.errorOnAutoCreate())
1968              throw new Error("Attempt to auto-create SequenceStructureVariationComponent.length");
1969            else if (Configuration.doAutoCreate())
1970              this.length = new IntegerType(); // bb
1971          return this.length;
1972        }
1973
1974        public boolean hasLengthElement() { 
1975          return this.length != null && !this.length.isEmpty();
1976        }
1977
1978        public boolean hasLength() { 
1979          return this.length != null && !this.length.isEmpty();
1980        }
1981
1982        /**
1983         * @param value {@link #length} (Structural Variant Length.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value
1984         */
1985        public SequenceStructureVariationComponent setLengthElement(IntegerType value) { 
1986          this.length = value;
1987          return this;
1988        }
1989
1990        /**
1991         * @return Structural Variant Length.
1992         */
1993        public int getLength() { 
1994          return this.length == null || this.length.isEmpty() ? 0 : this.length.getValue();
1995        }
1996
1997        /**
1998         * @param value Structural Variant Length.
1999         */
2000        public SequenceStructureVariationComponent setLength(int value) { 
2001            if (this.length == null)
2002              this.length = new IntegerType();
2003            this.length.setValue(value);
2004          return this;
2005        }
2006
2007        /**
2008         * @return {@link #outer} (Structural variant outer.)
2009         */
2010        public SequenceStructureVariationOuterComponent getOuter() { 
2011          if (this.outer == null)
2012            if (Configuration.errorOnAutoCreate())
2013              throw new Error("Attempt to auto-create SequenceStructureVariationComponent.outer");
2014            else if (Configuration.doAutoCreate())
2015              this.outer = new SequenceStructureVariationOuterComponent(); // cc
2016          return this.outer;
2017        }
2018
2019        public boolean hasOuter() { 
2020          return this.outer != null && !this.outer.isEmpty();
2021        }
2022
2023        /**
2024         * @param value {@link #outer} (Structural variant outer.)
2025         */
2026        public SequenceStructureVariationComponent setOuter(SequenceStructureVariationOuterComponent value) { 
2027          this.outer = value;
2028          return this;
2029        }
2030
2031        /**
2032         * @return {@link #inner} (Structural variant inner.)
2033         */
2034        public SequenceStructureVariationInnerComponent getInner() { 
2035          if (this.inner == null)
2036            if (Configuration.errorOnAutoCreate())
2037              throw new Error("Attempt to auto-create SequenceStructureVariationComponent.inner");
2038            else if (Configuration.doAutoCreate())
2039              this.inner = new SequenceStructureVariationInnerComponent(); // cc
2040          return this.inner;
2041        }
2042
2043        public boolean hasInner() { 
2044          return this.inner != null && !this.inner.isEmpty();
2045        }
2046
2047        /**
2048         * @param value {@link #inner} (Structural variant inner.)
2049         */
2050        public SequenceStructureVariationComponent setInner(SequenceStructureVariationInnerComponent value) { 
2051          this.inner = value;
2052          return this;
2053        }
2054
2055        protected void listChildren(List<Property> childrenList) {
2056          super.listChildren(childrenList);
2057          childrenList.add(new Property("precisionOfBoundaries", "string", "Precision of boundaries.", 0, java.lang.Integer.MAX_VALUE, precisionOfBoundaries));
2058          childrenList.add(new Property("reportedaCGHRatio", "decimal", "Structural Variant reported aCGH ratio.", 0, java.lang.Integer.MAX_VALUE, reportedaCGHRatio));
2059          childrenList.add(new Property("length", "integer", "Structural Variant Length.", 0, java.lang.Integer.MAX_VALUE, length));
2060          childrenList.add(new Property("outer", "", "Structural variant outer.", 0, java.lang.Integer.MAX_VALUE, outer));
2061          childrenList.add(new Property("inner", "", "Structural variant inner.", 0, java.lang.Integer.MAX_VALUE, inner));
2062        }
2063
2064      @Override
2065      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2066        switch (hash) {
2067        case 1591532317: /*precisionOfBoundaries*/ return this.precisionOfBoundaries == null ? new Base[0] : new Base[] {this.precisionOfBoundaries}; // StringType
2068        case -1872600587: /*reportedaCGHRatio*/ return this.reportedaCGHRatio == null ? new Base[0] : new Base[] {this.reportedaCGHRatio}; // DecimalType
2069        case -1106363674: /*length*/ return this.length == null ? new Base[0] : new Base[] {this.length}; // IntegerType
2070        case 106111099: /*outer*/ return this.outer == null ? new Base[0] : new Base[] {this.outer}; // SequenceStructureVariationOuterComponent
2071        case 100355670: /*inner*/ return this.inner == null ? new Base[0] : new Base[] {this.inner}; // SequenceStructureVariationInnerComponent
2072        default: return super.getProperty(hash, name, checkValid);
2073        }
2074
2075      }
2076
2077      @Override
2078      public void setProperty(int hash, String name, Base value) throws FHIRException {
2079        switch (hash) {
2080        case 1591532317: // precisionOfBoundaries
2081          this.precisionOfBoundaries = castToString(value); // StringType
2082          break;
2083        case -1872600587: // reportedaCGHRatio
2084          this.reportedaCGHRatio = castToDecimal(value); // DecimalType
2085          break;
2086        case -1106363674: // length
2087          this.length = castToInteger(value); // IntegerType
2088          break;
2089        case 106111099: // outer
2090          this.outer = (SequenceStructureVariationOuterComponent) value; // SequenceStructureVariationOuterComponent
2091          break;
2092        case 100355670: // inner
2093          this.inner = (SequenceStructureVariationInnerComponent) value; // SequenceStructureVariationInnerComponent
2094          break;
2095        default: super.setProperty(hash, name, value);
2096        }
2097
2098      }
2099
2100      @Override
2101      public void setProperty(String name, Base value) throws FHIRException {
2102        if (name.equals("precisionOfBoundaries"))
2103          this.precisionOfBoundaries = castToString(value); // StringType
2104        else if (name.equals("reportedaCGHRatio"))
2105          this.reportedaCGHRatio = castToDecimal(value); // DecimalType
2106        else if (name.equals("length"))
2107          this.length = castToInteger(value); // IntegerType
2108        else if (name.equals("outer"))
2109          this.outer = (SequenceStructureVariationOuterComponent) value; // SequenceStructureVariationOuterComponent
2110        else if (name.equals("inner"))
2111          this.inner = (SequenceStructureVariationInnerComponent) value; // SequenceStructureVariationInnerComponent
2112        else
2113          super.setProperty(name, value);
2114      }
2115
2116      @Override
2117      public Base makeProperty(int hash, String name) throws FHIRException {
2118        switch (hash) {
2119        case 1591532317: throw new FHIRException("Cannot make property precisionOfBoundaries as it is not a complex type"); // StringType
2120        case -1872600587: throw new FHIRException("Cannot make property reportedaCGHRatio as it is not a complex type"); // DecimalType
2121        case -1106363674: throw new FHIRException("Cannot make property length as it is not a complex type"); // IntegerType
2122        case 106111099:  return getOuter(); // SequenceStructureVariationOuterComponent
2123        case 100355670:  return getInner(); // SequenceStructureVariationInnerComponent
2124        default: return super.makeProperty(hash, name);
2125        }
2126
2127      }
2128
2129      @Override
2130      public Base addChild(String name) throws FHIRException {
2131        if (name.equals("precisionOfBoundaries")) {
2132          throw new FHIRException("Cannot call addChild on a primitive type Sequence.precisionOfBoundaries");
2133        }
2134        else if (name.equals("reportedaCGHRatio")) {
2135          throw new FHIRException("Cannot call addChild on a primitive type Sequence.reportedaCGHRatio");
2136        }
2137        else if (name.equals("length")) {
2138          throw new FHIRException("Cannot call addChild on a primitive type Sequence.length");
2139        }
2140        else if (name.equals("outer")) {
2141          this.outer = new SequenceStructureVariationOuterComponent();
2142          return this.outer;
2143        }
2144        else if (name.equals("inner")) {
2145          this.inner = new SequenceStructureVariationInnerComponent();
2146          return this.inner;
2147        }
2148        else
2149          return super.addChild(name);
2150      }
2151
2152      public SequenceStructureVariationComponent copy() {
2153        SequenceStructureVariationComponent dst = new SequenceStructureVariationComponent();
2154        copyValues(dst);
2155        dst.precisionOfBoundaries = precisionOfBoundaries == null ? null : precisionOfBoundaries.copy();
2156        dst.reportedaCGHRatio = reportedaCGHRatio == null ? null : reportedaCGHRatio.copy();
2157        dst.length = length == null ? null : length.copy();
2158        dst.outer = outer == null ? null : outer.copy();
2159        dst.inner = inner == null ? null : inner.copy();
2160        return dst;
2161      }
2162
2163      @Override
2164      public boolean equalsDeep(Base other) {
2165        if (!super.equalsDeep(other))
2166          return false;
2167        if (!(other instanceof SequenceStructureVariationComponent))
2168          return false;
2169        SequenceStructureVariationComponent o = (SequenceStructureVariationComponent) other;
2170        return compareDeep(precisionOfBoundaries, o.precisionOfBoundaries, true) && compareDeep(reportedaCGHRatio, o.reportedaCGHRatio, true)
2171           && compareDeep(length, o.length, true) && compareDeep(outer, o.outer, true) && compareDeep(inner, o.inner, true)
2172          ;
2173      }
2174
2175      @Override
2176      public boolean equalsShallow(Base other) {
2177        if (!super.equalsShallow(other))
2178          return false;
2179        if (!(other instanceof SequenceStructureVariationComponent))
2180          return false;
2181        SequenceStructureVariationComponent o = (SequenceStructureVariationComponent) other;
2182        return compareValues(precisionOfBoundaries, o.precisionOfBoundaries, true) && compareValues(reportedaCGHRatio, o.reportedaCGHRatio, true)
2183           && compareValues(length, o.length, true);
2184      }
2185
2186      public boolean isEmpty() {
2187        return super.isEmpty() && (precisionOfBoundaries == null || precisionOfBoundaries.isEmpty())
2188           && (reportedaCGHRatio == null || reportedaCGHRatio.isEmpty()) && (length == null || length.isEmpty())
2189           && (outer == null || outer.isEmpty()) && (inner == null || inner.isEmpty());
2190      }
2191
2192  public String fhirType() {
2193    return "Sequence.structureVariation";
2194
2195  }
2196
2197  }
2198
2199    @Block()
2200    public static class SequenceStructureVariationOuterComponent extends BackboneElement implements IBaseBackboneElement {
2201        /**
2202         * Structural Variant Outer Start-End.
2203         */
2204        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
2205        @Description(shortDefinition="Structural Variant Outer Start-End", formalDefinition="Structural Variant Outer Start-End." )
2206        protected IntegerType start;
2207
2208        /**
2209         * Structural Variant Outer Start-End.
2210         */
2211        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
2212        @Description(shortDefinition="Structural Variant Outer Start-End", formalDefinition="Structural Variant Outer Start-End." )
2213        protected IntegerType end;
2214
2215        private static final long serialVersionUID = -1798864889L;
2216
2217    /**
2218     * Constructor
2219     */
2220      public SequenceStructureVariationOuterComponent() {
2221        super();
2222      }
2223
2224        /**
2225         * @return {@link #start} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
2226         */
2227        public IntegerType getStartElement() { 
2228          if (this.start == null)
2229            if (Configuration.errorOnAutoCreate())
2230              throw new Error("Attempt to auto-create SequenceStructureVariationOuterComponent.start");
2231            else if (Configuration.doAutoCreate())
2232              this.start = new IntegerType(); // bb
2233          return this.start;
2234        }
2235
2236        public boolean hasStartElement() { 
2237          return this.start != null && !this.start.isEmpty();
2238        }
2239
2240        public boolean hasStart() { 
2241          return this.start != null && !this.start.isEmpty();
2242        }
2243
2244        /**
2245         * @param value {@link #start} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
2246         */
2247        public SequenceStructureVariationOuterComponent setStartElement(IntegerType value) { 
2248          this.start = value;
2249          return this;
2250        }
2251
2252        /**
2253         * @return Structural Variant Outer Start-End.
2254         */
2255        public int getStart() { 
2256          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
2257        }
2258
2259        /**
2260         * @param value Structural Variant Outer Start-End.
2261         */
2262        public SequenceStructureVariationOuterComponent setStart(int value) { 
2263            if (this.start == null)
2264              this.start = new IntegerType();
2265            this.start.setValue(value);
2266          return this;
2267        }
2268
2269        /**
2270         * @return {@link #end} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
2271         */
2272        public IntegerType getEndElement() { 
2273          if (this.end == null)
2274            if (Configuration.errorOnAutoCreate())
2275              throw new Error("Attempt to auto-create SequenceStructureVariationOuterComponent.end");
2276            else if (Configuration.doAutoCreate())
2277              this.end = new IntegerType(); // bb
2278          return this.end;
2279        }
2280
2281        public boolean hasEndElement() { 
2282          return this.end != null && !this.end.isEmpty();
2283        }
2284
2285        public boolean hasEnd() { 
2286          return this.end != null && !this.end.isEmpty();
2287        }
2288
2289        /**
2290         * @param value {@link #end} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
2291         */
2292        public SequenceStructureVariationOuterComponent setEndElement(IntegerType value) { 
2293          this.end = value;
2294          return this;
2295        }
2296
2297        /**
2298         * @return Structural Variant Outer Start-End.
2299         */
2300        public int getEnd() { 
2301          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
2302        }
2303
2304        /**
2305         * @param value Structural Variant Outer Start-End.
2306         */
2307        public SequenceStructureVariationOuterComponent setEnd(int value) { 
2308            if (this.end == null)
2309              this.end = new IntegerType();
2310            this.end.setValue(value);
2311          return this;
2312        }
2313
2314        protected void listChildren(List<Property> childrenList) {
2315          super.listChildren(childrenList);
2316          childrenList.add(new Property("start", "integer", "Structural Variant Outer Start-End.", 0, java.lang.Integer.MAX_VALUE, start));
2317          childrenList.add(new Property("end", "integer", "Structural Variant Outer Start-End.", 0, java.lang.Integer.MAX_VALUE, end));
2318        }
2319
2320      @Override
2321      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2322        switch (hash) {
2323        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
2324        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
2325        default: return super.getProperty(hash, name, checkValid);
2326        }
2327
2328      }
2329
2330      @Override
2331      public void setProperty(int hash, String name, Base value) throws FHIRException {
2332        switch (hash) {
2333        case 109757538: // start
2334          this.start = castToInteger(value); // IntegerType
2335          break;
2336        case 100571: // end
2337          this.end = castToInteger(value); // IntegerType
2338          break;
2339        default: super.setProperty(hash, name, value);
2340        }
2341
2342      }
2343
2344      @Override
2345      public void setProperty(String name, Base value) throws FHIRException {
2346        if (name.equals("start"))
2347          this.start = castToInteger(value); // IntegerType
2348        else if (name.equals("end"))
2349          this.end = castToInteger(value); // IntegerType
2350        else
2351          super.setProperty(name, value);
2352      }
2353
2354      @Override
2355      public Base makeProperty(int hash, String name) throws FHIRException {
2356        switch (hash) {
2357        case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // IntegerType
2358        case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // IntegerType
2359        default: return super.makeProperty(hash, name);
2360        }
2361
2362      }
2363
2364      @Override
2365      public Base addChild(String name) throws FHIRException {
2366        if (name.equals("start")) {
2367          throw new FHIRException("Cannot call addChild on a primitive type Sequence.start");
2368        }
2369        else if (name.equals("end")) {
2370          throw new FHIRException("Cannot call addChild on a primitive type Sequence.end");
2371        }
2372        else
2373          return super.addChild(name);
2374      }
2375
2376      public SequenceStructureVariationOuterComponent copy() {
2377        SequenceStructureVariationOuterComponent dst = new SequenceStructureVariationOuterComponent();
2378        copyValues(dst);
2379        dst.start = start == null ? null : start.copy();
2380        dst.end = end == null ? null : end.copy();
2381        return dst;
2382      }
2383
2384      @Override
2385      public boolean equalsDeep(Base other) {
2386        if (!super.equalsDeep(other))
2387          return false;
2388        if (!(other instanceof SequenceStructureVariationOuterComponent))
2389          return false;
2390        SequenceStructureVariationOuterComponent o = (SequenceStructureVariationOuterComponent) other;
2391        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true);
2392      }
2393
2394      @Override
2395      public boolean equalsShallow(Base other) {
2396        if (!super.equalsShallow(other))
2397          return false;
2398        if (!(other instanceof SequenceStructureVariationOuterComponent))
2399          return false;
2400        SequenceStructureVariationOuterComponent o = (SequenceStructureVariationOuterComponent) other;
2401        return compareValues(start, o.start, true) && compareValues(end, o.end, true);
2402      }
2403
2404      public boolean isEmpty() {
2405        return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty())
2406          ;
2407      }
2408
2409  public String fhirType() {
2410    return "Sequence.structureVariation.outer";
2411
2412  }
2413
2414  }
2415
2416    @Block()
2417    public static class SequenceStructureVariationInnerComponent extends BackboneElement implements IBaseBackboneElement {
2418        /**
2419         * Structural Variant Inner Start-End.
2420         */
2421        @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
2422        @Description(shortDefinition="Structural Variant Inner Start-End", formalDefinition="Structural Variant Inner Start-End." )
2423        protected IntegerType start;
2424
2425        /**
2426         * Structural Variant Inner Start-End.
2427         */
2428        @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true)
2429        @Description(shortDefinition="Structural Variant Inner Start-End", formalDefinition="Structural Variant Inner Start-End." )
2430        protected IntegerType end;
2431
2432        private static final long serialVersionUID = -1798864889L;
2433
2434    /**
2435     * Constructor
2436     */
2437      public SequenceStructureVariationInnerComponent() {
2438        super();
2439      }
2440
2441        /**
2442         * @return {@link #start} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
2443         */
2444        public IntegerType getStartElement() { 
2445          if (this.start == null)
2446            if (Configuration.errorOnAutoCreate())
2447              throw new Error("Attempt to auto-create SequenceStructureVariationInnerComponent.start");
2448            else if (Configuration.doAutoCreate())
2449              this.start = new IntegerType(); // bb
2450          return this.start;
2451        }
2452
2453        public boolean hasStartElement() { 
2454          return this.start != null && !this.start.isEmpty();
2455        }
2456
2457        public boolean hasStart() { 
2458          return this.start != null && !this.start.isEmpty();
2459        }
2460
2461        /**
2462         * @param value {@link #start} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
2463         */
2464        public SequenceStructureVariationInnerComponent setStartElement(IntegerType value) { 
2465          this.start = value;
2466          return this;
2467        }
2468
2469        /**
2470         * @return Structural Variant Inner Start-End.
2471         */
2472        public int getStart() { 
2473          return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue();
2474        }
2475
2476        /**
2477         * @param value Structural Variant Inner Start-End.
2478         */
2479        public SequenceStructureVariationInnerComponent setStart(int value) { 
2480            if (this.start == null)
2481              this.start = new IntegerType();
2482            this.start.setValue(value);
2483          return this;
2484        }
2485
2486        /**
2487         * @return {@link #end} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
2488         */
2489        public IntegerType getEndElement() { 
2490          if (this.end == null)
2491            if (Configuration.errorOnAutoCreate())
2492              throw new Error("Attempt to auto-create SequenceStructureVariationInnerComponent.end");
2493            else if (Configuration.doAutoCreate())
2494              this.end = new IntegerType(); // bb
2495          return this.end;
2496        }
2497
2498        public boolean hasEndElement() { 
2499          return this.end != null && !this.end.isEmpty();
2500        }
2501
2502        public boolean hasEnd() { 
2503          return this.end != null && !this.end.isEmpty();
2504        }
2505
2506        /**
2507         * @param value {@link #end} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
2508         */
2509        public SequenceStructureVariationInnerComponent setEndElement(IntegerType value) { 
2510          this.end = value;
2511          return this;
2512        }
2513
2514        /**
2515         * @return Structural Variant Inner Start-End.
2516         */
2517        public int getEnd() { 
2518          return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue();
2519        }
2520
2521        /**
2522         * @param value Structural Variant Inner Start-End.
2523         */
2524        public SequenceStructureVariationInnerComponent setEnd(int value) { 
2525            if (this.end == null)
2526              this.end = new IntegerType();
2527            this.end.setValue(value);
2528          return this;
2529        }
2530
2531        protected void listChildren(List<Property> childrenList) {
2532          super.listChildren(childrenList);
2533          childrenList.add(new Property("start", "integer", "Structural Variant Inner Start-End.", 0, java.lang.Integer.MAX_VALUE, start));
2534          childrenList.add(new Property("end", "integer", "Structural Variant Inner Start-End.", 0, java.lang.Integer.MAX_VALUE, end));
2535        }
2536
2537      @Override
2538      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2539        switch (hash) {
2540        case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // IntegerType
2541        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // IntegerType
2542        default: return super.getProperty(hash, name, checkValid);
2543        }
2544
2545      }
2546
2547      @Override
2548      public void setProperty(int hash, String name, Base value) throws FHIRException {
2549        switch (hash) {
2550        case 109757538: // start
2551          this.start = castToInteger(value); // IntegerType
2552          break;
2553        case 100571: // end
2554          this.end = castToInteger(value); // IntegerType
2555          break;
2556        default: super.setProperty(hash, name, value);
2557        }
2558
2559      }
2560
2561      @Override
2562      public void setProperty(String name, Base value) throws FHIRException {
2563        if (name.equals("start"))
2564          this.start = castToInteger(value); // IntegerType
2565        else if (name.equals("end"))
2566          this.end = castToInteger(value); // IntegerType
2567        else
2568          super.setProperty(name, value);
2569      }
2570
2571      @Override
2572      public Base makeProperty(int hash, String name) throws FHIRException {
2573        switch (hash) {
2574        case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // IntegerType
2575        case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // IntegerType
2576        default: return super.makeProperty(hash, name);
2577        }
2578
2579      }
2580
2581      @Override
2582      public Base addChild(String name) throws FHIRException {
2583        if (name.equals("start")) {
2584          throw new FHIRException("Cannot call addChild on a primitive type Sequence.start");
2585        }
2586        else if (name.equals("end")) {
2587          throw new FHIRException("Cannot call addChild on a primitive type Sequence.end");
2588        }
2589        else
2590          return super.addChild(name);
2591      }
2592
2593      public SequenceStructureVariationInnerComponent copy() {
2594        SequenceStructureVariationInnerComponent dst = new SequenceStructureVariationInnerComponent();
2595        copyValues(dst);
2596        dst.start = start == null ? null : start.copy();
2597        dst.end = end == null ? null : end.copy();
2598        return dst;
2599      }
2600
2601      @Override
2602      public boolean equalsDeep(Base other) {
2603        if (!super.equalsDeep(other))
2604          return false;
2605        if (!(other instanceof SequenceStructureVariationInnerComponent))
2606          return false;
2607        SequenceStructureVariationInnerComponent o = (SequenceStructureVariationInnerComponent) other;
2608        return compareDeep(start, o.start, true) && compareDeep(end, o.end, true);
2609      }
2610
2611      @Override
2612      public boolean equalsShallow(Base other) {
2613        if (!super.equalsShallow(other))
2614          return false;
2615        if (!(other instanceof SequenceStructureVariationInnerComponent))
2616          return false;
2617        SequenceStructureVariationInnerComponent o = (SequenceStructureVariationInnerComponent) other;
2618        return compareValues(start, o.start, true) && compareValues(end, o.end, true);
2619      }
2620
2621      public boolean isEmpty() {
2622        return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty())
2623          ;
2624      }
2625
2626  public String fhirType() {
2627    return "Sequence.structureVariation.inner";
2628
2629  }
2630
2631  }
2632
2633    /**
2634     * Amino acid / cDNA transcript / RNA variation.
2635     */
2636    @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true)
2637    @Description(shortDefinition="AA | DNA | RNA", formalDefinition="Amino acid / cDNA transcript / RNA variation." )
2638    protected Enumeration<SequenceType> type;
2639
2640    /**
2641     * The patient, or group of patients whose sequencing results are described by this resource.
2642     */
2643    @Child(name = "patient", type = {Patient.class}, order=1, min=0, max=1, modifier=false, summary=true)
2644    @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient, or group of patients whose sequencing results are described by this resource." )
2645    protected Reference patient;
2646
2647    /**
2648     * The actual object that is the target of the reference (The patient, or group of patients whose sequencing results are described by this resource.)
2649     */
2650    protected Patient patientTarget;
2651
2652    /**
2653     * Specimen used for sequencing.
2654     */
2655    @Child(name = "specimen", type = {Specimen.class}, order=2, min=0, max=1, modifier=false, summary=true)
2656    @Description(shortDefinition="Specimen used for sequencing", formalDefinition="Specimen used for sequencing." )
2657    protected Reference specimen;
2658
2659    /**
2660     * The actual object that is the target of the reference (Specimen used for sequencing.)
2661     */
2662    protected Specimen specimenTarget;
2663
2664    /**
2665     * The method for sequencing, for example, chip information.
2666     */
2667    @Child(name = "device", type = {Device.class}, order=3, min=0, max=1, modifier=false, summary=true)
2668    @Description(shortDefinition="The method for sequencing", formalDefinition="The method for sequencing, for example, chip information." )
2669    protected Reference device;
2670
2671    /**
2672     * The actual object that is the target of the reference (The method for sequencing, for example, chip information.)
2673     */
2674    protected Device deviceTarget;
2675
2676    /**
2677     * Quantity of the sequence.
2678     */
2679    @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=true)
2680    @Description(shortDefinition="Quantity of the sequence", formalDefinition="Quantity of the sequence." )
2681    protected Quantity quantity;
2682
2683    /**
2684     * The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria.
2685     */
2686    @Child(name = "species", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true)
2687    @Description(shortDefinition="Supporting tests of human, viruses, and bacteria", formalDefinition="The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria." )
2688    protected CodeableConcept species;
2689
2690    /**
2691     * Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined.  The other way is using  genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .
2692     */
2693    @Child(name = "referenceSeq", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2694    @Description(shortDefinition="Reference sequence", formalDefinition="Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined.  The other way is using  genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) ." )
2695    protected List<SequenceReferenceSeqComponent> referenceSeq;
2696
2697    /**
2698     * Variation info in this sequence.
2699     */
2700    @Child(name = "variation", type = {}, order=7, min=0, max=1, modifier=false, summary=true)
2701    @Description(shortDefinition="Variation info in this sequence", formalDefinition="Variation info in this sequence." )
2702    protected SequenceVariationComponent variation;
2703
2704    /**
2705     * Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing.
2706     */
2707    @Child(name = "quality", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2708    @Description(shortDefinition="Sequence Quality", formalDefinition="Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing." )
2709    protected List<SequenceQualityComponent> quality;
2710
2711    /**
2712     * The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA.
2713     */
2714    @Child(name = "allelicState", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true)
2715    @Description(shortDefinition="The level of occurrence of a single DNA Sequence Variation within a set of chromosomes: Heteroplasmic / Homoplasmic / Homozygous / Heterozygous / Hemizygous", formalDefinition="The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA." )
2716    protected CodeableConcept allelicState;
2717
2718    /**
2719     * Allele frequencies.
2720     */
2721    @Child(name = "allelicFrequency", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true)
2722    @Description(shortDefinition="Allele frequencies", formalDefinition="Allele frequencies." )
2723    protected DecimalType allelicFrequency;
2724
2725    /**
2726     * Values: amplificaiton / deletion / LOH.
2727     */
2728    @Child(name = "copyNumberEvent", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true)
2729    @Description(shortDefinition="Copy Number Event: Values: amplificaiton / deletion / LOH", formalDefinition="Values: amplificaiton / deletion / LOH." )
2730    protected CodeableConcept copyNumberEvent;
2731
2732    /**
2733     * Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
2734     */
2735    @Child(name = "readCoverage", type = {IntegerType.class}, order=12, min=0, max=1, modifier=false, summary=true)
2736    @Description(shortDefinition="Average number of reads representing a given nucleotide in the reconstructed sequence", formalDefinition="Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence." )
2737    protected IntegerType readCoverage;
2738
2739    /**
2740     * Configurations of the external repository.
2741     */
2742    @Child(name = "repository", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2743    @Description(shortDefinition="External repository", formalDefinition="Configurations of the external repository." )
2744    protected List<SequenceRepositoryComponent> repository;
2745
2746    /**
2747     * Pointer to next atomic sequence which at most contains one variation.
2748     */
2749    @Child(name = "pointer", type = {Sequence.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2750    @Description(shortDefinition="Pointer to next atomic sequence", formalDefinition="Pointer to next atomic sequence which at most contains one variation." )
2751    protected List<Reference> pointer;
2752    /**
2753     * The actual objects that are the target of the reference (Pointer to next atomic sequence which at most contains one variation.)
2754     */
2755    protected List<Sequence> pointerTarget;
2756
2757
2758    /**
2759     * Observed Sequence.
2760     */
2761    @Child(name = "observedSeq", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true)
2762    @Description(shortDefinition="Observed Sequence", formalDefinition="Observed Sequence." )
2763    protected StringType observedSeq;
2764
2765    /**
2766     * Analysis of the sequence.
2767     */
2768    @Child(name = "observation", type = {Observation.class}, order=16, min=0, max=1, modifier=false, summary=true)
2769    @Description(shortDefinition="Observation-genetics", formalDefinition="Analysis of the sequence." )
2770    protected Reference observation;
2771
2772    /**
2773     * The actual object that is the target of the reference (Analysis of the sequence.)
2774     */
2775    protected Observation observationTarget;
2776
2777    /**
2778     * Structural variant.
2779     */
2780    @Child(name = "structureVariation", type = {}, order=17, min=0, max=1, modifier=false, summary=true)
2781    @Description(shortDefinition="", formalDefinition="Structural variant." )
2782    protected SequenceStructureVariationComponent structureVariation;
2783
2784    private static final long serialVersionUID = -1153660995L;
2785
2786  /**
2787   * Constructor
2788   */
2789    public Sequence() {
2790      super();
2791    }
2792
2793  /**
2794   * Constructor
2795   */
2796    public Sequence(Enumeration<SequenceType> type) {
2797      super();
2798      this.type = type;
2799    }
2800
2801    /**
2802     * @return {@link #type} (Amino acid / cDNA transcript / RNA variation.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2803     */
2804    public Enumeration<SequenceType> getTypeElement() { 
2805      if (this.type == null)
2806        if (Configuration.errorOnAutoCreate())
2807          throw new Error("Attempt to auto-create Sequence.type");
2808        else if (Configuration.doAutoCreate())
2809          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory()); // bb
2810      return this.type;
2811    }
2812
2813    public boolean hasTypeElement() { 
2814      return this.type != null && !this.type.isEmpty();
2815    }
2816
2817    public boolean hasType() { 
2818      return this.type != null && !this.type.isEmpty();
2819    }
2820
2821    /**
2822     * @param value {@link #type} (Amino acid / cDNA transcript / RNA variation.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2823     */
2824    public Sequence setTypeElement(Enumeration<SequenceType> value) { 
2825      this.type = value;
2826      return this;
2827    }
2828
2829    /**
2830     * @return Amino acid / cDNA transcript / RNA variation.
2831     */
2832    public SequenceType getType() { 
2833      return this.type == null ? null : this.type.getValue();
2834    }
2835
2836    /**
2837     * @param value Amino acid / cDNA transcript / RNA variation.
2838     */
2839    public Sequence setType(SequenceType value) { 
2840        if (this.type == null)
2841          this.type = new Enumeration<SequenceType>(new SequenceTypeEnumFactory());
2842        this.type.setValue(value);
2843      return this;
2844    }
2845
2846    /**
2847     * @return {@link #patient} (The patient, or group of patients whose sequencing results are described by this resource.)
2848     */
2849    public Reference getPatient() { 
2850      if (this.patient == null)
2851        if (Configuration.errorOnAutoCreate())
2852          throw new Error("Attempt to auto-create Sequence.patient");
2853        else if (Configuration.doAutoCreate())
2854          this.patient = new Reference(); // cc
2855      return this.patient;
2856    }
2857
2858    public boolean hasPatient() { 
2859      return this.patient != null && !this.patient.isEmpty();
2860    }
2861
2862    /**
2863     * @param value {@link #patient} (The patient, or group of patients whose sequencing results are described by this resource.)
2864     */
2865    public Sequence setPatient(Reference value) { 
2866      this.patient = value;
2867      return this;
2868    }
2869
2870    /**
2871     * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, or group of patients whose sequencing results are described by this resource.)
2872     */
2873    public Patient getPatientTarget() { 
2874      if (this.patientTarget == null)
2875        if (Configuration.errorOnAutoCreate())
2876          throw new Error("Attempt to auto-create Sequence.patient");
2877        else if (Configuration.doAutoCreate())
2878          this.patientTarget = new Patient(); // aa
2879      return this.patientTarget;
2880    }
2881
2882    /**
2883     * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, or group of patients whose sequencing results are described by this resource.)
2884     */
2885    public Sequence setPatientTarget(Patient value) { 
2886      this.patientTarget = value;
2887      return this;
2888    }
2889
2890    /**
2891     * @return {@link #specimen} (Specimen used for sequencing.)
2892     */
2893    public Reference getSpecimen() { 
2894      if (this.specimen == null)
2895        if (Configuration.errorOnAutoCreate())
2896          throw new Error("Attempt to auto-create Sequence.specimen");
2897        else if (Configuration.doAutoCreate())
2898          this.specimen = new Reference(); // cc
2899      return this.specimen;
2900    }
2901
2902    public boolean hasSpecimen() { 
2903      return this.specimen != null && !this.specimen.isEmpty();
2904    }
2905
2906    /**
2907     * @param value {@link #specimen} (Specimen used for sequencing.)
2908     */
2909    public Sequence setSpecimen(Reference value) { 
2910      this.specimen = value;
2911      return this;
2912    }
2913
2914    /**
2915     * @return {@link #specimen} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Specimen used for sequencing.)
2916     */
2917    public Specimen getSpecimenTarget() { 
2918      if (this.specimenTarget == null)
2919        if (Configuration.errorOnAutoCreate())
2920          throw new Error("Attempt to auto-create Sequence.specimen");
2921        else if (Configuration.doAutoCreate())
2922          this.specimenTarget = new Specimen(); // aa
2923      return this.specimenTarget;
2924    }
2925
2926    /**
2927     * @param value {@link #specimen} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Specimen used for sequencing.)
2928     */
2929    public Sequence setSpecimenTarget(Specimen value) { 
2930      this.specimenTarget = value;
2931      return this;
2932    }
2933
2934    /**
2935     * @return {@link #device} (The method for sequencing, for example, chip information.)
2936     */
2937    public Reference getDevice() { 
2938      if (this.device == null)
2939        if (Configuration.errorOnAutoCreate())
2940          throw new Error("Attempt to auto-create Sequence.device");
2941        else if (Configuration.doAutoCreate())
2942          this.device = new Reference(); // cc
2943      return this.device;
2944    }
2945
2946    public boolean hasDevice() { 
2947      return this.device != null && !this.device.isEmpty();
2948    }
2949
2950    /**
2951     * @param value {@link #device} (The method for sequencing, for example, chip information.)
2952     */
2953    public Sequence setDevice(Reference value) { 
2954      this.device = value;
2955      return this;
2956    }
2957
2958    /**
2959     * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The method for sequencing, for example, chip information.)
2960     */
2961    public Device getDeviceTarget() { 
2962      if (this.deviceTarget == null)
2963        if (Configuration.errorOnAutoCreate())
2964          throw new Error("Attempt to auto-create Sequence.device");
2965        else if (Configuration.doAutoCreate())
2966          this.deviceTarget = new Device(); // aa
2967      return this.deviceTarget;
2968    }
2969
2970    /**
2971     * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The method for sequencing, for example, chip information.)
2972     */
2973    public Sequence setDeviceTarget(Device value) { 
2974      this.deviceTarget = value;
2975      return this;
2976    }
2977
2978    /**
2979     * @return {@link #quantity} (Quantity of the sequence.)
2980     */
2981    public Quantity getQuantity() { 
2982      if (this.quantity == null)
2983        if (Configuration.errorOnAutoCreate())
2984          throw new Error("Attempt to auto-create Sequence.quantity");
2985        else if (Configuration.doAutoCreate())
2986          this.quantity = new Quantity(); // cc
2987      return this.quantity;
2988    }
2989
2990    public boolean hasQuantity() { 
2991      return this.quantity != null && !this.quantity.isEmpty();
2992    }
2993
2994    /**
2995     * @param value {@link #quantity} (Quantity of the sequence.)
2996     */
2997    public Sequence setQuantity(Quantity value) { 
2998      this.quantity = value;
2999      return this;
3000    }
3001
3002    /**
3003     * @return {@link #species} (The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria.)
3004     */
3005    public CodeableConcept getSpecies() { 
3006      if (this.species == null)
3007        if (Configuration.errorOnAutoCreate())
3008          throw new Error("Attempt to auto-create Sequence.species");
3009        else if (Configuration.doAutoCreate())
3010          this.species = new CodeableConcept(); // cc
3011      return this.species;
3012    }
3013
3014    public boolean hasSpecies() { 
3015      return this.species != null && !this.species.isEmpty();
3016    }
3017
3018    /**
3019     * @param value {@link #species} (The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria.)
3020     */
3021    public Sequence setSpecies(CodeableConcept value) { 
3022      this.species = value;
3023      return this;
3024    }
3025
3026    /**
3027     * @return {@link #referenceSeq} (Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined.  The other way is using  genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .)
3028     */
3029    public List<SequenceReferenceSeqComponent> getReferenceSeq() { 
3030      if (this.referenceSeq == null)
3031        this.referenceSeq = new ArrayList<SequenceReferenceSeqComponent>();
3032      return this.referenceSeq;
3033    }
3034
3035    public boolean hasReferenceSeq() { 
3036      if (this.referenceSeq == null)
3037        return false;
3038      for (SequenceReferenceSeqComponent item : this.referenceSeq)
3039        if (!item.isEmpty())
3040          return true;
3041      return false;
3042    }
3043
3044    /**
3045     * @return {@link #referenceSeq} (Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined.  The other way is using  genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .)
3046     */
3047    // syntactic sugar
3048    public SequenceReferenceSeqComponent addReferenceSeq() { //3
3049      SequenceReferenceSeqComponent t = new SequenceReferenceSeqComponent();
3050      if (this.referenceSeq == null)
3051        this.referenceSeq = new ArrayList<SequenceReferenceSeqComponent>();
3052      this.referenceSeq.add(t);
3053      return t;
3054    }
3055
3056    // syntactic sugar
3057    public Sequence addReferenceSeq(SequenceReferenceSeqComponent t) { //3
3058      if (t == null)
3059        return this;
3060      if (this.referenceSeq == null)
3061        this.referenceSeq = new ArrayList<SequenceReferenceSeqComponent>();
3062      this.referenceSeq.add(t);
3063      return this;
3064    }
3065
3066    /**
3067     * @return {@link #variation} (Variation info in this sequence.)
3068     */
3069    public SequenceVariationComponent getVariation() { 
3070      if (this.variation == null)
3071        if (Configuration.errorOnAutoCreate())
3072          throw new Error("Attempt to auto-create Sequence.variation");
3073        else if (Configuration.doAutoCreate())
3074          this.variation = new SequenceVariationComponent(); // cc
3075      return this.variation;
3076    }
3077
3078    public boolean hasVariation() { 
3079      return this.variation != null && !this.variation.isEmpty();
3080    }
3081
3082    /**
3083     * @param value {@link #variation} (Variation info in this sequence.)
3084     */
3085    public Sequence setVariation(SequenceVariationComponent value) { 
3086      this.variation = value;
3087      return this;
3088    }
3089
3090    /**
3091     * @return {@link #quality} (Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing.)
3092     */
3093    public List<SequenceQualityComponent> getQuality() { 
3094      if (this.quality == null)
3095        this.quality = new ArrayList<SequenceQualityComponent>();
3096      return this.quality;
3097    }
3098
3099    public boolean hasQuality() { 
3100      if (this.quality == null)
3101        return false;
3102      for (SequenceQualityComponent item : this.quality)
3103        if (!item.isEmpty())
3104          return true;
3105      return false;
3106    }
3107
3108    /**
3109     * @return {@link #quality} (Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing.)
3110     */
3111    // syntactic sugar
3112    public SequenceQualityComponent addQuality() { //3
3113      SequenceQualityComponent t = new SequenceQualityComponent();
3114      if (this.quality == null)
3115        this.quality = new ArrayList<SequenceQualityComponent>();
3116      this.quality.add(t);
3117      return t;
3118    }
3119
3120    // syntactic sugar
3121    public Sequence addQuality(SequenceQualityComponent t) { //3
3122      if (t == null)
3123        return this;
3124      if (this.quality == null)
3125        this.quality = new ArrayList<SequenceQualityComponent>();
3126      this.quality.add(t);
3127      return this;
3128    }
3129
3130    /**
3131     * @return {@link #allelicState} (The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA.)
3132     */
3133    public CodeableConcept getAllelicState() { 
3134      if (this.allelicState == null)
3135        if (Configuration.errorOnAutoCreate())
3136          throw new Error("Attempt to auto-create Sequence.allelicState");
3137        else if (Configuration.doAutoCreate())
3138          this.allelicState = new CodeableConcept(); // cc
3139      return this.allelicState;
3140    }
3141
3142    public boolean hasAllelicState() { 
3143      return this.allelicState != null && !this.allelicState.isEmpty();
3144    }
3145
3146    /**
3147     * @param value {@link #allelicState} (The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA.)
3148     */
3149    public Sequence setAllelicState(CodeableConcept value) { 
3150      this.allelicState = value;
3151      return this;
3152    }
3153
3154    /**
3155     * @return {@link #allelicFrequency} (Allele frequencies.). This is the underlying object with id, value and extensions. The accessor "getAllelicFrequency" gives direct access to the value
3156     */
3157    public DecimalType getAllelicFrequencyElement() { 
3158      if (this.allelicFrequency == null)
3159        if (Configuration.errorOnAutoCreate())
3160          throw new Error("Attempt to auto-create Sequence.allelicFrequency");
3161        else if (Configuration.doAutoCreate())
3162          this.allelicFrequency = new DecimalType(); // bb
3163      return this.allelicFrequency;
3164    }
3165
3166    public boolean hasAllelicFrequencyElement() { 
3167      return this.allelicFrequency != null && !this.allelicFrequency.isEmpty();
3168    }
3169
3170    public boolean hasAllelicFrequency() { 
3171      return this.allelicFrequency != null && !this.allelicFrequency.isEmpty();
3172    }
3173
3174    /**
3175     * @param value {@link #allelicFrequency} (Allele frequencies.). This is the underlying object with id, value and extensions. The accessor "getAllelicFrequency" gives direct access to the value
3176     */
3177    public Sequence setAllelicFrequencyElement(DecimalType value) { 
3178      this.allelicFrequency = value;
3179      return this;
3180    }
3181
3182    /**
3183     * @return Allele frequencies.
3184     */
3185    public BigDecimal getAllelicFrequency() { 
3186      return this.allelicFrequency == null ? null : this.allelicFrequency.getValue();
3187    }
3188
3189    /**
3190     * @param value Allele frequencies.
3191     */
3192    public Sequence setAllelicFrequency(BigDecimal value) { 
3193      if (value == null)
3194        this.allelicFrequency = null;
3195      else {
3196        if (this.allelicFrequency == null)
3197          this.allelicFrequency = new DecimalType();
3198        this.allelicFrequency.setValue(value);
3199      }
3200      return this;
3201    }
3202
3203    /**
3204     * @param value Allele frequencies.
3205     */
3206    public Sequence setAllelicFrequency(long value) { 
3207          this.allelicFrequency = new DecimalType();
3208        this.allelicFrequency.setValue(value);
3209      return this;
3210    }
3211
3212    /**
3213     * @param value Allele frequencies.
3214     */
3215    public Sequence setAllelicFrequency(double value) { 
3216          this.allelicFrequency = new DecimalType();
3217        this.allelicFrequency.setValue(value);
3218      return this;
3219    }
3220
3221    /**
3222     * @return {@link #copyNumberEvent} (Values: amplificaiton / deletion / LOH.)
3223     */
3224    public CodeableConcept getCopyNumberEvent() { 
3225      if (this.copyNumberEvent == null)
3226        if (Configuration.errorOnAutoCreate())
3227          throw new Error("Attempt to auto-create Sequence.copyNumberEvent");
3228        else if (Configuration.doAutoCreate())
3229          this.copyNumberEvent = new CodeableConcept(); // cc
3230      return this.copyNumberEvent;
3231    }
3232
3233    public boolean hasCopyNumberEvent() { 
3234      return this.copyNumberEvent != null && !this.copyNumberEvent.isEmpty();
3235    }
3236
3237    /**
3238     * @param value {@link #copyNumberEvent} (Values: amplificaiton / deletion / LOH.)
3239     */
3240    public Sequence setCopyNumberEvent(CodeableConcept value) { 
3241      this.copyNumberEvent = value;
3242      return this;
3243    }
3244
3245    /**
3246     * @return {@link #readCoverage} (Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.). This is the underlying object with id, value and extensions. The accessor "getReadCoverage" gives direct access to the value
3247     */
3248    public IntegerType getReadCoverageElement() { 
3249      if (this.readCoverage == null)
3250        if (Configuration.errorOnAutoCreate())
3251          throw new Error("Attempt to auto-create Sequence.readCoverage");
3252        else if (Configuration.doAutoCreate())
3253          this.readCoverage = new IntegerType(); // bb
3254      return this.readCoverage;
3255    }
3256
3257    public boolean hasReadCoverageElement() { 
3258      return this.readCoverage != null && !this.readCoverage.isEmpty();
3259    }
3260
3261    public boolean hasReadCoverage() { 
3262      return this.readCoverage != null && !this.readCoverage.isEmpty();
3263    }
3264
3265    /**
3266     * @param value {@link #readCoverage} (Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.). This is the underlying object with id, value and extensions. The accessor "getReadCoverage" gives direct access to the value
3267     */
3268    public Sequence setReadCoverageElement(IntegerType value) { 
3269      this.readCoverage = value;
3270      return this;
3271    }
3272
3273    /**
3274     * @return Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
3275     */
3276    public int getReadCoverage() { 
3277      return this.readCoverage == null || this.readCoverage.isEmpty() ? 0 : this.readCoverage.getValue();
3278    }
3279
3280    /**
3281     * @param value Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.
3282     */
3283    public Sequence setReadCoverage(int value) { 
3284        if (this.readCoverage == null)
3285          this.readCoverage = new IntegerType();
3286        this.readCoverage.setValue(value);
3287      return this;
3288    }
3289
3290    /**
3291     * @return {@link #repository} (Configurations of the external repository.)
3292     */
3293    public List<SequenceRepositoryComponent> getRepository() { 
3294      if (this.repository == null)
3295        this.repository = new ArrayList<SequenceRepositoryComponent>();
3296      return this.repository;
3297    }
3298
3299    public boolean hasRepository() { 
3300      if (this.repository == null)
3301        return false;
3302      for (SequenceRepositoryComponent item : this.repository)
3303        if (!item.isEmpty())
3304          return true;
3305      return false;
3306    }
3307
3308    /**
3309     * @return {@link #repository} (Configurations of the external repository.)
3310     */
3311    // syntactic sugar
3312    public SequenceRepositoryComponent addRepository() { //3
3313      SequenceRepositoryComponent t = new SequenceRepositoryComponent();
3314      if (this.repository == null)
3315        this.repository = new ArrayList<SequenceRepositoryComponent>();
3316      this.repository.add(t);
3317      return t;
3318    }
3319
3320    // syntactic sugar
3321    public Sequence addRepository(SequenceRepositoryComponent t) { //3
3322      if (t == null)
3323        return this;
3324      if (this.repository == null)
3325        this.repository = new ArrayList<SequenceRepositoryComponent>();
3326      this.repository.add(t);
3327      return this;
3328    }
3329
3330    /**
3331     * @return {@link #pointer} (Pointer to next atomic sequence which at most contains one variation.)
3332     */
3333    public List<Reference> getPointer() { 
3334      if (this.pointer == null)
3335        this.pointer = new ArrayList<Reference>();
3336      return this.pointer;
3337    }
3338
3339    public boolean hasPointer() { 
3340      if (this.pointer == null)
3341        return false;
3342      for (Reference item : this.pointer)
3343        if (!item.isEmpty())
3344          return true;
3345      return false;
3346    }
3347
3348    /**
3349     * @return {@link #pointer} (Pointer to next atomic sequence which at most contains one variation.)
3350     */
3351    // syntactic sugar
3352    public Reference addPointer() { //3
3353      Reference t = new Reference();
3354      if (this.pointer == null)
3355        this.pointer = new ArrayList<Reference>();
3356      this.pointer.add(t);
3357      return t;
3358    }
3359
3360    // syntactic sugar
3361    public Sequence addPointer(Reference t) { //3
3362      if (t == null)
3363        return this;
3364      if (this.pointer == null)
3365        this.pointer = new ArrayList<Reference>();
3366      this.pointer.add(t);
3367      return this;
3368    }
3369
3370    /**
3371     * @return {@link #pointer} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Pointer to next atomic sequence which at most contains one variation.)
3372     */
3373    public List<Sequence> getPointerTarget() { 
3374      if (this.pointerTarget == null)
3375        this.pointerTarget = new ArrayList<Sequence>();
3376      return this.pointerTarget;
3377    }
3378
3379    // syntactic sugar
3380    /**
3381     * @return {@link #pointer} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Pointer to next atomic sequence which at most contains one variation.)
3382     */
3383    public Sequence addPointerTarget() { 
3384      Sequence r = new Sequence();
3385      if (this.pointerTarget == null)
3386        this.pointerTarget = new ArrayList<Sequence>();
3387      this.pointerTarget.add(r);
3388      return r;
3389    }
3390
3391    /**
3392     * @return {@link #observedSeq} (Observed Sequence.). This is the underlying object with id, value and extensions. The accessor "getObservedSeq" gives direct access to the value
3393     */
3394    public StringType getObservedSeqElement() { 
3395      if (this.observedSeq == null)
3396        if (Configuration.errorOnAutoCreate())
3397          throw new Error("Attempt to auto-create Sequence.observedSeq");
3398        else if (Configuration.doAutoCreate())
3399          this.observedSeq = new StringType(); // bb
3400      return this.observedSeq;
3401    }
3402
3403    public boolean hasObservedSeqElement() { 
3404      return this.observedSeq != null && !this.observedSeq.isEmpty();
3405    }
3406
3407    public boolean hasObservedSeq() { 
3408      return this.observedSeq != null && !this.observedSeq.isEmpty();
3409    }
3410
3411    /**
3412     * @param value {@link #observedSeq} (Observed Sequence.). This is the underlying object with id, value and extensions. The accessor "getObservedSeq" gives direct access to the value
3413     */
3414    public Sequence setObservedSeqElement(StringType value) { 
3415      this.observedSeq = value;
3416      return this;
3417    }
3418
3419    /**
3420     * @return Observed Sequence.
3421     */
3422    public String getObservedSeq() { 
3423      return this.observedSeq == null ? null : this.observedSeq.getValue();
3424    }
3425
3426    /**
3427     * @param value Observed Sequence.
3428     */
3429    public Sequence setObservedSeq(String value) { 
3430      if (Utilities.noString(value))
3431        this.observedSeq = null;
3432      else {
3433        if (this.observedSeq == null)
3434          this.observedSeq = new StringType();
3435        this.observedSeq.setValue(value);
3436      }
3437      return this;
3438    }
3439
3440    /**
3441     * @return {@link #observation} (Analysis of the sequence.)
3442     */
3443    public Reference getObservation() { 
3444      if (this.observation == null)
3445        if (Configuration.errorOnAutoCreate())
3446          throw new Error("Attempt to auto-create Sequence.observation");
3447        else if (Configuration.doAutoCreate())
3448          this.observation = new Reference(); // cc
3449      return this.observation;
3450    }
3451
3452    public boolean hasObservation() { 
3453      return this.observation != null && !this.observation.isEmpty();
3454    }
3455
3456    /**
3457     * @param value {@link #observation} (Analysis of the sequence.)
3458     */
3459    public Sequence setObservation(Reference value) { 
3460      this.observation = value;
3461      return this;
3462    }
3463
3464    /**
3465     * @return {@link #observation} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Analysis of the sequence.)
3466     */
3467    public Observation getObservationTarget() { 
3468      if (this.observationTarget == null)
3469        if (Configuration.errorOnAutoCreate())
3470          throw new Error("Attempt to auto-create Sequence.observation");
3471        else if (Configuration.doAutoCreate())
3472          this.observationTarget = new Observation(); // aa
3473      return this.observationTarget;
3474    }
3475
3476    /**
3477     * @param value {@link #observation} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Analysis of the sequence.)
3478     */
3479    public Sequence setObservationTarget(Observation value) { 
3480      this.observationTarget = value;
3481      return this;
3482    }
3483
3484    /**
3485     * @return {@link #structureVariation} (Structural variant.)
3486     */
3487    public SequenceStructureVariationComponent getStructureVariation() { 
3488      if (this.structureVariation == null)
3489        if (Configuration.errorOnAutoCreate())
3490          throw new Error("Attempt to auto-create Sequence.structureVariation");
3491        else if (Configuration.doAutoCreate())
3492          this.structureVariation = new SequenceStructureVariationComponent(); // cc
3493      return this.structureVariation;
3494    }
3495
3496    public boolean hasStructureVariation() { 
3497      return this.structureVariation != null && !this.structureVariation.isEmpty();
3498    }
3499
3500    /**
3501     * @param value {@link #structureVariation} (Structural variant.)
3502     */
3503    public Sequence setStructureVariation(SequenceStructureVariationComponent value) { 
3504      this.structureVariation = value;
3505      return this;
3506    }
3507
3508      protected void listChildren(List<Property> childrenList) {
3509        super.listChildren(childrenList);
3510        childrenList.add(new Property("type", "code", "Amino acid / cDNA transcript / RNA variation.", 0, java.lang.Integer.MAX_VALUE, type));
3511        childrenList.add(new Property("patient", "Reference(Patient)", "The patient, or group of patients whose sequencing results are described by this resource.", 0, java.lang.Integer.MAX_VALUE, patient));
3512        childrenList.add(new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, java.lang.Integer.MAX_VALUE, specimen));
3513        childrenList.add(new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, java.lang.Integer.MAX_VALUE, device));
3514        childrenList.add(new Property("quantity", "Quantity", "Quantity of the sequence.", 0, java.lang.Integer.MAX_VALUE, quantity));
3515        childrenList.add(new Property("species", "CodeableConcept", "The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria.", 0, java.lang.Integer.MAX_VALUE, species));
3516        childrenList.add(new Property("referenceSeq", "", "Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined.  The other way is using  genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .", 0, java.lang.Integer.MAX_VALUE, referenceSeq));
3517        childrenList.add(new Property("variation", "", "Variation info in this sequence.", 0, java.lang.Integer.MAX_VALUE, variation));
3518        childrenList.add(new Property("quality", "", "Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing.", 0, java.lang.Integer.MAX_VALUE, quality));
3519        childrenList.add(new Property("allelicState", "CodeableConcept", "The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA.", 0, java.lang.Integer.MAX_VALUE, allelicState));
3520        childrenList.add(new Property("allelicFrequency", "decimal", "Allele frequencies.", 0, java.lang.Integer.MAX_VALUE, allelicFrequency));
3521        childrenList.add(new Property("copyNumberEvent", "CodeableConcept", "Values: amplificaiton / deletion / LOH.", 0, java.lang.Integer.MAX_VALUE, copyNumberEvent));
3522        childrenList.add(new Property("readCoverage", "integer", "Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", 0, java.lang.Integer.MAX_VALUE, readCoverage));
3523        childrenList.add(new Property("repository", "", "Configurations of the external repository.", 0, java.lang.Integer.MAX_VALUE, repository));
3524        childrenList.add(new Property("pointer", "Reference(Sequence)", "Pointer to next atomic sequence which at most contains one variation.", 0, java.lang.Integer.MAX_VALUE, pointer));
3525        childrenList.add(new Property("observedSeq", "string", "Observed Sequence.", 0, java.lang.Integer.MAX_VALUE, observedSeq));
3526        childrenList.add(new Property("observation", "Reference(Observation)", "Analysis of the sequence.", 0, java.lang.Integer.MAX_VALUE, observation));
3527        childrenList.add(new Property("structureVariation", "", "Structural variant.", 0, java.lang.Integer.MAX_VALUE, structureVariation));
3528      }
3529
3530      @Override
3531      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3532        switch (hash) {
3533        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SequenceType>
3534        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
3535        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : new Base[] {this.specimen}; // Reference
3536        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
3537        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
3538        case -2008465092: /*species*/ return this.species == null ? new Base[0] : new Base[] {this.species}; // CodeableConcept
3539        case -502547180: /*referenceSeq*/ return this.referenceSeq == null ? new Base[0] : this.referenceSeq.toArray(new Base[this.referenceSeq.size()]); // SequenceReferenceSeqComponent
3540        case -81944045: /*variation*/ return this.variation == null ? new Base[0] : new Base[] {this.variation}; // SequenceVariationComponent
3541        case 651215103: /*quality*/ return this.quality == null ? new Base[0] : this.quality.toArray(new Base[this.quality.size()]); // SequenceQualityComponent
3542        case 2079026319: /*allelicState*/ return this.allelicState == null ? new Base[0] : new Base[] {this.allelicState}; // CodeableConcept
3543        case 8650330: /*allelicFrequency*/ return this.allelicFrequency == null ? new Base[0] : new Base[] {this.allelicFrequency}; // DecimalType
3544        case 960854556: /*copyNumberEvent*/ return this.copyNumberEvent == null ? new Base[0] : new Base[] {this.copyNumberEvent}; // CodeableConcept
3545        case -1798816354: /*readCoverage*/ return this.readCoverage == null ? new Base[0] : new Base[] {this.readCoverage}; // IntegerType
3546        case 1950800714: /*repository*/ return this.repository == null ? new Base[0] : this.repository.toArray(new Base[this.repository.size()]); // SequenceRepositoryComponent
3547        case -400605635: /*pointer*/ return this.pointer == null ? new Base[0] : this.pointer.toArray(new Base[this.pointer.size()]); // Reference
3548        case 125541495: /*observedSeq*/ return this.observedSeq == null ? new Base[0] : new Base[] {this.observedSeq}; // StringType
3549        case 122345516: /*observation*/ return this.observation == null ? new Base[0] : new Base[] {this.observation}; // Reference
3550        case 1886586336: /*structureVariation*/ return this.structureVariation == null ? new Base[0] : new Base[] {this.structureVariation}; // SequenceStructureVariationComponent
3551        default: return super.getProperty(hash, name, checkValid);
3552        }
3553
3554      }
3555
3556      @Override
3557      public void setProperty(int hash, String name, Base value) throws FHIRException {
3558        switch (hash) {
3559        case 3575610: // type
3560          this.type = new SequenceTypeEnumFactory().fromType(value); // Enumeration<SequenceType>
3561          break;
3562        case -791418107: // patient
3563          this.patient = castToReference(value); // Reference
3564          break;
3565        case -2132868344: // specimen
3566          this.specimen = castToReference(value); // Reference
3567          break;
3568        case -1335157162: // device
3569          this.device = castToReference(value); // Reference
3570          break;
3571        case -1285004149: // quantity
3572          this.quantity = castToQuantity(value); // Quantity
3573          break;
3574        case -2008465092: // species
3575          this.species = castToCodeableConcept(value); // CodeableConcept
3576          break;
3577        case -502547180: // referenceSeq
3578          this.getReferenceSeq().add((SequenceReferenceSeqComponent) value); // SequenceReferenceSeqComponent
3579          break;
3580        case -81944045: // variation
3581          this.variation = (SequenceVariationComponent) value; // SequenceVariationComponent
3582          break;
3583        case 651215103: // quality
3584          this.getQuality().add((SequenceQualityComponent) value); // SequenceQualityComponent
3585          break;
3586        case 2079026319: // allelicState
3587          this.allelicState = castToCodeableConcept(value); // CodeableConcept
3588          break;
3589        case 8650330: // allelicFrequency
3590          this.allelicFrequency = castToDecimal(value); // DecimalType
3591          break;
3592        case 960854556: // copyNumberEvent
3593          this.copyNumberEvent = castToCodeableConcept(value); // CodeableConcept
3594          break;
3595        case -1798816354: // readCoverage
3596          this.readCoverage = castToInteger(value); // IntegerType
3597          break;
3598        case 1950800714: // repository
3599          this.getRepository().add((SequenceRepositoryComponent) value); // SequenceRepositoryComponent
3600          break;
3601        case -400605635: // pointer
3602          this.getPointer().add(castToReference(value)); // Reference
3603          break;
3604        case 125541495: // observedSeq
3605          this.observedSeq = castToString(value); // StringType
3606          break;
3607        case 122345516: // observation
3608          this.observation = castToReference(value); // Reference
3609          break;
3610        case 1886586336: // structureVariation
3611          this.structureVariation = (SequenceStructureVariationComponent) value; // SequenceStructureVariationComponent
3612          break;
3613        default: super.setProperty(hash, name, value);
3614        }
3615
3616      }
3617
3618      @Override
3619      public void setProperty(String name, Base value) throws FHIRException {
3620        if (name.equals("type"))
3621          this.type = new SequenceTypeEnumFactory().fromType(value); // Enumeration<SequenceType>
3622        else if (name.equals("patient"))
3623          this.patient = castToReference(value); // Reference
3624        else if (name.equals("specimen"))
3625          this.specimen = castToReference(value); // Reference
3626        else if (name.equals("device"))
3627          this.device = castToReference(value); // Reference
3628        else if (name.equals("quantity"))
3629          this.quantity = castToQuantity(value); // Quantity
3630        else if (name.equals("species"))
3631          this.species = castToCodeableConcept(value); // CodeableConcept
3632        else if (name.equals("referenceSeq"))
3633          this.getReferenceSeq().add((SequenceReferenceSeqComponent) value);
3634        else if (name.equals("variation"))
3635          this.variation = (SequenceVariationComponent) value; // SequenceVariationComponent
3636        else if (name.equals("quality"))
3637          this.getQuality().add((SequenceQualityComponent) value);
3638        else if (name.equals("allelicState"))
3639          this.allelicState = castToCodeableConcept(value); // CodeableConcept
3640        else if (name.equals("allelicFrequency"))
3641          this.allelicFrequency = castToDecimal(value); // DecimalType
3642        else if (name.equals("copyNumberEvent"))
3643          this.copyNumberEvent = castToCodeableConcept(value); // CodeableConcept
3644        else if (name.equals("readCoverage"))
3645          this.readCoverage = castToInteger(value); // IntegerType
3646        else if (name.equals("repository"))
3647          this.getRepository().add((SequenceRepositoryComponent) value);
3648        else if (name.equals("pointer"))
3649          this.getPointer().add(castToReference(value));
3650        else if (name.equals("observedSeq"))
3651          this.observedSeq = castToString(value); // StringType
3652        else if (name.equals("observation"))
3653          this.observation = castToReference(value); // Reference
3654        else if (name.equals("structureVariation"))
3655          this.structureVariation = (SequenceStructureVariationComponent) value; // SequenceStructureVariationComponent
3656        else
3657          super.setProperty(name, value);
3658      }
3659
3660      @Override
3661      public Base makeProperty(int hash, String name) throws FHIRException {
3662        switch (hash) {
3663        case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<SequenceType>
3664        case -791418107:  return getPatient(); // Reference
3665        case -2132868344:  return getSpecimen(); // Reference
3666        case -1335157162:  return getDevice(); // Reference
3667        case -1285004149:  return getQuantity(); // Quantity
3668        case -2008465092:  return getSpecies(); // CodeableConcept
3669        case -502547180:  return addReferenceSeq(); // SequenceReferenceSeqComponent
3670        case -81944045:  return getVariation(); // SequenceVariationComponent
3671        case 651215103:  return addQuality(); // SequenceQualityComponent
3672        case 2079026319:  return getAllelicState(); // CodeableConcept
3673        case 8650330: throw new FHIRException("Cannot make property allelicFrequency as it is not a complex type"); // DecimalType
3674        case 960854556:  return getCopyNumberEvent(); // CodeableConcept
3675        case -1798816354: throw new FHIRException("Cannot make property readCoverage as it is not a complex type"); // IntegerType
3676        case 1950800714:  return addRepository(); // SequenceRepositoryComponent
3677        case -400605635:  return addPointer(); // Reference
3678        case 125541495: throw new FHIRException("Cannot make property observedSeq as it is not a complex type"); // StringType
3679        case 122345516:  return getObservation(); // Reference
3680        case 1886586336:  return getStructureVariation(); // SequenceStructureVariationComponent
3681        default: return super.makeProperty(hash, name);
3682        }
3683
3684      }
3685
3686      @Override
3687      public Base addChild(String name) throws FHIRException {
3688        if (name.equals("type")) {
3689          throw new FHIRException("Cannot call addChild on a primitive type Sequence.type");
3690        }
3691        else if (name.equals("patient")) {
3692          this.patient = new Reference();
3693          return this.patient;
3694        }
3695        else if (name.equals("specimen")) {
3696          this.specimen = new Reference();
3697          return this.specimen;
3698        }
3699        else if (name.equals("device")) {
3700          this.device = new Reference();
3701          return this.device;
3702        }
3703        else if (name.equals("quantity")) {
3704          this.quantity = new Quantity();
3705          return this.quantity;
3706        }
3707        else if (name.equals("species")) {
3708          this.species = new CodeableConcept();
3709          return this.species;
3710        }
3711        else if (name.equals("referenceSeq")) {
3712          return addReferenceSeq();
3713        }
3714        else if (name.equals("variation")) {
3715          this.variation = new SequenceVariationComponent();
3716          return this.variation;
3717        }
3718        else if (name.equals("quality")) {
3719          return addQuality();
3720        }
3721        else if (name.equals("allelicState")) {
3722          this.allelicState = new CodeableConcept();
3723          return this.allelicState;
3724        }
3725        else if (name.equals("allelicFrequency")) {
3726          throw new FHIRException("Cannot call addChild on a primitive type Sequence.allelicFrequency");
3727        }
3728        else if (name.equals("copyNumberEvent")) {
3729          this.copyNumberEvent = new CodeableConcept();
3730          return this.copyNumberEvent;
3731        }
3732        else if (name.equals("readCoverage")) {
3733          throw new FHIRException("Cannot call addChild on a primitive type Sequence.readCoverage");
3734        }
3735        else if (name.equals("repository")) {
3736          return addRepository();
3737        }
3738        else if (name.equals("pointer")) {
3739          return addPointer();
3740        }
3741        else if (name.equals("observedSeq")) {
3742          throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedSeq");
3743        }
3744        else if (name.equals("observation")) {
3745          this.observation = new Reference();
3746          return this.observation;
3747        }
3748        else if (name.equals("structureVariation")) {
3749          this.structureVariation = new SequenceStructureVariationComponent();
3750          return this.structureVariation;
3751        }
3752        else
3753          return super.addChild(name);
3754      }
3755
3756  public String fhirType() {
3757    return "Sequence";
3758
3759  }
3760
3761      public Sequence copy() {
3762        Sequence dst = new Sequence();
3763        copyValues(dst);
3764        dst.type = type == null ? null : type.copy();
3765        dst.patient = patient == null ? null : patient.copy();
3766        dst.specimen = specimen == null ? null : specimen.copy();
3767        dst.device = device == null ? null : device.copy();
3768        dst.quantity = quantity == null ? null : quantity.copy();
3769        dst.species = species == null ? null : species.copy();
3770        if (referenceSeq != null) {
3771          dst.referenceSeq = new ArrayList<SequenceReferenceSeqComponent>();
3772          for (SequenceReferenceSeqComponent i : referenceSeq)
3773            dst.referenceSeq.add(i.copy());
3774        };
3775        dst.variation = variation == null ? null : variation.copy();
3776        if (quality != null) {
3777          dst.quality = new ArrayList<SequenceQualityComponent>();
3778          for (SequenceQualityComponent i : quality)
3779            dst.quality.add(i.copy());
3780        };
3781        dst.allelicState = allelicState == null ? null : allelicState.copy();
3782        dst.allelicFrequency = allelicFrequency == null ? null : allelicFrequency.copy();
3783        dst.copyNumberEvent = copyNumberEvent == null ? null : copyNumberEvent.copy();
3784        dst.readCoverage = readCoverage == null ? null : readCoverage.copy();
3785        if (repository != null) {
3786          dst.repository = new ArrayList<SequenceRepositoryComponent>();
3787          for (SequenceRepositoryComponent i : repository)
3788            dst.repository.add(i.copy());
3789        };
3790        if (pointer != null) {
3791          dst.pointer = new ArrayList<Reference>();
3792          for (Reference i : pointer)
3793            dst.pointer.add(i.copy());
3794        };
3795        dst.observedSeq = observedSeq == null ? null : observedSeq.copy();
3796        dst.observation = observation == null ? null : observation.copy();
3797        dst.structureVariation = structureVariation == null ? null : structureVariation.copy();
3798        return dst;
3799      }
3800
3801      protected Sequence typedCopy() {
3802        return copy();
3803      }
3804
3805      @Override
3806      public boolean equalsDeep(Base other) {
3807        if (!super.equalsDeep(other))
3808          return false;
3809        if (!(other instanceof Sequence))
3810          return false;
3811        Sequence o = (Sequence) other;
3812        return compareDeep(type, o.type, true) && compareDeep(patient, o.patient, true) && compareDeep(specimen, o.specimen, true)
3813           && compareDeep(device, o.device, true) && compareDeep(quantity, o.quantity, true) && compareDeep(species, o.species, true)
3814           && compareDeep(referenceSeq, o.referenceSeq, true) && compareDeep(variation, o.variation, true)
3815           && compareDeep(quality, o.quality, true) && compareDeep(allelicState, o.allelicState, true) && compareDeep(allelicFrequency, o.allelicFrequency, true)
3816           && compareDeep(copyNumberEvent, o.copyNumberEvent, true) && compareDeep(readCoverage, o.readCoverage, true)
3817           && compareDeep(repository, o.repository, true) && compareDeep(pointer, o.pointer, true) && compareDeep(observedSeq, o.observedSeq, true)
3818           && compareDeep(observation, o.observation, true) && compareDeep(structureVariation, o.structureVariation, true)
3819          ;
3820      }
3821
3822      @Override
3823      public boolean equalsShallow(Base other) {
3824        if (!super.equalsShallow(other))
3825          return false;
3826        if (!(other instanceof Sequence))
3827          return false;
3828        Sequence o = (Sequence) other;
3829        return compareValues(type, o.type, true) && compareValues(allelicFrequency, o.allelicFrequency, true)
3830           && compareValues(readCoverage, o.readCoverage, true) && compareValues(observedSeq, o.observedSeq, true)
3831          ;
3832      }
3833
3834      public boolean isEmpty() {
3835        return super.isEmpty() && (type == null || type.isEmpty()) && (patient == null || patient.isEmpty())
3836           && (specimen == null || specimen.isEmpty()) && (device == null || device.isEmpty()) && (quantity == null || quantity.isEmpty())
3837           && (species == null || species.isEmpty()) && (referenceSeq == null || referenceSeq.isEmpty())
3838           && (variation == null || variation.isEmpty()) && (quality == null || quality.isEmpty()) && (allelicState == null || allelicState.isEmpty())
3839           && (allelicFrequency == null || allelicFrequency.isEmpty()) && (copyNumberEvent == null || copyNumberEvent.isEmpty())
3840           && (readCoverage == null || readCoverage.isEmpty()) && (repository == null || repository.isEmpty())
3841           && (pointer == null || pointer.isEmpty()) && (observedSeq == null || observedSeq.isEmpty())
3842           && (observation == null || observation.isEmpty()) && (structureVariation == null || structureVariation.isEmpty())
3843          ;
3844      }
3845
3846  @Override
3847  public ResourceType getResourceType() {
3848    return ResourceType.Sequence;
3849   }
3850
3851 /**
3852   * Search parameter: <b>patient</b>
3853   * <p>
3854   * Description: <b>The subject that the observation is about</b><br>
3855   * Type: <b>reference</b><br>
3856   * Path: <b>Sequence.patient</b><br>
3857   * </p>
3858   */
3859  @SearchParamDefinition(name="patient", path="Sequence.patient", description="The subject that the observation is about", type="reference" )
3860  public static final String SP_PATIENT = "patient";
3861 /**
3862   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3863   * <p>
3864   * Description: <b>The subject that the observation is about</b><br>
3865   * Type: <b>reference</b><br>
3866   * Path: <b>Sequence.patient</b><br>
3867   * </p>
3868   */
3869  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3870
3871/**
3872   * Constant for fluent queries to be used to add include statements. Specifies
3873   * the path value of "<b>Sequence:patient</b>".
3874   */
3875  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Sequence:patient").toLocked();
3876
3877 /**
3878   * Search parameter: <b>species</b>
3879   * <p>
3880   * Description: <b>The organism from which sample of the sequence was extracted.</b><br>
3881   * Type: <b>token</b><br>
3882   * Path: <b>Sequence.species</b><br>
3883   * </p>
3884   */
3885  @SearchParamDefinition(name="species", path="Sequence.species", description="The organism from which sample of the sequence was extracted.", type="token" )
3886  public static final String SP_SPECIES = "species";
3887 /**
3888   * <b>Fluent Client</b> search parameter constant for <b>species</b>
3889   * <p>
3890   * Description: <b>The organism from which sample of the sequence was extracted.</b><br>
3891   * Type: <b>token</b><br>
3892   * Path: <b>Sequence.species</b><br>
3893   * </p>
3894   */
3895  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIES = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIES);
3896
3897 /**
3898   * Search parameter: <b>coordinate</b>
3899   * <p>
3900   * Description: <b>Genomic coordinate of the sequence. For example, a search for sequence in region 1:123-345 can be represented as `coordinate=1$lt345$gt123`</b><br>
3901   * Type: <b>composite</b><br>
3902   * Path: <b></b><br>
3903   * </p>
3904   */
3905  @SearchParamDefinition(name="coordinate", path="", description="Genomic coordinate of the sequence. For example, a search for sequence in region 1:123-345 can be represented as `coordinate=1$lt345$gt123`", type="composite", compositeOf={"chromosome", "start"} )
3906  public static final String SP_COORDINATE = "coordinate";
3907 /**
3908   * <b>Fluent Client</b> search parameter constant for <b>coordinate</b>
3909   * <p>
3910   * Description: <b>Genomic coordinate of the sequence. For example, a search for sequence in region 1:123-345 can be represented as `coordinate=1$lt345$gt123`</b><br>
3911   * Type: <b>composite</b><br>
3912   * Path: <b></b><br>
3913   * </p>
3914   */
3915  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam> COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.NumberClientParam>(SP_COORDINATE);
3916
3917 /**
3918   * Search parameter: <b>start</b>
3919   * <p>
3920   * Description: <b>Start position (0-based inclusive) of the sequence</b><br>
3921   * Type: <b>number</b><br>
3922   * Path: <b>Sequence.variation.start</b><br>
3923   * </p>
3924   */
3925  @SearchParamDefinition(name="start", path="Sequence.variation.start", description="Start position (0-based inclusive) of the sequence", type="number" )
3926  public static final String SP_START = "start";
3927 /**
3928   * <b>Fluent Client</b> search parameter constant for <b>start</b>
3929   * <p>
3930   * Description: <b>Start position (0-based inclusive) of the sequence</b><br>
3931   * Type: <b>number</b><br>
3932   * Path: <b>Sequence.variation.start</b><br>
3933   * </p>
3934   */
3935  public static final ca.uhn.fhir.rest.gclient.NumberClientParam START = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_START);
3936
3937 /**
3938   * Search parameter: <b>type</b>
3939   * <p>
3940   * Description: <b>The type of the variant: Amino acid / cDNA transcript / RNA variation.</b><br>
3941   * Type: <b>token</b><br>
3942   * Path: <b>Sequence.type</b><br>
3943   * </p>
3944   */
3945  @SearchParamDefinition(name="type", path="Sequence.type", description="The type of the variant: Amino acid / cDNA transcript / RNA variation.", type="token" )
3946  public static final String SP_TYPE = "type";
3947 /**
3948   * <b>Fluent Client</b> search parameter constant for <b>type</b>
3949   * <p>
3950   * Description: <b>The type of the variant: Amino acid / cDNA transcript / RNA variation.</b><br>
3951   * Type: <b>token</b><br>
3952   * Path: <b>Sequence.type</b><br>
3953   * </p>
3954   */
3955  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
3956
3957 /**
3958   * Search parameter: <b>chromosome</b>
3959   * <p>
3960   * Description: <b>Chromosome of the sequence</b><br>
3961   * Type: <b>token</b><br>
3962   * Path: <b>Sequence.referenceSeq.chromosome</b><br>
3963   * </p>
3964   */
3965  @SearchParamDefinition(name="chromosome", path="Sequence.referenceSeq.chromosome", description="Chromosome of the sequence", type="token" )
3966  public static final String SP_CHROMOSOME = "chromosome";
3967 /**
3968   * <b>Fluent Client</b> search parameter constant for <b>chromosome</b>
3969   * <p>
3970   * Description: <b>Chromosome of the sequence</b><br>
3971   * Type: <b>token</b><br>
3972   * Path: <b>Sequence.referenceSeq.chromosome</b><br>
3973   * </p>
3974   */
3975  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHROMOSOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHROMOSOME);
3976
3977 /**
3978   * Search parameter: <b>end</b>
3979   * <p>
3980   * Description: <b>End position (0-based exclusive) of the sequence</b><br>
3981   * Type: <b>number</b><br>
3982   * Path: <b>Sequence.variation.end</b><br>
3983   * </p>
3984   */
3985  @SearchParamDefinition(name="end", path="Sequence.variation.end", description="End position (0-based exclusive) of the sequence", type="number" )
3986  public static final String SP_END = "end";
3987 /**
3988   * <b>Fluent Client</b> search parameter constant for <b>end</b>
3989   * <p>
3990   * Description: <b>End position (0-based exclusive) of the sequence</b><br>
3991   * Type: <b>number</b><br>
3992   * Path: <b>Sequence.variation.end</b><br>
3993   * </p>
3994   */
3995  public static final ca.uhn.fhir.rest.gclient.NumberClientParam END = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_END);
3996
3997
3998}
3999