org.opencb.biodata.models.variant.metadata.DepthCount 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 DepthCount 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\":\"DepthCount\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"fields\":[{\"name\":\"na\",\"type\":\"int\"},{\"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 na;
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 DepthCount() {}
/**
* All-args constructor.
*/
public DepthCount(java.lang.Integer na, java.lang.Integer lt5, java.lang.Integer lt10, java.lang.Integer lt15, java.lang.Integer lt20, java.lang.Integer gte20) {
this.na = na;
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 na;
case 1: return lt5;
case 2: return lt10;
case 3: return lt15;
case 4: return lt20;
case 5: 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: na = (java.lang.Integer)value$; break;
case 1: lt5 = (java.lang.Integer)value$; break;
case 2: lt10 = (java.lang.Integer)value$; break;
case 3: lt15 = (java.lang.Integer)value$; break;
case 4: lt20 = (java.lang.Integer)value$; break;
case 5: gte20 = (java.lang.Integer)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'na' field.
*/
public java.lang.Integer getNa() {
return na;
}
/**
* Sets the value of the 'na' field.
* @param value the value to set.
*/
public void setNa(java.lang.Integer value) {
this.na = value;
}
/**
* 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 DepthCount RecordBuilder */
public static org.opencb.biodata.models.variant.metadata.DepthCount.Builder newBuilder() {
return new org.opencb.biodata.models.variant.metadata.DepthCount.Builder();
}
/** Creates a new DepthCount RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.metadata.DepthCount.Builder newBuilder(org.opencb.biodata.models.variant.metadata.DepthCount.Builder other) {
return new org.opencb.biodata.models.variant.metadata.DepthCount.Builder(other);
}
/** Creates a new DepthCount RecordBuilder by copying an existing DepthCount instance */
public static org.opencb.biodata.models.variant.metadata.DepthCount.Builder newBuilder(org.opencb.biodata.models.variant.metadata.DepthCount other) {
return new org.opencb.biodata.models.variant.metadata.DepthCount.Builder(other);
}
/**
* RecordBuilder for DepthCount instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private int na;
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.DepthCount.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.metadata.DepthCount.Builder other) {
super(other);
if (isValidValue(fields()[0], other.na)) {
this.na = data().deepCopy(fields()[0].schema(), other.na);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.lt5)) {
this.lt5 = data().deepCopy(fields()[1].schema(), other.lt5);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.lt10)) {
this.lt10 = data().deepCopy(fields()[2].schema(), other.lt10);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.lt15)) {
this.lt15 = data().deepCopy(fields()[3].schema(), other.lt15);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.lt20)) {
this.lt20 = data().deepCopy(fields()[4].schema(), other.lt20);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.gte20)) {
this.gte20 = data().deepCopy(fields()[5].schema(), other.gte20);
fieldSetFlags()[5] = true;
}
}
/** Creates a Builder by copying an existing DepthCount instance */
private Builder(org.opencb.biodata.models.variant.metadata.DepthCount other) {
super(org.opencb.biodata.models.variant.metadata.DepthCount.SCHEMA$);
if (isValidValue(fields()[0], other.na)) {
this.na = data().deepCopy(fields()[0].schema(), other.na);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.lt5)) {
this.lt5 = data().deepCopy(fields()[1].schema(), other.lt5);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.lt10)) {
this.lt10 = data().deepCopy(fields()[2].schema(), other.lt10);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.lt15)) {
this.lt15 = data().deepCopy(fields()[3].schema(), other.lt15);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.lt20)) {
this.lt20 = data().deepCopy(fields()[4].schema(), other.lt20);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.gte20)) {
this.gte20 = data().deepCopy(fields()[5].schema(), other.gte20);
fieldSetFlags()[5] = true;
}
}
/** Gets the value of the 'na' field */
public java.lang.Integer getNa() {
return na;
}
/** Sets the value of the 'na' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder setNa(int value) {
validate(fields()[0], value);
this.na = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'na' field has been set */
public boolean hasNa() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'na' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder clearNa() {
fieldSetFlags()[0] = false;
return this;
}
/** 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.DepthCount.Builder setLt5(int value) {
validate(fields()[1], value);
this.lt5 = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'lt5' field has been set */
public boolean hasLt5() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'lt5' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder clearLt5() {
fieldSetFlags()[1] = 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.DepthCount.Builder setLt10(int value) {
validate(fields()[2], value);
this.lt10 = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'lt10' field has been set */
public boolean hasLt10() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'lt10' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder clearLt10() {
fieldSetFlags()[2] = 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.DepthCount.Builder setLt15(int value) {
validate(fields()[3], value);
this.lt15 = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'lt15' field has been set */
public boolean hasLt15() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'lt15' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder clearLt15() {
fieldSetFlags()[3] = 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.DepthCount.Builder setLt20(int value) {
validate(fields()[4], value);
this.lt20 = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'lt20' field has been set */
public boolean hasLt20() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'lt20' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder clearLt20() {
fieldSetFlags()[4] = 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.DepthCount.Builder setGte20(int value) {
validate(fields()[5], value);
this.gte20 = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'gte20' field has been set */
public boolean hasGte20() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'gte20' field */
public org.opencb.biodata.models.variant.metadata.DepthCount.Builder clearGte20() {
fieldSetFlags()[5] = false;
return this;
}
@Override
public DepthCount build() {
try {
DepthCount record = new DepthCount();
record.na = fieldSetFlags()[0] ? this.na : (java.lang.Integer) defaultValue(fields()[0]);
record.lt5 = fieldSetFlags()[1] ? this.lt5 : (java.lang.Integer) defaultValue(fields()[1]);
record.lt10 = fieldSetFlags()[2] ? this.lt10 : (java.lang.Integer) defaultValue(fields()[2]);
record.lt15 = fieldSetFlags()[3] ? this.lt15 : (java.lang.Integer) defaultValue(fields()[3]);
record.lt20 = fieldSetFlags()[4] ? this.lt20 : (java.lang.Integer) defaultValue(fields()[4]);
record.gte20 = fieldSetFlags()[5] ? this.gte20 : (java.lang.Integer) defaultValue(fields()[5]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}