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