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

org.opencb.biodata.models.variant.metadata.IndelLength Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.opencb.biodata.models.variant.metadata;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class IndelLength 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\":\"IndelLength\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"fields\":[{\"name\":\"lt5\",\"type\":\"int\"},{\"name\":\"lt10\",\"type\":\"int\"},{\"name\":\"lt15\",\"type\":\"int\"},{\"name\":\"lt20\",\"type\":\"int\"},{\"name\":\"gte20\",\"type\":\"int\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
   private int lt5;
   private int lt10;
   private int lt15;
   private int lt20;
   private int gte20;

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

  /**
   * All-args constructor.
   */
  public IndelLength(java.lang.Integer lt5, java.lang.Integer lt10, java.lang.Integer lt15, java.lang.Integer lt20, java.lang.Integer gte20) {
    this.lt5 = lt5;
    this.lt10 = lt10;
    this.lt15 = lt15;
    this.lt20 = lt20;
    this.gte20 = gte20;
  }

  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 lt5;
    case 1: return lt10;
    case 2: return lt15;
    case 3: return lt20;
    case 4: return gte20;
    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: lt5 = (java.lang.Integer)value$; break;
    case 1: lt10 = (java.lang.Integer)value$; break;
    case 2: lt15 = (java.lang.Integer)value$; break;
    case 3: lt20 = (java.lang.Integer)value$; break;
    case 4: gte20 = (java.lang.Integer)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

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

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

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

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

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

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

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

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

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

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

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

    private int lt5;
    private int lt10;
    private int lt15;
    private int lt20;
    private int gte20;

    /** Creates a new Builder */
    private Builder() {
      super(org.opencb.biodata.models.variant.metadata.IndelLength.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.opencb.biodata.models.variant.metadata.IndelLength.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.lt5)) {
        this.lt5 = data().deepCopy(fields()[0].schema(), other.lt5);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.lt10)) {
        this.lt10 = data().deepCopy(fields()[1].schema(), other.lt10);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.lt15)) {
        this.lt15 = data().deepCopy(fields()[2].schema(), other.lt15);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.lt20)) {
        this.lt20 = data().deepCopy(fields()[3].schema(), other.lt20);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.gte20)) {
        this.gte20 = data().deepCopy(fields()[4].schema(), other.gte20);
        fieldSetFlags()[4] = true;
      }
    }
    
    /** Creates a Builder by copying an existing IndelLength instance */
    private Builder(org.opencb.biodata.models.variant.metadata.IndelLength other) {
            super(org.opencb.biodata.models.variant.metadata.IndelLength.SCHEMA$);
      if (isValidValue(fields()[0], other.lt5)) {
        this.lt5 = data().deepCopy(fields()[0].schema(), other.lt5);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.lt10)) {
        this.lt10 = data().deepCopy(fields()[1].schema(), other.lt10);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.lt15)) {
        this.lt15 = data().deepCopy(fields()[2].schema(), other.lt15);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.lt20)) {
        this.lt20 = data().deepCopy(fields()[3].schema(), other.lt20);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.gte20)) {
        this.gte20 = data().deepCopy(fields()[4].schema(), other.gte20);
        fieldSetFlags()[4] = true;
      }
    }

    /** Gets the value of the 'lt5' field */
    public java.lang.Integer getLt5() {
      return lt5;
    }
    
    /** Sets the value of the 'lt5' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder setLt5(int value) {
      validate(fields()[0], value);
      this.lt5 = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'lt5' field has been set */
    public boolean hasLt5() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'lt5' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder clearLt5() {
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'lt10' field */
    public java.lang.Integer getLt10() {
      return lt10;
    }
    
    /** Sets the value of the 'lt10' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder setLt10(int value) {
      validate(fields()[1], value);
      this.lt10 = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'lt10' field has been set */
    public boolean hasLt10() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'lt10' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder clearLt10() {
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'lt15' field */
    public java.lang.Integer getLt15() {
      return lt15;
    }
    
    /** Sets the value of the 'lt15' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder setLt15(int value) {
      validate(fields()[2], value);
      this.lt15 = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'lt15' field has been set */
    public boolean hasLt15() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'lt15' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder clearLt15() {
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'lt20' field */
    public java.lang.Integer getLt20() {
      return lt20;
    }
    
    /** Sets the value of the 'lt20' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder setLt20(int value) {
      validate(fields()[3], value);
      this.lt20 = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'lt20' field has been set */
    public boolean hasLt20() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'lt20' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder clearLt20() {
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'gte20' field */
    public java.lang.Integer getGte20() {
      return gte20;
    }
    
    /** Sets the value of the 'gte20' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder setGte20(int value) {
      validate(fields()[4], value);
      this.gte20 = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'gte20' field has been set */
    public boolean hasGte20() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'gte20' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength.Builder clearGte20() {
      fieldSetFlags()[4] = false;
      return this;
    }

    @Override
    public IndelLength build() {
      try {
        IndelLength record = new IndelLength();
        record.lt5 = fieldSetFlags()[0] ? this.lt5 : (java.lang.Integer) defaultValue(fields()[0]);
        record.lt10 = fieldSetFlags()[1] ? this.lt10 : (java.lang.Integer) defaultValue(fields()[1]);
        record.lt15 = fieldSetFlags()[2] ? this.lt15 : (java.lang.Integer) defaultValue(fields()[2]);
        record.lt20 = fieldSetFlags()[3] ? this.lt20 : (java.lang.Integer) defaultValue(fields()[3]);
        record.gte20 = fieldSetFlags()[4] ? this.gte20 : (java.lang.Integer) defaultValue(fields()[4]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy