/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package avro.complex_schema;
@SuppressWarnings("all")
/** This forces backtracking through the different schema options. Consider the following elements: <backtrack> <qName>avro:qName</qName> <avroEnum>avro</avroEnum> <xmlEnum>rest.li</xmlEnum> <xmlEnum>xml</xmlEnum> <unsignedLongList>18446744073709551615 1844674407370955 12579</unsignedLongList> <listOfUnion>true 18446744073709551616 false -2147483648 -1234.567 avro</listOfUnion> </backtrack> The first four elements in the list can match either the first choice group or the second sequence group, and by default the first branch will be taken. It is not until the last child element, <listOfUnion>, is reached, that it becomes clear the choice group should not be followed. */
@org.apache.avro.specific.AvroGenerated
public class backtrack 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\":\"backtrack\",\"namespace\":\"avro.complex_schema\",\"doc\":\" This forces backtracking through the different schema options. Consider the following elements: <backtrack> <qName>avro:qName</qName> <avroEnum>avro</avroEnum> <xmlEnum>rest.li</xmlEnum> <xmlEnum>xml</xmlEnum> <unsignedLongList>18446744073709551615 1844674407370955 12579</unsignedLongList> <listOfUnion>true 18446744073709551616 false -2147483648 -1234.567 avro</listOfUnion> </backtrack> The first four elements in the list can match either the first choice group or the second sequence group, and by default the first branch will be taken. It is not until the last child element, <listOfUnion>, is reached, that it becomes clear the choice group should not be followed. \",\"fields\":[{\"name\":\"backtrack\",\"type\":{\"type\":\"array\",\"items\":[{\"type\":\"record\",\"name\":\"qName\",\"fields\":[{\"name\":\"qName\",\"type\":{\"type\":\"record\",\"name\":\"qName\",\"namespace\":\"org.w3.www._2001.xmlschema\",\"doc\":\"Qualified Name\",\"fields\":[{\"name\":\"namespace\",\"type\":\"string\",\"doc\":\"The namespace of this qualified name.\"},{\"name\":\"localPart\",\"type\":\"string\",\"doc\":\"The local part of this qualified name.\"}]},\"doc\":\"Simple type {http://www.w3.org/2001/XMLSchema}QName\"}]},{\"type\":\"record\",\"name\":\"avroEnum\",\"fields\":[{\"name\":\"avroEnum\",\"type\":{\"type\":\"enum\",\"name\":\"avroEnum\",\"namespace\":\"avro.complex_schema.enums\",\"doc\":\"Enumeration of symbols in {urn:avro:complex_schema}avroEnum\",\"symbols\":[\"xml\",\"json\",\"avro\",\"thrift\",\"protobuf\",\"rest_li\"]},\"doc\":\"Simple type {http://www.w3.org/2001/XMLSchema}anyType\"}]},{\"type\":\"record\",\"name\":\"xmlEnum\",\"fields\":[{\"name\":\"xmlEnum\",\"type\":\"string\",\"doc\":\"Simple type {http://www.w3.org/2001/XMLSchema}anyType\"}]},{\"type\":\"record\",\"name\":\"unsignedLongList\",\"fields\":[{\"name\":\"unsignedLongList\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"scale\":0,\"precision\":34}},\"doc\":\"Simple type null\"}]},{\"type\":\"record\",\"name\":\"listOfUnion\",\"fields\":[{\"name\":\"listOfUnion\",\"type\":{\"type\":\"array\",\"items\":[\"boolean\",\"string\",\"int\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"scale\":0,\"precision\":34}]},\"doc\":\"Simple type null\"}]}]},\"doc\":\"Children of {urn:avro:complex_schema}backtrack\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Children of {urn:avro:complex_schema}backtrack */
@Deprecated public java.util.List<java.lang.Object> backtrack;
/**
* 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 backtrack() {}
/**
* All-args constructor.
*/
public backtrack(java.util.List<java.lang.Object> backtrack) {
this.backtrack = backtrack;
}
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 backtrack;
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: backtrack = (java.util.List<java.lang.Object>)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'backtrack' field.
* Children of {urn:avro:complex_schema}backtrack */
public java.util.List<java.lang.Object> getBacktrack() {
return backtrack;
}
/**
* Sets the value of the 'backtrack' field.
* Children of {urn:avro:complex_schema}backtrack * @param value the value to set.
*/
public void setBacktrack(java.util.List<java.lang.Object> value) {
this.backtrack = value;
}
/** Creates a new backtrack RecordBuilder */
public static avro.complex_schema.backtrack.Builder newBuilder() {
return new avro.complex_schema.backtrack.Builder();
}
/** Creates a new backtrack RecordBuilder by copying an existing Builder */
public static avro.complex_schema.backtrack.Builder newBuilder(avro.complex_schema.backtrack.Builder other) {
return new avro.complex_schema.backtrack.Builder(other);
}
/** Creates a new backtrack RecordBuilder by copying an existing backtrack instance */
public static avro.complex_schema.backtrack.Builder newBuilder(avro.complex_schema.backtrack other) {
return new avro.complex_schema.backtrack.Builder(other);
}
/**
* RecordBuilder for backtrack instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<backtrack>
implements org.apache.avro.data.RecordBuilder<backtrack> {
private java.util.List<java.lang.Object> backtrack;
/** Creates a new Builder */
private Builder() {
super(avro.complex_schema.backtrack.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(avro.complex_schema.backtrack.Builder other) {
super(other);
if (isValidValue(fields()[0], other.backtrack)) {
this.backtrack = data().deepCopy(fields()[0].schema(), other.backtrack);
fieldSetFlags()[0] = true;
}
}
/** Creates a Builder by copying an existing backtrack instance */
private Builder(avro.complex_schema.backtrack other) {
super(avro.complex_schema.backtrack.SCHEMA$);
if (isValidValue(fields()[0], other.backtrack)) {
this.backtrack = data().deepCopy(fields()[0].schema(), other.backtrack);
fieldSetFlags()[0] = true;
}
}
/** Gets the value of the 'backtrack' field */
public java.util.List<java.lang.Object> getBacktrack() {
return backtrack;
}
/** Sets the value of the 'backtrack' field */
public avro.complex_schema.backtrack.Builder setBacktrack(java.util.List<java.lang.Object> value) {
validate(fields()[0], value);
this.backtrack = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'backtrack' field has been set */
public boolean hasBacktrack() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'backtrack' field */
public avro.complex_schema.backtrack.Builder clearBacktrack() {
backtrack = null;
fieldSetFlags()[0] = false;
return this;
}
@Override
public backtrack build() {
try {
backtrack record = new backtrack();
record.backtrack = fieldSetFlags()[0] ? this.backtrack : (java.util.List<java.lang.Object>) defaultValue(fields()[0]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}