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.participant.avro;
@SuppressWarnings("all")
/** This defines a pair of germline and tumor, this pair should/must be analyzed together */
@org.apache.avro.specific.AvroGenerated
public class MatchedSamples 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\":\"MatchedSamples\",\"namespace\":\"org.gel.models.participant.avro\",\"doc\":\"This defines a pair of germline and tumor, this pair should/must be analyzed together\",\"fields\":[{\"name\":\"germlineSampleId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Sample identifier (e.g, LP00012645_5GH)) for the germline\"},{\"name\":\"tumourSampleId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Sample identifier (e.g, LP00012643_7JS)) for the tumor\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Sample identifier (e.g, LP00012645_5GH)) for the germline */
private java.lang.String germlineSampleId;
/** Sample identifier (e.g, LP00012643_7JS)) for the tumor */
private java.lang.String tumourSampleId;
/**
* 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 MatchedSamples() {}
/**
* All-args constructor.
*/
public MatchedSamples(java.lang.String germlineSampleId, java.lang.String tumourSampleId) {
this.germlineSampleId = germlineSampleId;
this.tumourSampleId = tumourSampleId;
}
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 germlineSampleId;
case 1: return tumourSampleId;
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: germlineSampleId = (java.lang.String)value$; break;
case 1: tumourSampleId = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'germlineSampleId' field.
* Sample identifier (e.g, LP00012645_5GH)) for the germline */
public java.lang.String getGermlineSampleId() {
return germlineSampleId;
}
/**
* Sets the value of the 'germlineSampleId' field.
* Sample identifier (e.g, LP00012645_5GH)) for the germline * @param value the value to set.
*/
public void setGermlineSampleId(java.lang.String value) {
this.germlineSampleId = value;
}
/**
* Gets the value of the 'tumourSampleId' field.
* Sample identifier (e.g, LP00012643_7JS)) for the tumor */
public java.lang.String getTumourSampleId() {
return tumourSampleId;
}
/**
* Sets the value of the 'tumourSampleId' field.
* Sample identifier (e.g, LP00012643_7JS)) for the tumor * @param value the value to set.
*/
public void setTumourSampleId(java.lang.String value) {
this.tumourSampleId = value;
}
/** Creates a new MatchedSamples RecordBuilder */
public static org.gel.models.participant.avro.MatchedSamples.Builder newBuilder() {
return new org.gel.models.participant.avro.MatchedSamples.Builder();
}
/** Creates a new MatchedSamples RecordBuilder by copying an existing Builder */
public static org.gel.models.participant.avro.MatchedSamples.Builder newBuilder(org.gel.models.participant.avro.MatchedSamples.Builder other) {
return new org.gel.models.participant.avro.MatchedSamples.Builder(other);
}
/** Creates a new MatchedSamples RecordBuilder by copying an existing MatchedSamples instance */
public static org.gel.models.participant.avro.MatchedSamples.Builder newBuilder(org.gel.models.participant.avro.MatchedSamples other) {
return new org.gel.models.participant.avro.MatchedSamples.Builder(other);
}
/**
* RecordBuilder for MatchedSamples instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String germlineSampleId;
private java.lang.String tumourSampleId;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.participant.avro.MatchedSamples.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.participant.avro.MatchedSamples.Builder other) {
super(other);
if (isValidValue(fields()[0], other.germlineSampleId)) {
this.germlineSampleId = data().deepCopy(fields()[0].schema(), other.germlineSampleId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.tumourSampleId)) {
this.tumourSampleId = data().deepCopy(fields()[1].schema(), other.tumourSampleId);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing MatchedSamples instance */
private Builder(org.gel.models.participant.avro.MatchedSamples other) {
super(org.gel.models.participant.avro.MatchedSamples.SCHEMA$);
if (isValidValue(fields()[0], other.germlineSampleId)) {
this.germlineSampleId = data().deepCopy(fields()[0].schema(), other.germlineSampleId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.tumourSampleId)) {
this.tumourSampleId = data().deepCopy(fields()[1].schema(), other.tumourSampleId);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'germlineSampleId' field */
public java.lang.String getGermlineSampleId() {
return germlineSampleId;
}
/** Sets the value of the 'germlineSampleId' field */
public org.gel.models.participant.avro.MatchedSamples.Builder setGermlineSampleId(java.lang.String value) {
validate(fields()[0], value);
this.germlineSampleId = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'germlineSampleId' field has been set */
public boolean hasGermlineSampleId() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'germlineSampleId' field */
public org.gel.models.participant.avro.MatchedSamples.Builder clearGermlineSampleId() {
germlineSampleId = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'tumourSampleId' field */
public java.lang.String getTumourSampleId() {
return tumourSampleId;
}
/** Sets the value of the 'tumourSampleId' field */
public org.gel.models.participant.avro.MatchedSamples.Builder setTumourSampleId(java.lang.String value) {
validate(fields()[1], value);
this.tumourSampleId = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'tumourSampleId' field has been set */
public boolean hasTumourSampleId() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'tumourSampleId' field */
public org.gel.models.participant.avro.MatchedSamples.Builder clearTumourSampleId() {
tumourSampleId = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public MatchedSamples build() {
try {
MatchedSamples record = new MatchedSamples();
record.germlineSampleId = fieldSetFlags()[0] ? this.germlineSampleId : (java.lang.String) defaultValue(fields()[0]);
record.tumourSampleId = fieldSetFlags()[1] ? this.tumourSampleId : (java.lang.String) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}