org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation 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 CancerHotspotAlternateAnnotation 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\":\"CancerHotspotAlternateAnnotation\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"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\"}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String aminoacidAlternate;
private java.lang.Integer count;
private java.util.Map sampleCount;
/**
* 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 CancerHotspotAlternateAnnotation() {}
/**
* All-args constructor.
*/
public CancerHotspotAlternateAnnotation(java.lang.String aminoacidAlternate, java.lang.Integer count, java.util.Map sampleCount) {
this.aminoacidAlternate = aminoacidAlternate;
this.count = count;
this.sampleCount = sampleCount;
}
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 aminoacidAlternate;
case 1: return count;
case 2: return sampleCount;
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: aminoacidAlternate = (java.lang.String)value$; break;
case 1: count = (java.lang.Integer)value$; break;
case 2: sampleCount = (java.util.Map)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'aminoacidAlternate' field.
*/
public java.lang.String getAminoacidAlternate() {
return aminoacidAlternate;
}
/**
* Sets the value of the 'aminoacidAlternate' field.
* @param value the value to set.
*/
public void setAminoacidAlternate(java.lang.String value) {
this.aminoacidAlternate = value;
}
/**
* Gets the value of the 'count' field.
*/
public java.lang.Integer getCount() {
return count;
}
/**
* Sets the value of the 'count' field.
* @param value the value to set.
*/
public void setCount(java.lang.Integer value) {
this.count = value;
}
/**
* Gets the value of the 'sampleCount' field.
*/
public java.util.Map getSampleCount() {
return sampleCount;
}
/**
* Sets the value of the 'sampleCount' field.
* @param value the value to set.
*/
public void setSampleCount(java.util.Map value) {
this.sampleCount = value;
}
/** Creates a new CancerHotspotAlternateAnnotation RecordBuilder */
public static org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder();
}
/** Creates a new CancerHotspotAlternateAnnotation RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder newBuilder(org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder other) {
return new org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder(other);
}
/** Creates a new CancerHotspotAlternateAnnotation RecordBuilder by copying an existing CancerHotspotAlternateAnnotation instance */
public static org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder newBuilder(org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation other) {
return new org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder(other);
}
/**
* RecordBuilder for CancerHotspotAlternateAnnotation instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String aminoacidAlternate;
private java.lang.Integer count;
private java.util.Map sampleCount;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder other) {
super(other);
if (isValidValue(fields()[0], other.aminoacidAlternate)) {
this.aminoacidAlternate = data().deepCopy(fields()[0].schema(), other.aminoacidAlternate);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.count)) {
this.count = data().deepCopy(fields()[1].schema(), other.count);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.sampleCount)) {
this.sampleCount = data().deepCopy(fields()[2].schema(), other.sampleCount);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing CancerHotspotAlternateAnnotation instance */
private Builder(org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation other) {
super(org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.SCHEMA$);
if (isValidValue(fields()[0], other.aminoacidAlternate)) {
this.aminoacidAlternate = data().deepCopy(fields()[0].schema(), other.aminoacidAlternate);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.count)) {
this.count = data().deepCopy(fields()[1].schema(), other.count);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.sampleCount)) {
this.sampleCount = data().deepCopy(fields()[2].schema(), other.sampleCount);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'aminoacidAlternate' field */
public java.lang.String getAminoacidAlternate() {
return aminoacidAlternate;
}
/** Sets the value of the 'aminoacidAlternate' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder setAminoacidAlternate(java.lang.String value) {
validate(fields()[0], value);
this.aminoacidAlternate = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'aminoacidAlternate' field has been set */
public boolean hasAminoacidAlternate() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'aminoacidAlternate' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder clearAminoacidAlternate() {
aminoacidAlternate = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'count' field */
public java.lang.Integer getCount() {
return count;
}
/** Sets the value of the 'count' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder setCount(java.lang.Integer value) {
validate(fields()[1], value);
this.count = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'count' field has been set */
public boolean hasCount() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'count' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder clearCount() {
count = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'sampleCount' field */
public java.util.Map getSampleCount() {
return sampleCount;
}
/** Sets the value of the 'sampleCount' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder setSampleCount(java.util.Map value) {
validate(fields()[2], value);
this.sampleCount = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'sampleCount' field has been set */
public boolean hasSampleCount() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'sampleCount' field */
public org.opencb.biodata.models.variant.avro.CancerHotspotAlternateAnnotation.Builder clearSampleCount() {
sampleCount = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public CancerHotspotAlternateAnnotation build() {
try {
CancerHotspotAlternateAnnotation record = new CancerHotspotAlternateAnnotation();
record.aminoacidAlternate = fieldSetFlags()[0] ? this.aminoacidAlternate : (java.lang.String) defaultValue(fields()[0]);
record.count = fieldSetFlags()[1] ? this.count : (java.lang.Integer) defaultValue(fields()[1]);
record.sampleCount = fieldSetFlags()[2] ? this.sampleCount : (java.util.Map) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy