/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package avro.complex_schema; @SuppressWarnings("all") @org.apache.avro.specific.AvroGenerated public class anyAndFriends 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\":\"anyAndFriends\",\"namespace\":\"avro.complex_schema\",\"fields\":[{\"name\":\"anyAndFriends\",\"type\":\"string\",\"doc\":\"Simple type null\"}]}"); public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } /** Simple type null */ @Deprecated public java.lang.CharSequence anyAndFriends; /** * 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 anyAndFriends() {} /** * All-args constructor. */ public anyAndFriends(java.lang.CharSequence anyAndFriends) { this.anyAndFriends = anyAndFriends; } 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 anyAndFriends; 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: anyAndFriends = (java.lang.CharSequence)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'anyAndFriends' field. * Simple type null */ public java.lang.CharSequence getAnyAndFriends() { return anyAndFriends; } /** * Sets the value of the 'anyAndFriends' field. * Simple type null * @param value the value to set. */ public void setAnyAndFriends(java.lang.CharSequence value) { this.anyAndFriends = value; } /** Creates a new anyAndFriends RecordBuilder */ public static avro.complex_schema.anyAndFriends.Builder newBuilder() { return new avro.complex_schema.anyAndFriends.Builder(); } /** Creates a new anyAndFriends RecordBuilder by copying an existing Builder */ public static avro.complex_schema.anyAndFriends.Builder newBuilder(avro.complex_schema.anyAndFriends.Builder other) { return new avro.complex_schema.anyAndFriends.Builder(other); } /** Creates a new anyAndFriends RecordBuilder by copying an existing anyAndFriends instance */ public static avro.complex_schema.anyAndFriends.Builder newBuilder(avro.complex_schema.anyAndFriends other) { return new avro.complex_schema.anyAndFriends.Builder(other); } /** * RecordBuilder for anyAndFriends instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<anyAndFriends> implements org.apache.avro.data.RecordBuilder<anyAndFriends> { private java.lang.CharSequence anyAndFriends; /** Creates a new Builder */ private Builder() { super(avro.complex_schema.anyAndFriends.SCHEMA$); } /** Creates a Builder by copying an existing Builder */ private Builder(avro.complex_schema.anyAndFriends.Builder other) { super(other); if (isValidValue(fields()[0], other.anyAndFriends)) { this.anyAndFriends = data().deepCopy(fields()[0].schema(), other.anyAndFriends); fieldSetFlags()[0] = true; } } /** Creates a Builder by copying an existing anyAndFriends instance */ private Builder(avro.complex_schema.anyAndFriends other) { super(avro.complex_schema.anyAndFriends.SCHEMA$); if (isValidValue(fields()[0], other.anyAndFriends)) { this.anyAndFriends = data().deepCopy(fields()[0].schema(), other.anyAndFriends); fieldSetFlags()[0] = true; } } /** Gets the value of the 'anyAndFriends' field */ public java.lang.CharSequence getAnyAndFriends() { return anyAndFriends; } /** Sets the value of the 'anyAndFriends' field */ public avro.complex_schema.anyAndFriends.Builder setAnyAndFriends(java.lang.CharSequence value) { validate(fields()[0], value); this.anyAndFriends = value; fieldSetFlags()[0] = true; return this; } /** Checks whether the 'anyAndFriends' field has been set */ public boolean hasAnyAndFriends() { return fieldSetFlags()[0]; } /** Clears the value of the 'anyAndFriends' field */ public avro.complex_schema.anyAndFriends.Builder clearAnyAndFriends() { anyAndFriends = null; fieldSetFlags()[0] = false; return this; } @Override public anyAndFriends build() { try { anyAndFriends record = new anyAndFriends(); record.anyAndFriends = fieldSetFlags()[0] ? this.anyAndFriends : (java.lang.CharSequence) defaultValue(fields()[0]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }