org.opencb.biodata.models.metadata.Experiment Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.opencb.biodata.models.metadata;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class Experiment 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\":\"Experiment\",\"namespace\":\"org.opencb.biodata.models.metadata\",\"fields\":[{\"name\":\"center\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"date\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"molecule\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"technique\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"library\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"libraryLayout\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"platform\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String center;
private java.lang.String date;
private java.lang.String molecule;
private java.lang.String technique;
private java.lang.String library;
private java.lang.String libraryLayout;
private java.lang.String platform;
private java.lang.String description;
/**
* 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 Experiment() {}
/**
* All-args constructor.
*/
public Experiment(java.lang.String center, java.lang.String date, java.lang.String molecule, java.lang.String technique, java.lang.String library, java.lang.String libraryLayout, java.lang.String platform, java.lang.String description) {
this.center = center;
this.date = date;
this.molecule = molecule;
this.technique = technique;
this.library = library;
this.libraryLayout = libraryLayout;
this.platform = platform;
this.description = description;
}
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 center;
case 1: return date;
case 2: return molecule;
case 3: return technique;
case 4: return library;
case 5: return libraryLayout;
case 6: return platform;
case 7: return description;
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: center = (java.lang.String)value$; break;
case 1: date = (java.lang.String)value$; break;
case 2: molecule = (java.lang.String)value$; break;
case 3: technique = (java.lang.String)value$; break;
case 4: library = (java.lang.String)value$; break;
case 5: libraryLayout = (java.lang.String)value$; break;
case 6: platform = (java.lang.String)value$; break;
case 7: description = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'center' field.
*/
public java.lang.String getCenter() {
return center;
}
/**
* Sets the value of the 'center' field.
* @param value the value to set.
*/
public void setCenter(java.lang.String value) {
this.center = value;
}
/**
* Gets the value of the 'date' field.
*/
public java.lang.String getDate() {
return date;
}
/**
* Sets the value of the 'date' field.
* @param value the value to set.
*/
public void setDate(java.lang.String value) {
this.date = value;
}
/**
* Gets the value of the 'molecule' field.
*/
public java.lang.String getMolecule() {
return molecule;
}
/**
* Sets the value of the 'molecule' field.
* @param value the value to set.
*/
public void setMolecule(java.lang.String value) {
this.molecule = value;
}
/**
* Gets the value of the 'technique' field.
*/
public java.lang.String getTechnique() {
return technique;
}
/**
* Sets the value of the 'technique' field.
* @param value the value to set.
*/
public void setTechnique(java.lang.String value) {
this.technique = value;
}
/**
* Gets the value of the 'library' field.
*/
public java.lang.String getLibrary() {
return library;
}
/**
* Sets the value of the 'library' field.
* @param value the value to set.
*/
public void setLibrary(java.lang.String value) {
this.library = value;
}
/**
* Gets the value of the 'libraryLayout' field.
*/
public java.lang.String getLibraryLayout() {
return libraryLayout;
}
/**
* Sets the value of the 'libraryLayout' field.
* @param value the value to set.
*/
public void setLibraryLayout(java.lang.String value) {
this.libraryLayout = value;
}
/**
* Gets the value of the 'platform' field.
*/
public java.lang.String getPlatform() {
return platform;
}
/**
* Sets the value of the 'platform' field.
* @param value the value to set.
*/
public void setPlatform(java.lang.String value) {
this.platform = value;
}
/**
* Gets the value of the 'description' field.
*/
public java.lang.String getDescription() {
return description;
}
/**
* Sets the value of the 'description' field.
* @param value the value to set.
*/
public void setDescription(java.lang.String value) {
this.description = value;
}
/** Creates a new Experiment RecordBuilder */
public static org.opencb.biodata.models.metadata.Experiment.Builder newBuilder() {
return new org.opencb.biodata.models.metadata.Experiment.Builder();
}
/** Creates a new Experiment RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.metadata.Experiment.Builder newBuilder(org.opencb.biodata.models.metadata.Experiment.Builder other) {
return new org.opencb.biodata.models.metadata.Experiment.Builder(other);
}
/** Creates a new Experiment RecordBuilder by copying an existing Experiment instance */
public static org.opencb.biodata.models.metadata.Experiment.Builder newBuilder(org.opencb.biodata.models.metadata.Experiment other) {
return new org.opencb.biodata.models.metadata.Experiment.Builder(other);
}
/**
* RecordBuilder for Experiment instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String center;
private java.lang.String date;
private java.lang.String molecule;
private java.lang.String technique;
private java.lang.String library;
private java.lang.String libraryLayout;
private java.lang.String platform;
private java.lang.String description;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.metadata.Experiment.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.metadata.Experiment.Builder other) {
super(other);
if (isValidValue(fields()[0], other.center)) {
this.center = data().deepCopy(fields()[0].schema(), other.center);
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.molecule)) {
this.molecule = data().deepCopy(fields()[2].schema(), other.molecule);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.technique)) {
this.technique = data().deepCopy(fields()[3].schema(), other.technique);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.library)) {
this.library = data().deepCopy(fields()[4].schema(), other.library);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.libraryLayout)) {
this.libraryLayout = data().deepCopy(fields()[5].schema(), other.libraryLayout);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.platform)) {
this.platform = data().deepCopy(fields()[6].schema(), other.platform);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.description)) {
this.description = data().deepCopy(fields()[7].schema(), other.description);
fieldSetFlags()[7] = true;
}
}
/** Creates a Builder by copying an existing Experiment instance */
private Builder(org.opencb.biodata.models.metadata.Experiment other) {
super(org.opencb.biodata.models.metadata.Experiment.SCHEMA$);
if (isValidValue(fields()[0], other.center)) {
this.center = data().deepCopy(fields()[0].schema(), other.center);
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.molecule)) {
this.molecule = data().deepCopy(fields()[2].schema(), other.molecule);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.technique)) {
this.technique = data().deepCopy(fields()[3].schema(), other.technique);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.library)) {
this.library = data().deepCopy(fields()[4].schema(), other.library);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.libraryLayout)) {
this.libraryLayout = data().deepCopy(fields()[5].schema(), other.libraryLayout);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.platform)) {
this.platform = data().deepCopy(fields()[6].schema(), other.platform);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.description)) {
this.description = data().deepCopy(fields()[7].schema(), other.description);
fieldSetFlags()[7] = true;
}
}
/** Gets the value of the 'center' field */
public java.lang.String getCenter() {
return center;
}
/** Sets the value of the 'center' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setCenter(java.lang.String value) {
validate(fields()[0], value);
this.center = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'center' field has been set */
public boolean hasCenter() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'center' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearCenter() {
center = 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.metadata.Experiment.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.metadata.Experiment.Builder clearDate() {
date = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'molecule' field */
public java.lang.String getMolecule() {
return molecule;
}
/** Sets the value of the 'molecule' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setMolecule(java.lang.String value) {
validate(fields()[2], value);
this.molecule = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'molecule' field has been set */
public boolean hasMolecule() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'molecule' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearMolecule() {
molecule = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'technique' field */
public java.lang.String getTechnique() {
return technique;
}
/** Sets the value of the 'technique' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setTechnique(java.lang.String value) {
validate(fields()[3], value);
this.technique = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'technique' field has been set */
public boolean hasTechnique() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'technique' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearTechnique() {
technique = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'library' field */
public java.lang.String getLibrary() {
return library;
}
/** Sets the value of the 'library' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setLibrary(java.lang.String value) {
validate(fields()[4], value);
this.library = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'library' field has been set */
public boolean hasLibrary() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'library' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearLibrary() {
library = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'libraryLayout' field */
public java.lang.String getLibraryLayout() {
return libraryLayout;
}
/** Sets the value of the 'libraryLayout' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setLibraryLayout(java.lang.String value) {
validate(fields()[5], value);
this.libraryLayout = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'libraryLayout' field has been set */
public boolean hasLibraryLayout() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'libraryLayout' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearLibraryLayout() {
libraryLayout = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'platform' field */
public java.lang.String getPlatform() {
return platform;
}
/** Sets the value of the 'platform' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setPlatform(java.lang.String value) {
validate(fields()[6], value);
this.platform = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'platform' field has been set */
public boolean hasPlatform() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'platform' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearPlatform() {
platform = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'description' field */
public java.lang.String getDescription() {
return description;
}
/** Sets the value of the 'description' field */
public org.opencb.biodata.models.metadata.Experiment.Builder setDescription(java.lang.String value) {
validate(fields()[7], value);
this.description = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'description' field has been set */
public boolean hasDescription() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'description' field */
public org.opencb.biodata.models.metadata.Experiment.Builder clearDescription() {
description = null;
fieldSetFlags()[7] = false;
return this;
}
@Override
public Experiment build() {
try {
Experiment record = new Experiment();
record.center = fieldSetFlags()[0] ? this.center : (java.lang.String) defaultValue(fields()[0]);
record.date = fieldSetFlags()[1] ? this.date : (java.lang.String) defaultValue(fields()[1]);
record.molecule = fieldSetFlags()[2] ? this.molecule : (java.lang.String) defaultValue(fields()[2]);
record.technique = fieldSetFlags()[3] ? this.technique : (java.lang.String) defaultValue(fields()[3]);
record.library = fieldSetFlags()[4] ? this.library : (java.lang.String) defaultValue(fields()[4]);
record.libraryLayout = fieldSetFlags()[5] ? this.libraryLayout : (java.lang.String) defaultValue(fields()[5]);
record.platform = fieldSetFlags()[6] ? this.platform : (java.lang.String) defaultValue(fields()[6]);
record.description = fieldSetFlags()[7] ? this.description : (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