org.opencb.biodata.models.variant.avro.GeneMirnaTarget 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 GeneMirnaTarget 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\":\"GeneMirnaTarget\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"name\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"biotype\",\"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 name;
private java.lang.String biotype;
/**
* 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 GeneMirnaTarget() {}
/**
* All-args constructor.
*/
public GeneMirnaTarget(java.lang.String id, java.lang.String name, java.lang.String biotype) {
this.id = id;
this.name = name;
this.biotype = biotype;
}
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 name;
case 2: return biotype;
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: name = (java.lang.String)value$; break;
case 2: biotype = (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 'name' field.
*/
public java.lang.String getName() {
return name;
}
/**
* Sets the value of the 'name' field.
* @param value the value to set.
*/
public void setName(java.lang.String value) {
this.name = value;
}
/**
* Gets the value of the 'biotype' field.
*/
public java.lang.String getBiotype() {
return biotype;
}
/**
* Sets the value of the 'biotype' field.
* @param value the value to set.
*/
public void setBiotype(java.lang.String value) {
this.biotype = value;
}
/** Creates a new GeneMirnaTarget RecordBuilder */
public static org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder();
}
/** Creates a new GeneMirnaTarget RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder newBuilder(org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder other) {
return new org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder(other);
}
/** Creates a new GeneMirnaTarget RecordBuilder by copying an existing GeneMirnaTarget instance */
public static org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder newBuilder(org.opencb.biodata.models.variant.avro.GeneMirnaTarget other) {
return new org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder(other);
}
/**
* RecordBuilder for GeneMirnaTarget 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 name;
private java.lang.String biotype;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.GeneMirnaTarget.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.GeneMirnaTarget.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.name)) {
this.name = data().deepCopy(fields()[1].schema(), other.name);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.biotype)) {
this.biotype = data().deepCopy(fields()[2].schema(), other.biotype);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing GeneMirnaTarget instance */
private Builder(org.opencb.biodata.models.variant.avro.GeneMirnaTarget other) {
super(org.opencb.biodata.models.variant.avro.GeneMirnaTarget.SCHEMA$);
if (isValidValue(fields()[0], other.id)) {
this.id = data().deepCopy(fields()[0].schema(), other.id);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.name)) {
this.name = data().deepCopy(fields()[1].schema(), other.name);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.biotype)) {
this.biotype = data().deepCopy(fields()[2].schema(), other.biotype);
fieldSetFlags()[2] = 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.GeneMirnaTarget.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.GeneMirnaTarget.Builder clearId() {
id = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'name' field */
public java.lang.String getName() {
return name;
}
/** Sets the value of the 'name' field */
public org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder setName(java.lang.String value) {
validate(fields()[1], value);
this.name = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'name' field has been set */
public boolean hasName() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'name' field */
public org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder clearName() {
name = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'biotype' field */
public java.lang.String getBiotype() {
return biotype;
}
/** Sets the value of the 'biotype' field */
public org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder setBiotype(java.lang.String value) {
validate(fields()[2], value);
this.biotype = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'biotype' field has been set */
public boolean hasBiotype() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'biotype' field */
public org.opencb.biodata.models.variant.avro.GeneMirnaTarget.Builder clearBiotype() {
biotype = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public GeneMirnaTarget build() {
try {
GeneMirnaTarget record = new GeneMirnaTarget();
record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
record.name = fieldSetFlags()[1] ? this.name : (java.lang.String) defaultValue(fields()[1]);
record.biotype = fieldSetFlags()[2] ? this.biotype : (java.lang.String) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy