/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package avro.complex_schema;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class xmlEnum 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\":\"xmlEnum\",\"namespace\":\"avro.complex_schema\",\"fields\":[{\"name\":\"xmlEnum\",\"type\":\"string\",\"doc\":\"Simple type {http://www.w3.org/2001/XMLSchema}anyType\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Simple type {http://www.w3.org/2001/XMLSchema}anyType */
@Deprecated public java.lang.CharSequence xmlEnum;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use <code>newBuilder()</code>.
*/
public xmlEnum() {}
/**
* All-args constructor.
*/
public xmlEnum(java.lang.CharSequence xmlEnum) {
this.xmlEnum = xmlEnum;
}
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 xmlEnum;
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: xmlEnum = (java.lang.CharSequence)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'xmlEnum' field.
* Simple type {http://www.w3.org/2001/XMLSchema}anyType */
public java.lang.CharSequence getXmlEnum() {
return xmlEnum;
}
/**
* Sets the value of the 'xmlEnum' field.
* Simple type {http://www.w3.org/2001/XMLSchema}anyType * @param value the value to set.
*/
public void setXmlEnum(java.lang.CharSequence value) {
this.xmlEnum = value;
}
/** Creates a new xmlEnum RecordBuilder */
public static avro.complex_schema.xmlEnum.Builder newBuilder() {
return new avro.complex_schema.xmlEnum.Builder();
}
/** Creates a new xmlEnum RecordBuilder by copying an existing Builder */
public static avro.complex_schema.xmlEnum.Builder newBuilder(avro.complex_schema.xmlEnum.Builder other) {
return new avro.complex_schema.xmlEnum.Builder(other);
}
/** Creates a new xmlEnum RecordBuilder by copying an existing xmlEnum instance */
public static avro.complex_schema.xmlEnum.Builder newBuilder(avro.complex_schema.xmlEnum other) {
return new avro.complex_schema.xmlEnum.Builder(other);
}
/**
* RecordBuilder for xmlEnum instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<xmlEnum>
implements org.apache.avro.data.RecordBuilder<xmlEnum> {
private java.lang.CharSequence xmlEnum;
/** Creates a new Builder */
private Builder() {
super(avro.complex_schema.xmlEnum.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(avro.complex_schema.xmlEnum.Builder other) {
super(other);
if (isValidValue(fields()[0], other.xmlEnum)) {
this.xmlEnum = data().deepCopy(fields()[0].schema(), other.xmlEnum);
fieldSetFlags()[0] = true;
}
}
/** Creates a Builder by copying an existing xmlEnum instance */
private Builder(avro.complex_schema.xmlEnum other) {
super(avro.complex_schema.xmlEnum.SCHEMA$);
if (isValidValue(fields()[0], other.xmlEnum)) {
this.xmlEnum = data().deepCopy(fields()[0].schema(), other.xmlEnum);
fieldSetFlags()[0] = true;
}
}
/** Gets the value of the 'xmlEnum' field */
public java.lang.CharSequence getXmlEnum() {
return xmlEnum;
}
/** Sets the value of the 'xmlEnum' field */
public avro.complex_schema.xmlEnum.Builder setXmlEnum(java.lang.CharSequence value) {
validate(fields()[0], value);
this.xmlEnum = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'xmlEnum' field has been set */
public boolean hasXmlEnum() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'xmlEnum' field */
public avro.complex_schema.xmlEnum.Builder clearXmlEnum() {
xmlEnum = null;
fieldSetFlags()[0] = false;
return this;
}
@Override
public xmlEnum build() {
try {
xmlEnum record = new xmlEnum();
record.xmlEnum = fieldSetFlags()[0] ? this.xmlEnum : (java.lang.CharSequence) defaultValue(fields()[0]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}