Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.report.avro;
@SuppressWarnings("all")
/** The population allele frequency of a given variant in a given study and optionally population */
@org.apache.avro.specific.AvroGenerated
public class AlleleFrequency 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\":\"AlleleFrequency\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"The population allele frequency of a given variant in a given study and optionally population\",\"fields\":[{\"name\":\"study\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The study from where this data comes from\"},{\"name\":\"population\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The specific population where this allele frequency belongs\"},{\"name\":\"alternateFrequency\",\"type\":\"float\",\"doc\":\"The frequency of the alternate allele\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** The study from where this data comes from */
private java.lang.String study;
/** The specific population where this allele frequency belongs */
private java.lang.String population;
/** The frequency of the alternate allele */
private float alternateFrequency;
/**
* 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 AlleleFrequency() {}
/**
* All-args constructor.
*/
public AlleleFrequency(java.lang.String study, java.lang.String population, java.lang.Float alternateFrequency) {
this.study = study;
this.population = population;
this.alternateFrequency = alternateFrequency;
}
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 study;
case 1: return population;
case 2: return alternateFrequency;
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: study = (java.lang.String)value$; break;
case 1: population = (java.lang.String)value$; break;
case 2: alternateFrequency = (java.lang.Float)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'study' field.
* The study from where this data comes from */
public java.lang.String getStudy() {
return study;
}
/**
* Sets the value of the 'study' field.
* The study from where this data comes from * @param value the value to set.
*/
public void setStudy(java.lang.String value) {
this.study = value;
}
/**
* Gets the value of the 'population' field.
* The specific population where this allele frequency belongs */
public java.lang.String getPopulation() {
return population;
}
/**
* Sets the value of the 'population' field.
* The specific population where this allele frequency belongs * @param value the value to set.
*/
public void setPopulation(java.lang.String value) {
this.population = value;
}
/**
* Gets the value of the 'alternateFrequency' field.
* The frequency of the alternate allele */
public java.lang.Float getAlternateFrequency() {
return alternateFrequency;
}
/**
* Sets the value of the 'alternateFrequency' field.
* The frequency of the alternate allele * @param value the value to set.
*/
public void setAlternateFrequency(java.lang.Float value) {
this.alternateFrequency = value;
}
/** Creates a new AlleleFrequency RecordBuilder */
public static org.gel.models.report.avro.AlleleFrequency.Builder newBuilder() {
return new org.gel.models.report.avro.AlleleFrequency.Builder();
}
/** Creates a new AlleleFrequency RecordBuilder by copying an existing Builder */
public static org.gel.models.report.avro.AlleleFrequency.Builder newBuilder(org.gel.models.report.avro.AlleleFrequency.Builder other) {
return new org.gel.models.report.avro.AlleleFrequency.Builder(other);
}
/** Creates a new AlleleFrequency RecordBuilder by copying an existing AlleleFrequency instance */
public static org.gel.models.report.avro.AlleleFrequency.Builder newBuilder(org.gel.models.report.avro.AlleleFrequency other) {
return new org.gel.models.report.avro.AlleleFrequency.Builder(other);
}
/**
* RecordBuilder for AlleleFrequency instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String study;
private java.lang.String population;
private float alternateFrequency;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.report.avro.AlleleFrequency.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.report.avro.AlleleFrequency.Builder other) {
super(other);
if (isValidValue(fields()[0], other.study)) {
this.study = data().deepCopy(fields()[0].schema(), other.study);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.population)) {
this.population = data().deepCopy(fields()[1].schema(), other.population);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.alternateFrequency)) {
this.alternateFrequency = data().deepCopy(fields()[2].schema(), other.alternateFrequency);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing AlleleFrequency instance */
private Builder(org.gel.models.report.avro.AlleleFrequency other) {
super(org.gel.models.report.avro.AlleleFrequency.SCHEMA$);
if (isValidValue(fields()[0], other.study)) {
this.study = data().deepCopy(fields()[0].schema(), other.study);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.population)) {
this.population = data().deepCopy(fields()[1].schema(), other.population);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.alternateFrequency)) {
this.alternateFrequency = data().deepCopy(fields()[2].schema(), other.alternateFrequency);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'study' field */
public java.lang.String getStudy() {
return study;
}
/** Sets the value of the 'study' field */
public org.gel.models.report.avro.AlleleFrequency.Builder setStudy(java.lang.String value) {
validate(fields()[0], value);
this.study = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'study' field has been set */
public boolean hasStudy() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'study' field */
public org.gel.models.report.avro.AlleleFrequency.Builder clearStudy() {
study = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'population' field */
public java.lang.String getPopulation() {
return population;
}
/** Sets the value of the 'population' field */
public org.gel.models.report.avro.AlleleFrequency.Builder setPopulation(java.lang.String value) {
validate(fields()[1], value);
this.population = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'population' field has been set */
public boolean hasPopulation() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'population' field */
public org.gel.models.report.avro.AlleleFrequency.Builder clearPopulation() {
population = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'alternateFrequency' field */
public java.lang.Float getAlternateFrequency() {
return alternateFrequency;
}
/** Sets the value of the 'alternateFrequency' field */
public org.gel.models.report.avro.AlleleFrequency.Builder setAlternateFrequency(float value) {
validate(fields()[2], value);
this.alternateFrequency = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'alternateFrequency' field has been set */
public boolean hasAlternateFrequency() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'alternateFrequency' field */
public org.gel.models.report.avro.AlleleFrequency.Builder clearAlternateFrequency() {
fieldSetFlags()[2] = false;
return this;
}
@Override
public AlleleFrequency build() {
try {
AlleleFrequency record = new AlleleFrequency();
record.study = fieldSetFlags()[0] ? this.study : (java.lang.String) defaultValue(fields()[0]);
record.population = fieldSetFlags()[1] ? this.population : (java.lang.String) defaultValue(fields()[1]);
record.alternateFrequency = fieldSetFlags()[2] ? this.alternateFrequency : (java.lang.Float) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}