/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package avro.complex_schema; @SuppressWarnings("all") @org.apache.avro.specific.AvroGenerated public class prohibit 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\":\"prohibit\",\"namespace\":\"avro.complex_schema\",\"fields\":[{\"name\":\"prohibit\",\"type\":{\"type\":\"array\",\"items\":[{\"type\":\"record\",\"name\":\"fixed\",\"fields\":[{\"name\":\"fixed\",\"type\":{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"scale\":0,\"precision\":34},\"doc\":\"Simple type {http://www.w3.org/2001/XMLSchema}decimal\"}]}]},\"doc\":\"Children of {urn:avro:complex_schema}prohibit\"}]}"); public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } /** Children of {urn:avro:complex_schema}prohibit */ @Deprecated public java.util.List<java.lang.Object> prohibit; /** * 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 prohibit() {} /** * All-args constructor. */ public prohibit(java.util.List<java.lang.Object> prohibit) { this.prohibit = prohibit; } 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 prohibit; 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: prohibit = (java.util.List<java.lang.Object>)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'prohibit' field. * Children of {urn:avro:complex_schema}prohibit */ public java.util.List<java.lang.Object> getProhibit() { return prohibit; } /** * Sets the value of the 'prohibit' field. * Children of {urn:avro:complex_schema}prohibit * @param value the value to set. */ public void setProhibit(java.util.List<java.lang.Object> value) { this.prohibit = value; } /** Creates a new prohibit RecordBuilder */ public static avro.complex_schema.prohibit.Builder newBuilder() { return new avro.complex_schema.prohibit.Builder(); } /** Creates a new prohibit RecordBuilder by copying an existing Builder */ public static avro.complex_schema.prohibit.Builder newBuilder(avro.complex_schema.prohibit.Builder other) { return new avro.complex_schema.prohibit.Builder(other); } /** Creates a new prohibit RecordBuilder by copying an existing prohibit instance */ public static avro.complex_schema.prohibit.Builder newBuilder(avro.complex_schema.prohibit other) { return new avro.complex_schema.prohibit.Builder(other); } /** * RecordBuilder for prohibit instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<prohibit> implements org.apache.avro.data.RecordBuilder<prohibit> { private java.util.List<java.lang.Object> prohibit; /** Creates a new Builder */ private Builder() { super(avro.complex_schema.prohibit.SCHEMA$); } /** Creates a Builder by copying an existing Builder */ private Builder(avro.complex_schema.prohibit.Builder other) { super(other); if (isValidValue(fields()[0], other.prohibit)) { this.prohibit = data().deepCopy(fields()[0].schema(), other.prohibit); fieldSetFlags()[0] = true; } } /** Creates a Builder by copying an existing prohibit instance */ private Builder(avro.complex_schema.prohibit other) { super(avro.complex_schema.prohibit.SCHEMA$); if (isValidValue(fields()[0], other.prohibit)) { this.prohibit = data().deepCopy(fields()[0].schema(), other.prohibit); fieldSetFlags()[0] = true; } } /** Gets the value of the 'prohibit' field */ public java.util.List<java.lang.Object> getProhibit() { return prohibit; } /** Sets the value of the 'prohibit' field */ public avro.complex_schema.prohibit.Builder setProhibit(java.util.List<java.lang.Object> value) { validate(fields()[0], value); this.prohibit = value; fieldSetFlags()[0] = true; return this; } /** Checks whether the 'prohibit' field has been set */ public boolean hasProhibit() { return fieldSetFlags()[0]; } /** Clears the value of the 'prohibit' field */ public avro.complex_schema.prohibit.Builder clearProhibit() { prohibit = null; fieldSetFlags()[0] = false; return this; } @Override public prohibit build() { try { prohibit record = new prohibit(); record.prohibit = fieldSetFlags()[0] ? this.prohibit : (java.util.List<java.lang.Object>) defaultValue(fields()[0]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }