org.gel.models.participant.avro.HpoTermModifiers Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.participant.avro;
@SuppressWarnings("all")
/** HPO Modifiers
For GMS, hpoModifierCode and hpoModifierVersion will be used */
@org.apache.avro.specific.AvroGenerated
public class HpoTermModifiers 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\":\"HpoTermModifiers\",\"namespace\":\"org.gel.models.participant.avro\",\"doc\":\"HPO Modifiers\\n For GMS, hpoModifierCode and hpoModifierVersion will be used\",\"fields\":[{\"name\":\"laterality\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Laterality\",\"symbols\":[\"RIGHT\",\"UNILATERAL\",\"BILATERAL\",\"LEFT\"]}]},{\"name\":\"progression\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Progression\",\"symbols\":[\"PROGRESSIVE\",\"NONPROGRESSIVE\"]}]},{\"name\":\"severity\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Severity\",\"symbols\":[\"BORDERLINE\",\"MILD\",\"MODERATE\",\"SEVERE\",\"PROFOUND\"]}]},{\"name\":\"spatialPattern\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"SpatialPattern\",\"symbols\":[\"DISTAL\",\"GENERALIZED\",\"LOCALIZED\",\"PROXIMAL\"]}]},{\"name\":\"hpoModifierCode\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"hpoModifierVersion\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private org.gel.models.participant.avro.Laterality laterality;
private org.gel.models.participant.avro.Progression progression;
private org.gel.models.participant.avro.Severity severity;
private org.gel.models.participant.avro.SpatialPattern spatialPattern;
private java.lang.String hpoModifierCode;
private java.lang.String hpoModifierVersion;
/**
* 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 HpoTermModifiers() {}
/**
* All-args constructor.
*/
public HpoTermModifiers(org.gel.models.participant.avro.Laterality laterality, org.gel.models.participant.avro.Progression progression, org.gel.models.participant.avro.Severity severity, org.gel.models.participant.avro.SpatialPattern spatialPattern, java.lang.String hpoModifierCode, java.lang.String hpoModifierVersion) {
this.laterality = laterality;
this.progression = progression;
this.severity = severity;
this.spatialPattern = spatialPattern;
this.hpoModifierCode = hpoModifierCode;
this.hpoModifierVersion = hpoModifierVersion;
}
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 laterality;
case 1: return progression;
case 2: return severity;
case 3: return spatialPattern;
case 4: return hpoModifierCode;
case 5: return hpoModifierVersion;
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: laterality = (org.gel.models.participant.avro.Laterality)value$; break;
case 1: progression = (org.gel.models.participant.avro.Progression)value$; break;
case 2: severity = (org.gel.models.participant.avro.Severity)value$; break;
case 3: spatialPattern = (org.gel.models.participant.avro.SpatialPattern)value$; break;
case 4: hpoModifierCode = (java.lang.String)value$; break;
case 5: hpoModifierVersion = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'laterality' field.
*/
public org.gel.models.participant.avro.Laterality getLaterality() {
return laterality;
}
/**
* Sets the value of the 'laterality' field.
* @param value the value to set.
*/
public void setLaterality(org.gel.models.participant.avro.Laterality value) {
this.laterality = value;
}
/**
* Gets the value of the 'progression' field.
*/
public org.gel.models.participant.avro.Progression getProgression() {
return progression;
}
/**
* Sets the value of the 'progression' field.
* @param value the value to set.
*/
public void setProgression(org.gel.models.participant.avro.Progression value) {
this.progression = value;
}
/**
* Gets the value of the 'severity' field.
*/
public org.gel.models.participant.avro.Severity getSeverity() {
return severity;
}
/**
* Sets the value of the 'severity' field.
* @param value the value to set.
*/
public void setSeverity(org.gel.models.participant.avro.Severity value) {
this.severity = value;
}
/**
* Gets the value of the 'spatialPattern' field.
*/
public org.gel.models.participant.avro.SpatialPattern getSpatialPattern() {
return spatialPattern;
}
/**
* Sets the value of the 'spatialPattern' field.
* @param value the value to set.
*/
public void setSpatialPattern(org.gel.models.participant.avro.SpatialPattern value) {
this.spatialPattern = value;
}
/**
* Gets the value of the 'hpoModifierCode' field.
*/
public java.lang.String getHpoModifierCode() {
return hpoModifierCode;
}
/**
* Sets the value of the 'hpoModifierCode' field.
* @param value the value to set.
*/
public void setHpoModifierCode(java.lang.String value) {
this.hpoModifierCode = value;
}
/**
* Gets the value of the 'hpoModifierVersion' field.
*/
public java.lang.String getHpoModifierVersion() {
return hpoModifierVersion;
}
/**
* Sets the value of the 'hpoModifierVersion' field.
* @param value the value to set.
*/
public void setHpoModifierVersion(java.lang.String value) {
this.hpoModifierVersion = value;
}
/** Creates a new HpoTermModifiers RecordBuilder */
public static org.gel.models.participant.avro.HpoTermModifiers.Builder newBuilder() {
return new org.gel.models.participant.avro.HpoTermModifiers.Builder();
}
/** Creates a new HpoTermModifiers RecordBuilder by copying an existing Builder */
public static org.gel.models.participant.avro.HpoTermModifiers.Builder newBuilder(org.gel.models.participant.avro.HpoTermModifiers.Builder other) {
return new org.gel.models.participant.avro.HpoTermModifiers.Builder(other);
}
/** Creates a new HpoTermModifiers RecordBuilder by copying an existing HpoTermModifiers instance */
public static org.gel.models.participant.avro.HpoTermModifiers.Builder newBuilder(org.gel.models.participant.avro.HpoTermModifiers other) {
return new org.gel.models.participant.avro.HpoTermModifiers.Builder(other);
}
/**
* RecordBuilder for HpoTermModifiers instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private org.gel.models.participant.avro.Laterality laterality;
private org.gel.models.participant.avro.Progression progression;
private org.gel.models.participant.avro.Severity severity;
private org.gel.models.participant.avro.SpatialPattern spatialPattern;
private java.lang.String hpoModifierCode;
private java.lang.String hpoModifierVersion;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.participant.avro.HpoTermModifiers.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.participant.avro.HpoTermModifiers.Builder other) {
super(other);
if (isValidValue(fields()[0], other.laterality)) {
this.laterality = data().deepCopy(fields()[0].schema(), other.laterality);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.progression)) {
this.progression = data().deepCopy(fields()[1].schema(), other.progression);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.severity)) {
this.severity = data().deepCopy(fields()[2].schema(), other.severity);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.spatialPattern)) {
this.spatialPattern = data().deepCopy(fields()[3].schema(), other.spatialPattern);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.hpoModifierCode)) {
this.hpoModifierCode = data().deepCopy(fields()[4].schema(), other.hpoModifierCode);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.hpoModifierVersion)) {
this.hpoModifierVersion = data().deepCopy(fields()[5].schema(), other.hpoModifierVersion);
fieldSetFlags()[5] = true;
}
}
/** Creates a Builder by copying an existing HpoTermModifiers instance */
private Builder(org.gel.models.participant.avro.HpoTermModifiers other) {
super(org.gel.models.participant.avro.HpoTermModifiers.SCHEMA$);
if (isValidValue(fields()[0], other.laterality)) {
this.laterality = data().deepCopy(fields()[0].schema(), other.laterality);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.progression)) {
this.progression = data().deepCopy(fields()[1].schema(), other.progression);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.severity)) {
this.severity = data().deepCopy(fields()[2].schema(), other.severity);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.spatialPattern)) {
this.spatialPattern = data().deepCopy(fields()[3].schema(), other.spatialPattern);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.hpoModifierCode)) {
this.hpoModifierCode = data().deepCopy(fields()[4].schema(), other.hpoModifierCode);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.hpoModifierVersion)) {
this.hpoModifierVersion = data().deepCopy(fields()[5].schema(), other.hpoModifierVersion);
fieldSetFlags()[5] = true;
}
}
/** Gets the value of the 'laterality' field */
public org.gel.models.participant.avro.Laterality getLaterality() {
return laterality;
}
/** Sets the value of the 'laterality' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder setLaterality(org.gel.models.participant.avro.Laterality value) {
validate(fields()[0], value);
this.laterality = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'laterality' field has been set */
public boolean hasLaterality() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'laterality' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder clearLaterality() {
laterality = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'progression' field */
public org.gel.models.participant.avro.Progression getProgression() {
return progression;
}
/** Sets the value of the 'progression' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder setProgression(org.gel.models.participant.avro.Progression value) {
validate(fields()[1], value);
this.progression = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'progression' field has been set */
public boolean hasProgression() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'progression' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder clearProgression() {
progression = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'severity' field */
public org.gel.models.participant.avro.Severity getSeverity() {
return severity;
}
/** Sets the value of the 'severity' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder setSeverity(org.gel.models.participant.avro.Severity value) {
validate(fields()[2], value);
this.severity = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'severity' field has been set */
public boolean hasSeverity() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'severity' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder clearSeverity() {
severity = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'spatialPattern' field */
public org.gel.models.participant.avro.SpatialPattern getSpatialPattern() {
return spatialPattern;
}
/** Sets the value of the 'spatialPattern' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder setSpatialPattern(org.gel.models.participant.avro.SpatialPattern value) {
validate(fields()[3], value);
this.spatialPattern = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'spatialPattern' field has been set */
public boolean hasSpatialPattern() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'spatialPattern' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder clearSpatialPattern() {
spatialPattern = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'hpoModifierCode' field */
public java.lang.String getHpoModifierCode() {
return hpoModifierCode;
}
/** Sets the value of the 'hpoModifierCode' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder setHpoModifierCode(java.lang.String value) {
validate(fields()[4], value);
this.hpoModifierCode = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'hpoModifierCode' field has been set */
public boolean hasHpoModifierCode() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'hpoModifierCode' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder clearHpoModifierCode() {
hpoModifierCode = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'hpoModifierVersion' field */
public java.lang.String getHpoModifierVersion() {
return hpoModifierVersion;
}
/** Sets the value of the 'hpoModifierVersion' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder setHpoModifierVersion(java.lang.String value) {
validate(fields()[5], value);
this.hpoModifierVersion = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'hpoModifierVersion' field has been set */
public boolean hasHpoModifierVersion() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'hpoModifierVersion' field */
public org.gel.models.participant.avro.HpoTermModifiers.Builder clearHpoModifierVersion() {
hpoModifierVersion = null;
fieldSetFlags()[5] = false;
return this;
}
@Override
public HpoTermModifiers build() {
try {
HpoTermModifiers record = new HpoTermModifiers();
record.laterality = fieldSetFlags()[0] ? this.laterality : (org.gel.models.participant.avro.Laterality) defaultValue(fields()[0]);
record.progression = fieldSetFlags()[1] ? this.progression : (org.gel.models.participant.avro.Progression) defaultValue(fields()[1]);
record.severity = fieldSetFlags()[2] ? this.severity : (org.gel.models.participant.avro.Severity) defaultValue(fields()[2]);
record.spatialPattern = fieldSetFlags()[3] ? this.spatialPattern : (org.gel.models.participant.avro.SpatialPattern) defaultValue(fields()[3]);
record.hpoModifierCode = fieldSetFlags()[4] ? this.hpoModifierCode : (java.lang.String) defaultValue(fields()[4]);
record.hpoModifierVersion = fieldSetFlags()[5] ? this.hpoModifierVersion : (java.lang.String) defaultValue(fields()[5]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy