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

Energistics.Protocol.GrowingObject.GrowingObjectGetRange Maven / Gradle / Ivy

/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package Energistics.Protocol.GrowingObject;

import org.apache.avro.specific.SpecificData;

@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class GrowingObjectGetRange extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = 5364758183495520142L;
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"GrowingObjectGetRange\",\"namespace\":\"Energistics.Protocol.GrowingObject\",\"fields\":[{\"name\":\"uuid\",\"type\":\"string\"},{\"name\":\"startIndex\",\"type\":\"long\"},{\"name\":\"endIndex\",\"type\":\"long\"}],\"messageType\":\"4\",\"protocol\":\"6\",\"senderRole\":\"customer\",\"protocolRoles\":\"store,customer\",\"fullName\":\"Energistics.Protocol.GrowingObject.GrowingObjectGetRange\",\"depends\":[]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  @Deprecated public java.lang.CharSequence uuid;
  @Deprecated public long startIndex;
  @Deprecated public long endIndex;

  /**
   * 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 GrowingObjectGetRange() {}

  /**
   * All-args constructor.
   * @param uuid The new value for uuid
   * @param startIndex The new value for startIndex
   * @param endIndex The new value for endIndex
   */
  public GrowingObjectGetRange(java.lang.CharSequence uuid, java.lang.Long startIndex, java.lang.Long endIndex) {
    this.uuid = uuid;
    this.startIndex = startIndex;
    this.endIndex = endIndex;
  }

  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 uuid;
    case 1: return startIndex;
    case 2: return endIndex;
    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: uuid = (java.lang.CharSequence)value$; break;
    case 1: startIndex = (java.lang.Long)value$; break;
    case 2: endIndex = (java.lang.Long)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

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

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

  /**
   * Gets the value of the 'startIndex' field.
   * @return The value of the 'startIndex' field.
   */
  public java.lang.Long getStartIndex() {
    return startIndex;
  }

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

  /**
   * Gets the value of the 'endIndex' field.
   * @return The value of the 'endIndex' field.
   */
  public java.lang.Long getEndIndex() {
    return endIndex;
  }

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

  /**
   * Creates a new GrowingObjectGetRange RecordBuilder.
   * @return A new GrowingObjectGetRange RecordBuilder
   */
  public static Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder newBuilder() {
    return new Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder();
  }

  /**
   * Creates a new GrowingObjectGetRange RecordBuilder by copying an existing Builder.
   * @param other The existing builder to copy.
   * @return A new GrowingObjectGetRange RecordBuilder
   */
  public static Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder newBuilder(Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder other) {
    return new Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder(other);
  }

  /**
   * Creates a new GrowingObjectGetRange RecordBuilder by copying an existing GrowingObjectGetRange instance.
   * @param other The existing instance to copy.
   * @return A new GrowingObjectGetRange RecordBuilder
   */
  public static Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder newBuilder(Energistics.Protocol.GrowingObject.GrowingObjectGetRange other) {
    return new Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder(other);
  }

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

    private java.lang.CharSequence uuid;
    private long startIndex;
    private long endIndex;

    /** 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(Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.uuid)) {
        this.uuid = data().deepCopy(fields()[0].schema(), other.uuid);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.startIndex)) {
        this.startIndex = data().deepCopy(fields()[1].schema(), other.startIndex);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.endIndex)) {
        this.endIndex = data().deepCopy(fields()[2].schema(), other.endIndex);
        fieldSetFlags()[2] = true;
      }
    }

    /**
     * Creates a Builder by copying an existing GrowingObjectGetRange instance
     * @param other The existing instance to copy.
     */
    private Builder(Energistics.Protocol.GrowingObject.GrowingObjectGetRange other) {
            super(SCHEMA$);
      if (isValidValue(fields()[0], other.uuid)) {
        this.uuid = data().deepCopy(fields()[0].schema(), other.uuid);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.startIndex)) {
        this.startIndex = data().deepCopy(fields()[1].schema(), other.startIndex);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.endIndex)) {
        this.endIndex = data().deepCopy(fields()[2].schema(), other.endIndex);
        fieldSetFlags()[2] = true;
      }
    }

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

    /**
      * Sets the value of the 'uuid' field.
      * @param value The value of 'uuid'.
      * @return This builder.
      */
    public Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder setUuid(java.lang.CharSequence value) {
      validate(fields()[0], value);
      this.uuid = value;
      fieldSetFlags()[0] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'uuid' field.
      * @return This builder.
      */
    public Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder clearUuid() {
      uuid = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /**
      * Gets the value of the 'startIndex' field.
      * @return The value.
      */
    public java.lang.Long getStartIndex() {
      return startIndex;
    }

    /**
      * Sets the value of the 'startIndex' field.
      * @param value The value of 'startIndex'.
      * @return This builder.
      */
    public Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder setStartIndex(long value) {
      validate(fields()[1], value);
      this.startIndex = value;
      fieldSetFlags()[1] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'startIndex' field.
      * @return This builder.
      */
    public Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder clearStartIndex() {
      fieldSetFlags()[1] = false;
      return this;
    }

    /**
      * Gets the value of the 'endIndex' field.
      * @return The value.
      */
    public java.lang.Long getEndIndex() {
      return endIndex;
    }

    /**
      * Sets the value of the 'endIndex' field.
      * @param value The value of 'endIndex'.
      * @return This builder.
      */
    public Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder setEndIndex(long value) {
      validate(fields()[2], value);
      this.endIndex = value;
      fieldSetFlags()[2] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'endIndex' field.
      * @return This builder.
      */
    public Energistics.Protocol.GrowingObject.GrowingObjectGetRange.Builder clearEndIndex() {
      fieldSetFlags()[2] = false;
      return this;
    }

    @Override
    public GrowingObjectGetRange build() {
      try {
        GrowingObjectGetRange record = new GrowingObjectGetRange();
        record.uuid = fieldSetFlags()[0] ? this.uuid : (java.lang.CharSequence) defaultValue(fields()[0]);
        record.startIndex = fieldSetFlags()[1] ? this.startIndex : (java.lang.Long) defaultValue(fields()[1]);
        record.endIndex = fieldSetFlags()[2] ? this.endIndex : (java.lang.Long) defaultValue(fields()[2]);
        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