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

org.opencb.biodata.models.variant.avro.Repeat Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.opencb.biodata.models.variant.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class Repeat 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\":\"Repeat\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"chromosome\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"start\",\"type\":[\"null\",\"int\"]},{\"name\":\"end\",\"type\":[\"null\",\"int\"]},{\"name\":\"period\",\"type\":[\"null\",\"int\"]},{\"name\":\"consensusSize\",\"type\":[\"null\",\"int\"]},{\"name\":\"copyNumber\",\"type\":[\"null\",\"float\"]},{\"name\":\"percentageMatch\",\"type\":[\"null\",\"float\"]},{\"name\":\"score\",\"type\":[\"null\",\"float\"]},{\"name\":\"sequence\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"source\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
   private java.lang.String id;
   private java.lang.String chromosome;
   private java.lang.Integer start;
   private java.lang.Integer end;
   private java.lang.Integer period;
   private java.lang.Integer consensusSize;
   private java.lang.Float copyNumber;
   private java.lang.Float percentageMatch;
   private java.lang.Float score;
   private java.lang.String sequence;
   private java.lang.String source;

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

  /**
   * All-args constructor.
   */
  public Repeat(java.lang.String id, java.lang.String chromosome, java.lang.Integer start, java.lang.Integer end, java.lang.Integer period, java.lang.Integer consensusSize, java.lang.Float copyNumber, java.lang.Float percentageMatch, java.lang.Float score, java.lang.String sequence, java.lang.String source) {
    this.id = id;
    this.chromosome = chromosome;
    this.start = start;
    this.end = end;
    this.period = period;
    this.consensusSize = consensusSize;
    this.copyNumber = copyNumber;
    this.percentageMatch = percentageMatch;
    this.score = score;
    this.sequence = sequence;
    this.source = source;
  }

  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 id;
    case 1: return chromosome;
    case 2: return start;
    case 3: return end;
    case 4: return period;
    case 5: return consensusSize;
    case 6: return copyNumber;
    case 7: return percentageMatch;
    case 8: return score;
    case 9: return sequence;
    case 10: return source;
    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: id = (java.lang.String)value$; break;
    case 1: chromosome = (java.lang.String)value$; break;
    case 2: start = (java.lang.Integer)value$; break;
    case 3: end = (java.lang.Integer)value$; break;
    case 4: period = (java.lang.Integer)value$; break;
    case 5: consensusSize = (java.lang.Integer)value$; break;
    case 6: copyNumber = (java.lang.Float)value$; break;
    case 7: percentageMatch = (java.lang.Float)value$; break;
    case 8: score = (java.lang.Float)value$; break;
    case 9: sequence = (java.lang.String)value$; break;
    case 10: source = (java.lang.String)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

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

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

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

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

  /**
   * Gets the value of the 'start' field.
   */
  public java.lang.Integer getStart() {
    return start;
  }

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

  /**
   * Gets the value of the 'end' field.
   */
  public java.lang.Integer getEnd() {
    return end;
  }

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

  /**
   * Gets the value of the 'period' field.
   */
  public java.lang.Integer getPeriod() {
    return period;
  }

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

  /**
   * Gets the value of the 'consensusSize' field.
   */
  public java.lang.Integer getConsensusSize() {
    return consensusSize;
  }

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

  /**
   * Gets the value of the 'copyNumber' field.
   */
  public java.lang.Float getCopyNumber() {
    return copyNumber;
  }

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

  /**
   * Gets the value of the 'percentageMatch' field.
   */
  public java.lang.Float getPercentageMatch() {
    return percentageMatch;
  }

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

  /**
   * Gets the value of the 'score' field.
   */
  public java.lang.Float getScore() {
    return score;
  }

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

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

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

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

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

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

    private java.lang.String id;
    private java.lang.String chromosome;
    private java.lang.Integer start;
    private java.lang.Integer end;
    private java.lang.Integer period;
    private java.lang.Integer consensusSize;
    private java.lang.Float copyNumber;
    private java.lang.Float percentageMatch;
    private java.lang.Float score;
    private java.lang.String sequence;
    private java.lang.String source;

    /** Creates a new Builder */
    private Builder() {
      super(org.opencb.biodata.models.variant.avro.Repeat.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.opencb.biodata.models.variant.avro.Repeat.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.id)) {
        this.id = data().deepCopy(fields()[0].schema(), other.id);
        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.start)) {
        this.start = data().deepCopy(fields()[2].schema(), other.start);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.end)) {
        this.end = data().deepCopy(fields()[3].schema(), other.end);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.period)) {
        this.period = data().deepCopy(fields()[4].schema(), other.period);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.consensusSize)) {
        this.consensusSize = data().deepCopy(fields()[5].schema(), other.consensusSize);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.copyNumber)) {
        this.copyNumber = data().deepCopy(fields()[6].schema(), other.copyNumber);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.percentageMatch)) {
        this.percentageMatch = data().deepCopy(fields()[7].schema(), other.percentageMatch);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.score)) {
        this.score = data().deepCopy(fields()[8].schema(), other.score);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.sequence)) {
        this.sequence = data().deepCopy(fields()[9].schema(), other.sequence);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.source)) {
        this.source = data().deepCopy(fields()[10].schema(), other.source);
        fieldSetFlags()[10] = true;
      }
    }
    
    /** Creates a Builder by copying an existing Repeat instance */
    private Builder(org.opencb.biodata.models.variant.avro.Repeat other) {
            super(org.opencb.biodata.models.variant.avro.Repeat.SCHEMA$);
      if (isValidValue(fields()[0], other.id)) {
        this.id = data().deepCopy(fields()[0].schema(), other.id);
        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.start)) {
        this.start = data().deepCopy(fields()[2].schema(), other.start);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.end)) {
        this.end = data().deepCopy(fields()[3].schema(), other.end);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.period)) {
        this.period = data().deepCopy(fields()[4].schema(), other.period);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.consensusSize)) {
        this.consensusSize = data().deepCopy(fields()[5].schema(), other.consensusSize);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.copyNumber)) {
        this.copyNumber = data().deepCopy(fields()[6].schema(), other.copyNumber);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.percentageMatch)) {
        this.percentageMatch = data().deepCopy(fields()[7].schema(), other.percentageMatch);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.score)) {
        this.score = data().deepCopy(fields()[8].schema(), other.score);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.sequence)) {
        this.sequence = data().deepCopy(fields()[9].schema(), other.sequence);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.source)) {
        this.source = data().deepCopy(fields()[10].schema(), other.source);
        fieldSetFlags()[10] = true;
      }
    }

    /** Gets the value of the 'id' field */
    public java.lang.String getId() {
      return id;
    }
    
    /** Sets the value of the 'id' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setId(java.lang.String value) {
      validate(fields()[0], value);
      this.id = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'id' field has been set */
    public boolean hasId() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'id' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearId() {
      id = 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.opencb.biodata.models.variant.avro.Repeat.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.opencb.biodata.models.variant.avro.Repeat.Builder clearChromosome() {
      chromosome = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'start' field */
    public java.lang.Integer getStart() {
      return start;
    }
    
    /** Sets the value of the 'start' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setStart(java.lang.Integer value) {
      validate(fields()[2], value);
      this.start = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'start' field has been set */
    public boolean hasStart() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'start' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearStart() {
      start = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'end' field */
    public java.lang.Integer getEnd() {
      return end;
    }
    
    /** Sets the value of the 'end' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setEnd(java.lang.Integer value) {
      validate(fields()[3], value);
      this.end = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'end' field has been set */
    public boolean hasEnd() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'end' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearEnd() {
      end = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'period' field */
    public java.lang.Integer getPeriod() {
      return period;
    }
    
    /** Sets the value of the 'period' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setPeriod(java.lang.Integer value) {
      validate(fields()[4], value);
      this.period = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'period' field has been set */
    public boolean hasPeriod() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'period' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearPeriod() {
      period = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'consensusSize' field */
    public java.lang.Integer getConsensusSize() {
      return consensusSize;
    }
    
    /** Sets the value of the 'consensusSize' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setConsensusSize(java.lang.Integer value) {
      validate(fields()[5], value);
      this.consensusSize = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'consensusSize' field has been set */
    public boolean hasConsensusSize() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'consensusSize' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearConsensusSize() {
      consensusSize = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'copyNumber' field */
    public java.lang.Float getCopyNumber() {
      return copyNumber;
    }
    
    /** Sets the value of the 'copyNumber' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setCopyNumber(java.lang.Float value) {
      validate(fields()[6], value);
      this.copyNumber = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'copyNumber' field has been set */
    public boolean hasCopyNumber() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'copyNumber' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearCopyNumber() {
      copyNumber = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'percentageMatch' field */
    public java.lang.Float getPercentageMatch() {
      return percentageMatch;
    }
    
    /** Sets the value of the 'percentageMatch' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setPercentageMatch(java.lang.Float value) {
      validate(fields()[7], value);
      this.percentageMatch = value;
      fieldSetFlags()[7] = true;
      return this; 
    }
    
    /** Checks whether the 'percentageMatch' field has been set */
    public boolean hasPercentageMatch() {
      return fieldSetFlags()[7];
    }
    
    /** Clears the value of the 'percentageMatch' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearPercentageMatch() {
      percentageMatch = null;
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'score' field */
    public java.lang.Float getScore() {
      return score;
    }
    
    /** Sets the value of the 'score' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setScore(java.lang.Float value) {
      validate(fields()[8], value);
      this.score = value;
      fieldSetFlags()[8] = true;
      return this; 
    }
    
    /** Checks whether the 'score' field has been set */
    public boolean hasScore() {
      return fieldSetFlags()[8];
    }
    
    /** Clears the value of the 'score' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearScore() {
      score = null;
      fieldSetFlags()[8] = false;
      return this;
    }

    /** Gets the value of the 'sequence' field */
    public java.lang.String getSequence() {
      return sequence;
    }
    
    /** Sets the value of the 'sequence' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setSequence(java.lang.String value) {
      validate(fields()[9], value);
      this.sequence = value;
      fieldSetFlags()[9] = true;
      return this; 
    }
    
    /** Checks whether the 'sequence' field has been set */
    public boolean hasSequence() {
      return fieldSetFlags()[9];
    }
    
    /** Clears the value of the 'sequence' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearSequence() {
      sequence = null;
      fieldSetFlags()[9] = false;
      return this;
    }

    /** Gets the value of the 'source' field */
    public java.lang.String getSource() {
      return source;
    }
    
    /** Sets the value of the 'source' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder setSource(java.lang.String value) {
      validate(fields()[10], value);
      this.source = value;
      fieldSetFlags()[10] = true;
      return this; 
    }
    
    /** Checks whether the 'source' field has been set */
    public boolean hasSource() {
      return fieldSetFlags()[10];
    }
    
    /** Clears the value of the 'source' field */
    public org.opencb.biodata.models.variant.avro.Repeat.Builder clearSource() {
      source = null;
      fieldSetFlags()[10] = false;
      return this;
    }

    @Override
    public Repeat build() {
      try {
        Repeat record = new Repeat();
        record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
        record.chromosome = fieldSetFlags()[1] ? this.chromosome : (java.lang.String) defaultValue(fields()[1]);
        record.start = fieldSetFlags()[2] ? this.start : (java.lang.Integer) defaultValue(fields()[2]);
        record.end = fieldSetFlags()[3] ? this.end : (java.lang.Integer) defaultValue(fields()[3]);
        record.period = fieldSetFlags()[4] ? this.period : (java.lang.Integer) defaultValue(fields()[4]);
        record.consensusSize = fieldSetFlags()[5] ? this.consensusSize : (java.lang.Integer) defaultValue(fields()[5]);
        record.copyNumber = fieldSetFlags()[6] ? this.copyNumber : (java.lang.Float) defaultValue(fields()[6]);
        record.percentageMatch = fieldSetFlags()[7] ? this.percentageMatch : (java.lang.Float) defaultValue(fields()[7]);
        record.score = fieldSetFlags()[8] ? this.score : (java.lang.Float) defaultValue(fields()[8]);
        record.sequence = fieldSetFlags()[9] ? this.sequence : (java.lang.String) defaultValue(fields()[9]);
        record.source = fieldSetFlags()[10] ? this.source : (java.lang.String) defaultValue(fields()[10]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy