org.opencb.biodata.models.variant.avro.GeneTraitAssociation 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 GeneTraitAssociation 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\":\"GeneTraitAssociation\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"hpo\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"score\",\"type\":[\"null\",\"float\"]},{\"name\":\"numberOfPubmeds\",\"type\":[\"null\",\"int\"]},{\"name\":\"associationTypes\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"sources\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"source\",\"type\":{\"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 hpo;
private java.lang.Float score;
private java.lang.Integer numberOfPubmeds;
private java.util.List associationTypes;
private java.util.List sources;
private java.lang.String source;
/**
* 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 GeneTraitAssociation() {}
/**
* All-args constructor.
*/
public GeneTraitAssociation(java.lang.String id, java.lang.String name, java.lang.String hpo, java.lang.Float score, java.lang.Integer numberOfPubmeds, java.util.List associationTypes, java.util.List sources, java.lang.String source) {
this.id = id;
this.name = name;
this.hpo = hpo;
this.score = score;
this.numberOfPubmeds = numberOfPubmeds;
this.associationTypes = associationTypes;
this.sources = sources;
this.source = source;
}
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 hpo;
case 3: return score;
case 4: return numberOfPubmeds;
case 5: return associationTypes;
case 6: return sources;
case 7: return source;
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: hpo = (java.lang.String)value$; break;
case 3: score = (java.lang.Float)value$; break;
case 4: numberOfPubmeds = (java.lang.Integer)value$; break;
case 5: associationTypes = (java.util.List)value$; break;
case 6: sources = (java.util.List)value$; break;
case 7: source = (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 'hpo' field.
*/
public java.lang.String getHpo() {
return hpo;
}
/**
* Sets the value of the 'hpo' field.
* @param value the value to set.
*/
public void setHpo(java.lang.String value) {
this.hpo = value;
}
/**
* Gets the value of the 'score' field.
*/
public java.lang.Float getScore() {
return score;
}
/**
* Sets the value of the 'score' field.
* @param value the value to set.
*/
public void setScore(java.lang.Float value) {
this.score = value;
}
/**
* Gets the value of the 'numberOfPubmeds' field.
*/
public java.lang.Integer getNumberOfPubmeds() {
return numberOfPubmeds;
}
/**
* Sets the value of the 'numberOfPubmeds' field.
* @param value the value to set.
*/
public void setNumberOfPubmeds(java.lang.Integer value) {
this.numberOfPubmeds = value;
}
/**
* Gets the value of the 'associationTypes' field.
*/
public java.util.List getAssociationTypes() {
return associationTypes;
}
/**
* Sets the value of the 'associationTypes' field.
* @param value the value to set.
*/
public void setAssociationTypes(java.util.List value) {
this.associationTypes = value;
}
/**
* Gets the value of the 'sources' field.
*/
public java.util.List getSources() {
return sources;
}
/**
* Sets the value of the 'sources' field.
* @param value the value to set.
*/
public void setSources(java.util.List value) {
this.sources = 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;
}
/** Creates a new GeneTraitAssociation RecordBuilder */
public static org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder();
}
/** Creates a new GeneTraitAssociation RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder newBuilder(org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder other) {
return new org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder(other);
}
/** Creates a new GeneTraitAssociation RecordBuilder by copying an existing GeneTraitAssociation instance */
public static org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder newBuilder(org.opencb.biodata.models.variant.avro.GeneTraitAssociation other) {
return new org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder(other);
}
/**
* RecordBuilder for GeneTraitAssociation 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 hpo;
private java.lang.Float score;
private java.lang.Integer numberOfPubmeds;
private java.util.List associationTypes;
private java.util.List sources;
private java.lang.String source;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.GeneTraitAssociation.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.GeneTraitAssociation.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.hpo)) {
this.hpo = data().deepCopy(fields()[2].schema(), other.hpo);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.score)) {
this.score = data().deepCopy(fields()[3].schema(), other.score);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.numberOfPubmeds)) {
this.numberOfPubmeds = data().deepCopy(fields()[4].schema(), other.numberOfPubmeds);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.associationTypes)) {
this.associationTypes = data().deepCopy(fields()[5].schema(), other.associationTypes);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.sources)) {
this.sources = data().deepCopy(fields()[6].schema(), other.sources);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.source)) {
this.source = data().deepCopy(fields()[7].schema(), other.source);
fieldSetFlags()[7] = true;
}
}
/** Creates a Builder by copying an existing GeneTraitAssociation instance */
private Builder(org.opencb.biodata.models.variant.avro.GeneTraitAssociation other) {
super(org.opencb.biodata.models.variant.avro.GeneTraitAssociation.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.hpo)) {
this.hpo = data().deepCopy(fields()[2].schema(), other.hpo);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.score)) {
this.score = data().deepCopy(fields()[3].schema(), other.score);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.numberOfPubmeds)) {
this.numberOfPubmeds = data().deepCopy(fields()[4].schema(), other.numberOfPubmeds);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.associationTypes)) {
this.associationTypes = data().deepCopy(fields()[5].schema(), other.associationTypes);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.sources)) {
this.sources = data().deepCopy(fields()[6].schema(), other.sources);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.source)) {
this.source = data().deepCopy(fields()[7].schema(), other.source);
fieldSetFlags()[7] = 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.GeneTraitAssociation.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.GeneTraitAssociation.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.GeneTraitAssociation.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.GeneTraitAssociation.Builder clearName() {
name = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'hpo' field */
public java.lang.String getHpo() {
return hpo;
}
/** Sets the value of the 'hpo' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder setHpo(java.lang.String value) {
validate(fields()[2], value);
this.hpo = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'hpo' field has been set */
public boolean hasHpo() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'hpo' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder clearHpo() {
hpo = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'score' field */
public java.lang.Float getScore() {
return score;
}
/** Sets the value of the 'score' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder setScore(java.lang.Float value) {
validate(fields()[3], value);
this.score = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'score' field has been set */
public boolean hasScore() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'score' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder clearScore() {
score = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'numberOfPubmeds' field */
public java.lang.Integer getNumberOfPubmeds() {
return numberOfPubmeds;
}
/** Sets the value of the 'numberOfPubmeds' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder setNumberOfPubmeds(java.lang.Integer value) {
validate(fields()[4], value);
this.numberOfPubmeds = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'numberOfPubmeds' field has been set */
public boolean hasNumberOfPubmeds() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'numberOfPubmeds' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder clearNumberOfPubmeds() {
numberOfPubmeds = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'associationTypes' field */
public java.util.List getAssociationTypes() {
return associationTypes;
}
/** Sets the value of the 'associationTypes' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder setAssociationTypes(java.util.List value) {
validate(fields()[5], value);
this.associationTypes = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'associationTypes' field has been set */
public boolean hasAssociationTypes() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'associationTypes' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder clearAssociationTypes() {
associationTypes = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'sources' field */
public java.util.List getSources() {
return sources;
}
/** Sets the value of the 'sources' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder setSources(java.util.List value) {
validate(fields()[6], value);
this.sources = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'sources' field has been set */
public boolean hasSources() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'sources' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder clearSources() {
sources = null;
fieldSetFlags()[6] = 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.GeneTraitAssociation.Builder setSource(java.lang.String value) {
validate(fields()[7], value);
this.source = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'source' field has been set */
public boolean hasSource() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'source' field */
public org.opencb.biodata.models.variant.avro.GeneTraitAssociation.Builder clearSource() {
source = null;
fieldSetFlags()[7] = false;
return this;
}
@Override
public GeneTraitAssociation build() {
try {
GeneTraitAssociation record = new GeneTraitAssociation();
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.hpo = fieldSetFlags()[2] ? this.hpo : (java.lang.String) defaultValue(fields()[2]);
record.score = fieldSetFlags()[3] ? this.score : (java.lang.Float) defaultValue(fields()[3]);
record.numberOfPubmeds = fieldSetFlags()[4] ? this.numberOfPubmeds : (java.lang.Integer) defaultValue(fields()[4]);
record.associationTypes = fieldSetFlags()[5] ? this.associationTypes : (java.util.List) defaultValue(fields()[5]);
record.sources = fieldSetFlags()[6] ? this.sources : (java.util.List) defaultValue(fields()[6]);
record.source = fieldSetFlags()[7] ? this.source : (java.lang.String) defaultValue(fields()[7]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy