org.opencb.biodata.models.variant.avro.GwasAssociationStudy Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.opencb.biodata.models.variant.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class GwasAssociationStudy 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\":\"GwasAssociationStudy\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"pubmedid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"study\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"studyAccession\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"initialSampleSizeDescription\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"initialSampleSize\",\"type\":[\"null\",\"int\"]},{\"name\":\"platform\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"genotypingTechnology\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"traits\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"GwasAssociationStudyTrait\",\"fields\":[{\"name\":\"diseaseTrait\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"strongestSnpRiskAllele\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"ontologies\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"OntologyTermAnnotation\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"name\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"source\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"url\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"attributes\",\"type\":[\"null\",{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}]}]}}]},{\"name\":\"scores\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"GwasAssociationStudyTraitScores\",\"fields\":[{\"name\":\"pValue\",\"type\":[\"null\",\"double\"]},{\"name\":\"pValueMlog\",\"type\":[\"null\",\"double\"]},{\"name\":\"pValueText\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"orBeta\",\"type\":[\"null\",\"double\"]},{\"name\":\"percentCI\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}}]}]}}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String pubmedid;
private java.lang.String study;
private java.lang.String studyAccession;
private java.lang.String initialSampleSizeDescription;
private java.lang.Integer initialSampleSize;
private java.lang.String platform;
private java.lang.String genotypingTechnology;
private java.util.List traits;
/**
* 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 GwasAssociationStudy() {}
/**
* All-args constructor.
*/
public GwasAssociationStudy(java.lang.String pubmedid, java.lang.String study, java.lang.String studyAccession, java.lang.String initialSampleSizeDescription, java.lang.Integer initialSampleSize, java.lang.String platform, java.lang.String genotypingTechnology, java.util.List traits) {
this.pubmedid = pubmedid;
this.study = study;
this.studyAccession = studyAccession;
this.initialSampleSizeDescription = initialSampleSizeDescription;
this.initialSampleSize = initialSampleSize;
this.platform = platform;
this.genotypingTechnology = genotypingTechnology;
this.traits = traits;
}
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 pubmedid;
case 1: return study;
case 2: return studyAccession;
case 3: return initialSampleSizeDescription;
case 4: return initialSampleSize;
case 5: return platform;
case 6: return genotypingTechnology;
case 7: return traits;
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: pubmedid = (java.lang.String)value$; break;
case 1: study = (java.lang.String)value$; break;
case 2: studyAccession = (java.lang.String)value$; break;
case 3: initialSampleSizeDescription = (java.lang.String)value$; break;
case 4: initialSampleSize = (java.lang.Integer)value$; break;
case 5: platform = (java.lang.String)value$; break;
case 6: genotypingTechnology = (java.lang.String)value$; break;
case 7: traits = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'pubmedid' field.
*/
public java.lang.String getPubmedid() {
return pubmedid;
}
/**
* Sets the value of the 'pubmedid' field.
* @param value the value to set.
*/
public void setPubmedid(java.lang.String value) {
this.pubmedid = value;
}
/**
* Gets the value of the 'study' field.
*/
public java.lang.String getStudy() {
return study;
}
/**
* Sets the value of the 'study' field.
* @param value the value to set.
*/
public void setStudy(java.lang.String value) {
this.study = value;
}
/**
* Gets the value of the 'studyAccession' field.
*/
public java.lang.String getStudyAccession() {
return studyAccession;
}
/**
* Sets the value of the 'studyAccession' field.
* @param value the value to set.
*/
public void setStudyAccession(java.lang.String value) {
this.studyAccession = value;
}
/**
* Gets the value of the 'initialSampleSizeDescription' field.
*/
public java.lang.String getInitialSampleSizeDescription() {
return initialSampleSizeDescription;
}
/**
* Sets the value of the 'initialSampleSizeDescription' field.
* @param value the value to set.
*/
public void setInitialSampleSizeDescription(java.lang.String value) {
this.initialSampleSizeDescription = value;
}
/**
* Gets the value of the 'initialSampleSize' field.
*/
public java.lang.Integer getInitialSampleSize() {
return initialSampleSize;
}
/**
* Sets the value of the 'initialSampleSize' field.
* @param value the value to set.
*/
public void setInitialSampleSize(java.lang.Integer value) {
this.initialSampleSize = 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 'genotypingTechnology' field.
*/
public java.lang.String getGenotypingTechnology() {
return genotypingTechnology;
}
/**
* Sets the value of the 'genotypingTechnology' field.
* @param value the value to set.
*/
public void setGenotypingTechnology(java.lang.String value) {
this.genotypingTechnology = value;
}
/**
* Gets the value of the 'traits' field.
*/
public java.util.List getTraits() {
return traits;
}
/**
* Sets the value of the 'traits' field.
* @param value the value to set.
*/
public void setTraits(java.util.List value) {
this.traits = value;
}
/** Creates a new GwasAssociationStudy RecordBuilder */
public static org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder();
}
/** Creates a new GwasAssociationStudy RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder newBuilder(org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder other) {
return new org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder(other);
}
/** Creates a new GwasAssociationStudy RecordBuilder by copying an existing GwasAssociationStudy instance */
public static org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder newBuilder(org.opencb.biodata.models.variant.avro.GwasAssociationStudy other) {
return new org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder(other);
}
/**
* RecordBuilder for GwasAssociationStudy instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String pubmedid;
private java.lang.String study;
private java.lang.String studyAccession;
private java.lang.String initialSampleSizeDescription;
private java.lang.Integer initialSampleSize;
private java.lang.String platform;
private java.lang.String genotypingTechnology;
private java.util.List traits;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.GwasAssociationStudy.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder other) {
super(other);
if (isValidValue(fields()[0], other.pubmedid)) {
this.pubmedid = data().deepCopy(fields()[0].schema(), other.pubmedid);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.study)) {
this.study = data().deepCopy(fields()[1].schema(), other.study);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.studyAccession)) {
this.studyAccession = data().deepCopy(fields()[2].schema(), other.studyAccession);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.initialSampleSizeDescription)) {
this.initialSampleSizeDescription = data().deepCopy(fields()[3].schema(), other.initialSampleSizeDescription);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.initialSampleSize)) {
this.initialSampleSize = data().deepCopy(fields()[4].schema(), other.initialSampleSize);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.platform)) {
this.platform = data().deepCopy(fields()[5].schema(), other.platform);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.genotypingTechnology)) {
this.genotypingTechnology = data().deepCopy(fields()[6].schema(), other.genotypingTechnology);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.traits)) {
this.traits = data().deepCopy(fields()[7].schema(), other.traits);
fieldSetFlags()[7] = true;
}
}
/** Creates a Builder by copying an existing GwasAssociationStudy instance */
private Builder(org.opencb.biodata.models.variant.avro.GwasAssociationStudy other) {
super(org.opencb.biodata.models.variant.avro.GwasAssociationStudy.SCHEMA$);
if (isValidValue(fields()[0], other.pubmedid)) {
this.pubmedid = data().deepCopy(fields()[0].schema(), other.pubmedid);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.study)) {
this.study = data().deepCopy(fields()[1].schema(), other.study);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.studyAccession)) {
this.studyAccession = data().deepCopy(fields()[2].schema(), other.studyAccession);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.initialSampleSizeDescription)) {
this.initialSampleSizeDescription = data().deepCopy(fields()[3].schema(), other.initialSampleSizeDescription);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.initialSampleSize)) {
this.initialSampleSize = data().deepCopy(fields()[4].schema(), other.initialSampleSize);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.platform)) {
this.platform = data().deepCopy(fields()[5].schema(), other.platform);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.genotypingTechnology)) {
this.genotypingTechnology = data().deepCopy(fields()[6].schema(), other.genotypingTechnology);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.traits)) {
this.traits = data().deepCopy(fields()[7].schema(), other.traits);
fieldSetFlags()[7] = true;
}
}
/** Gets the value of the 'pubmedid' field */
public java.lang.String getPubmedid() {
return pubmedid;
}
/** Sets the value of the 'pubmedid' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setPubmedid(java.lang.String value) {
validate(fields()[0], value);
this.pubmedid = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'pubmedid' field has been set */
public boolean hasPubmedid() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'pubmedid' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearPubmedid() {
pubmedid = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'study' field */
public java.lang.String getStudy() {
return study;
}
/** Sets the value of the 'study' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setStudy(java.lang.String value) {
validate(fields()[1], value);
this.study = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'study' field has been set */
public boolean hasStudy() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'study' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearStudy() {
study = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'studyAccession' field */
public java.lang.String getStudyAccession() {
return studyAccession;
}
/** Sets the value of the 'studyAccession' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setStudyAccession(java.lang.String value) {
validate(fields()[2], value);
this.studyAccession = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'studyAccession' field has been set */
public boolean hasStudyAccession() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'studyAccession' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearStudyAccession() {
studyAccession = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'initialSampleSizeDescription' field */
public java.lang.String getInitialSampleSizeDescription() {
return initialSampleSizeDescription;
}
/** Sets the value of the 'initialSampleSizeDescription' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setInitialSampleSizeDescription(java.lang.String value) {
validate(fields()[3], value);
this.initialSampleSizeDescription = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'initialSampleSizeDescription' field has been set */
public boolean hasInitialSampleSizeDescription() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'initialSampleSizeDescription' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearInitialSampleSizeDescription() {
initialSampleSizeDescription = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'initialSampleSize' field */
public java.lang.Integer getInitialSampleSize() {
return initialSampleSize;
}
/** Sets the value of the 'initialSampleSize' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setInitialSampleSize(java.lang.Integer value) {
validate(fields()[4], value);
this.initialSampleSize = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'initialSampleSize' field has been set */
public boolean hasInitialSampleSize() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'initialSampleSize' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearInitialSampleSize() {
initialSampleSize = null;
fieldSetFlags()[4] = 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.variant.avro.GwasAssociationStudy.Builder setPlatform(java.lang.String value) {
validate(fields()[5], value);
this.platform = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'platform' field has been set */
public boolean hasPlatform() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'platform' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearPlatform() {
platform = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'genotypingTechnology' field */
public java.lang.String getGenotypingTechnology() {
return genotypingTechnology;
}
/** Sets the value of the 'genotypingTechnology' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setGenotypingTechnology(java.lang.String value) {
validate(fields()[6], value);
this.genotypingTechnology = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'genotypingTechnology' field has been set */
public boolean hasGenotypingTechnology() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'genotypingTechnology' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearGenotypingTechnology() {
genotypingTechnology = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'traits' field */
public java.util.List getTraits() {
return traits;
}
/** Sets the value of the 'traits' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder setTraits(java.util.List value) {
validate(fields()[7], value);
this.traits = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'traits' field has been set */
public boolean hasTraits() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'traits' field */
public org.opencb.biodata.models.variant.avro.GwasAssociationStudy.Builder clearTraits() {
traits = null;
fieldSetFlags()[7] = false;
return this;
}
@Override
public GwasAssociationStudy build() {
try {
GwasAssociationStudy record = new GwasAssociationStudy();
record.pubmedid = fieldSetFlags()[0] ? this.pubmedid : (java.lang.String) defaultValue(fields()[0]);
record.study = fieldSetFlags()[1] ? this.study : (java.lang.String) defaultValue(fields()[1]);
record.studyAccession = fieldSetFlags()[2] ? this.studyAccession : (java.lang.String) defaultValue(fields()[2]);
record.initialSampleSizeDescription = fieldSetFlags()[3] ? this.initialSampleSizeDescription : (java.lang.String) defaultValue(fields()[3]);
record.initialSampleSize = fieldSetFlags()[4] ? this.initialSampleSize : (java.lang.Integer) defaultValue(fields()[4]);
record.platform = fieldSetFlags()[5] ? this.platform : (java.lang.String) defaultValue(fields()[5]);
record.genotypingTechnology = fieldSetFlags()[6] ? this.genotypingTechnology : (java.lang.String) defaultValue(fields()[6]);
record.traits = fieldSetFlags()[7] ? this.traits : (java.util.List) defaultValue(fields()[7]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy