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