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

org.apache.hudi.avro.model.HoodieLSMTimelineInstant Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package org.apache.hudi.avro.model;

import org.apache.avro.specific.SpecificData;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;

@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class HoodieLSMTimelineInstant extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = 8423518351254036456L;
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"HoodieLSMTimelineInstant\",\"namespace\":\"org.apache.hudi.avro.model\",\"fields\":[{\"name\":\"instantTime\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"completionTime\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"action\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"metadata\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"plan\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"version\",\"type\":\"int\",\"default\":1}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }

  private static SpecificData MODEL$ = new SpecificData();

  private static final BinaryMessageEncoder ENCODER =
      new BinaryMessageEncoder(MODEL$, SCHEMA$);

  private static final BinaryMessageDecoder DECODER =
      new BinaryMessageDecoder(MODEL$, SCHEMA$);

  /**
   * Return the BinaryMessageDecoder instance used by this class.
   */
  public static BinaryMessageDecoder getDecoder() {
    return DECODER;
  }

  /**
   * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
   */
  public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
    return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
  }

  /** Serializes this HoodieLSMTimelineInstant to a ByteBuffer. */
  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
    return ENCODER.encode(this);
  }

  /** Deserializes a HoodieLSMTimelineInstant from a ByteBuffer. */
  public static HoodieLSMTimelineInstant fromByteBuffer(
      java.nio.ByteBuffer b) throws java.io.IOException {
    return DECODER.decode(b);
  }

  @Deprecated public java.lang.String instantTime;
  @Deprecated public java.lang.String completionTime;
  @Deprecated public java.lang.String action;
  @Deprecated public java.nio.ByteBuffer metadata;
  @Deprecated public java.nio.ByteBuffer plan;
  @Deprecated public int version;

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

  /**
   * All-args constructor.
   * @param instantTime The new value for instantTime
   * @param completionTime The new value for completionTime
   * @param action The new value for action
   * @param metadata The new value for metadata
   * @param plan The new value for plan
   * @param version The new value for version
   */
  public HoodieLSMTimelineInstant(java.lang.String instantTime, java.lang.String completionTime, java.lang.String action, java.nio.ByteBuffer metadata, java.nio.ByteBuffer plan, java.lang.Integer version) {
    this.instantTime = instantTime;
    this.completionTime = completionTime;
    this.action = action;
    this.metadata = metadata;
    this.plan = plan;
    this.version = version;
  }

  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 instantTime;
    case 1: return completionTime;
    case 2: return action;
    case 3: return metadata;
    case 4: return plan;
    case 5: return version;
    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: instantTime = (java.lang.String)value$; break;
    case 1: completionTime = (java.lang.String)value$; break;
    case 2: action = (java.lang.String)value$; break;
    case 3: metadata = (java.nio.ByteBuffer)value$; break;
    case 4: plan = (java.nio.ByteBuffer)value$; break;
    case 5: version = (java.lang.Integer)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'instantTime' field.
   * @return The value of the 'instantTime' field.
   */
  public java.lang.String getInstantTime() {
    return instantTime;
  }

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

  /**
   * Gets the value of the 'completionTime' field.
   * @return The value of the 'completionTime' field.
   */
  public java.lang.String getCompletionTime() {
    return completionTime;
  }

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

  /**
   * Gets the value of the 'action' field.
   * @return The value of the 'action' field.
   */
  public java.lang.String getAction() {
    return action;
  }

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

  /**
   * Gets the value of the 'metadata' field.
   * @return The value of the 'metadata' field.
   */
  public java.nio.ByteBuffer getMetadata() {
    return metadata;
  }

  /**
   * Sets the value of the 'metadata' field.
   * @param value the value to set.
   */
  public void setMetadata(java.nio.ByteBuffer value) {
    this.metadata = value;
  }

  /**
   * Gets the value of the 'plan' field.
   * @return The value of the 'plan' field.
   */
  public java.nio.ByteBuffer getPlan() {
    return plan;
  }

  /**
   * Sets the value of the 'plan' field.
   * @param value the value to set.
   */
  public void setPlan(java.nio.ByteBuffer value) {
    this.plan = value;
  }

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

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

  /**
   * Creates a new HoodieLSMTimelineInstant RecordBuilder.
   * @return A new HoodieLSMTimelineInstant RecordBuilder
   */
  public static org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder newBuilder() {
    return new org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder();
  }

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

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

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

    private java.lang.String instantTime;
    private java.lang.String completionTime;
    private java.lang.String action;
    private java.nio.ByteBuffer metadata;
    private java.nio.ByteBuffer plan;
    private int version;

    /** 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.hudi.avro.model.HoodieLSMTimelineInstant.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.instantTime)) {
        this.instantTime = data().deepCopy(fields()[0].schema(), other.instantTime);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.completionTime)) {
        this.completionTime = data().deepCopy(fields()[1].schema(), other.completionTime);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.action)) {
        this.action = data().deepCopy(fields()[2].schema(), other.action);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.metadata)) {
        this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.plan)) {
        this.plan = data().deepCopy(fields()[4].schema(), other.plan);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.version)) {
        this.version = data().deepCopy(fields()[5].schema(), other.version);
        fieldSetFlags()[5] = true;
      }
    }

    /**
     * Creates a Builder by copying an existing HoodieLSMTimelineInstant instance
     * @param other The existing instance to copy.
     */
    private Builder(org.apache.hudi.avro.model.HoodieLSMTimelineInstant other) {
            super(SCHEMA$);
      if (isValidValue(fields()[0], other.instantTime)) {
        this.instantTime = data().deepCopy(fields()[0].schema(), other.instantTime);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.completionTime)) {
        this.completionTime = data().deepCopy(fields()[1].schema(), other.completionTime);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.action)) {
        this.action = data().deepCopy(fields()[2].schema(), other.action);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.metadata)) {
        this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.plan)) {
        this.plan = data().deepCopy(fields()[4].schema(), other.plan);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.version)) {
        this.version = data().deepCopy(fields()[5].schema(), other.version);
        fieldSetFlags()[5] = true;
      }
    }

    /**
      * Gets the value of the 'instantTime' field.
      * @return The value.
      */
    public java.lang.String getInstantTime() {
      return instantTime;
    }

    /**
      * Sets the value of the 'instantTime' field.
      * @param value The value of 'instantTime'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setInstantTime(java.lang.String value) {
      validate(fields()[0], value);
      this.instantTime = value;
      fieldSetFlags()[0] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'instantTime' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearInstantTime() {
      instantTime = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /**
      * Gets the value of the 'completionTime' field.
      * @return The value.
      */
    public java.lang.String getCompletionTime() {
      return completionTime;
    }

    /**
      * Sets the value of the 'completionTime' field.
      * @param value The value of 'completionTime'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setCompletionTime(java.lang.String value) {
      validate(fields()[1], value);
      this.completionTime = value;
      fieldSetFlags()[1] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'completionTime' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearCompletionTime() {
      completionTime = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /**
      * Gets the value of the 'action' field.
      * @return The value.
      */
    public java.lang.String getAction() {
      return action;
    }

    /**
      * Sets the value of the 'action' field.
      * @param value The value of 'action'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setAction(java.lang.String value) {
      validate(fields()[2], value);
      this.action = value;
      fieldSetFlags()[2] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'action' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearAction() {
      action = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /**
      * Gets the value of the 'metadata' field.
      * @return The value.
      */
    public java.nio.ByteBuffer getMetadata() {
      return metadata;
    }

    /**
      * Sets the value of the 'metadata' field.
      * @param value The value of 'metadata'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setMetadata(java.nio.ByteBuffer value) {
      validate(fields()[3], value);
      this.metadata = value;
      fieldSetFlags()[3] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'metadata' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearMetadata() {
      metadata = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /**
      * Gets the value of the 'plan' field.
      * @return The value.
      */
    public java.nio.ByteBuffer getPlan() {
      return plan;
    }

    /**
      * Sets the value of the 'plan' field.
      * @param value The value of 'plan'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setPlan(java.nio.ByteBuffer value) {
      validate(fields()[4], value);
      this.plan = value;
      fieldSetFlags()[4] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'plan' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearPlan() {
      plan = null;
      fieldSetFlags()[4] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'version' field.
      * @param value The value of 'version'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setVersion(int value) {
      validate(fields()[5], value);
      this.version = value;
      fieldSetFlags()[5] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'version' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearVersion() {
      fieldSetFlags()[5] = false;
      return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    public HoodieLSMTimelineInstant build() {
      try {
        HoodieLSMTimelineInstant record = new HoodieLSMTimelineInstant();
        record.instantTime = fieldSetFlags()[0] ? this.instantTime : (java.lang.String) defaultValue(fields()[0]);
        record.completionTime = fieldSetFlags()[1] ? this.completionTime : (java.lang.String) defaultValue(fields()[1]);
        record.action = fieldSetFlags()[2] ? this.action : (java.lang.String) defaultValue(fields()[2]);
        record.metadata = fieldSetFlags()[3] ? this.metadata : (java.nio.ByteBuffer) defaultValue(fields()[3]);
        record.plan = fieldSetFlags()[4] ? this.plan : (java.nio.ByteBuffer) defaultValue(fields()[4]);
        record.version = fieldSetFlags()[5] ? this.version : (java.lang.Integer) defaultValue(fields()[5]);
        return record;
      } catch (java.lang.Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }

  @SuppressWarnings("unchecked")
  private static final org.apache.avro.io.DatumWriter
    WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$);

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

  @SuppressWarnings("unchecked")
  private static final org.apache.avro.io.DatumReader
    READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$);

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy