org.opencb.biodata.models.variant.avro.ExonOverlap 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 ExonOverlap 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\":\"ExonOverlap\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"number\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"percentage\",\"type\":[\"null\",\"float\"]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String number;
private java.lang.Float percentage;
/**
* 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 ExonOverlap() {}
/**
* All-args constructor.
*/
public ExonOverlap(java.lang.String number, java.lang.Float percentage) {
this.number = number;
this.percentage = percentage;
}
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 number;
case 1: return percentage;
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: number = (java.lang.String)value$; break;
case 1: percentage = (java.lang.Float)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'number' field.
*/
public java.lang.String getNumber() {
return number;
}
/**
* Sets the value of the 'number' field.
* @param value the value to set.
*/
public void setNumber(java.lang.String value) {
this.number = value;
}
/**
* Gets the value of the 'percentage' field.
*/
public java.lang.Float getPercentage() {
return percentage;
}
/**
* Sets the value of the 'percentage' field.
* @param value the value to set.
*/
public void setPercentage(java.lang.Float value) {
this.percentage = value;
}
/** Creates a new ExonOverlap RecordBuilder */
public static org.opencb.biodata.models.variant.avro.ExonOverlap.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.ExonOverlap.Builder();
}
/** Creates a new ExonOverlap RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.ExonOverlap.Builder newBuilder(org.opencb.biodata.models.variant.avro.ExonOverlap.Builder other) {
return new org.opencb.biodata.models.variant.avro.ExonOverlap.Builder(other);
}
/** Creates a new ExonOverlap RecordBuilder by copying an existing ExonOverlap instance */
public static org.opencb.biodata.models.variant.avro.ExonOverlap.Builder newBuilder(org.opencb.biodata.models.variant.avro.ExonOverlap other) {
return new org.opencb.biodata.models.variant.avro.ExonOverlap.Builder(other);
}
/**
* RecordBuilder for ExonOverlap instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String number;
private java.lang.Float percentage;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.ExonOverlap.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.ExonOverlap.Builder other) {
super(other);
if (isValidValue(fields()[0], other.number)) {
this.number = data().deepCopy(fields()[0].schema(), other.number);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.percentage)) {
this.percentage = data().deepCopy(fields()[1].schema(), other.percentage);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing ExonOverlap instance */
private Builder(org.opencb.biodata.models.variant.avro.ExonOverlap other) {
super(org.opencb.biodata.models.variant.avro.ExonOverlap.SCHEMA$);
if (isValidValue(fields()[0], other.number)) {
this.number = data().deepCopy(fields()[0].schema(), other.number);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.percentage)) {
this.percentage = data().deepCopy(fields()[1].schema(), other.percentage);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'number' field */
public java.lang.String getNumber() {
return number;
}
/** Sets the value of the 'number' field */
public org.opencb.biodata.models.variant.avro.ExonOverlap.Builder setNumber(java.lang.String value) {
validate(fields()[0], value);
this.number = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'number' field has been set */
public boolean hasNumber() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'number' field */
public org.opencb.biodata.models.variant.avro.ExonOverlap.Builder clearNumber() {
number = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'percentage' field */
public java.lang.Float getPercentage() {
return percentage;
}
/** Sets the value of the 'percentage' field */
public org.opencb.biodata.models.variant.avro.ExonOverlap.Builder setPercentage(java.lang.Float value) {
validate(fields()[1], value);
this.percentage = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'percentage' field has been set */
public boolean hasPercentage() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'percentage' field */
public org.opencb.biodata.models.variant.avro.ExonOverlap.Builder clearPercentage() {
percentage = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public ExonOverlap build() {
try {
ExonOverlap record = new ExonOverlap();
record.number = fieldSetFlags()[0] ? this.number : (java.lang.String) defaultValue(fields()[0]);
record.percentage = fieldSetFlags()[1] ? this.percentage : (java.lang.Float) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy