org.opencb.biodata.models.variant.avro.EvidenceSubmission Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.opencb.biodata.models.variant.avro;
@SuppressWarnings("all")
/** The submission information */
@org.apache.avro.specific.AvroGenerated
public class EvidenceSubmission 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\":\"EvidenceSubmission\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"doc\":\"The submission information\",\"fields\":[{\"name\":\"submitter\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The submitter\"},{\"name\":\"date\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The submission date\"},{\"name\":\"id\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The submission id\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** The submitter */
private java.lang.String submitter;
/** The submission date */
private java.lang.String date;
/** The submission id */
private java.lang.String id;
/**
* 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 EvidenceSubmission() {}
/**
* All-args constructor.
*/
public EvidenceSubmission(java.lang.String submitter, java.lang.String date, java.lang.String id) {
this.submitter = submitter;
this.date = date;
this.id = id;
}
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 submitter;
case 1: return date;
case 2: return id;
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: submitter = (java.lang.String)value$; break;
case 1: date = (java.lang.String)value$; break;
case 2: id = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'submitter' field.
* The submitter */
public java.lang.String getSubmitter() {
return submitter;
}
/**
* Sets the value of the 'submitter' field.
* The submitter * @param value the value to set.
*/
public void setSubmitter(java.lang.String value) {
this.submitter = value;
}
/**
* Gets the value of the 'date' field.
* The submission date */
public java.lang.String getDate() {
return date;
}
/**
* Sets the value of the 'date' field.
* The submission date * @param value the value to set.
*/
public void setDate(java.lang.String value) {
this.date = value;
}
/**
* Gets the value of the 'id' field.
* The submission id */
public java.lang.String getId() {
return id;
}
/**
* Sets the value of the 'id' field.
* The submission id * @param value the value to set.
*/
public void setId(java.lang.String value) {
this.id = value;
}
/** Creates a new EvidenceSubmission RecordBuilder */
public static org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder();
}
/** Creates a new EvidenceSubmission RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder newBuilder(org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder other) {
return new org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder(other);
}
/** Creates a new EvidenceSubmission RecordBuilder by copying an existing EvidenceSubmission instance */
public static org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder newBuilder(org.opencb.biodata.models.variant.avro.EvidenceSubmission other) {
return new org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder(other);
}
/**
* RecordBuilder for EvidenceSubmission instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String submitter;
private java.lang.String date;
private java.lang.String id;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.EvidenceSubmission.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder other) {
super(other);
if (isValidValue(fields()[0], other.submitter)) {
this.submitter = data().deepCopy(fields()[0].schema(), other.submitter);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.date)) {
this.date = data().deepCopy(fields()[1].schema(), other.date);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.id)) {
this.id = data().deepCopy(fields()[2].schema(), other.id);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing EvidenceSubmission instance */
private Builder(org.opencb.biodata.models.variant.avro.EvidenceSubmission other) {
super(org.opencb.biodata.models.variant.avro.EvidenceSubmission.SCHEMA$);
if (isValidValue(fields()[0], other.submitter)) {
this.submitter = data().deepCopy(fields()[0].schema(), other.submitter);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.date)) {
this.date = data().deepCopy(fields()[1].schema(), other.date);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.id)) {
this.id = data().deepCopy(fields()[2].schema(), other.id);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'submitter' field */
public java.lang.String getSubmitter() {
return submitter;
}
/** Sets the value of the 'submitter' field */
public org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder setSubmitter(java.lang.String value) {
validate(fields()[0], value);
this.submitter = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'submitter' field has been set */
public boolean hasSubmitter() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'submitter' field */
public org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder clearSubmitter() {
submitter = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'date' field */
public java.lang.String getDate() {
return date;
}
/** Sets the value of the 'date' field */
public org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder setDate(java.lang.String value) {
validate(fields()[1], value);
this.date = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'date' field has been set */
public boolean hasDate() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'date' field */
public org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder clearDate() {
date = null;
fieldSetFlags()[1] = false;
return this;
}
/** 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.EvidenceSubmission.Builder setId(java.lang.String value) {
validate(fields()[2], value);
this.id = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'id' field has been set */
public boolean hasId() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'id' field */
public org.opencb.biodata.models.variant.avro.EvidenceSubmission.Builder clearId() {
id = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public EvidenceSubmission build() {
try {
EvidenceSubmission record = new EvidenceSubmission();
record.submitter = fieldSetFlags()[0] ? this.submitter : (java.lang.String) defaultValue(fields()[0]);
record.date = fieldSetFlags()[1] ? this.date : (java.lang.String) defaultValue(fields()[1]);
record.id = fieldSetFlags()[2] ? this.id : (java.lang.String) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}