org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.opencb.biodata.models.variant.metadata;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class VariantFileHeaderSimpleLine 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\":\"VariantFileHeaderSimpleLine\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"fields\":[{\"name\":\"key\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Key of group of the Simple Header Line, e.g. source, assembly, pedigreeDB, ...\"},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Value\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Key of group of the Simple Header Line, e.g. source, assembly, pedigreeDB, ... */
private java.lang.String key;
/** Value */
private java.lang.String value;
/**
* 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 VariantFileHeaderSimpleLine() {}
/**
* All-args constructor.
*/
public VariantFileHeaderSimpleLine(java.lang.String key, java.lang.String value) {
this.key = key;
this.value = value;
}
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 key;
case 1: return value;
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: key = (java.lang.String)value$; break;
case 1: value = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'key' field.
* Key of group of the Simple Header Line, e.g. source, assembly, pedigreeDB, ... */
public java.lang.String getKey() {
return key;
}
/**
* Sets the value of the 'key' field.
* Key of group of the Simple Header Line, e.g. source, assembly, pedigreeDB, ... * @param value the value to set.
*/
public void setKey(java.lang.String value) {
this.key = value;
}
/**
* Gets the value of the 'value' field.
* Value */
public java.lang.String getValue() {
return value;
}
/**
* Sets the value of the 'value' field.
* Value * @param value the value to set.
*/
public void setValue(java.lang.String value) {
this.value = value;
}
/** Creates a new VariantFileHeaderSimpleLine RecordBuilder */
public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder newBuilder() {
return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder();
}
/** Creates a new VariantFileHeaderSimpleLine RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder other) {
return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder(other);
}
/** Creates a new VariantFileHeaderSimpleLine RecordBuilder by copying an existing VariantFileHeaderSimpleLine instance */
public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine other) {
return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder(other);
}
/**
* RecordBuilder for VariantFileHeaderSimpleLine instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String key;
private java.lang.String value;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder other) {
super(other);
if (isValidValue(fields()[0], other.key)) {
this.key = data().deepCopy(fields()[0].schema(), other.key);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.value)) {
this.value = data().deepCopy(fields()[1].schema(), other.value);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing VariantFileHeaderSimpleLine instance */
private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine other) {
super(org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.SCHEMA$);
if (isValidValue(fields()[0], other.key)) {
this.key = data().deepCopy(fields()[0].schema(), other.key);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.value)) {
this.value = data().deepCopy(fields()[1].schema(), other.value);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'key' field */
public java.lang.String getKey() {
return key;
}
/** Sets the value of the 'key' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder setKey(java.lang.String value) {
validate(fields()[0], value);
this.key = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'key' field has been set */
public boolean hasKey() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'key' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder clearKey() {
key = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'value' field */
public java.lang.String getValue() {
return value;
}
/** Sets the value of the 'value' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder setValue(java.lang.String value) {
validate(fields()[1], value);
this.value = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'value' field has been set */
public boolean hasValue() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'value' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderSimpleLine.Builder clearValue() {
value = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public VariantFileHeaderSimpleLine build() {
try {
VariantFileHeaderSimpleLine record = new VariantFileHeaderSimpleLine();
record.key = fieldSetFlags()[0] ? this.key : (java.lang.String) defaultValue(fields()[0]);
record.value = fieldSetFlags()[1] ? this.value : (java.lang.String) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy