org.opencb.biodata.models.variant.avro.GeneDrugInteraction 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 GeneDrugInteraction 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\":\"GeneDrugInteraction\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"geneName\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"drugName\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"source\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"studyType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"type\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"interactionType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"chemblId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"publications\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String geneName;
private java.lang.String drugName;
private java.lang.String source;
private java.lang.String studyType;
private java.lang.String type;
private java.lang.String interactionType;
private java.lang.String chemblId;
private java.util.List publications;
/**
* 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 GeneDrugInteraction() {}
/**
* All-args constructor.
*/
public GeneDrugInteraction(java.lang.String geneName, java.lang.String drugName, java.lang.String source, java.lang.String studyType, java.lang.String type, java.lang.String interactionType, java.lang.String chemblId, java.util.List publications) {
this.geneName = geneName;
this.drugName = drugName;
this.source = source;
this.studyType = studyType;
this.type = type;
this.interactionType = interactionType;
this.chemblId = chemblId;
this.publications = publications;
}
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 geneName;
case 1: return drugName;
case 2: return source;
case 3: return studyType;
case 4: return type;
case 5: return interactionType;
case 6: return chemblId;
case 7: return publications;
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: geneName = (java.lang.String)value$; break;
case 1: drugName = (java.lang.String)value$; break;
case 2: source = (java.lang.String)value$; break;
case 3: studyType = (java.lang.String)value$; break;
case 4: type = (java.lang.String)value$; break;
case 5: interactionType = (java.lang.String)value$; break;
case 6: chemblId = (java.lang.String)value$; break;
case 7: publications = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'geneName' field.
*/
public java.lang.String getGeneName() {
return geneName;
}
/**
* Sets the value of the 'geneName' field.
* @param value the value to set.
*/
public void setGeneName(java.lang.String value) {
this.geneName = value;
}
/**
* Gets the value of the 'drugName' field.
*/
public java.lang.String getDrugName() {
return drugName;
}
/**
* Sets the value of the 'drugName' field.
* @param value the value to set.
*/
public void setDrugName(java.lang.String value) {
this.drugName = value;
}
/**
* Gets the value of the 'source' field.
*/
public java.lang.String getSource() {
return source;
}
/**
* Sets the value of the 'source' field.
* @param value the value to set.
*/
public void setSource(java.lang.String value) {
this.source = value;
}
/**
* Gets the value of the 'studyType' field.
*/
public java.lang.String getStudyType() {
return studyType;
}
/**
* Sets the value of the 'studyType' field.
* @param value the value to set.
*/
public void setStudyType(java.lang.String value) {
this.studyType = value;
}
/**
* Gets the value of the 'type' field.
*/
public java.lang.String getType() {
return type;
}
/**
* Sets the value of the 'type' field.
* @param value the value to set.
*/
public void setType(java.lang.String value) {
this.type = value;
}
/**
* Gets the value of the 'interactionType' field.
*/
public java.lang.String getInteractionType() {
return interactionType;
}
/**
* Sets the value of the 'interactionType' field.
* @param value the value to set.
*/
public void setInteractionType(java.lang.String value) {
this.interactionType = value;
}
/**
* Gets the value of the 'chemblId' field.
*/
public java.lang.String getChemblId() {
return chemblId;
}
/**
* Sets the value of the 'chemblId' field.
* @param value the value to set.
*/
public void setChemblId(java.lang.String value) {
this.chemblId = value;
}
/**
* Gets the value of the 'publications' field.
*/
public java.util.List getPublications() {
return publications;
}
/**
* Sets the value of the 'publications' field.
* @param value the value to set.
*/
public void setPublications(java.util.List value) {
this.publications = value;
}
/** Creates a new GeneDrugInteraction RecordBuilder */
public static org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder();
}
/** Creates a new GeneDrugInteraction RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder newBuilder(org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder other) {
return new org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder(other);
}
/** Creates a new GeneDrugInteraction RecordBuilder by copying an existing GeneDrugInteraction instance */
public static org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder newBuilder(org.opencb.biodata.models.variant.avro.GeneDrugInteraction other) {
return new org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder(other);
}
/**
* RecordBuilder for GeneDrugInteraction instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String geneName;
private java.lang.String drugName;
private java.lang.String source;
private java.lang.String studyType;
private java.lang.String type;
private java.lang.String interactionType;
private java.lang.String chemblId;
private java.util.List publications;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.GeneDrugInteraction.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder other) {
super(other);
if (isValidValue(fields()[0], other.geneName)) {
this.geneName = data().deepCopy(fields()[0].schema(), other.geneName);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.drugName)) {
this.drugName = data().deepCopy(fields()[1].schema(), other.drugName);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.source)) {
this.source = data().deepCopy(fields()[2].schema(), other.source);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.studyType)) {
this.studyType = data().deepCopy(fields()[3].schema(), other.studyType);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.type)) {
this.type = data().deepCopy(fields()[4].schema(), other.type);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.interactionType)) {
this.interactionType = data().deepCopy(fields()[5].schema(), other.interactionType);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.chemblId)) {
this.chemblId = data().deepCopy(fields()[6].schema(), other.chemblId);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.publications)) {
this.publications = data().deepCopy(fields()[7].schema(), other.publications);
fieldSetFlags()[7] = true;
}
}
/** Creates a Builder by copying an existing GeneDrugInteraction instance */
private Builder(org.opencb.biodata.models.variant.avro.GeneDrugInteraction other) {
super(org.opencb.biodata.models.variant.avro.GeneDrugInteraction.SCHEMA$);
if (isValidValue(fields()[0], other.geneName)) {
this.geneName = data().deepCopy(fields()[0].schema(), other.geneName);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.drugName)) {
this.drugName = data().deepCopy(fields()[1].schema(), other.drugName);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.source)) {
this.source = data().deepCopy(fields()[2].schema(), other.source);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.studyType)) {
this.studyType = data().deepCopy(fields()[3].schema(), other.studyType);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.type)) {
this.type = data().deepCopy(fields()[4].schema(), other.type);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.interactionType)) {
this.interactionType = data().deepCopy(fields()[5].schema(), other.interactionType);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.chemblId)) {
this.chemblId = data().deepCopy(fields()[6].schema(), other.chemblId);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.publications)) {
this.publications = data().deepCopy(fields()[7].schema(), other.publications);
fieldSetFlags()[7] = true;
}
}
/** Gets the value of the 'geneName' field */
public java.lang.String getGeneName() {
return geneName;
}
/** Sets the value of the 'geneName' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setGeneName(java.lang.String value) {
validate(fields()[0], value);
this.geneName = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'geneName' field has been set */
public boolean hasGeneName() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'geneName' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearGeneName() {
geneName = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'drugName' field */
public java.lang.String getDrugName() {
return drugName;
}
/** Sets the value of the 'drugName' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setDrugName(java.lang.String value) {
validate(fields()[1], value);
this.drugName = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'drugName' field has been set */
public boolean hasDrugName() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'drugName' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearDrugName() {
drugName = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'source' field */
public java.lang.String getSource() {
return source;
}
/** Sets the value of the 'source' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setSource(java.lang.String value) {
validate(fields()[2], value);
this.source = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'source' field has been set */
public boolean hasSource() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'source' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearSource() {
source = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'studyType' field */
public java.lang.String getStudyType() {
return studyType;
}
/** Sets the value of the 'studyType' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setStudyType(java.lang.String value) {
validate(fields()[3], value);
this.studyType = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'studyType' field has been set */
public boolean hasStudyType() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'studyType' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearStudyType() {
studyType = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'type' field */
public java.lang.String getType() {
return type;
}
/** Sets the value of the 'type' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setType(java.lang.String value) {
validate(fields()[4], value);
this.type = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'type' field has been set */
public boolean hasType() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'type' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearType() {
type = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'interactionType' field */
public java.lang.String getInteractionType() {
return interactionType;
}
/** Sets the value of the 'interactionType' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setInteractionType(java.lang.String value) {
validate(fields()[5], value);
this.interactionType = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'interactionType' field has been set */
public boolean hasInteractionType() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'interactionType' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearInteractionType() {
interactionType = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'chemblId' field */
public java.lang.String getChemblId() {
return chemblId;
}
/** Sets the value of the 'chemblId' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setChemblId(java.lang.String value) {
validate(fields()[6], value);
this.chemblId = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'chemblId' field has been set */
public boolean hasChemblId() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'chemblId' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearChemblId() {
chemblId = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'publications' field */
public java.util.List getPublications() {
return publications;
}
/** Sets the value of the 'publications' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder setPublications(java.util.List value) {
validate(fields()[7], value);
this.publications = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'publications' field has been set */
public boolean hasPublications() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'publications' field */
public org.opencb.biodata.models.variant.avro.GeneDrugInteraction.Builder clearPublications() {
publications = null;
fieldSetFlags()[7] = false;
return this;
}
@Override
public GeneDrugInteraction build() {
try {
GeneDrugInteraction record = new GeneDrugInteraction();
record.geneName = fieldSetFlags()[0] ? this.geneName : (java.lang.String) defaultValue(fields()[0]);
record.drugName = fieldSetFlags()[1] ? this.drugName : (java.lang.String) defaultValue(fields()[1]);
record.source = fieldSetFlags()[2] ? this.source : (java.lang.String) defaultValue(fields()[2]);
record.studyType = fieldSetFlags()[3] ? this.studyType : (java.lang.String) defaultValue(fields()[3]);
record.type = fieldSetFlags()[4] ? this.type : (java.lang.String) defaultValue(fields()[4]);
record.interactionType = fieldSetFlags()[5] ? this.interactionType : (java.lang.String) defaultValue(fields()[5]);
record.chemblId = fieldSetFlags()[6] ? this.chemblId : (java.lang.String) defaultValue(fields()[6]);
record.publications = fieldSetFlags()[7] ? this.publications : (java.util.List) defaultValue(fields()[7]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy