org.gel.models.participant.avro.Technology Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.participant.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class Technology 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\":\"Technology\",\"namespace\":\"org.gel.models.participant.avro\",\"fields\":[{\"name\":\"testTechnologyId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Technology unique identifier\"},{\"name\":\"testTechnologyDescription\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Technology description\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Technology unique identifier */
private java.lang.String testTechnologyId;
/** Technology description */
private java.lang.String testTechnologyDescription;
/**
* 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 Technology() {}
/**
* All-args constructor.
*/
public Technology(java.lang.String testTechnologyId, java.lang.String testTechnologyDescription) {
this.testTechnologyId = testTechnologyId;
this.testTechnologyDescription = testTechnologyDescription;
}
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 testTechnologyId;
case 1: return testTechnologyDescription;
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: testTechnologyId = (java.lang.String)value$; break;
case 1: testTechnologyDescription = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'testTechnologyId' field.
* Technology unique identifier */
public java.lang.String getTestTechnologyId() {
return testTechnologyId;
}
/**
* Sets the value of the 'testTechnologyId' field.
* Technology unique identifier * @param value the value to set.
*/
public void setTestTechnologyId(java.lang.String value) {
this.testTechnologyId = value;
}
/**
* Gets the value of the 'testTechnologyDescription' field.
* Technology description */
public java.lang.String getTestTechnologyDescription() {
return testTechnologyDescription;
}
/**
* Sets the value of the 'testTechnologyDescription' field.
* Technology description * @param value the value to set.
*/
public void setTestTechnologyDescription(java.lang.String value) {
this.testTechnologyDescription = value;
}
/** Creates a new Technology RecordBuilder */
public static org.gel.models.participant.avro.Technology.Builder newBuilder() {
return new org.gel.models.participant.avro.Technology.Builder();
}
/** Creates a new Technology RecordBuilder by copying an existing Builder */
public static org.gel.models.participant.avro.Technology.Builder newBuilder(org.gel.models.participant.avro.Technology.Builder other) {
return new org.gel.models.participant.avro.Technology.Builder(other);
}
/** Creates a new Technology RecordBuilder by copying an existing Technology instance */
public static org.gel.models.participant.avro.Technology.Builder newBuilder(org.gel.models.participant.avro.Technology other) {
return new org.gel.models.participant.avro.Technology.Builder(other);
}
/**
* RecordBuilder for Technology instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String testTechnologyId;
private java.lang.String testTechnologyDescription;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.participant.avro.Technology.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.participant.avro.Technology.Builder other) {
super(other);
if (isValidValue(fields()[0], other.testTechnologyId)) {
this.testTechnologyId = data().deepCopy(fields()[0].schema(), other.testTechnologyId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.testTechnologyDescription)) {
this.testTechnologyDescription = data().deepCopy(fields()[1].schema(), other.testTechnologyDescription);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing Technology instance */
private Builder(org.gel.models.participant.avro.Technology other) {
super(org.gel.models.participant.avro.Technology.SCHEMA$);
if (isValidValue(fields()[0], other.testTechnologyId)) {
this.testTechnologyId = data().deepCopy(fields()[0].schema(), other.testTechnologyId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.testTechnologyDescription)) {
this.testTechnologyDescription = data().deepCopy(fields()[1].schema(), other.testTechnologyDescription);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'testTechnologyId' field */
public java.lang.String getTestTechnologyId() {
return testTechnologyId;
}
/** Sets the value of the 'testTechnologyId' field */
public org.gel.models.participant.avro.Technology.Builder setTestTechnologyId(java.lang.String value) {
validate(fields()[0], value);
this.testTechnologyId = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'testTechnologyId' field has been set */
public boolean hasTestTechnologyId() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'testTechnologyId' field */
public org.gel.models.participant.avro.Technology.Builder clearTestTechnologyId() {
testTechnologyId = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'testTechnologyDescription' field */
public java.lang.String getTestTechnologyDescription() {
return testTechnologyDescription;
}
/** Sets the value of the 'testTechnologyDescription' field */
public org.gel.models.participant.avro.Technology.Builder setTestTechnologyDescription(java.lang.String value) {
validate(fields()[1], value);
this.testTechnologyDescription = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'testTechnologyDescription' field has been set */
public boolean hasTestTechnologyDescription() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'testTechnologyDescription' field */
public org.gel.models.participant.avro.Technology.Builder clearTestTechnologyDescription() {
testTechnologyDescription = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public Technology build() {
try {
Technology record = new Technology();
record.testTechnologyId = fieldSetFlags()[0] ? this.testTechnologyId : (java.lang.String) defaultValue(fields()[0]);
record.testTechnologyDescription = fieldSetFlags()[1] ? this.testTechnologyDescription : (java.lang.String) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}