org.gel.models.report.avro.Identifier 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 Identifier 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\":\"Identifier\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"source\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Source i.e, esenmbl\"},{\"name\":\"identifier\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"identifier\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Source i.e, esenmbl */
private java.lang.String source;
/** identifier */
private java.lang.String identifier;
/**
* 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 Identifier() {}
/**
* All-args constructor.
*/
public Identifier(java.lang.String source, java.lang.String identifier) {
this.source = source;
this.identifier = identifier;
}
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 source;
case 1: return identifier;
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: source = (java.lang.String)value$; break;
case 1: identifier = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'source' field.
* Source i.e, esenmbl */
public java.lang.String getSource() {
return source;
}
/**
* Sets the value of the 'source' field.
* Source i.e, esenmbl * @param value the value to set.
*/
public void setSource(java.lang.String value) {
this.source = value;
}
/**
* Gets the value of the 'identifier' field.
* identifier */
public java.lang.String getIdentifier() {
return identifier;
}
/**
* Sets the value of the 'identifier' field.
* identifier * @param value the value to set.
*/
public void setIdentifier(java.lang.String value) {
this.identifier = value;
}
/** Creates a new Identifier RecordBuilder */
public static org.gel.models.report.avro.Identifier.Builder newBuilder() {
return new org.gel.models.report.avro.Identifier.Builder();
}
/** Creates a new Identifier RecordBuilder by copying an existing Builder */
public static org.gel.models.report.avro.Identifier.Builder newBuilder(org.gel.models.report.avro.Identifier.Builder other) {
return new org.gel.models.report.avro.Identifier.Builder(other);
}
/** Creates a new Identifier RecordBuilder by copying an existing Identifier instance */
public static org.gel.models.report.avro.Identifier.Builder newBuilder(org.gel.models.report.avro.Identifier other) {
return new org.gel.models.report.avro.Identifier.Builder(other);
}
/**
* RecordBuilder for Identifier instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String source;
private java.lang.String identifier;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.report.avro.Identifier.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.report.avro.Identifier.Builder other) {
super(other);
if (isValidValue(fields()[0], other.source)) {
this.source = data().deepCopy(fields()[0].schema(), other.source);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.identifier)) {
this.identifier = data().deepCopy(fields()[1].schema(), other.identifier);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing Identifier instance */
private Builder(org.gel.models.report.avro.Identifier other) {
super(org.gel.models.report.avro.Identifier.SCHEMA$);
if (isValidValue(fields()[0], other.source)) {
this.source = data().deepCopy(fields()[0].schema(), other.source);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.identifier)) {
this.identifier = data().deepCopy(fields()[1].schema(), other.identifier);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'source' field */
public java.lang.String getSource() {
return source;
}
/** Sets the value of the 'source' field */
public org.gel.models.report.avro.Identifier.Builder setSource(java.lang.String value) {
validate(fields()[0], value);
this.source = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'source' field has been set */
public boolean hasSource() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'source' field */
public org.gel.models.report.avro.Identifier.Builder clearSource() {
source = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'identifier' field */
public java.lang.String getIdentifier() {
return identifier;
}
/** Sets the value of the 'identifier' field */
public org.gel.models.report.avro.Identifier.Builder setIdentifier(java.lang.String value) {
validate(fields()[1], value);
this.identifier = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'identifier' field has been set */
public boolean hasIdentifier() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'identifier' field */
public org.gel.models.report.avro.Identifier.Builder clearIdentifier() {
identifier = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public Identifier build() {
try {
Identifier record = new Identifier();
record.source = fieldSetFlags()[0] ? this.source : (java.lang.String) defaultValue(fields()[0]);
record.identifier = fieldSetFlags()[1] ? this.identifier : (java.lang.String) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy