All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.reef.webserver.AvroEvaluatorInfo Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package org.apache.reef.webserver;

import org.apache.avro.specific.SpecificData;

@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class AvroEvaluatorInfo extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = -5212616309098657894L;
  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\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  @Deprecated public java.lang.CharSequence evaluatorId;
  @Deprecated public java.lang.CharSequence nodeId;
  @Deprecated public java.lang.CharSequence nodeName;
  @Deprecated public int memory;
  @Deprecated public java.lang.CharSequence type;
  @Deprecated public java.lang.CharSequence internetAddress;
  @Deprecated public java.lang.CharSequence runtimeName;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder().
   */
  public AvroEvaluatorInfo() {}

  /**
   * All-args constructor.
   * @param evaluatorId The new value for evaluatorId
   * @param nodeId The new value for nodeId
   * @param nodeName The new value for nodeName
   * @param memory The new value for memory
   * @param type The new value for type
   * @param internetAddress The new value for internetAddress
   * @param runtimeName The new value for runtimeName
   */
  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) {
    this.evaluatorId = evaluatorId;
    this.nodeId = nodeId;
    this.nodeName = nodeName;
    this.memory = memory;
    this.type = type;
    this.internetAddress = internetAddress;
    this.runtimeName = runtimeName;
  }

  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 evaluatorId;
    case 1: return nodeId;
    case 2: return nodeName;
    case 3: return memory;
    case 4: return type;
    case 5: return internetAddress;
    case 6: return runtimeName;
    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: evaluatorId = (java.lang.CharSequence)value$; break;
    case 1: nodeId = (java.lang.CharSequence)value$; break;
    case 2: nodeName = (java.lang.CharSequence)value$; break;
    case 3: memory = (java.lang.Integer)value$; break;
    case 4: type = (java.lang.CharSequence)value$; break;
    case 5: internetAddress = (java.lang.CharSequence)value$; break;
    case 6: runtimeName = (java.lang.CharSequence)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'evaluatorId' field.
   * @return The value of the 'evaluatorId' field.
   */
  public java.lang.CharSequence getEvaluatorId() {
    return evaluatorId;
  }

  /**
   * Sets the value of the 'evaluatorId' field.
   * @param value the value to set.
   */
  public void setEvaluatorId(java.lang.CharSequence value) {
    this.evaluatorId = value;
  }

  /**
   * Gets the value of the 'nodeId' field.
   * @return The value of the 'nodeId' field.
   */
  public java.lang.CharSequence getNodeId() {
    return nodeId;
  }

  /**
   * Sets the value of the 'nodeId' field.
   * @param value the value to set.
   */
  public void setNodeId(java.lang.CharSequence value) {
    this.nodeId = value;
  }

  /**
   * Gets the value of the 'nodeName' field.
   * @return The value of the 'nodeName' field.
   */
  public java.lang.CharSequence getNodeName() {
    return nodeName;
  }

  /**
   * Sets the value of the 'nodeName' field.
   * @param value the value to set.
   */
  public void setNodeName(java.lang.CharSequence value) {
    this.nodeName = value;
  }

  /**
   * Gets the value of the 'memory' field.
   * @return The value of the 'memory' field.
   */
  public java.lang.Integer getMemory() {
    return memory;
  }

  /**
   * Sets the value of the 'memory' field.
   * @param value the value to set.
   */
  public void setMemory(java.lang.Integer value) {
    this.memory = value;
  }

  /**
   * Gets the value of the 'type' field.
   * @return The value of the 'type' field.
   */
  public java.lang.CharSequence getType() {
    return type;
  }

  /**
   * Sets the value of the 'type' field.
   * @param value the value to set.
   */
  public void setType(java.lang.CharSequence value) {
    this.type = value;
  }

  /**
   * Gets the value of the 'internetAddress' field.
   * @return The value of the 'internetAddress' field.
   */
  public java.lang.CharSequence getInternetAddress() {
    return internetAddress;
  }

  /**
   * Sets the value of the 'internetAddress' field.
   * @param value the value to set.
   */
  public void setInternetAddress(java.lang.CharSequence value) {
    this.internetAddress = value;
  }

  /**
   * Gets the value of the 'runtimeName' field.
   * @return The value of the 'runtimeName' field.
   */
  public java.lang.CharSequence getRuntimeName() {
    return runtimeName;
  }

  /**
   * Sets the value of the 'runtimeName' field.
   * @param value the value to set.
   */
  public void setRuntimeName(java.lang.CharSequence value) {
    this.runtimeName = value;
  }

  /**
   * Creates a new AvroEvaluatorInfo RecordBuilder.
   * @return A new AvroEvaluatorInfo RecordBuilder
   */
  public static org.apache.reef.webserver.AvroEvaluatorInfo.Builder newBuilder() {
    return new org.apache.reef.webserver.AvroEvaluatorInfo.Builder();
  }

  /**
   * Creates a new AvroEvaluatorInfo RecordBuilder by copying an existing Builder.
   * @param other The existing builder to copy.
   * @return A new AvroEvaluatorInfo RecordBuilder
   */
  public static org.apache.reef.webserver.AvroEvaluatorInfo.Builder newBuilder(org.apache.reef.webserver.AvroEvaluatorInfo.Builder other) {
    return new org.apache.reef.webserver.AvroEvaluatorInfo.Builder(other);
  }

  /**
   * Creates a new AvroEvaluatorInfo RecordBuilder by copying an existing AvroEvaluatorInfo instance.
   * @param other The existing instance to copy.
   * @return A new AvroEvaluatorInfo RecordBuilder
   */
  public static org.apache.reef.webserver.AvroEvaluatorInfo.Builder newBuilder(org.apache.reef.webserver.AvroEvaluatorInfo other) {
    return new org.apache.reef.webserver.AvroEvaluatorInfo.Builder(other);
  }

  /**
   * RecordBuilder for AvroEvaluatorInfo instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private java.lang.CharSequence evaluatorId;
    private java.lang.CharSequence nodeId;
    private java.lang.CharSequence nodeName;
    private int memory;
    private java.lang.CharSequence type;
    private java.lang.CharSequence internetAddress;
    private java.lang.CharSequence runtimeName;

    /** Creates a new Builder */
    private Builder() {
      super(SCHEMA$);
    }

    /**
     * Creates a Builder by copying an existing Builder.
     * @param other The existing Builder to copy.
     */
    private Builder(org.apache.reef.webserver.AvroEvaluatorInfo.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.evaluatorId)) {
        this.evaluatorId = data().deepCopy(fields()[0].schema(), other.evaluatorId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.nodeId)) {
        this.nodeId = data().deepCopy(fields()[1].schema(), other.nodeId);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.nodeName)) {
        this.nodeName = data().deepCopy(fields()[2].schema(), other.nodeName);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.memory)) {
        this.memory = data().deepCopy(fields()[3].schema(), other.memory);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.type)) {
        this.type = data().deepCopy(fields()[4].schema(), other.type);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.internetAddress)) {
        this.internetAddress = data().deepCopy(fields()[5].schema(), other.internetAddress);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.runtimeName)) {
        this.runtimeName = data().deepCopy(fields()[6].schema(), other.runtimeName);
        fieldSetFlags()[6] = true;
      }
    }

    /**
     * Creates a Builder by copying an existing AvroEvaluatorInfo instance
     * @param other The existing instance to copy.
     */
    private Builder(org.apache.reef.webserver.AvroEvaluatorInfo other) {
            super(SCHEMA$);
      if (isValidValue(fields()[0], other.evaluatorId)) {
        this.evaluatorId = data().deepCopy(fields()[0].schema(), other.evaluatorId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.nodeId)) {
        this.nodeId = data().deepCopy(fields()[1].schema(), other.nodeId);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.nodeName)) {
        this.nodeName = data().deepCopy(fields()[2].schema(), other.nodeName);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.memory)) {
        this.memory = data().deepCopy(fields()[3].schema(), other.memory);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.type)) {
        this.type = data().deepCopy(fields()[4].schema(), other.type);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.internetAddress)) {
        this.internetAddress = data().deepCopy(fields()[5].schema(), other.internetAddress);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.runtimeName)) {
        this.runtimeName = data().deepCopy(fields()[6].schema(), other.runtimeName);
        fieldSetFlags()[6] = true;
      }
    }

    /**
      * Gets the value of the 'evaluatorId' field.
      * @return The value.
      */
    public java.lang.CharSequence getEvaluatorId() {
      return evaluatorId;
    }

    /**
      * Sets the value of the 'evaluatorId' field.
      * @param value The value of 'evaluatorId'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setEvaluatorId(java.lang.CharSequence value) {
      validate(fields()[0], value);
      this.evaluatorId = value;
      fieldSetFlags()[0] = true;
      return this;
    }

    /**
      * Checks whether the 'evaluatorId' field has been set.
      * @return True if the 'evaluatorId' field has been set, false otherwise.
      */
    public boolean hasEvaluatorId() {
      return fieldSetFlags()[0];
    }


    /**
      * Clears the value of the 'evaluatorId' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearEvaluatorId() {
      evaluatorId = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /**
      * Gets the value of the 'nodeId' field.
      * @return The value.
      */
    public java.lang.CharSequence getNodeId() {
      return nodeId;
    }

    /**
      * Sets the value of the 'nodeId' field.
      * @param value The value of 'nodeId'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setNodeId(java.lang.CharSequence value) {
      validate(fields()[1], value);
      this.nodeId = value;
      fieldSetFlags()[1] = true;
      return this;
    }

    /**
      * Checks whether the 'nodeId' field has been set.
      * @return True if the 'nodeId' field has been set, false otherwise.
      */
    public boolean hasNodeId() {
      return fieldSetFlags()[1];
    }


    /**
      * Clears the value of the 'nodeId' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearNodeId() {
      nodeId = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /**
      * Gets the value of the 'nodeName' field.
      * @return The value.
      */
    public java.lang.CharSequence getNodeName() {
      return nodeName;
    }

    /**
      * Sets the value of the 'nodeName' field.
      * @param value The value of 'nodeName'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setNodeName(java.lang.CharSequence value) {
      validate(fields()[2], value);
      this.nodeName = value;
      fieldSetFlags()[2] = true;
      return this;
    }

    /**
      * Checks whether the 'nodeName' field has been set.
      * @return True if the 'nodeName' field has been set, false otherwise.
      */
    public boolean hasNodeName() {
      return fieldSetFlags()[2];
    }


    /**
      * Clears the value of the 'nodeName' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearNodeName() {
      nodeName = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /**
      * Gets the value of the 'memory' field.
      * @return The value.
      */
    public java.lang.Integer getMemory() {
      return memory;
    }

    /**
      * Sets the value of the 'memory' field.
      * @param value The value of 'memory'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setMemory(int value) {
      validate(fields()[3], value);
      this.memory = value;
      fieldSetFlags()[3] = true;
      return this;
    }

    /**
      * Checks whether the 'memory' field has been set.
      * @return True if the 'memory' field has been set, false otherwise.
      */
    public boolean hasMemory() {
      return fieldSetFlags()[3];
    }


    /**
      * Clears the value of the 'memory' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearMemory() {
      fieldSetFlags()[3] = false;
      return this;
    }

    /**
      * Gets the value of the 'type' field.
      * @return The value.
      */
    public java.lang.CharSequence getType() {
      return type;
    }

    /**
      * Sets the value of the 'type' field.
      * @param value The value of 'type'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setType(java.lang.CharSequence value) {
      validate(fields()[4], value);
      this.type = value;
      fieldSetFlags()[4] = true;
      return this;
    }

    /**
      * Checks whether the 'type' field has been set.
      * @return True if the 'type' field has been set, false otherwise.
      */
    public boolean hasType() {
      return fieldSetFlags()[4];
    }


    /**
      * Clears the value of the 'type' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearType() {
      type = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /**
      * Gets the value of the 'internetAddress' field.
      * @return The value.
      */
    public java.lang.CharSequence getInternetAddress() {
      return internetAddress;
    }

    /**
      * Sets the value of the 'internetAddress' field.
      * @param value The value of 'internetAddress'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setInternetAddress(java.lang.CharSequence value) {
      validate(fields()[5], value);
      this.internetAddress = value;
      fieldSetFlags()[5] = true;
      return this;
    }

    /**
      * Checks whether the 'internetAddress' field has been set.
      * @return True if the 'internetAddress' field has been set, false otherwise.
      */
    public boolean hasInternetAddress() {
      return fieldSetFlags()[5];
    }


    /**
      * Clears the value of the 'internetAddress' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearInternetAddress() {
      internetAddress = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /**
      * Gets the value of the 'runtimeName' field.
      * @return The value.
      */
    public java.lang.CharSequence getRuntimeName() {
      return runtimeName;
    }

    /**
      * Sets the value of the 'runtimeName' field.
      * @param value The value of 'runtimeName'.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder setRuntimeName(java.lang.CharSequence value) {
      validate(fields()[6], value);
      this.runtimeName = value;
      fieldSetFlags()[6] = true;
      return this;
    }

    /**
      * Checks whether the 'runtimeName' field has been set.
      * @return True if the 'runtimeName' field has been set, false otherwise.
      */
    public boolean hasRuntimeName() {
      return fieldSetFlags()[6];
    }


    /**
      * Clears the value of the 'runtimeName' field.
      * @return This builder.
      */
    public org.apache.reef.webserver.AvroEvaluatorInfo.Builder clearRuntimeName() {
      runtimeName = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    @Override
    public AvroEvaluatorInfo build() {
      try {
        AvroEvaluatorInfo record = new AvroEvaluatorInfo();
        record.evaluatorId = fieldSetFlags()[0] ? this.evaluatorId : (java.lang.CharSequence) defaultValue(fields()[0]);
        record.nodeId = fieldSetFlags()[1] ? this.nodeId : (java.lang.CharSequence) defaultValue(fields()[1]);
        record.nodeName = fieldSetFlags()[2] ? this.nodeName : (java.lang.CharSequence) defaultValue(fields()[2]);
        record.memory = fieldSetFlags()[3] ? this.memory : (java.lang.Integer) defaultValue(fields()[3]);
        record.type = fieldSetFlags()[4] ? this.type : (java.lang.CharSequence) defaultValue(fields()[4]);
        record.internetAddress = fieldSetFlags()[5] ? this.internetAddress : (java.lang.CharSequence) defaultValue(fields()[5]);
        record.runtimeName = fieldSetFlags()[6] ? this.runtimeName : (java.lang.CharSequence) defaultValue(fields()[6]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }

  private static final org.apache.avro.io.DatumWriter
    WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);

  @Override public void writeExternal(java.io.ObjectOutput out)
    throws java.io.IOException {
    WRITER$.write(this, SpecificData.getEncoder(out));
  }

  private static final org.apache.avro.io.DatumReader
    READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);

  @Override public void readExternal(java.io.ObjectInput in)
    throws java.io.IOException {
    READER$.read(this, SpecificData.getDecoder(in));
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy