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

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

/**
 * 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 HoodieFileStatus extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = -3159966031300103229L;
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"HoodieFileStatus\",\"namespace\":\"org.apache.hudi.avro.model\",\"fields\":[{\"name\":\"version\",\"type\":[\"int\",\"null\"],\"default\":1},{\"name\":\"path\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"HoodiePath\",\"fields\":[{\"name\":\"version\",\"type\":[\"int\",\"null\"],\"default\":1},{\"name\":\"uri\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null}]}],\"default\":null},{\"name\":\"length\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"isDir\",\"type\":[\"null\",\"boolean\"],\"default\":null},{\"name\":\"blockReplication\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"blockSize\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"modificationTime\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"accessTime\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"permission\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"HoodieFSPermission\",\"fields\":[{\"name\":\"version\",\"type\":[\"int\",\"null\"],\"default\":1},{\"name\":\"userAction\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"groupAction\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"otherAction\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"stickyBit\",\"type\":[\"null\",\"boolean\"],\"default\":null}]}],\"default\":null},{\"name\":\"owner\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"group\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"symlink\",\"type\":[\"null\",\"HoodiePath\"],\"default\":null}]}");
  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 HoodieFileStatus to a ByteBuffer. */
  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
    return ENCODER.encode(this);
  }

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

  @Deprecated public java.lang.Integer version;
  @Deprecated public org.apache.hudi.avro.model.HoodiePath path;
  @Deprecated public java.lang.Long length;
  @Deprecated public java.lang.Boolean isDir;
  @Deprecated public java.lang.Integer blockReplication;
  @Deprecated public java.lang.Long blockSize;
  @Deprecated public java.lang.Long modificationTime;
  @Deprecated public java.lang.Long accessTime;
  @Deprecated public org.apache.hudi.avro.model.HoodieFSPermission permission;
  @Deprecated public java.lang.String owner;
  @Deprecated public java.lang.String group;
  @Deprecated public org.apache.hudi.avro.model.HoodiePath symlink;

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

  /**
   * All-args constructor.
   * @param version The new value for version
   * @param path The new value for path
   * @param length The new value for length
   * @param isDir The new value for isDir
   * @param blockReplication The new value for blockReplication
   * @param blockSize The new value for blockSize
   * @param modificationTime The new value for modificationTime
   * @param accessTime The new value for accessTime
   * @param permission The new value for permission
   * @param owner The new value for owner
   * @param group The new value for group
   * @param symlink The new value for symlink
   */
  public HoodieFileStatus(java.lang.Integer version, org.apache.hudi.avro.model.HoodiePath path, java.lang.Long length, java.lang.Boolean isDir, java.lang.Integer blockReplication, java.lang.Long blockSize, java.lang.Long modificationTime, java.lang.Long accessTime, org.apache.hudi.avro.model.HoodieFSPermission permission, java.lang.String owner, java.lang.String group, org.apache.hudi.avro.model.HoodiePath symlink) {
    this.version = version;
    this.path = path;
    this.length = length;
    this.isDir = isDir;
    this.blockReplication = blockReplication;
    this.blockSize = blockSize;
    this.modificationTime = modificationTime;
    this.accessTime = accessTime;
    this.permission = permission;
    this.owner = owner;
    this.group = group;
    this.symlink = symlink;
  }

  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 version;
    case 1: return path;
    case 2: return length;
    case 3: return isDir;
    case 4: return blockReplication;
    case 5: return blockSize;
    case 6: return modificationTime;
    case 7: return accessTime;
    case 8: return permission;
    case 9: return owner;
    case 10: return group;
    case 11: return symlink;
    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: version = (java.lang.Integer)value$; break;
    case 1: path = (org.apache.hudi.avro.model.HoodiePath)value$; break;
    case 2: length = (java.lang.Long)value$; break;
    case 3: isDir = (java.lang.Boolean)value$; break;
    case 4: blockReplication = (java.lang.Integer)value$; break;
    case 5: blockSize = (java.lang.Long)value$; break;
    case 6: modificationTime = (java.lang.Long)value$; break;
    case 7: accessTime = (java.lang.Long)value$; break;
    case 8: permission = (org.apache.hudi.avro.model.HoodieFSPermission)value$; break;
    case 9: owner = (java.lang.String)value$; break;
    case 10: group = (java.lang.String)value$; break;
    case 11: symlink = (org.apache.hudi.avro.model.HoodiePath)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * 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;
  }

  /**
   * Gets the value of the 'path' field.
   * @return The value of the 'path' field.
   */
  public org.apache.hudi.avro.model.HoodiePath getPath() {
    return path;
  }

  /**
   * Sets the value of the 'path' field.
   * @param value the value to set.
   */
  public void setPath(org.apache.hudi.avro.model.HoodiePath value) {
    this.path = value;
  }

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

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

  /**
   * Gets the value of the 'isDir' field.
   * @return The value of the 'isDir' field.
   */
  public java.lang.Boolean getIsDir() {
    return isDir;
  }

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

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

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

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

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

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

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

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

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

  /**
   * Gets the value of the 'permission' field.
   * @return The value of the 'permission' field.
   */
  public org.apache.hudi.avro.model.HoodieFSPermission getPermission() {
    return permission;
  }

  /**
   * Sets the value of the 'permission' field.
   * @param value the value to set.
   */
  public void setPermission(org.apache.hudi.avro.model.HoodieFSPermission value) {
    this.permission = value;
  }

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

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

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

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

  /**
   * Gets the value of the 'symlink' field.
   * @return The value of the 'symlink' field.
   */
  public org.apache.hudi.avro.model.HoodiePath getSymlink() {
    return symlink;
  }

  /**
   * Sets the value of the 'symlink' field.
   * @param value the value to set.
   */
  public void setSymlink(org.apache.hudi.avro.model.HoodiePath value) {
    this.symlink = value;
  }

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

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

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

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

    private java.lang.Integer version;
    private org.apache.hudi.avro.model.HoodiePath path;
    private org.apache.hudi.avro.model.HoodiePath.Builder pathBuilder;
    private java.lang.Long length;
    private java.lang.Boolean isDir;
    private java.lang.Integer blockReplication;
    private java.lang.Long blockSize;
    private java.lang.Long modificationTime;
    private java.lang.Long accessTime;
    private org.apache.hudi.avro.model.HoodieFSPermission permission;
    private org.apache.hudi.avro.model.HoodieFSPermission.Builder permissionBuilder;
    private java.lang.String owner;
    private java.lang.String group;
    private org.apache.hudi.avro.model.HoodiePath symlink;
    private org.apache.hudi.avro.model.HoodiePath.Builder symlinkBuilder;

    /** 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.HoodieFileStatus.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.version)) {
        this.version = data().deepCopy(fields()[0].schema(), other.version);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.path)) {
        this.path = data().deepCopy(fields()[1].schema(), other.path);
        fieldSetFlags()[1] = true;
      }
      if (other.hasPathBuilder()) {
        this.pathBuilder = org.apache.hudi.avro.model.HoodiePath.newBuilder(other.getPathBuilder());
      }
      if (isValidValue(fields()[2], other.length)) {
        this.length = data().deepCopy(fields()[2].schema(), other.length);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.isDir)) {
        this.isDir = data().deepCopy(fields()[3].schema(), other.isDir);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.blockReplication)) {
        this.blockReplication = data().deepCopy(fields()[4].schema(), other.blockReplication);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.blockSize)) {
        this.blockSize = data().deepCopy(fields()[5].schema(), other.blockSize);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.modificationTime)) {
        this.modificationTime = data().deepCopy(fields()[6].schema(), other.modificationTime);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.accessTime)) {
        this.accessTime = data().deepCopy(fields()[7].schema(), other.accessTime);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.permission)) {
        this.permission = data().deepCopy(fields()[8].schema(), other.permission);
        fieldSetFlags()[8] = true;
      }
      if (other.hasPermissionBuilder()) {
        this.permissionBuilder = org.apache.hudi.avro.model.HoodieFSPermission.newBuilder(other.getPermissionBuilder());
      }
      if (isValidValue(fields()[9], other.owner)) {
        this.owner = data().deepCopy(fields()[9].schema(), other.owner);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.group)) {
        this.group = data().deepCopy(fields()[10].schema(), other.group);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.symlink)) {
        this.symlink = data().deepCopy(fields()[11].schema(), other.symlink);
        fieldSetFlags()[11] = true;
      }
      if (other.hasSymlinkBuilder()) {
        this.symlinkBuilder = org.apache.hudi.avro.model.HoodiePath.newBuilder(other.getSymlinkBuilder());
      }
    }

    /**
     * Creates a Builder by copying an existing HoodieFileStatus instance
     * @param other The existing instance to copy.
     */
    private Builder(org.apache.hudi.avro.model.HoodieFileStatus other) {
            super(SCHEMA$);
      if (isValidValue(fields()[0], other.version)) {
        this.version = data().deepCopy(fields()[0].schema(), other.version);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.path)) {
        this.path = data().deepCopy(fields()[1].schema(), other.path);
        fieldSetFlags()[1] = true;
      }
      this.pathBuilder = null;
      if (isValidValue(fields()[2], other.length)) {
        this.length = data().deepCopy(fields()[2].schema(), other.length);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.isDir)) {
        this.isDir = data().deepCopy(fields()[3].schema(), other.isDir);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.blockReplication)) {
        this.blockReplication = data().deepCopy(fields()[4].schema(), other.blockReplication);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.blockSize)) {
        this.blockSize = data().deepCopy(fields()[5].schema(), other.blockSize);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.modificationTime)) {
        this.modificationTime = data().deepCopy(fields()[6].schema(), other.modificationTime);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.accessTime)) {
        this.accessTime = data().deepCopy(fields()[7].schema(), other.accessTime);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.permission)) {
        this.permission = data().deepCopy(fields()[8].schema(), other.permission);
        fieldSetFlags()[8] = true;
      }
      this.permissionBuilder = null;
      if (isValidValue(fields()[9], other.owner)) {
        this.owner = data().deepCopy(fields()[9].schema(), other.owner);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.group)) {
        this.group = data().deepCopy(fields()[10].schema(), other.group);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.symlink)) {
        this.symlink = data().deepCopy(fields()[11].schema(), other.symlink);
        fieldSetFlags()[11] = true;
      }
      this.symlinkBuilder = null;
    }

    /**
      * 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.HoodieFileStatus.Builder setVersion(java.lang.Integer value) {
      validate(fields()[0], value);
      this.version = value;
      fieldSetFlags()[0] = 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()[0];
    }


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

    /**
      * Gets the value of the 'path' field.
      * @return The value.
      */
    public org.apache.hudi.avro.model.HoodiePath getPath() {
      return path;
    }

    /**
      * Sets the value of the 'path' field.
      * @param value The value of 'path'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setPath(org.apache.hudi.avro.model.HoodiePath value) {
      validate(fields()[1], value);
      this.pathBuilder = null;
      this.path = value;
      fieldSetFlags()[1] = true;
      return this;
    }

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

    /**
     * Gets the Builder instance for the 'path' field and creates one if it doesn't exist yet.
     * @return This builder.
     */
    public org.apache.hudi.avro.model.HoodiePath.Builder getPathBuilder() {
      if (pathBuilder == null) {
        if (hasPath()) {
          setPathBuilder(org.apache.hudi.avro.model.HoodiePath.newBuilder(path));
        } else {
          setPathBuilder(org.apache.hudi.avro.model.HoodiePath.newBuilder());
        }
      }
      return pathBuilder;
    }

    /**
     * Sets the Builder instance for the 'path' field
     * @param value The builder instance that must be set.
     * @return This builder.
     */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setPathBuilder(org.apache.hudi.avro.model.HoodiePath.Builder value) {
      clearPath();
      pathBuilder = value;
      return this;
    }

    /**
     * Checks whether the 'path' field has an active Builder instance
     * @return True if the 'path' field has an active Builder instance
     */
    public boolean hasPathBuilder() {
      return pathBuilder != null;
    }

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

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

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

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


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

    /**
      * Gets the value of the 'isDir' field.
      * @return The value.
      */
    public java.lang.Boolean getIsDir() {
      return isDir;
    }

    /**
      * Sets the value of the 'isDir' field.
      * @param value The value of 'isDir'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setIsDir(java.lang.Boolean value) {
      validate(fields()[3], value);
      this.isDir = value;
      fieldSetFlags()[3] = true;
      return this;
    }

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


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

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

    /**
      * Sets the value of the 'blockReplication' field.
      * @param value The value of 'blockReplication'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setBlockReplication(java.lang.Integer value) {
      validate(fields()[4], value);
      this.blockReplication = value;
      fieldSetFlags()[4] = true;
      return this;
    }

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


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

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

    /**
      * Sets the value of the 'blockSize' field.
      * @param value The value of 'blockSize'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setBlockSize(java.lang.Long value) {
      validate(fields()[5], value);
      this.blockSize = value;
      fieldSetFlags()[5] = true;
      return this;
    }

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


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

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

    /**
      * Sets the value of the 'modificationTime' field.
      * @param value The value of 'modificationTime'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setModificationTime(java.lang.Long value) {
      validate(fields()[6], value);
      this.modificationTime = value;
      fieldSetFlags()[6] = true;
      return this;
    }

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


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

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

    /**
      * Sets the value of the 'accessTime' field.
      * @param value The value of 'accessTime'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setAccessTime(java.lang.Long value) {
      validate(fields()[7], value);
      this.accessTime = value;
      fieldSetFlags()[7] = true;
      return this;
    }

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


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

    /**
      * Gets the value of the 'permission' field.
      * @return The value.
      */
    public org.apache.hudi.avro.model.HoodieFSPermission getPermission() {
      return permission;
    }

    /**
      * Sets the value of the 'permission' field.
      * @param value The value of 'permission'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setPermission(org.apache.hudi.avro.model.HoodieFSPermission value) {
      validate(fields()[8], value);
      this.permissionBuilder = null;
      this.permission = value;
      fieldSetFlags()[8] = true;
      return this;
    }

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

    /**
     * Gets the Builder instance for the 'permission' field and creates one if it doesn't exist yet.
     * @return This builder.
     */
    public org.apache.hudi.avro.model.HoodieFSPermission.Builder getPermissionBuilder() {
      if (permissionBuilder == null) {
        if (hasPermission()) {
          setPermissionBuilder(org.apache.hudi.avro.model.HoodieFSPermission.newBuilder(permission));
        } else {
          setPermissionBuilder(org.apache.hudi.avro.model.HoodieFSPermission.newBuilder());
        }
      }
      return permissionBuilder;
    }

    /**
     * Sets the Builder instance for the 'permission' field
     * @param value The builder instance that must be set.
     * @return This builder.
     */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setPermissionBuilder(org.apache.hudi.avro.model.HoodieFSPermission.Builder value) {
      clearPermission();
      permissionBuilder = value;
      return this;
    }

    /**
     * Checks whether the 'permission' field has an active Builder instance
     * @return True if the 'permission' field has an active Builder instance
     */
    public boolean hasPermissionBuilder() {
      return permissionBuilder != null;
    }

    /**
      * Clears the value of the 'permission' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder clearPermission() {
      permission = null;
      permissionBuilder = null;
      fieldSetFlags()[8] = false;
      return this;
    }

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

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

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


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

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

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

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


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

    /**
      * Gets the value of the 'symlink' field.
      * @return The value.
      */
    public org.apache.hudi.avro.model.HoodiePath getSymlink() {
      return symlink;
    }

    /**
      * Sets the value of the 'symlink' field.
      * @param value The value of 'symlink'.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setSymlink(org.apache.hudi.avro.model.HoodiePath value) {
      validate(fields()[11], value);
      this.symlinkBuilder = null;
      this.symlink = value;
      fieldSetFlags()[11] = true;
      return this;
    }

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

    /**
     * Gets the Builder instance for the 'symlink' field and creates one if it doesn't exist yet.
     * @return This builder.
     */
    public org.apache.hudi.avro.model.HoodiePath.Builder getSymlinkBuilder() {
      if (symlinkBuilder == null) {
        if (hasSymlink()) {
          setSymlinkBuilder(org.apache.hudi.avro.model.HoodiePath.newBuilder(symlink));
        } else {
          setSymlinkBuilder(org.apache.hudi.avro.model.HoodiePath.newBuilder());
        }
      }
      return symlinkBuilder;
    }

    /**
     * Sets the Builder instance for the 'symlink' field
     * @param value The builder instance that must be set.
     * @return This builder.
     */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder setSymlinkBuilder(org.apache.hudi.avro.model.HoodiePath.Builder value) {
      clearSymlink();
      symlinkBuilder = value;
      return this;
    }

    /**
     * Checks whether the 'symlink' field has an active Builder instance
     * @return True if the 'symlink' field has an active Builder instance
     */
    public boolean hasSymlinkBuilder() {
      return symlinkBuilder != null;
    }

    /**
      * Clears the value of the 'symlink' field.
      * @return This builder.
      */
    public org.apache.hudi.avro.model.HoodieFileStatus.Builder clearSymlink() {
      symlink = null;
      symlinkBuilder = null;
      fieldSetFlags()[11] = false;
      return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    public HoodieFileStatus build() {
      try {
        HoodieFileStatus record = new HoodieFileStatus();
        record.version = fieldSetFlags()[0] ? this.version : (java.lang.Integer) defaultValue(fields()[0]);
        if (pathBuilder != null) {
          record.path = this.pathBuilder.build();
        } else {
          record.path = fieldSetFlags()[1] ? this.path : (org.apache.hudi.avro.model.HoodiePath) defaultValue(fields()[1]);
        }
        record.length = fieldSetFlags()[2] ? this.length : (java.lang.Long) defaultValue(fields()[2]);
        record.isDir = fieldSetFlags()[3] ? this.isDir : (java.lang.Boolean) defaultValue(fields()[3]);
        record.blockReplication = fieldSetFlags()[4] ? this.blockReplication : (java.lang.Integer) defaultValue(fields()[4]);
        record.blockSize = fieldSetFlags()[5] ? this.blockSize : (java.lang.Long) defaultValue(fields()[5]);
        record.modificationTime = fieldSetFlags()[6] ? this.modificationTime : (java.lang.Long) defaultValue(fields()[6]);
        record.accessTime = fieldSetFlags()[7] ? this.accessTime : (java.lang.Long) defaultValue(fields()[7]);
        if (permissionBuilder != null) {
          record.permission = this.permissionBuilder.build();
        } else {
          record.permission = fieldSetFlags()[8] ? this.permission : (org.apache.hudi.avro.model.HoodieFSPermission) defaultValue(fields()[8]);
        }
        record.owner = fieldSetFlags()[9] ? this.owner : (java.lang.String) defaultValue(fields()[9]);
        record.group = fieldSetFlags()[10] ? this.group : (java.lang.String) defaultValue(fields()[10]);
        if (symlinkBuilder != null) {
          record.symlink = this.symlinkBuilder.build();
        } else {
          record.symlink = fieldSetFlags()[11] ? this.symlink : (org.apache.hudi.avro.model.HoodiePath) defaultValue(fields()[11]);
        }
        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