org.gel.models.report.avro.UniparentalDisomyFragment Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.report.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class UniparentalDisomyFragment 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\":\"UniparentalDisomyFragment\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"coordinates\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Coordinates\",\"fields\":[{\"name\":\"assembly\",\"type\":{\"type\":\"enum\",\"name\":\"Assembly\",\"doc\":\"The reference genome assembly\",\"symbols\":[\"GRCh38\",\"GRCh37\"]},\"doc\":\"The assembly to which this variant corresponds\"},{\"name\":\"chromosome\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Chromosome without \\\"chr\\\" prefix (e.g. X rather than chrX)\"},{\"name\":\"start\",\"type\":\"int\",\"doc\":\"Start genomic position for variant (1-based)\"},{\"name\":\"end\",\"type\":\"int\",\"doc\":\"End genomic position for variant\"},{\"name\":\"ciStart\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"ConfidenceInterval\",\"fields\":[{\"name\":\"left\",\"type\":\"int\"},{\"name\":\"right\",\"type\":\"int\"}]}]},{\"name\":\"ciEnd\",\"type\":[\"null\",\"ConfidenceInterval\"]}]}],\"doc\":\"Coordinates can be specified to indicate the part of the chromosome affected\"},{\"name\":\"uniparentalDisomyType\",\"type\":{\"type\":\"enum\",\"name\":\"UniparentalDisomyType\",\"symbols\":[\"isodisomy\",\"heterodisomy\",\"both\"]},\"doc\":\"indicates whether the UPD event involves `isodisomy`, `heterodisomy` or `both`\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Coordinates can be specified to indicate the part of the chromosome affected */
private org.gel.models.report.avro.Coordinates coordinates;
/** indicates whether the UPD event involves `isodisomy`, `heterodisomy` or `both` */
private org.gel.models.report.avro.UniparentalDisomyType uniparentalDisomyType;
/**
* 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 UniparentalDisomyFragment() {}
/**
* All-args constructor.
*/
public UniparentalDisomyFragment(org.gel.models.report.avro.Coordinates coordinates, org.gel.models.report.avro.UniparentalDisomyType uniparentalDisomyType) {
this.coordinates = coordinates;
this.uniparentalDisomyType = uniparentalDisomyType;
}
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 coordinates;
case 1: return uniparentalDisomyType;
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: coordinates = (org.gel.models.report.avro.Coordinates)value$; break;
case 1: uniparentalDisomyType = (org.gel.models.report.avro.UniparentalDisomyType)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'coordinates' field.
* Coordinates can be specified to indicate the part of the chromosome affected */
public org.gel.models.report.avro.Coordinates getCoordinates() {
return coordinates;
}
/**
* Sets the value of the 'coordinates' field.
* Coordinates can be specified to indicate the part of the chromosome affected * @param value the value to set.
*/
public void setCoordinates(org.gel.models.report.avro.Coordinates value) {
this.coordinates = value;
}
/**
* Gets the value of the 'uniparentalDisomyType' field.
* indicates whether the UPD event involves `isodisomy`, `heterodisomy` or `both` */
public org.gel.models.report.avro.UniparentalDisomyType getUniparentalDisomyType() {
return uniparentalDisomyType;
}
/**
* Sets the value of the 'uniparentalDisomyType' field.
* indicates whether the UPD event involves `isodisomy`, `heterodisomy` or `both` * @param value the value to set.
*/
public void setUniparentalDisomyType(org.gel.models.report.avro.UniparentalDisomyType value) {
this.uniparentalDisomyType = value;
}
/** Creates a new UniparentalDisomyFragment RecordBuilder */
public static org.gel.models.report.avro.UniparentalDisomyFragment.Builder newBuilder() {
return new org.gel.models.report.avro.UniparentalDisomyFragment.Builder();
}
/** Creates a new UniparentalDisomyFragment RecordBuilder by copying an existing Builder */
public static org.gel.models.report.avro.UniparentalDisomyFragment.Builder newBuilder(org.gel.models.report.avro.UniparentalDisomyFragment.Builder other) {
return new org.gel.models.report.avro.UniparentalDisomyFragment.Builder(other);
}
/** Creates a new UniparentalDisomyFragment RecordBuilder by copying an existing UniparentalDisomyFragment instance */
public static org.gel.models.report.avro.UniparentalDisomyFragment.Builder newBuilder(org.gel.models.report.avro.UniparentalDisomyFragment other) {
return new org.gel.models.report.avro.UniparentalDisomyFragment.Builder(other);
}
/**
* RecordBuilder for UniparentalDisomyFragment instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private org.gel.models.report.avro.Coordinates coordinates;
private org.gel.models.report.avro.UniparentalDisomyType uniparentalDisomyType;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.report.avro.UniparentalDisomyFragment.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.report.avro.UniparentalDisomyFragment.Builder other) {
super(other);
if (isValidValue(fields()[0], other.coordinates)) {
this.coordinates = data().deepCopy(fields()[0].schema(), other.coordinates);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.uniparentalDisomyType)) {
this.uniparentalDisomyType = data().deepCopy(fields()[1].schema(), other.uniparentalDisomyType);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing UniparentalDisomyFragment instance */
private Builder(org.gel.models.report.avro.UniparentalDisomyFragment other) {
super(org.gel.models.report.avro.UniparentalDisomyFragment.SCHEMA$);
if (isValidValue(fields()[0], other.coordinates)) {
this.coordinates = data().deepCopy(fields()[0].schema(), other.coordinates);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.uniparentalDisomyType)) {
this.uniparentalDisomyType = data().deepCopy(fields()[1].schema(), other.uniparentalDisomyType);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'coordinates' field */
public org.gel.models.report.avro.Coordinates getCoordinates() {
return coordinates;
}
/** Sets the value of the 'coordinates' field */
public org.gel.models.report.avro.UniparentalDisomyFragment.Builder setCoordinates(org.gel.models.report.avro.Coordinates value) {
validate(fields()[0], value);
this.coordinates = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'coordinates' field has been set */
public boolean hasCoordinates() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'coordinates' field */
public org.gel.models.report.avro.UniparentalDisomyFragment.Builder clearCoordinates() {
coordinates = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'uniparentalDisomyType' field */
public org.gel.models.report.avro.UniparentalDisomyType getUniparentalDisomyType() {
return uniparentalDisomyType;
}
/** Sets the value of the 'uniparentalDisomyType' field */
public org.gel.models.report.avro.UniparentalDisomyFragment.Builder setUniparentalDisomyType(org.gel.models.report.avro.UniparentalDisomyType value) {
validate(fields()[1], value);
this.uniparentalDisomyType = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'uniparentalDisomyType' field has been set */
public boolean hasUniparentalDisomyType() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'uniparentalDisomyType' field */
public org.gel.models.report.avro.UniparentalDisomyFragment.Builder clearUniparentalDisomyType() {
uniparentalDisomyType = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public UniparentalDisomyFragment build() {
try {
UniparentalDisomyFragment record = new UniparentalDisomyFragment();
record.coordinates = fieldSetFlags()[0] ? this.coordinates : (org.gel.models.report.avro.Coordinates) defaultValue(fields()[0]);
record.uniparentalDisomyType = fieldSetFlags()[1] ? this.uniparentalDisomyType : (org.gel.models.report.avro.UniparentalDisomyType) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy