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

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

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class UniparentalDisomyDetails 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\":\"UniparentalDisomyDetails\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"assembly\",\"type\":{\"type\":\"enum\",\"name\":\"Assembly\",\"doc\":\"The reference genome assembly\",\"symbols\":[\"GRCh38\",\"GRCh37\"]},\"doc\":\"Reference 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 UPD event involves an entire 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\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Reference 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 UPD event involves an entire 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;

  /**
   * 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 UniparentalDisomyDetails() {}

  /**
   * All-args constructor.
   */
  public UniparentalDisomyDetails(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) {
    this.assembly = assembly;
    this.chromosome = chromosome;
    this.complete = complete;
    this.origin = origin;
    this.uniparentalDisomyFragments = uniparentalDisomyFragments;
  }

  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;
    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;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

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

  /**
   * Sets the value of the 'assembly' field.
   * Reference 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 UPD event involves an entire chromosome   */
  public java.lang.Boolean getComplete() {
    return complete;
  }

  /**
   * Sets the value of the 'complete' field.
   * indicates whether UPD event involves an entire 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;
  }

  /** Creates a new UniparentalDisomyDetails RecordBuilder */
  public static org.gel.models.report.avro.UniparentalDisomyDetails.Builder newBuilder() {
    return new org.gel.models.report.avro.UniparentalDisomyDetails.Builder();
  }
  
  /** Creates a new UniparentalDisomyDetails RecordBuilder by copying an existing Builder */
  public static org.gel.models.report.avro.UniparentalDisomyDetails.Builder newBuilder(org.gel.models.report.avro.UniparentalDisomyDetails.Builder other) {
    return new org.gel.models.report.avro.UniparentalDisomyDetails.Builder(other);
  }
  
  /** Creates a new UniparentalDisomyDetails RecordBuilder by copying an existing UniparentalDisomyDetails instance */
  public static org.gel.models.report.avro.UniparentalDisomyDetails.Builder newBuilder(org.gel.models.report.avro.UniparentalDisomyDetails other) {
    return new org.gel.models.report.avro.UniparentalDisomyDetails.Builder(other);
  }
  
  /**
   * RecordBuilder for UniparentalDisomyDetails 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;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.UniparentalDisomyDetails.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.UniparentalDisomyDetails.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;
      }
    }
    
    /** Creates a Builder by copying an existing UniparentalDisomyDetails instance */
    private Builder(org.gel.models.report.avro.UniparentalDisomyDetails other) {
            super(org.gel.models.report.avro.UniparentalDisomyDetails.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;
      }
    }

    /** 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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.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.UniparentalDisomyDetails.Builder clearUniparentalDisomyFragments() {
      uniparentalDisomyFragments = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    @Override
    public UniparentalDisomyDetails build() {
      try {
        UniparentalDisomyDetails record = new UniparentalDisomyDetails();
        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]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy