This project has retired. For details please refer to its Attic page.
Source code
001/**
002 * Autogenerated by Avro
003 *
004 * DO NOT EDIT DIRECTLY
005 */
006package org.apache.reef.runtime.mesos.util;
007
008import org.apache.avro.specific.SpecificData;
009
010@SuppressWarnings("all")
011@org.apache.avro.specific.AvroGenerated
012public class EvaluatorRelease extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
013  private static final long serialVersionUID = 2182541896130576738L;
014  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"EvaluatorRelease\",\"namespace\":\"org.apache.reef.runtime.mesos.util\",\"fields\":[{\"name\":\"identifier\",\"type\":\"string\"}]}");
015  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
016  @Deprecated public java.lang.CharSequence identifier;
017
018  /**
019   * Default constructor.  Note that this does not initialize fields
020   * to their default values from the schema.  If that is desired then
021   * one should use <code>newBuilder()</code>.
022   */
023  public EvaluatorRelease() {}
024
025  /**
026   * All-args constructor.
027   * @param identifier The new value for identifier
028   */
029  public EvaluatorRelease(java.lang.CharSequence identifier) {
030    this.identifier = identifier;
031  }
032
033  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
034  // Used by DatumWriter.  Applications should not call.
035  public java.lang.Object get(int field$) {
036    switch (field$) {
037    case 0: return identifier;
038    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
039    }
040  }
041
042  // Used by DatumReader.  Applications should not call.
043  @SuppressWarnings(value="unchecked")
044  public void put(int field$, java.lang.Object value$) {
045    switch (field$) {
046    case 0: identifier = (java.lang.CharSequence)value$; break;
047    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
048    }
049  }
050
051  /**
052   * Gets the value of the 'identifier' field.
053   * @return The value of the 'identifier' field.
054   */
055  public java.lang.CharSequence getIdentifier() {
056    return identifier;
057  }
058
059  /**
060   * Sets the value of the 'identifier' field.
061   * @param value the value to set.
062   */
063  public void setIdentifier(java.lang.CharSequence value) {
064    this.identifier = value;
065  }
066
067  /**
068   * Creates a new EvaluatorRelease RecordBuilder.
069   * @return A new EvaluatorRelease RecordBuilder
070   */
071  public static org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder newBuilder() {
072    return new org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder();
073  }
074
075  /**
076   * Creates a new EvaluatorRelease RecordBuilder by copying an existing Builder.
077   * @param other The existing builder to copy.
078   * @return A new EvaluatorRelease RecordBuilder
079   */
080  public static org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder newBuilder(org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder other) {
081    return new org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder(other);
082  }
083
084  /**
085   * Creates a new EvaluatorRelease RecordBuilder by copying an existing EvaluatorRelease instance.
086   * @param other The existing instance to copy.
087   * @return A new EvaluatorRelease RecordBuilder
088   */
089  public static org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder newBuilder(org.apache.reef.runtime.mesos.util.EvaluatorRelease other) {
090    return new org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder(other);
091  }
092
093  /**
094   * RecordBuilder for EvaluatorRelease instances.
095   */
096  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<EvaluatorRelease>
097    implements org.apache.avro.data.RecordBuilder<EvaluatorRelease> {
098
099    private java.lang.CharSequence identifier;
100
101    /** Creates a new Builder */
102    private Builder() {
103      super(SCHEMA$);
104    }
105
106    /**
107     * Creates a Builder by copying an existing Builder.
108     * @param other The existing Builder to copy.
109     */
110    private Builder(org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder other) {
111      super(other);
112      if (isValidValue(fields()[0], other.identifier)) {
113        this.identifier = data().deepCopy(fields()[0].schema(), other.identifier);
114        fieldSetFlags()[0] = true;
115      }
116    }
117
118    /**
119     * Creates a Builder by copying an existing EvaluatorRelease instance
120     * @param other The existing instance to copy.
121     */
122    private Builder(org.apache.reef.runtime.mesos.util.EvaluatorRelease other) {
123            super(SCHEMA$);
124      if (isValidValue(fields()[0], other.identifier)) {
125        this.identifier = data().deepCopy(fields()[0].schema(), other.identifier);
126        fieldSetFlags()[0] = true;
127      }
128    }
129
130    /**
131      * Gets the value of the 'identifier' field.
132      * @return The value.
133      */
134    public java.lang.CharSequence getIdentifier() {
135      return identifier;
136    }
137
138    /**
139      * Sets the value of the 'identifier' field.
140      * @param value The value of 'identifier'.
141      * @return This builder.
142      */
143    public org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder setIdentifier(java.lang.CharSequence value) {
144      validate(fields()[0], value);
145      this.identifier = value;
146      fieldSetFlags()[0] = true;
147      return this;
148    }
149
150    /**
151      * Checks whether the 'identifier' field has been set.
152      * @return True if the 'identifier' field has been set, false otherwise.
153      */
154    public boolean hasIdentifier() {
155      return fieldSetFlags()[0];
156    }
157
158
159    /**
160      * Clears the value of the 'identifier' field.
161      * @return This builder.
162      */
163    public org.apache.reef.runtime.mesos.util.EvaluatorRelease.Builder clearIdentifier() {
164      identifier = null;
165      fieldSetFlags()[0] = false;
166      return this;
167    }
168
169    @Override
170    public EvaluatorRelease build() {
171      try {
172        EvaluatorRelease record = new EvaluatorRelease();
173        record.identifier = fieldSetFlags()[0] ? this.identifier : (java.lang.CharSequence) defaultValue(fields()[0]);
174        return record;
175      } catch (Exception e) {
176        throw new org.apache.avro.AvroRuntimeException(e);
177      }
178    }
179  }
180
181  private static final org.apache.avro.io.DatumWriter
182    WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
183
184  @Override public void writeExternal(java.io.ObjectOutput out)
185    throws java.io.IOException {
186    WRITER$.write(this, SpecificData.getEncoder(out));
187  }
188
189  private static final org.apache.avro.io.DatumReader
190    READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
191
192  @Override public void readExternal(java.io.ObjectInput in)
193    throws java.io.IOException {
194    READER$.read(this, SpecificData.getDecoder(in));
195  }
196
197}