/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package com.cloudera.knittingboar.yarn.avro.generated; @SuppressWarnings("all") public class ProgressReport 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\":\"ProgressReport\",\"namespace\":\"com.cloudera.knittingboar.yarn.avro.generated\",\"fields\":[{\"name\":\"workerId\",\"type\":{\"type\":\"fixed\",\"name\":\"WorkerId\",\"size\":32}},{\"name\":\"report\",\"type\":{\"type\":\"map\",\"values\":\"string\"}}]}"); @Deprecated public com.cloudera.knittingboar.yarn.avro.generated.WorkerId workerId; @Deprecated public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> report; 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 workerId; case 1: return report; 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: workerId = (com.cloudera.knittingboar.yarn.avro.generated.WorkerId)value$; break; case 1: report = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'workerId' field. */ public com.cloudera.knittingboar.yarn.avro.generated.WorkerId getWorkerId() { return workerId; } /** * Sets the value of the 'workerId' field. * @param value the value to set. */ public void setWorkerId(com.cloudera.knittingboar.yarn.avro.generated.WorkerId value) { this.workerId = value; } /** * Gets the value of the 'report' field. */ public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getReport() { return report; } /** * Sets the value of the 'report' field. * @param value the value to set. */ public void setReport(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value) { this.report = value; } /** Creates a new ProgressReport RecordBuilder */ public static com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder newBuilder() { return new com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder(); } /** Creates a new ProgressReport RecordBuilder by copying an existing Builder */ public static com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder newBuilder(com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder other) { return new com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder(other); } /** Creates a new ProgressReport RecordBuilder by copying an existing ProgressReport instance */ public static com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder newBuilder(com.cloudera.knittingboar.yarn.avro.generated.ProgressReport other) { return new com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder(other); } /** * RecordBuilder for ProgressReport instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ProgressReport> implements org.apache.avro.data.RecordBuilder<ProgressReport> { private com.cloudera.knittingboar.yarn.avro.generated.WorkerId workerId; private java.util.Map<java.lang.CharSequence,java.lang.CharSequence> report; /** Creates a new Builder */ private Builder() { super(com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.SCHEMA$); } /** Creates a Builder by copying an existing Builder */ private Builder(com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder other) { super(other); } /** Creates a Builder by copying an existing ProgressReport instance */ private Builder(com.cloudera.knittingboar.yarn.avro.generated.ProgressReport other) { super(com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.SCHEMA$); if (isValidValue(fields()[0], other.workerId)) { this.workerId = (com.cloudera.knittingboar.yarn.avro.generated.WorkerId) data().deepCopy(fields()[0].schema(), other.workerId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.report)) { this.report = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) data().deepCopy(fields()[1].schema(), other.report); fieldSetFlags()[1] = true; } } /** Gets the value of the 'workerId' field */ public com.cloudera.knittingboar.yarn.avro.generated.WorkerId getWorkerId() { return workerId; } /** Sets the value of the 'workerId' field */ public com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder setWorkerId(com.cloudera.knittingboar.yarn.avro.generated.WorkerId value) { validate(fields()[0], value); this.workerId = value; fieldSetFlags()[0] = true; return this; } /** Checks whether the 'workerId' field has been set */ public boolean hasWorkerId() { return fieldSetFlags()[0]; } /** Clears the value of the 'workerId' field */ public com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder clearWorkerId() { workerId = null; fieldSetFlags()[0] = false; return this; } /** Gets the value of the 'report' field */ public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getReport() { return report; } /** Sets the value of the 'report' field */ public com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder setReport(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value) { validate(fields()[1], value); this.report = value; fieldSetFlags()[1] = true; return this; } /** Checks whether the 'report' field has been set */ public boolean hasReport() { return fieldSetFlags()[1]; } /** Clears the value of the 'report' field */ public com.cloudera.knittingboar.yarn.avro.generated.ProgressReport.Builder clearReport() { report = null; fieldSetFlags()[1] = false; return this; } @Override public ProgressReport build() { try { ProgressReport record = new ProgressReport(); record.workerId = fieldSetFlags()[0] ? this.workerId : (com.cloudera.knittingboar.yarn.avro.generated.WorkerId) defaultValue(fields()[0]); record.report = fieldSetFlags()[1] ? this.report : (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }