org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation 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 CancerHotspotVariantAnnotation 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\":\"CancerHotspotVariantAnnotation\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"geneName\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"proteinId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"aminoacidPosition\",\"type\":[\"null\",\"int\"]},{\"name\":\"aminoacidReference\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"cancerType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"scores\",\"type\":[\"null\",{\"type\":\"map\",\"values\":\"double\",\"avro.java.string\":\"String\"}]},{\"name\":\"cancerTypeCount\",\"type\":[\"null\",{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"}]},{\"name\":\"organCount\",\"type\":[\"null\",{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"}]},{\"name\":\"variants\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"CancerHotspotAlternateAnnotation\",\"fields\":[{\"name\":\"aminoacidAlternate\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"count\",\"type\":[\"null\",\"int\"]},{\"name\":\"sampleCount\",\"type\":[\"null\",{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"}]}]}}]},{\"name\":\"source\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String geneName;
private java.lang.String proteinId;
private java.lang.Integer aminoacidPosition;
private java.lang.String aminoacidReference;
private java.lang.String cancerType;
private java.util.Map scores;
private java.util.Map cancerTypeCount;
private java.util.Map organCount;
private java.util.List variants;
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 CancerHotspotVariantAnnotation() {}
/**
* All-args constructor.
*/
public CancerHotspotVariantAnnotation(java.lang.String geneName, java.lang.String proteinId, java.lang.Integer aminoacidPosition, java.lang.String aminoacidReference, java.lang.String cancerType, java.util.Map scores, java.util.Map cancerTypeCount, java.util.Map organCount, java.util.List variants, java.lang.String source) {
this.geneName = geneName;
this.proteinId = proteinId;
this.aminoacidPosition = aminoacidPosition;
this.aminoacidReference = aminoacidReference;
this.cancerType = cancerType;
this.scores = scores;
this.cancerTypeCount = cancerTypeCount;
this.organCount = organCount;
this.variants = variants;
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 geneName;
case 1: return proteinId;
case 2: return aminoacidPosition;
case 3: return aminoacidReference;
case 4: return cancerType;
case 5: return scores;
case 6: return cancerTypeCount;
case 7: return organCount;
case 8: return variants;
case 9: 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: geneName = (java.lang.String)value$; break;
case 1: proteinId = (java.lang.String)value$; break;
case 2: aminoacidPosition = (java.lang.Integer)value$; break;
case 3: aminoacidReference = (java.lang.String)value$; break;
case 4: cancerType = (java.lang.String)value$; break;
case 5: scores = (java.util.Map)value$; break;
case 6: cancerTypeCount = (java.util.Map)value$; break;
case 7: organCount = (java.util.Map)value$; break;
case 8: variants = (java.util.List)value$; break;
case 9: source = (java.lang.String)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 'proteinId' field.
*/
public java.lang.String getProteinId() {
return proteinId;
}
/**
* Sets the value of the 'proteinId' field.
* @param value the value to set.
*/
public void setProteinId(java.lang.String value) {
this.proteinId = value;
}
/**
* Gets the value of the 'aminoacidPosition' field.
*/
public java.lang.Integer getAminoacidPosition() {
return aminoacidPosition;
}
/**
* Sets the value of the 'aminoacidPosition' field.
* @param value the value to set.
*/
public void setAminoacidPosition(java.lang.Integer value) {
this.aminoacidPosition = value;
}
/**
* Gets the value of the 'aminoacidReference' field.
*/
public java.lang.String getAminoacidReference() {
return aminoacidReference;
}
/**
* Sets the value of the 'aminoacidReference' field.
* @param value the value to set.
*/
public void setAminoacidReference(java.lang.String value) {
this.aminoacidReference = value;
}
/**
* Gets the value of the 'cancerType' field.
*/
public java.lang.String getCancerType() {
return cancerType;
}
/**
* Sets the value of the 'cancerType' field.
* @param value the value to set.
*/
public void setCancerType(java.lang.String value) {
this.cancerType = value;
}
/**
* Gets the value of the 'scores' field.
*/
public java.util.Map getScores() {
return scores;
}
/**
* Sets the value of the 'scores' field.
* @param value the value to set.
*/
public void setScores(java.util.Map value) {
this.scores = value;
}
/**
* Gets the value of the 'cancerTypeCount' field.
*/
public java.util.Map getCancerTypeCount() {
return cancerTypeCount;
}
/**
* Sets the value of the 'cancerTypeCount' field.
* @param value the value to set.
*/
public void setCancerTypeCount(java.util.Map value) {
this.cancerTypeCount = value;
}
/**
* Gets the value of the 'organCount' field.
*/
public java.util.Map getOrganCount() {
return organCount;
}
/**
* Sets the value of the 'organCount' field.
* @param value the value to set.
*/
public void setOrganCount(java.util.Map value) {
this.organCount = value;
}
/**
* Gets the value of the 'variants' field.
*/
public java.util.List getVariants() {
return variants;
}
/**
* Sets the value of the 'variants' field.
* @param value the value to set.
*/
public void setVariants(java.util.List value) {
this.variants = 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 CancerHotspotVariantAnnotation RecordBuilder */
public static org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder();
}
/** Creates a new CancerHotspotVariantAnnotation RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder newBuilder(org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder other) {
return new org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder(other);
}
/** Creates a new CancerHotspotVariantAnnotation RecordBuilder by copying an existing CancerHotspotVariantAnnotation instance */
public static org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder newBuilder(org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation other) {
return new org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder(other);
}
/**
* RecordBuilder for CancerHotspotVariantAnnotation 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 proteinId;
private java.lang.Integer aminoacidPosition;
private java.lang.String aminoacidReference;
private java.lang.String cancerType;
private java.util.Map scores;
private java.util.Map cancerTypeCount;
private java.util.Map organCount;
private java.util.List variants;
private java.lang.String source;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.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.proteinId)) {
this.proteinId = data().deepCopy(fields()[1].schema(), other.proteinId);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.aminoacidPosition)) {
this.aminoacidPosition = data().deepCopy(fields()[2].schema(), other.aminoacidPosition);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.aminoacidReference)) {
this.aminoacidReference = data().deepCopy(fields()[3].schema(), other.aminoacidReference);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.cancerType)) {
this.cancerType = data().deepCopy(fields()[4].schema(), other.cancerType);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.scores)) {
this.scores = data().deepCopy(fields()[5].schema(), other.scores);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.cancerTypeCount)) {
this.cancerTypeCount = data().deepCopy(fields()[6].schema(), other.cancerTypeCount);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.organCount)) {
this.organCount = data().deepCopy(fields()[7].schema(), other.organCount);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.variants)) {
this.variants = data().deepCopy(fields()[8].schema(), other.variants);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.source)) {
this.source = data().deepCopy(fields()[9].schema(), other.source);
fieldSetFlags()[9] = true;
}
}
/** Creates a Builder by copying an existing CancerHotspotVariantAnnotation instance */
private Builder(org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation other) {
super(org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.SCHEMA$);
if (isValidValue(fields()[0], other.geneName)) {
this.geneName = data().deepCopy(fields()[0].schema(), other.geneName);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.proteinId)) {
this.proteinId = data().deepCopy(fields()[1].schema(), other.proteinId);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.aminoacidPosition)) {
this.aminoacidPosition = data().deepCopy(fields()[2].schema(), other.aminoacidPosition);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.aminoacidReference)) {
this.aminoacidReference = data().deepCopy(fields()[3].schema(), other.aminoacidReference);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.cancerType)) {
this.cancerType = data().deepCopy(fields()[4].schema(), other.cancerType);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.scores)) {
this.scores = data().deepCopy(fields()[5].schema(), other.scores);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.cancerTypeCount)) {
this.cancerTypeCount = data().deepCopy(fields()[6].schema(), other.cancerTypeCount);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.organCount)) {
this.organCount = data().deepCopy(fields()[7].schema(), other.organCount);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.variants)) {
this.variants = data().deepCopy(fields()[8].schema(), other.variants);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.source)) {
this.source = data().deepCopy(fields()[9].schema(), other.source);
fieldSetFlags()[9] = 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.CancerHotspotVariantAnnotation.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.CancerHotspotVariantAnnotation.Builder clearGeneName() {
geneName = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'proteinId' field */
public java.lang.String getProteinId() {
return proteinId;
}
/** Sets the value of the 'proteinId' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setProteinId(java.lang.String value) {
validate(fields()[1], value);
this.proteinId = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'proteinId' field has been set */
public boolean hasProteinId() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'proteinId' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearProteinId() {
proteinId = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'aminoacidPosition' field */
public java.lang.Integer getAminoacidPosition() {
return aminoacidPosition;
}
/** Sets the value of the 'aminoacidPosition' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setAminoacidPosition(java.lang.Integer value) {
validate(fields()[2], value);
this.aminoacidPosition = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'aminoacidPosition' field has been set */
public boolean hasAminoacidPosition() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'aminoacidPosition' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearAminoacidPosition() {
aminoacidPosition = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'aminoacidReference' field */
public java.lang.String getAminoacidReference() {
return aminoacidReference;
}
/** Sets the value of the 'aminoacidReference' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setAminoacidReference(java.lang.String value) {
validate(fields()[3], value);
this.aminoacidReference = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'aminoacidReference' field has been set */
public boolean hasAminoacidReference() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'aminoacidReference' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearAminoacidReference() {
aminoacidReference = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'cancerType' field */
public java.lang.String getCancerType() {
return cancerType;
}
/** Sets the value of the 'cancerType' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setCancerType(java.lang.String value) {
validate(fields()[4], value);
this.cancerType = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'cancerType' field has been set */
public boolean hasCancerType() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'cancerType' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearCancerType() {
cancerType = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'scores' field */
public java.util.Map getScores() {
return scores;
}
/** Sets the value of the 'scores' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setScores(java.util.Map value) {
validate(fields()[5], value);
this.scores = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'scores' field has been set */
public boolean hasScores() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'scores' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearScores() {
scores = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'cancerTypeCount' field */
public java.util.Map getCancerTypeCount() {
return cancerTypeCount;
}
/** Sets the value of the 'cancerTypeCount' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setCancerTypeCount(java.util.Map value) {
validate(fields()[6], value);
this.cancerTypeCount = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'cancerTypeCount' field has been set */
public boolean hasCancerTypeCount() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'cancerTypeCount' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearCancerTypeCount() {
cancerTypeCount = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'organCount' field */
public java.util.Map getOrganCount() {
return organCount;
}
/** Sets the value of the 'organCount' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setOrganCount(java.util.Map value) {
validate(fields()[7], value);
this.organCount = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'organCount' field has been set */
public boolean hasOrganCount() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'organCount' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearOrganCount() {
organCount = null;
fieldSetFlags()[7] = false;
return this;
}
/** Gets the value of the 'variants' field */
public java.util.List getVariants() {
return variants;
}
/** Sets the value of the 'variants' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder setVariants(java.util.List value) {
validate(fields()[8], value);
this.variants = value;
fieldSetFlags()[8] = true;
return this;
}
/** Checks whether the 'variants' field has been set */
public boolean hasVariants() {
return fieldSetFlags()[8];
}
/** Clears the value of the 'variants' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearVariants() {
variants = null;
fieldSetFlags()[8] = 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.CancerHotspotVariantAnnotation.Builder setSource(java.lang.String value) {
validate(fields()[9], value);
this.source = value;
fieldSetFlags()[9] = true;
return this;
}
/** Checks whether the 'source' field has been set */
public boolean hasSource() {
return fieldSetFlags()[9];
}
/** Clears the value of the 'source' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotVariantAnnotation.Builder clearSource() {
source = null;
fieldSetFlags()[9] = false;
return this;
}
@Override
public CancerHotspotVariantAnnotation build() {
try {
CancerHotspotVariantAnnotation record = new CancerHotspotVariantAnnotation();
record.geneName = fieldSetFlags()[0] ? this.geneName : (java.lang.String) defaultValue(fields()[0]);
record.proteinId = fieldSetFlags()[1] ? this.proteinId : (java.lang.String) defaultValue(fields()[1]);
record.aminoacidPosition = fieldSetFlags()[2] ? this.aminoacidPosition : (java.lang.Integer) defaultValue(fields()[2]);
record.aminoacidReference = fieldSetFlags()[3] ? this.aminoacidReference : (java.lang.String) defaultValue(fields()[3]);
record.cancerType = fieldSetFlags()[4] ? this.cancerType : (java.lang.String) defaultValue(fields()[4]);
record.scores = fieldSetFlags()[5] ? this.scores : (java.util.Map) defaultValue(fields()[5]);
record.cancerTypeCount = fieldSetFlags()[6] ? this.cancerTypeCount : (java.util.Map) defaultValue(fields()[6]);
record.organCount = fieldSetFlags()[7] ? this.organCount : (java.util.Map) defaultValue(fields()[7]);
record.variants = fieldSetFlags()[8] ? this.variants : (java.util.List) defaultValue(fields()[8]);
record.source = fieldSetFlags()[9] ? this.source : (java.lang.String) defaultValue(fields()[9]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}