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

com.uber.hoodie.avro.model.HoodieCleanMetadata Maven / Gradle / Ivy

There is a newer version: 0.4.7
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package com.uber.hoodie.avro.model;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class HoodieCleanMetadata extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"HoodieCleanMetadata\",\"namespace\":\"com.uber.hoodie.avro.model\",\"fields\":[{\"name\":\"startCleanTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"timeTakenInMillis\",\"type\":\"long\"},{\"name\":\"totalFilesDeleted\",\"type\":\"int\"},{\"name\":\"earliestCommitToRetain\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"partitionMetadata\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"HoodieCleanPartitionMetadata\",\"fields\":[{\"name\":\"partitionPath\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"policy\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"deletePathPatterns\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}},{\"name\":\"successDeleteFiles\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}},{\"name\":\"failedDeleteFiles\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}}]},\"avro.java.string\":\"String\"}}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  @Deprecated public java.lang.String startCleanTime;
  @Deprecated public long timeTakenInMillis;
  @Deprecated public int totalFilesDeleted;
  @Deprecated public java.lang.String earliestCommitToRetain;
  @Deprecated public java.util.Map partitionMetadata;

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

  /**
   * All-args constructor.
   */
  public HoodieCleanMetadata(java.lang.String startCleanTime, java.lang.Long timeTakenInMillis, java.lang.Integer totalFilesDeleted, java.lang.String earliestCommitToRetain, java.util.Map partitionMetadata) {
    this.startCleanTime = startCleanTime;
    this.timeTakenInMillis = timeTakenInMillis;
    this.totalFilesDeleted = totalFilesDeleted;
    this.earliestCommitToRetain = earliestCommitToRetain;
    this.partitionMetadata = partitionMetadata;
  }

  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 startCleanTime;
    case 1: return timeTakenInMillis;
    case 2: return totalFilesDeleted;
    case 3: return earliestCommitToRetain;
    case 4: return partitionMetadata;
    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: startCleanTime = (java.lang.String)value$; break;
    case 1: timeTakenInMillis = (java.lang.Long)value$; break;
    case 2: totalFilesDeleted = (java.lang.Integer)value$; break;
    case 3: earliestCommitToRetain = (java.lang.String)value$; break;
    case 4: partitionMetadata = (java.util.Map)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'startCleanTime' field.
   */
  public java.lang.String getStartCleanTime() {
    return startCleanTime;
  }

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

  /**
   * Gets the value of the 'timeTakenInMillis' field.
   */
  public java.lang.Long getTimeTakenInMillis() {
    return timeTakenInMillis;
  }

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

  /**
   * Gets the value of the 'totalFilesDeleted' field.
   */
  public java.lang.Integer getTotalFilesDeleted() {
    return totalFilesDeleted;
  }

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

  /**
   * Gets the value of the 'earliestCommitToRetain' field.
   */
  public java.lang.String getEarliestCommitToRetain() {
    return earliestCommitToRetain;
  }

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

  /**
   * Gets the value of the 'partitionMetadata' field.
   */
  public java.util.Map getPartitionMetadata() {
    return partitionMetadata;
  }

  /**
   * Sets the value of the 'partitionMetadata' field.
   * @param value the value to set.
   */
  public void setPartitionMetadata(java.util.Map value) {
    this.partitionMetadata = value;
  }

  /** Creates a new HoodieCleanMetadata RecordBuilder */
  public static com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder newBuilder() {
    return new com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder();
  }
  
  /** Creates a new HoodieCleanMetadata RecordBuilder by copying an existing Builder */
  public static com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder newBuilder(com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder other) {
    return new com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder(other);
  }
  
  /** Creates a new HoodieCleanMetadata RecordBuilder by copying an existing HoodieCleanMetadata instance */
  public static com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder newBuilder(com.uber.hoodie.avro.model.HoodieCleanMetadata other) {
    return new com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder(other);
  }
  
  /**
   * RecordBuilder for HoodieCleanMetadata instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private java.lang.String startCleanTime;
    private long timeTakenInMillis;
    private int totalFilesDeleted;
    private java.lang.String earliestCommitToRetain;
    private java.util.Map partitionMetadata;

    /** Creates a new Builder */
    private Builder() {
      super(com.uber.hoodie.avro.model.HoodieCleanMetadata.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.startCleanTime)) {
        this.startCleanTime = data().deepCopy(fields()[0].schema(), other.startCleanTime);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.timeTakenInMillis)) {
        this.timeTakenInMillis = data().deepCopy(fields()[1].schema(), other.timeTakenInMillis);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.totalFilesDeleted)) {
        this.totalFilesDeleted = data().deepCopy(fields()[2].schema(), other.totalFilesDeleted);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.earliestCommitToRetain)) {
        this.earliestCommitToRetain = data().deepCopy(fields()[3].schema(), other.earliestCommitToRetain);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.partitionMetadata)) {
        this.partitionMetadata = data().deepCopy(fields()[4].schema(), other.partitionMetadata);
        fieldSetFlags()[4] = true;
      }
    }
    
    /** Creates a Builder by copying an existing HoodieCleanMetadata instance */
    private Builder(com.uber.hoodie.avro.model.HoodieCleanMetadata other) {
            super(com.uber.hoodie.avro.model.HoodieCleanMetadata.SCHEMA$);
      if (isValidValue(fields()[0], other.startCleanTime)) {
        this.startCleanTime = data().deepCopy(fields()[0].schema(), other.startCleanTime);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.timeTakenInMillis)) {
        this.timeTakenInMillis = data().deepCopy(fields()[1].schema(), other.timeTakenInMillis);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.totalFilesDeleted)) {
        this.totalFilesDeleted = data().deepCopy(fields()[2].schema(), other.totalFilesDeleted);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.earliestCommitToRetain)) {
        this.earliestCommitToRetain = data().deepCopy(fields()[3].schema(), other.earliestCommitToRetain);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.partitionMetadata)) {
        this.partitionMetadata = data().deepCopy(fields()[4].schema(), other.partitionMetadata);
        fieldSetFlags()[4] = true;
      }
    }

    /** Gets the value of the 'startCleanTime' field */
    public java.lang.String getStartCleanTime() {
      return startCleanTime;
    }
    
    /** Sets the value of the 'startCleanTime' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder setStartCleanTime(java.lang.String value) {
      validate(fields()[0], value);
      this.startCleanTime = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'startCleanTime' field has been set */
    public boolean hasStartCleanTime() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'startCleanTime' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder clearStartCleanTime() {
      startCleanTime = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'timeTakenInMillis' field */
    public java.lang.Long getTimeTakenInMillis() {
      return timeTakenInMillis;
    }
    
    /** Sets the value of the 'timeTakenInMillis' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder setTimeTakenInMillis(long value) {
      validate(fields()[1], value);
      this.timeTakenInMillis = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'timeTakenInMillis' field has been set */
    public boolean hasTimeTakenInMillis() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'timeTakenInMillis' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder clearTimeTakenInMillis() {
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'totalFilesDeleted' field */
    public java.lang.Integer getTotalFilesDeleted() {
      return totalFilesDeleted;
    }
    
    /** Sets the value of the 'totalFilesDeleted' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder setTotalFilesDeleted(int value) {
      validate(fields()[2], value);
      this.totalFilesDeleted = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'totalFilesDeleted' field has been set */
    public boolean hasTotalFilesDeleted() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'totalFilesDeleted' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder clearTotalFilesDeleted() {
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'earliestCommitToRetain' field */
    public java.lang.String getEarliestCommitToRetain() {
      return earliestCommitToRetain;
    }
    
    /** Sets the value of the 'earliestCommitToRetain' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder setEarliestCommitToRetain(java.lang.String value) {
      validate(fields()[3], value);
      this.earliestCommitToRetain = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'earliestCommitToRetain' field has been set */
    public boolean hasEarliestCommitToRetain() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'earliestCommitToRetain' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder clearEarliestCommitToRetain() {
      earliestCommitToRetain = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'partitionMetadata' field */
    public java.util.Map getPartitionMetadata() {
      return partitionMetadata;
    }
    
    /** Sets the value of the 'partitionMetadata' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder setPartitionMetadata(java.util.Map value) {
      validate(fields()[4], value);
      this.partitionMetadata = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'partitionMetadata' field has been set */
    public boolean hasPartitionMetadata() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'partitionMetadata' field */
    public com.uber.hoodie.avro.model.HoodieCleanMetadata.Builder clearPartitionMetadata() {
      partitionMetadata = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    @Override
    public HoodieCleanMetadata build() {
      try {
        HoodieCleanMetadata record = new HoodieCleanMetadata();
        record.startCleanTime = fieldSetFlags()[0] ? this.startCleanTime : (java.lang.String) defaultValue(fields()[0]);
        record.timeTakenInMillis = fieldSetFlags()[1] ? this.timeTakenInMillis : (java.lang.Long) defaultValue(fields()[1]);
        record.totalFilesDeleted = fieldSetFlags()[2] ? this.totalFilesDeleted : (java.lang.Integer) defaultValue(fields()[2]);
        record.earliestCommitToRetain = fieldSetFlags()[3] ? this.earliestCommitToRetain : (java.lang.String) defaultValue(fields()[3]);
        record.partitionMetadata = fieldSetFlags()[4] ? this.partitionMetadata : (java.util.Map) defaultValue(fields()[4]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy