org.opencb.biodata.models.variant.avro.BreakendMate 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 BreakendMate 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\":\"BreakendMate\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"chromosome\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"position\",\"type\":[\"null\",\"int\"]},{\"name\":\"ciPositionLeft\",\"type\":[\"null\",\"int\"]},{\"name\":\"ciPositionRight\",\"type\":[\"null\",\"int\"]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String chromosome;
private java.lang.Integer position;
private java.lang.Integer ciPositionLeft;
private java.lang.Integer ciPositionRight;
/**
* 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 BreakendMate() {}
/**
* All-args constructor.
*/
public BreakendMate(java.lang.String chromosome, java.lang.Integer position, java.lang.Integer ciPositionLeft, java.lang.Integer ciPositionRight) {
this.chromosome = chromosome;
this.position = position;
this.ciPositionLeft = ciPositionLeft;
this.ciPositionRight = ciPositionRight;
}
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 chromosome;
case 1: return position;
case 2: return ciPositionLeft;
case 3: return ciPositionRight;
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: chromosome = (java.lang.String)value$; break;
case 1: position = (java.lang.Integer)value$; break;
case 2: ciPositionLeft = (java.lang.Integer)value$; break;
case 3: ciPositionRight = (java.lang.Integer)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* 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 'position' field.
*/
public java.lang.Integer getPosition() {
return position;
}
/**
* Sets the value of the 'position' field.
* @param value the value to set.
*/
public void setPosition(java.lang.Integer value) {
this.position = value;
}
/**
* Gets the value of the 'ciPositionLeft' field.
*/
public java.lang.Integer getCiPositionLeft() {
return ciPositionLeft;
}
/**
* Sets the value of the 'ciPositionLeft' field.
* @param value the value to set.
*/
public void setCiPositionLeft(java.lang.Integer value) {
this.ciPositionLeft = value;
}
/**
* Gets the value of the 'ciPositionRight' field.
*/
public java.lang.Integer getCiPositionRight() {
return ciPositionRight;
}
/**
* Sets the value of the 'ciPositionRight' field.
* @param value the value to set.
*/
public void setCiPositionRight(java.lang.Integer value) {
this.ciPositionRight = value;
}
/** Creates a new BreakendMate RecordBuilder */
public static org.opencb.biodata.models.variant.avro.BreakendMate.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.BreakendMate.Builder();
}
/** Creates a new BreakendMate RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.BreakendMate.Builder newBuilder(org.opencb.biodata.models.variant.avro.BreakendMate.Builder other) {
return new org.opencb.biodata.models.variant.avro.BreakendMate.Builder(other);
}
/** Creates a new BreakendMate RecordBuilder by copying an existing BreakendMate instance */
public static org.opencb.biodata.models.variant.avro.BreakendMate.Builder newBuilder(org.opencb.biodata.models.variant.avro.BreakendMate other) {
return new org.opencb.biodata.models.variant.avro.BreakendMate.Builder(other);
}
/**
* RecordBuilder for BreakendMate instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String chromosome;
private java.lang.Integer position;
private java.lang.Integer ciPositionLeft;
private java.lang.Integer ciPositionRight;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.BreakendMate.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.BreakendMate.Builder other) {
super(other);
if (isValidValue(fields()[0], other.chromosome)) {
this.chromosome = data().deepCopy(fields()[0].schema(), other.chromosome);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.position)) {
this.position = data().deepCopy(fields()[1].schema(), other.position);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.ciPositionLeft)) {
this.ciPositionLeft = data().deepCopy(fields()[2].schema(), other.ciPositionLeft);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.ciPositionRight)) {
this.ciPositionRight = data().deepCopy(fields()[3].schema(), other.ciPositionRight);
fieldSetFlags()[3] = true;
}
}
/** Creates a Builder by copying an existing BreakendMate instance */
private Builder(org.opencb.biodata.models.variant.avro.BreakendMate other) {
super(org.opencb.biodata.models.variant.avro.BreakendMate.SCHEMA$);
if (isValidValue(fields()[0], other.chromosome)) {
this.chromosome = data().deepCopy(fields()[0].schema(), other.chromosome);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.position)) {
this.position = data().deepCopy(fields()[1].schema(), other.position);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.ciPositionLeft)) {
this.ciPositionLeft = data().deepCopy(fields()[2].schema(), other.ciPositionLeft);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.ciPositionRight)) {
this.ciPositionRight = data().deepCopy(fields()[3].schema(), other.ciPositionRight);
fieldSetFlags()[3] = true;
}
}
/** 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.BreakendMate.Builder setChromosome(java.lang.String value) {
validate(fields()[0], value);
this.chromosome = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'chromosome' field has been set */
public boolean hasChromosome() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'chromosome' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearChromosome() {
chromosome = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'position' field */
public java.lang.Integer getPosition() {
return position;
}
/** Sets the value of the 'position' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setPosition(java.lang.Integer value) {
validate(fields()[1], value);
this.position = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'position' field has been set */
public boolean hasPosition() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'position' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearPosition() {
position = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'ciPositionLeft' field */
public java.lang.Integer getCiPositionLeft() {
return ciPositionLeft;
}
/** Sets the value of the 'ciPositionLeft' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setCiPositionLeft(java.lang.Integer value) {
validate(fields()[2], value);
this.ciPositionLeft = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'ciPositionLeft' field has been set */
public boolean hasCiPositionLeft() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'ciPositionLeft' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearCiPositionLeft() {
ciPositionLeft = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'ciPositionRight' field */
public java.lang.Integer getCiPositionRight() {
return ciPositionRight;
}
/** Sets the value of the 'ciPositionRight' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setCiPositionRight(java.lang.Integer value) {
validate(fields()[3], value);
this.ciPositionRight = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'ciPositionRight' field has been set */
public boolean hasCiPositionRight() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'ciPositionRight' field */
public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearCiPositionRight() {
ciPositionRight = null;
fieldSetFlags()[3] = false;
return this;
}
@Override
public BreakendMate build() {
try {
BreakendMate record = new BreakendMate();
record.chromosome = fieldSetFlags()[0] ? this.chromosome : (java.lang.String) defaultValue(fields()[0]);
record.position = fieldSetFlags()[1] ? this.position : (java.lang.Integer) defaultValue(fields()[1]);
record.ciPositionLeft = fieldSetFlags()[2] ? this.ciPositionLeft : (java.lang.Integer) defaultValue(fields()[2]);
record.ciPositionRight = fieldSetFlags()[3] ? this.ciPositionRight : (java.lang.Integer) defaultValue(fields()[3]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy