001/**
002 * Autogenerated by Avro
003 *
004 * DO NOT EDIT DIRECTLY
005 */
006package org.apache.reef.webserver;
007
008import org.apache.avro.specific.SpecificData;
009
010@SuppressWarnings("all")
011@org.apache.avro.specific.AvroGenerated
012public class AvroEvaluatorInfo extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
013  private static final long serialVersionUID = -5212616309098657894L;
014  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroEvaluatorInfo\",\"namespace\":\"org.apache.reef.webserver\",\"fields\":[{\"name\":\"evaluatorId\",\"type\":\"string\"},{\"name\":\"nodeId\",\"type\":\"string\"},{\"name\":\"nodeName\",\"type\":\"string\"},{\"name\":\"memory\",\"type\":\"int\"},{\"name\":\"type\",\"type\":\"string\"},{\"name\":\"internetAddress\",\"type\":\"string\"},{\"name\":\"runtimeName\",\"type\":\"string\"}]}");
015  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
016  @Deprecated public java.lang.CharSequence evaluatorId;
017  @Deprecated public java.lang.CharSequence nodeId;
018  @Deprecated public java.lang.CharSequence nodeName;
019  @Deprecated public int memory;
020  @Deprecated public java.lang.CharSequence type;
021  @Deprecated public java.lang.CharSequence internetAddress;
022  @Deprecated public java.lang.CharSequence runtimeName;
023
024  /**
025   * Default constructor.  Note that this does not initialize fields
026   * to their default values from the schema.  If that is desired then
027   * one should use <code>newBuilder()</code>.
028   */
029  public AvroEvaluatorInfo() {}
030
031  /**
032   * All-args constructor.
033   * @param evaluatorId The new value for evaluatorId
034   * @param nodeId The new value for nodeId
035   * @param nodeName The new value for nodeName
036   * @param memory The new value for memory
037   * @param type The new value for type
038   * @param internetAddress The new value for internetAddress
039   * @param runtimeName The new value for runtimeName
040   */
041  public AvroEvaluatorInfo(java.lang.CharSequence evaluatorId, java.lang.CharSequence nodeId, java.lang.CharSequence nodeName, java.lang.Integer memory, java.lang.CharSequence type, java.lang.CharSequence internetAddress, java.lang.CharSequence runtimeName) {
042    this.evaluatorId = evaluatorId;
043    this.nodeId = nodeId;
044    this.nodeName = nodeName;
045    this.memory = memory;
046    this.type = type;
047    this.internetAddress = internetAddress;
048    this.runtimeName = runtimeName;
049  }
050
051  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
052  // Used by DatumWriter.  Applications should not call.
053  public java.lang.Object get(int field$) {
054    switch (field$) {
055    case 0: return evaluatorId;
056    case 1: return nodeId;
057    case 2: return nodeName;
058    case 3: return memory;
059    case 4: return type;
060    case 5: return internetAddress;
061    case 6: return runtimeName;
062    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
063    }
064  }
065
066  // Used by DatumReader.  Applications should not call.
067  @SuppressWarnings(value="unchecked")
068  public void put(int field$, java.lang.Object value$) {
069    switch (field$) {
070    case 0: evaluatorId = (java.lang.CharSequence)value$; break;
071    case 1: nodeId = (java.lang.CharSequence)value$; break;
072    case 2: nodeName = (java.lang.CharSequence)value$; break;
073    case 3: memory = (java.lang.Integer)value$; break;
074    case 4: type = (java.lang.CharSequence)value$; break;
075    case 5: internetAddress = (java.lang.CharSequence)value$; break;
076    case 6: runtimeName = (java.lang.CharSequence)value$; break;
077    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
078    }
079  }
080
081  /**
082   * Gets the value of the 'evaluatorId' field.
083   * @return The value of the 'evaluatorId' field.
084   */
085  public java.lang.CharSequence getEvaluatorId() {
086    return evaluatorId;
087  }
088
089  /**
090   * Sets the value of the 'evaluatorId' field.
091   * @param value the value to set.
092   */
093  public void setEvaluatorId(java.lang.CharSequence value) {
094    this.evaluatorId = value;
095  }
096
097  /**
098   * Gets the value of the 'nodeId' field.
099   * @return The value of the 'nodeId' field.
100   */
101  public java.lang.CharSequence getNodeId() {
102    return nodeId;
103  }
104
105  /**
106   * Sets the value of the 'nodeId' field.
107   * @param value the value to set.
108   */
109  public void setNodeId(java.lang.CharSequence value) {
110    this.nodeId = value;
111  }
112
113  /**
114   * Gets the value of the 'nodeName' field.
115   * @return The value of the 'nodeName' field.
116   */
117  public java.lang.CharSequence getNodeName() {
118    return nodeName;
119  }
120
121  /**
122   * Sets the value of the 'nodeName' field.
123   * @param value the value to set.
124   */
125  public void setNodeName(java.lang.CharSequence value) {
126    this.nodeName = value;
127  }
128
129  /**
130   * Gets the value of the 'memory' field.
131   * @return The value of the 'memory' field.
132   */
133  public java.lang.Integer getMemory() {
134    return memory;
135  }
136
137  /**
138   * Sets the value of the 'memory' field.
139   * @param value the value to set.
140   */
141  public void setMemory(java.lang.Integer value) {
142    this.memory = value;
143  }
144
145  /**
146   * Gets the value of the 'type' field.
147   * @return The value of the 'type' field.
148   */
149  public java.lang.CharSequence getType() {
150    return type;
151  }
152
153  /**
154   * Sets the value of the 'type' field.
155   * @param value the value to set.
156   */
157  public void setType(java.lang.CharSequence value) {
158    this.type = value;
159  }
160
161  /**
162   * Gets the value of the 'internetAddress' field.
163   * @return The value of the 'internetAddress' field.
164   */
165  public java.lang.CharSequence getInternetAddress() {
166    return internetAddress;
167  }
168
169  /**
170   * Sets the value of the 'internetAddress' field.
171   * @param value the value to set.
172   */
173  public void setInternetAddress(java.lang.CharSequence value) {
174    this.internetAddress = value;
175  }
176
177  /**
178   * Gets the value of the 'runtimeName' field.
179   * @return The value of the 'runtimeName' field.
180   */
181  public java.lang.CharSequence getRuntimeName() {
182    return runtimeName;
183  }
184
185  /**
186   * Sets the value of the 'runtimeName' field.
187   * @param value the value to set.
188   */
189  public void setRuntimeName(java.lang.CharSequence value) {
190    this.runtimeName = value;
191  }
192
193  /**
194   * Creates a new AvroEvaluatorInfo RecordBuilder.
195   * @return A new AvroEvaluatorInfo RecordBuilder
196   */
197  public static org.apache.reef.webserver.AvroEvaluatorInfo.Builder newBuilder() {
198    return new org.apache.reef.webserver.AvroEvaluatorInfo.Builder();
199  }
200
201  /**
202   * Creates a new AvroEvaluatorInfo RecordBuilder by copying an existing Builder.
203   * @param other The existing builder to copy.
204   * @return A new AvroEvaluatorInfo RecordBuilder
205   */
206  public static org.apache.reef.webserver.AvroEvaluatorInfo.Builder newBuilder(org.apache.reef.webserver.AvroEvaluatorInfo.Builder other) {
207    return new org.apache.reef.webserver.AvroEvaluatorInfo.Builder(other);
208  }
209
210  /**
211   * Creates a new AvroEvaluatorInfo RecordBuilder by copying an existing AvroEvaluatorInfo instance.
212   * @param other The existing instance to copy.
213   * @return A new AvroEvaluatorInfo RecordBuilder
214   */
215  public static org.apache.reef.webserver.AvroEvaluatorInfo.Builder newBuilder(org.apache.reef.webserver.AvroEvaluatorInfo other) {
216    return new org.apache.reef.webserver.AvroEvaluatorInfo.Builder(other);
217  }
218
219  /**
220   * RecordBuilder for AvroEvaluatorInfo instances.
221   */
222  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<AvroEvaluatorInfo>
223    implements org.apache.avro.data.RecordBuilder<AvroEvaluatorInfo> {
224
225    private java.lang.CharSequence evaluatorId;
226    private java.lang.CharSequence nodeId;
227    private java.lang.CharSequence nodeName;
228    private int memory;
229    private java.lang.CharSequence type;
230    private java.lang.CharSequence internetAddress;
231    private java.lang.CharSequence runtimeName;
232
233    /** Creates a new Builder */
234    private Builder() {
235      super(SCHEMA$);
236    }
237
238    /**
239     * Creates a Builder by copying an existing Builder.
240     * @param other The existing Builder to copy.
241     */
242    private Builder(org.apache.reef.webserver.AvroEvaluatorInfo.Builder other) {
243      super(other);
244      if (isValidValue(fields()[0], other.evaluatorId)) {
245        this.evaluatorId = data().deepCopy(fields()[0].schema(), other.evaluatorId);
246        fieldSetFlags()[0] = true;
247      }
248      if (isValidValue(fields()[1], other.nodeId)) {
249        this.nodeId = data().deepCopy(fields()[1].schema(), other.nodeId);
250        fieldSetFlags()[1] = true;
251      }
252      if (isValidValue(fields()[2], other.nodeName)) {
253        this.nodeName = data().deepCopy(fields()[2].schema(), other.nodeName);
254        fieldSetFlags()[2] = true;
255      }
256      if (isValidValue(fields()[3], other.memory)) {
257        this.memory = data().deepCopy(fields()[3].schema(), other.memory);
258        fieldSetFlags()[3] = true;
259      }
260      if (isValidValue(fields()[4], other.type)) {
261        this.type = data().deepCopy(fields()[4].schema(), other.type);
262        fieldSetFlags()[4] = true;
263      }
264      if (isValidValue(fields()[5], other.internetAddress)) {
265        this.internetAddress = data().deepCopy(fields()[5].schema(), other.internetAddress);
266        fieldSetFlags()[5] = true;
267      }
268      if (isValidValue(fields()[6], other.runtimeName)) {
269        this.runtimeName = data().deepCopy(fields()[6].schema(), other.runtimeName);
270        fieldSetFlags()[6] = true;
271      }
272    }
273
274    /**
275     * Creates a Builder by copying an existing AvroEvaluatorInfo instance
276     * @param other The existing instance to copy.
277     */
278    private Builder(org.apache.reef.webserver.AvroEvaluatorInfo other) {
279            super(SCHEMA$);
280      if (isValidValue(fields()[0], other.evaluatorId)) {
281        this.evaluatorId = data().deepCopy(fields()[0].schema(), other.evaluatorId);
282        fieldSetFlags()[0] = true;
283      }
284      if (isValidValue(fields()[1], other.nodeId)) {
285        this.nodeId = data().deepCopy(fields()[1].schema(), other.nodeId);
286        fieldSetFlags()[1] = true;
287      }
288      if (isValidValue(fields()[2], other.nodeName)) {
289        this.nodeName = data().deepCopy(fields()[2].schema(), other.nodeName);
290        fieldSetFlags()[2] = true;
291      }
292      if (isValidValue(fields()[3], other.memory)) {
293        this.memory = data().deepCopy(fields()[3].schema(), other.memory);
294        fieldSetFlags()[3] = true;
295      }
296      if (isValidValue(fields()[4], other.type)) {
297        this.type = data().deepCopy(fields()[4].schema(), other.type);
298        fieldSetFlags()[4] = true;
299      }
300      if (isValidValue(fields()[5], other.internetAddress)) {
301        this.internetAddress = data().deepCopy(fields()[5].schema(), other.internetAddress);
302        fieldSetFlags()[5] = true;
303      }
304      if (isValidValue(fields()[6], other.runtimeName)) {
305        this.runtimeName = data().deepCopy(fields()[6].schema(), other.runtimeName);
306        fieldSetFlags()[6] = true;
307      }
308    }
309
310    /**
311      * Gets the value of the 'evaluatorId' field.
312      * @return The value.
313      */
314    public java.lang.CharSequence getEvaluatorId() {
315      return evaluatorId;
316    }
317
318    /**
319      * Sets the value of the 'evaluatorId' field.
320      * @param value The value of 'evaluatorId'.
321      * @return This builder.
322      */
323    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setEvaluatorId(java.lang.CharSequence value) {
324      validate(fields()[0], value);
325      this.evaluatorId = value;
326      fieldSetFlags()[0] = true;
327      return this;
328    }
329
330    /**
331      * Checks whether the 'evaluatorId' field has been set.
332      * @return True if the 'evaluatorId' field has been set, false otherwise.
333      */
334    public boolean hasEvaluatorId() {
335      return fieldSetFlags()[0];
336    }
337
338
339    /**
340      * Clears the value of the 'evaluatorId' field.
341      * @return This builder.
342      */
343    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearEvaluatorId() {
344      evaluatorId = null;
345      fieldSetFlags()[0] = false;
346      return this;
347    }
348
349    /**
350      * Gets the value of the 'nodeId' field.
351      * @return The value.
352      */
353    public java.lang.CharSequence getNodeId() {
354      return nodeId;
355    }
356
357    /**
358      * Sets the value of the 'nodeId' field.
359      * @param value The value of 'nodeId'.
360      * @return This builder.
361      */
362    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setNodeId(java.lang.CharSequence value) {
363      validate(fields()[1], value);
364      this.nodeId = value;
365      fieldSetFlags()[1] = true;
366      return this;
367    }
368
369    /**
370      * Checks whether the 'nodeId' field has been set.
371      * @return True if the 'nodeId' field has been set, false otherwise.
372      */
373    public boolean hasNodeId() {
374      return fieldSetFlags()[1];
375    }
376
377
378    /**
379      * Clears the value of the 'nodeId' field.
380      * @return This builder.
381      */
382    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearNodeId() {
383      nodeId = null;
384      fieldSetFlags()[1] = false;
385      return this;
386    }
387
388    /**
389      * Gets the value of the 'nodeName' field.
390      * @return The value.
391      */
392    public java.lang.CharSequence getNodeName() {
393      return nodeName;
394    }
395
396    /**
397      * Sets the value of the 'nodeName' field.
398      * @param value The value of 'nodeName'.
399      * @return This builder.
400      */
401    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setNodeName(java.lang.CharSequence value) {
402      validate(fields()[2], value);
403      this.nodeName = value;
404      fieldSetFlags()[2] = true;
405      return this;
406    }
407
408    /**
409      * Checks whether the 'nodeName' field has been set.
410      * @return True if the 'nodeName' field has been set, false otherwise.
411      */
412    public boolean hasNodeName() {
413      return fieldSetFlags()[2];
414    }
415
416
417    /**
418      * Clears the value of the 'nodeName' field.
419      * @return This builder.
420      */
421    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearNodeName() {
422      nodeName = null;
423      fieldSetFlags()[2] = false;
424      return this;
425    }
426
427    /**
428      * Gets the value of the 'memory' field.
429      * @return The value.
430      */
431    public java.lang.Integer getMemory() {
432      return memory;
433    }
434
435    /**
436      * Sets the value of the 'memory' field.
437      * @param value The value of 'memory'.
438      * @return This builder.
439      */
440    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setMemory(int value) {
441      validate(fields()[3], value);
442      this.memory = value;
443      fieldSetFlags()[3] = true;
444      return this;
445    }
446
447    /**
448      * Checks whether the 'memory' field has been set.
449      * @return True if the 'memory' field has been set, false otherwise.
450      */
451    public boolean hasMemory() {
452      return fieldSetFlags()[3];
453    }
454
455
456    /**
457      * Clears the value of the 'memory' field.
458      * @return This builder.
459      */
460    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearMemory() {
461      fieldSetFlags()[3] = false;
462      return this;
463    }
464
465    /**
466      * Gets the value of the 'type' field.
467      * @return The value.
468      */
469    public java.lang.CharSequence getType() {
470      return type;
471    }
472
473    /**
474      * Sets the value of the 'type' field.
475      * @param value The value of 'type'.
476      * @return This builder.
477      */
478    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setType(java.lang.CharSequence value) {
479      validate(fields()[4], value);
480      this.type = value;
481      fieldSetFlags()[4] = true;
482      return this;
483    }
484
485    /**
486      * Checks whether the 'type' field has been set.
487      * @return True if the 'type' field has been set, false otherwise.
488      */
489    public boolean hasType() {
490      return fieldSetFlags()[4];
491    }
492
493
494    /**
495      * Clears the value of the 'type' field.
496      * @return This builder.
497      */
498    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearType() {
499      type = null;
500      fieldSetFlags()[4] = false;
501      return this;
502    }
503
504    /**
505      * Gets the value of the 'internetAddress' field.
506      * @return The value.
507      */
508    public java.lang.CharSequence getInternetAddress() {
509      return internetAddress;
510    }
511
512    /**
513      * Sets the value of the 'internetAddress' field.
514      * @param value The value of 'internetAddress'.
515      * @return This builder.
516      */
517    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setInternetAddress(java.lang.CharSequence value) {
518      validate(fields()[5], value);
519      this.internetAddress = value;
520      fieldSetFlags()[5] = true;
521      return this;
522    }
523
524    /**
525      * Checks whether the 'internetAddress' field has been set.
526      * @return True if the 'internetAddress' field has been set, false otherwise.
527      */
528    public boolean hasInternetAddress() {
529      return fieldSetFlags()[5];
530    }
531
532
533    /**
534      * Clears the value of the 'internetAddress' field.
535      * @return This builder.
536      */
537    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearInternetAddress() {
538      internetAddress = null;
539      fieldSetFlags()[5] = false;
540      return this;
541    }
542
543    /**
544      * Gets the value of the 'runtimeName' field.
545      * @return The value.
546      */
547    public java.lang.CharSequence getRuntimeName() {
548      return runtimeName;
549    }
550
551    /**
552      * Sets the value of the 'runtimeName' field.
553      * @param value The value of 'runtimeName'.
554      * @return This builder.
555      */
556    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setRuntimeName(java.lang.CharSequence value) {
557      validate(fields()[6], value);
558      this.runtimeName = value;
559      fieldSetFlags()[6] = true;
560      return this;
561    }
562
563    /**
564      * Checks whether the 'runtimeName' field has been set.
565      * @return True if the 'runtimeName' field has been set, false otherwise.
566      */
567    public boolean hasRuntimeName() {
568      return fieldSetFlags()[6];
569    }
570
571
572    /**
573      * Clears the value of the 'runtimeName' field.
574      * @return This builder.
575      */
576    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearRuntimeName() {
577      runtimeName = null;
578      fieldSetFlags()[6] = false;
579      return this;
580    }
581
582    @Override
583    public AvroEvaluatorInfo build() {
584      try {
585        AvroEvaluatorInfo record = new AvroEvaluatorInfo();
586        record.evaluatorId = fieldSetFlags()[0] ? this.evaluatorId : (java.lang.CharSequence) defaultValue(fields()[0]);
587        record.nodeId = fieldSetFlags()[1] ? this.nodeId : (java.lang.CharSequence) defaultValue(fields()[1]);
588        record.nodeName = fieldSetFlags()[2] ? this.nodeName : (java.lang.CharSequence) defaultValue(fields()[2]);
589        record.memory = fieldSetFlags()[3] ? this.memory : (java.lang.Integer) defaultValue(fields()[3]);
590        record.type = fieldSetFlags()[4] ? this.type : (java.lang.CharSequence) defaultValue(fields()[4]);
591        record.internetAddress = fieldSetFlags()[5] ? this.internetAddress : (java.lang.CharSequence) defaultValue(fields()[5]);
592        record.runtimeName = fieldSetFlags()[6] ? this.runtimeName : (java.lang.CharSequence) defaultValue(fields()[6]);
593        return record;
594      } catch (Exception e) {
595        throw new org.apache.avro.AvroRuntimeException(e);
596      }
597    }
598  }
599
600  private static final org.apache.avro.io.DatumWriter
601    WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
602
603  @Override public void writeExternal(java.io.ObjectOutput out)
604    throws java.io.IOException {
605    WRITER$.write(this, SpecificData.getEncoder(out));
606  }
607
608  private static final org.apache.avro.io.DatumReader
609    READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
610
611  @Override public void readExternal(java.io.ObjectInput in)
612    throws java.io.IOException {
613    READER$.read(this, SpecificData.getDecoder(in));
614  }
615
616}