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

org.apache.flume.serialization.TransferStateFileMeta Maven / Gradle / Ivy

There is a newer version: 4.15.0-HBase-1.5
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.apache.flume.serialization;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class TransferStateFileMeta 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\":\"TransferStateFileMeta\",\"namespace\":\"org.apache.flume.serialization\",\"fields\":[{\"name\":\"offset\",\"type\":\"long\"}]}");
  @Deprecated public long offset;

  /**
   * Default constructor.
   */
  public TransferStateFileMeta() {}

  /**
   * All-args constructor.
   */
  public TransferStateFileMeta(java.lang.Long offset) {
    this.offset = offset;
  }

  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 offset;
    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: offset = (java.lang.Long)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

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

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

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

    private long offset;

    /** Creates a new Builder */
    private Builder() {
      super(org.apache.flume.serialization.TransferStateFileMeta.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.apache.flume.serialization.TransferStateFileMeta.Builder other) {
      super(other);
    }
    
    /** Creates a Builder by copying an existing TransferStateFileMeta instance */
    private Builder(org.apache.flume.serialization.TransferStateFileMeta other) {
            super(org.apache.flume.serialization.TransferStateFileMeta.SCHEMA$);
      if (isValidValue(fields()[0], other.offset)) {
        this.offset = data().deepCopy(fields()[0].schema(), other.offset);
        fieldSetFlags()[0] = true;
      }
    }

    /** Gets the value of the 'offset' field */
    public java.lang.Long getOffset() {
      return offset;
    }
    
    /** Sets the value of the 'offset' field */
    public org.apache.flume.serialization.TransferStateFileMeta.Builder setOffset(long value) {
      validate(fields()[0], value);
      this.offset = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'offset' field has been set */
    public boolean hasOffset() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'offset' field */
    public org.apache.flume.serialization.TransferStateFileMeta.Builder clearOffset() {
      fieldSetFlags()[0] = false;
      return this;
    }

    @Override
    public TransferStateFileMeta build() {
      try {
        TransferStateFileMeta record = new TransferStateFileMeta();
        record.offset = fieldSetFlags()[0] ? this.offset : (java.lang.Long) defaultValue(fields()[0]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy