org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine 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 VariantFileHeaderComplexLine 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\":\"VariantFileHeaderComplexLine\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"fields\":[{\"name\":\"key\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Key of group of the Complex Header Line, e.g. INFO, FORMAT, FILTER, ALT, ...\"},{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"ID or Name of the line\"},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The description\",\"default\":null},{\"name\":\"number\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Arity of the values associated with this metadata line.\\n Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT\\n Accepted values:\\n - : The field has always this number of values.\\n - A: The field has one value per alternate allele.\\n - R: The field has one value for each possible allele, including the reference.\\n - G: The field has one value for each possible genotype\\n - .: The number of possible values varies, is unknown or unbounded.\",\"default\":null},{\"name\":\"type\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Type of the values associated with this metadata line.\\n Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT\\n Accepted values:\\n - Integer\\n - Float\\n - String\\n - Character\\n - Flag\",\"default\":null},{\"name\":\"genericFields\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Other optional fields\",\"default\":{}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Key of group of the Complex Header Line, e.g. INFO, FORMAT, FILTER, ALT, ... */
private java.lang.String key;
/** ID or Name of the line */
private java.lang.String id;
/** The description */
private java.lang.String description;
/** Arity of the values associated with this metadata line.
Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT
Accepted values:
- : The field has always this number of values.
- A: The field has one value per alternate allele.
- R: The field has one value for each possible allele, including the reference.
- G: The field has one value for each possible genotype
- .: The number of possible values varies, is unknown or unbounded. */
private java.lang.String number;
/** Type of the values associated with this metadata line.
Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT
Accepted values:
- Integer
- Float
- String
- Character
- Flag */
private java.lang.String type;
/** Other optional fields */
private java.util.Map genericFields;
/**
* 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 VariantFileHeaderComplexLine() {}
/**
* All-args constructor.
*/
public VariantFileHeaderComplexLine(java.lang.String key, java.lang.String id, java.lang.String description, java.lang.String number, java.lang.String type, java.util.Map genericFields) {
this.key = key;
this.id = id;
this.description = description;
this.number = number;
this.type = type;
this.genericFields = genericFields;
}
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 id;
case 2: return description;
case 3: return number;
case 4: return type;
case 5: return genericFields;
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: id = (java.lang.String)value$; break;
case 2: description = (java.lang.String)value$; break;
case 3: number = (java.lang.String)value$; break;
case 4: type = (java.lang.String)value$; break;
case 5: genericFields = (java.util.Map)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'key' field.
* Key of group of the Complex Header Line, e.g. INFO, FORMAT, FILTER, ALT, ... */
public java.lang.String getKey() {
return key;
}
/**
* Sets the value of the 'key' field.
* Key of group of the Complex Header Line, e.g. INFO, FORMAT, FILTER, ALT, ... * @param value the value to set.
*/
public void setKey(java.lang.String value) {
this.key = value;
}
/**
* Gets the value of the 'id' field.
* ID or Name of the line */
public java.lang.String getId() {
return id;
}
/**
* Sets the value of the 'id' field.
* ID or Name of the line * @param value the value to set.
*/
public void setId(java.lang.String value) {
this.id = value;
}
/**
* Gets the value of the 'description' field.
* The description */
public java.lang.String getDescription() {
return description;
}
/**
* Sets the value of the 'description' field.
* The description * @param value the value to set.
*/
public void setDescription(java.lang.String value) {
this.description = value;
}
/**
* Gets the value of the 'number' field.
* Arity of the values associated with this metadata line.
Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT
Accepted values:
- : The field has always this number of values.
- A: The field has one value per alternate allele.
- R: The field has one value for each possible allele, including the reference.
- G: The field has one value for each possible genotype
- .: The number of possible values varies, is unknown or unbounded. */
public java.lang.String getNumber() {
return number;
}
/**
* Sets the value of the 'number' field.
* Arity of the values associated with this metadata line.
Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT
Accepted values:
- : The field has always this number of values.
- A: The field has one value per alternate allele.
- R: The field has one value for each possible allele, including the reference.
- G: The field has one value for each possible genotype
- .: The number of possible values varies, is unknown or unbounded. * @param value the value to set.
*/
public void setNumber(java.lang.String value) {
this.number = value;
}
/**
* Gets the value of the 'type' field.
* Type of the values associated with this metadata line.
Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT
Accepted values:
- Integer
- Float
- String
- Character
- Flag */
public java.lang.String getType() {
return type;
}
/**
* Sets the value of the 'type' field.
* Type of the values associated with this metadata line.
Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT
Accepted values:
- Integer
- Float
- String
- Character
- Flag * @param value the value to set.
*/
public void setType(java.lang.String value) {
this.type = value;
}
/**
* Gets the value of the 'genericFields' field.
* Other optional fields */
public java.util.Map getGenericFields() {
return genericFields;
}
/**
* Sets the value of the 'genericFields' field.
* Other optional fields * @param value the value to set.
*/
public void setGenericFields(java.util.Map value) {
this.genericFields = value;
}
/** Creates a new VariantFileHeaderComplexLine RecordBuilder */
public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder newBuilder() {
return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder();
}
/** Creates a new VariantFileHeaderComplexLine RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder other) {
return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder(other);
}
/** Creates a new VariantFileHeaderComplexLine RecordBuilder by copying an existing VariantFileHeaderComplexLine instance */
public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine other) {
return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder(other);
}
/**
* RecordBuilder for VariantFileHeaderComplexLine 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 id;
private java.lang.String description;
private java.lang.String number;
private java.lang.String type;
private java.util.Map genericFields;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.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.id)) {
this.id = data().deepCopy(fields()[1].schema(), other.id);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.description)) {
this.description = data().deepCopy(fields()[2].schema(), other.description);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.number)) {
this.number = data().deepCopy(fields()[3].schema(), other.number);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.type)) {
this.type = data().deepCopy(fields()[4].schema(), other.type);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.genericFields)) {
this.genericFields = data().deepCopy(fields()[5].schema(), other.genericFields);
fieldSetFlags()[5] = true;
}
}
/** Creates a Builder by copying an existing VariantFileHeaderComplexLine instance */
private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine other) {
super(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.SCHEMA$);
if (isValidValue(fields()[0], other.key)) {
this.key = data().deepCopy(fields()[0].schema(), other.key);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.id)) {
this.id = data().deepCopy(fields()[1].schema(), other.id);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.description)) {
this.description = data().deepCopy(fields()[2].schema(), other.description);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.number)) {
this.number = data().deepCopy(fields()[3].schema(), other.number);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.type)) {
this.type = data().deepCopy(fields()[4].schema(), other.type);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.genericFields)) {
this.genericFields = data().deepCopy(fields()[5].schema(), other.genericFields);
fieldSetFlags()[5] = 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.VariantFileHeaderComplexLine.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.VariantFileHeaderComplexLine.Builder clearKey() {
key = null;
fieldSetFlags()[0] = 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.metadata.VariantFileHeaderComplexLine.Builder setId(java.lang.String value) {
validate(fields()[1], value);
this.id = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'id' field has been set */
public boolean hasId() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'id' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearId() {
id = null;
fieldSetFlags()[1] = 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.variant.metadata.VariantFileHeaderComplexLine.Builder setDescription(java.lang.String value) {
validate(fields()[2], value);
this.description = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'description' field has been set */
public boolean hasDescription() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'description' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearDescription() {
description = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'number' field */
public java.lang.String getNumber() {
return number;
}
/** Sets the value of the 'number' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setNumber(java.lang.String value) {
validate(fields()[3], value);
this.number = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'number' field has been set */
public boolean hasNumber() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'number' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearNumber() {
number = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'type' field */
public java.lang.String getType() {
return type;
}
/** Sets the value of the 'type' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setType(java.lang.String value) {
validate(fields()[4], value);
this.type = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'type' field has been set */
public boolean hasType() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'type' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearType() {
type = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'genericFields' field */
public java.util.Map getGenericFields() {
return genericFields;
}
/** Sets the value of the 'genericFields' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setGenericFields(java.util.Map value) {
validate(fields()[5], value);
this.genericFields = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'genericFields' field has been set */
public boolean hasGenericFields() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'genericFields' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearGenericFields() {
genericFields = null;
fieldSetFlags()[5] = false;
return this;
}
@Override
public VariantFileHeaderComplexLine build() {
try {
VariantFileHeaderComplexLine record = new VariantFileHeaderComplexLine();
record.key = fieldSetFlags()[0] ? this.key : (java.lang.String) defaultValue(fields()[0]);
record.id = fieldSetFlags()[1] ? this.id : (java.lang.String) defaultValue(fields()[1]);
record.description = fieldSetFlags()[2] ? this.description : (java.lang.String) defaultValue(fields()[2]);
record.number = fieldSetFlags()[3] ? this.number : (java.lang.String) defaultValue(fields()[3]);
record.type = fieldSetFlags()[4] ? this.type : (java.lang.String) defaultValue(fields()[4]);
record.genericFields = fieldSetFlags()[5] ? this.genericFields : (java.util.Map) defaultValue(fields()[5]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy