All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gel.models.report.avro.UniparentalDisomy Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class UniparentalDisomy extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"UniparentalDisomy\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"assembly\",\"type\":{\"type\":\"enum\",\"name\":\"Assembly\",\"doc\":\"The reference genome assembly\",\"symbols\":[\"GRCh38\",\"GRCh37\"]},\"doc\":\"The assembly\"},{\"name\":\"chromosome\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Chromosome where two homologues were inherited from one parent\"},{\"name\":\"complete\",\"type\":[\"null\",\"boolean\"],\"doc\":\"indicates Whether the UPD event involves an entire chromosome or part of a chromosome\"},{\"name\":\"origin\",\"type\":{\"type\":\"enum\",\"name\":\"UniparentalDisomyOrigin\",\"symbols\":[\"paternal\",\"maternal\",\"unknown\"]},\"doc\":\"The parent who contributed two chromosomes was the mother (maternal) or the father (paternal)\"},{\"name\":\"uniparentalDisomyFragments\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"UniparentalDisomyFragment\",\"fields\":[{\"name\":\"coordinates\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Coordinates\",\"fields\":[{\"name\":\"assembly\",\"type\":\"Assembly\",\"doc\":\"The assembly to which this variant corresponds\"},{\"name\":\"chromosome\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Chromosome without \\\"chr\\\" prefix (e.g. X rather than chrX)\"},{\"name\":\"start\",\"type\":\"int\",\"doc\":\"Start genomic position for variant (1-based)\"},{\"name\":\"end\",\"type\":\"int\",\"doc\":\"End genomic position for variant\"},{\"name\":\"ciStart\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"ConfidenceInterval\",\"fields\":[{\"name\":\"left\",\"type\":\"int\"},{\"name\":\"right\",\"type\":\"int\"}]}]},{\"name\":\"ciEnd\",\"type\":[\"null\",\"ConfidenceInterval\"]}]}],\"doc\":\"Coordinates can be specified to indicate the part of the chromosome affected\"},{\"name\":\"uniparentalDisomyType\",\"type\":{\"type\":\"enum\",\"name\":\"UniparentalDisomyType\",\"symbols\":[\"isodisomy\",\"heterodisomy\",\"both\"]},\"doc\":\"indicates whether the UPD event involves `isodisomy`, `heterodisomy` or `both`\"}]}}],\"doc\":\"List of all of the UPD fragments for this UPD event\"},{\"name\":\"participantId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Participant affected by this UPD\"},{\"name\":\"uniparentalDisomyEvidences\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"UniparentalDisomyEvidences\",\"fields\":[{\"name\":\"ibds\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"IdentityByDescent\",\"fields\":[{\"name\":\"relatedSample\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"ibd0\",\"type\":\"float\"},{\"name\":\"ibd1\",\"type\":\"float\"},{\"name\":\"ibd2\",\"type\":\"float\"},{\"name\":\"pihat\",\"type\":\"float\"}]}}]}]}],\"doc\":\"Evidences for the UPD call\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** The assembly */
   private org.gel.models.report.avro.Assembly assembly;
  /** Chromosome where two homologues were inherited from one parent */
   private java.lang.String chromosome;
  /** indicates Whether the UPD event involves an entire chromosome or part of a chromosome */
   private java.lang.Boolean complete;
  /** The parent who contributed two chromosomes was the mother (maternal) or the father (paternal) */
   private org.gel.models.report.avro.UniparentalDisomyOrigin origin;
  /** List of all of the UPD fragments for this UPD event */
   private java.util.List uniparentalDisomyFragments;
  /** Participant affected by this UPD */
   private java.lang.String participantId;
  /** Evidences for the UPD call */
   private org.gel.models.report.avro.UniparentalDisomyEvidences uniparentalDisomyEvidences;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder(). 
   */
  public UniparentalDisomy() {}

  /**
   * All-args constructor.
   */
  public UniparentalDisomy(org.gel.models.report.avro.Assembly assembly, java.lang.String chromosome, java.lang.Boolean complete, org.gel.models.report.avro.UniparentalDisomyOrigin origin, java.util.List uniparentalDisomyFragments, java.lang.String participantId, org.gel.models.report.avro.UniparentalDisomyEvidences uniparentalDisomyEvidences) {
    this.assembly = assembly;
    this.chromosome = chromosome;
    this.complete = complete;
    this.origin = origin;
    this.uniparentalDisomyFragments = uniparentalDisomyFragments;
    this.participantId = participantId;
    this.uniparentalDisomyEvidences = uniparentalDisomyEvidences;
  }

  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call. 
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return assembly;
    case 1: return chromosome;
    case 2: return complete;
    case 3: return origin;
    case 4: return uniparentalDisomyFragments;
    case 5: return participantId;
    case 6: return uniparentalDisomyEvidences;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }
  // Used by DatumReader.  Applications should not call. 
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: assembly = (org.gel.models.report.avro.Assembly)value$; break;
    case 1: chromosome = (java.lang.String)value$; break;
    case 2: complete = (java.lang.Boolean)value$; break;
    case 3: origin = (org.gel.models.report.avro.UniparentalDisomyOrigin)value$; break;
    case 4: uniparentalDisomyFragments = (java.util.List)value$; break;
    case 5: participantId = (java.lang.String)value$; break;
    case 6: uniparentalDisomyEvidences = (org.gel.models.report.avro.UniparentalDisomyEvidences)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'assembly' field.
   * The assembly   */
  public org.gel.models.report.avro.Assembly getAssembly() {
    return assembly;
  }

  /**
   * Sets the value of the 'assembly' field.
   * The assembly   * @param value the value to set.
   */
  public void setAssembly(org.gel.models.report.avro.Assembly value) {
    this.assembly = value;
  }

  /**
   * Gets the value of the 'chromosome' field.
   * Chromosome where two homologues were inherited from one parent   */
  public java.lang.String getChromosome() {
    return chromosome;
  }

  /**
   * Sets the value of the 'chromosome' field.
   * Chromosome where two homologues were inherited from one parent   * @param value the value to set.
   */
  public void setChromosome(java.lang.String value) {
    this.chromosome = value;
  }

  /**
   * Gets the value of the 'complete' field.
   * indicates Whether the UPD event involves an entire chromosome or part of a chromosome   */
  public java.lang.Boolean getComplete() {
    return complete;
  }

  /**
   * Sets the value of the 'complete' field.
   * indicates Whether the UPD event involves an entire chromosome or part of a chromosome   * @param value the value to set.
   */
  public void setComplete(java.lang.Boolean value) {
    this.complete = value;
  }

  /**
   * Gets the value of the 'origin' field.
   * The parent who contributed two chromosomes was the mother (maternal) or the father (paternal)   */
  public org.gel.models.report.avro.UniparentalDisomyOrigin getOrigin() {
    return origin;
  }

  /**
   * Sets the value of the 'origin' field.
   * The parent who contributed two chromosomes was the mother (maternal) or the father (paternal)   * @param value the value to set.
   */
  public void setOrigin(org.gel.models.report.avro.UniparentalDisomyOrigin value) {
    this.origin = value;
  }

  /**
   * Gets the value of the 'uniparentalDisomyFragments' field.
   * List of all of the UPD fragments for this UPD event   */
  public java.util.List getUniparentalDisomyFragments() {
    return uniparentalDisomyFragments;
  }

  /**
   * Sets the value of the 'uniparentalDisomyFragments' field.
   * List of all of the UPD fragments for this UPD event   * @param value the value to set.
   */
  public void setUniparentalDisomyFragments(java.util.List value) {
    this.uniparentalDisomyFragments = value;
  }

  /**
   * Gets the value of the 'participantId' field.
   * Participant affected by this UPD   */
  public java.lang.String getParticipantId() {
    return participantId;
  }

  /**
   * Sets the value of the 'participantId' field.
   * Participant affected by this UPD   * @param value the value to set.
   */
  public void setParticipantId(java.lang.String value) {
    this.participantId = value;
  }

  /**
   * Gets the value of the 'uniparentalDisomyEvidences' field.
   * Evidences for the UPD call   */
  public org.gel.models.report.avro.UniparentalDisomyEvidences getUniparentalDisomyEvidences() {
    return uniparentalDisomyEvidences;
  }

  /**
   * Sets the value of the 'uniparentalDisomyEvidences' field.
   * Evidences for the UPD call   * @param value the value to set.
   */
  public void setUniparentalDisomyEvidences(org.gel.models.report.avro.UniparentalDisomyEvidences value) {
    this.uniparentalDisomyEvidences = value;
  }

  /** Creates a new UniparentalDisomy RecordBuilder */
  public static org.gel.models.report.avro.UniparentalDisomy.Builder newBuilder() {
    return new org.gel.models.report.avro.UniparentalDisomy.Builder();
  }
  
  /** Creates a new UniparentalDisomy RecordBuilder by copying an existing Builder */
  public static org.gel.models.report.avro.UniparentalDisomy.Builder newBuilder(org.gel.models.report.avro.UniparentalDisomy.Builder other) {
    return new org.gel.models.report.avro.UniparentalDisomy.Builder(other);
  }
  
  /** Creates a new UniparentalDisomy RecordBuilder by copying an existing UniparentalDisomy instance */
  public static org.gel.models.report.avro.UniparentalDisomy.Builder newBuilder(org.gel.models.report.avro.UniparentalDisomy other) {
    return new org.gel.models.report.avro.UniparentalDisomy.Builder(other);
  }
  
  /**
   * RecordBuilder for UniparentalDisomy instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private org.gel.models.report.avro.Assembly assembly;
    private java.lang.String chromosome;
    private java.lang.Boolean complete;
    private org.gel.models.report.avro.UniparentalDisomyOrigin origin;
    private java.util.List uniparentalDisomyFragments;
    private java.lang.String participantId;
    private org.gel.models.report.avro.UniparentalDisomyEvidences uniparentalDisomyEvidences;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.UniparentalDisomy.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.UniparentalDisomy.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.assembly)) {
        this.assembly = data().deepCopy(fields()[0].schema(), other.assembly);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.chromosome)) {
        this.chromosome = data().deepCopy(fields()[1].schema(), other.chromosome);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.complete)) {
        this.complete = data().deepCopy(fields()[2].schema(), other.complete);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.origin)) {
        this.origin = data().deepCopy(fields()[3].schema(), other.origin);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.uniparentalDisomyFragments)) {
        this.uniparentalDisomyFragments = data().deepCopy(fields()[4].schema(), other.uniparentalDisomyFragments);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.participantId)) {
        this.participantId = data().deepCopy(fields()[5].schema(), other.participantId);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.uniparentalDisomyEvidences)) {
        this.uniparentalDisomyEvidences = data().deepCopy(fields()[6].schema(), other.uniparentalDisomyEvidences);
        fieldSetFlags()[6] = true;
      }
    }
    
    /** Creates a Builder by copying an existing UniparentalDisomy instance */
    private Builder(org.gel.models.report.avro.UniparentalDisomy other) {
            super(org.gel.models.report.avro.UniparentalDisomy.SCHEMA$);
      if (isValidValue(fields()[0], other.assembly)) {
        this.assembly = data().deepCopy(fields()[0].schema(), other.assembly);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.chromosome)) {
        this.chromosome = data().deepCopy(fields()[1].schema(), other.chromosome);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.complete)) {
        this.complete = data().deepCopy(fields()[2].schema(), other.complete);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.origin)) {
        this.origin = data().deepCopy(fields()[3].schema(), other.origin);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.uniparentalDisomyFragments)) {
        this.uniparentalDisomyFragments = data().deepCopy(fields()[4].schema(), other.uniparentalDisomyFragments);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.participantId)) {
        this.participantId = data().deepCopy(fields()[5].schema(), other.participantId);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.uniparentalDisomyEvidences)) {
        this.uniparentalDisomyEvidences = data().deepCopy(fields()[6].schema(), other.uniparentalDisomyEvidences);
        fieldSetFlags()[6] = true;
      }
    }

    /** Gets the value of the 'assembly' field */
    public org.gel.models.report.avro.Assembly getAssembly() {
      return assembly;
    }
    
    /** Sets the value of the 'assembly' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setAssembly(org.gel.models.report.avro.Assembly value) {
      validate(fields()[0], value);
      this.assembly = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'assembly' field has been set */
    public boolean hasAssembly() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'assembly' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearAssembly() {
      assembly = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'chromosome' field */
    public java.lang.String getChromosome() {
      return chromosome;
    }
    
    /** Sets the value of the 'chromosome' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setChromosome(java.lang.String value) {
      validate(fields()[1], value);
      this.chromosome = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'chromosome' field has been set */
    public boolean hasChromosome() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'chromosome' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearChromosome() {
      chromosome = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'complete' field */
    public java.lang.Boolean getComplete() {
      return complete;
    }
    
    /** Sets the value of the 'complete' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setComplete(java.lang.Boolean value) {
      validate(fields()[2], value);
      this.complete = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'complete' field has been set */
    public boolean hasComplete() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'complete' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearComplete() {
      complete = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'origin' field */
    public org.gel.models.report.avro.UniparentalDisomyOrigin getOrigin() {
      return origin;
    }
    
    /** Sets the value of the 'origin' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setOrigin(org.gel.models.report.avro.UniparentalDisomyOrigin value) {
      validate(fields()[3], value);
      this.origin = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'origin' field has been set */
    public boolean hasOrigin() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'origin' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearOrigin() {
      origin = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'uniparentalDisomyFragments' field */
    public java.util.List getUniparentalDisomyFragments() {
      return uniparentalDisomyFragments;
    }
    
    /** Sets the value of the 'uniparentalDisomyFragments' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setUniparentalDisomyFragments(java.util.List value) {
      validate(fields()[4], value);
      this.uniparentalDisomyFragments = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'uniparentalDisomyFragments' field has been set */
    public boolean hasUniparentalDisomyFragments() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'uniparentalDisomyFragments' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearUniparentalDisomyFragments() {
      uniparentalDisomyFragments = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'participantId' field */
    public java.lang.String getParticipantId() {
      return participantId;
    }
    
    /** Sets the value of the 'participantId' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setParticipantId(java.lang.String value) {
      validate(fields()[5], value);
      this.participantId = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'participantId' field has been set */
    public boolean hasParticipantId() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'participantId' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearParticipantId() {
      participantId = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'uniparentalDisomyEvidences' field */
    public org.gel.models.report.avro.UniparentalDisomyEvidences getUniparentalDisomyEvidences() {
      return uniparentalDisomyEvidences;
    }
    
    /** Sets the value of the 'uniparentalDisomyEvidences' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder setUniparentalDisomyEvidences(org.gel.models.report.avro.UniparentalDisomyEvidences value) {
      validate(fields()[6], value);
      this.uniparentalDisomyEvidences = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'uniparentalDisomyEvidences' field has been set */
    public boolean hasUniparentalDisomyEvidences() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'uniparentalDisomyEvidences' field */
    public org.gel.models.report.avro.UniparentalDisomy.Builder clearUniparentalDisomyEvidences() {
      uniparentalDisomyEvidences = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    @Override
    public UniparentalDisomy build() {
      try {
        UniparentalDisomy record = new UniparentalDisomy();
        record.assembly = fieldSetFlags()[0] ? this.assembly : (org.gel.models.report.avro.Assembly) defaultValue(fields()[0]);
        record.chromosome = fieldSetFlags()[1] ? this.chromosome : (java.lang.String) defaultValue(fields()[1]);
        record.complete = fieldSetFlags()[2] ? this.complete : (java.lang.Boolean) defaultValue(fields()[2]);
        record.origin = fieldSetFlags()[3] ? this.origin : (org.gel.models.report.avro.UniparentalDisomyOrigin) defaultValue(fields()[3]);
        record.uniparentalDisomyFragments = fieldSetFlags()[4] ? this.uniparentalDisomyFragments : (java.util.List) defaultValue(fields()[4]);
        record.participantId = fieldSetFlags()[5] ? this.participantId : (java.lang.String) defaultValue(fields()[5]);
        record.uniparentalDisomyEvidences = fieldSetFlags()[6] ? this.uniparentalDisomyEvidences : (org.gel.models.report.avro.UniparentalDisomyEvidences) defaultValue(fields()[6]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy