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

org.gel.models.report.avro.BreakPoint 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 BreakPoint 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\":\"BreakPoint\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"coordinates\",\"type\":{\"type\":\"record\",\"name\":\"Coordinates\",\"fields\":[{\"name\":\"assembly\",\"type\":{\"type\":\"enum\",\"name\":\"Assembly\",\"doc\":\"The reference genome assembly\",\"symbols\":[\"GRCh38\",\"GRCh37\"]},\"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\"]}]}},{\"name\":\"reference\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"alternate\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"info\",\"type\":[\"null\",{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}]}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
   private org.gel.models.report.avro.Coordinates coordinates;
   private java.lang.String reference;
   private java.lang.String alternate;
   private java.util.Map info;

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

  /**
   * All-args constructor.
   */
  public BreakPoint(org.gel.models.report.avro.Coordinates coordinates, java.lang.String reference, java.lang.String alternate, java.util.Map info) {
    this.coordinates = coordinates;
    this.reference = reference;
    this.alternate = alternate;
    this.info = info;
  }

  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 coordinates;
    case 1: return reference;
    case 2: return alternate;
    case 3: return info;
    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: coordinates = (org.gel.models.report.avro.Coordinates)value$; break;
    case 1: reference = (java.lang.String)value$; break;
    case 2: alternate = (java.lang.String)value$; break;
    case 3: info = (java.util.Map)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'coordinates' field.
   */
  public org.gel.models.report.avro.Coordinates getCoordinates() {
    return coordinates;
  }

  /**
   * Sets the value of the 'coordinates' field.
   * @param value the value to set.
   */
  public void setCoordinates(org.gel.models.report.avro.Coordinates value) {
    this.coordinates = value;
  }

  /**
   * Gets the value of the 'reference' field.
   */
  public java.lang.String getReference() {
    return reference;
  }

  /**
   * Sets the value of the 'reference' field.
   * @param value the value to set.
   */
  public void setReference(java.lang.String value) {
    this.reference = value;
  }

  /**
   * Gets the value of the 'alternate' field.
   */
  public java.lang.String getAlternate() {
    return alternate;
  }

  /**
   * Sets the value of the 'alternate' field.
   * @param value the value to set.
   */
  public void setAlternate(java.lang.String value) {
    this.alternate = value;
  }

  /**
   * Gets the value of the 'info' field.
   */
  public java.util.Map getInfo() {
    return info;
  }

  /**
   * Sets the value of the 'info' field.
   * @param value the value to set.
   */
  public void setInfo(java.util.Map value) {
    this.info = value;
  }

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

    private org.gel.models.report.avro.Coordinates coordinates;
    private java.lang.String reference;
    private java.lang.String alternate;
    private java.util.Map info;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.BreakPoint.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.BreakPoint.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.coordinates)) {
        this.coordinates = data().deepCopy(fields()[0].schema(), other.coordinates);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.reference)) {
        this.reference = data().deepCopy(fields()[1].schema(), other.reference);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.alternate)) {
        this.alternate = data().deepCopy(fields()[2].schema(), other.alternate);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.info)) {
        this.info = data().deepCopy(fields()[3].schema(), other.info);
        fieldSetFlags()[3] = true;
      }
    }
    
    /** Creates a Builder by copying an existing BreakPoint instance */
    private Builder(org.gel.models.report.avro.BreakPoint other) {
            super(org.gel.models.report.avro.BreakPoint.SCHEMA$);
      if (isValidValue(fields()[0], other.coordinates)) {
        this.coordinates = data().deepCopy(fields()[0].schema(), other.coordinates);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.reference)) {
        this.reference = data().deepCopy(fields()[1].schema(), other.reference);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.alternate)) {
        this.alternate = data().deepCopy(fields()[2].schema(), other.alternate);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.info)) {
        this.info = data().deepCopy(fields()[3].schema(), other.info);
        fieldSetFlags()[3] = true;
      }
    }

    /** Gets the value of the 'coordinates' field */
    public org.gel.models.report.avro.Coordinates getCoordinates() {
      return coordinates;
    }
    
    /** Sets the value of the 'coordinates' field */
    public org.gel.models.report.avro.BreakPoint.Builder setCoordinates(org.gel.models.report.avro.Coordinates value) {
      validate(fields()[0], value);
      this.coordinates = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'coordinates' field has been set */
    public boolean hasCoordinates() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'coordinates' field */
    public org.gel.models.report.avro.BreakPoint.Builder clearCoordinates() {
      coordinates = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'reference' field */
    public java.lang.String getReference() {
      return reference;
    }
    
    /** Sets the value of the 'reference' field */
    public org.gel.models.report.avro.BreakPoint.Builder setReference(java.lang.String value) {
      validate(fields()[1], value);
      this.reference = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'reference' field has been set */
    public boolean hasReference() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'reference' field */
    public org.gel.models.report.avro.BreakPoint.Builder clearReference() {
      reference = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'alternate' field */
    public java.lang.String getAlternate() {
      return alternate;
    }
    
    /** Sets the value of the 'alternate' field */
    public org.gel.models.report.avro.BreakPoint.Builder setAlternate(java.lang.String value) {
      validate(fields()[2], value);
      this.alternate = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'alternate' field has been set */
    public boolean hasAlternate() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'alternate' field */
    public org.gel.models.report.avro.BreakPoint.Builder clearAlternate() {
      alternate = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'info' field */
    public java.util.Map getInfo() {
      return info;
    }
    
    /** Sets the value of the 'info' field */
    public org.gel.models.report.avro.BreakPoint.Builder setInfo(java.util.Map value) {
      validate(fields()[3], value);
      this.info = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'info' field has been set */
    public boolean hasInfo() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'info' field */
    public org.gel.models.report.avro.BreakPoint.Builder clearInfo() {
      info = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    @Override
    public BreakPoint build() {
      try {
        BreakPoint record = new BreakPoint();
        record.coordinates = fieldSetFlags()[0] ? this.coordinates : (org.gel.models.report.avro.Coordinates) defaultValue(fields()[0]);
        record.reference = fieldSetFlags()[1] ? this.reference : (java.lang.String) defaultValue(fields()[1]);
        record.alternate = fieldSetFlags()[2] ? this.alternate : (java.lang.String) defaultValue(fields()[2]);
        record.info = fieldSetFlags()[3] ? this.info : (java.util.Map) defaultValue(fields()[3]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy