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

com.pinterest.doctorkafka.ReplicaStat Maven / Gradle / Ivy

There is a newer version: 0.3.0-rc.2
Show newest version
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package com.pinterest.doctorkafka;

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 ReplicaStat extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = -6012653331275498829L;
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ReplicaStat\",\"namespace\":\"com.pinterest.doctorkafka\",\"fields\":[{\"name\":\"timestamp\",\"type\":\"long\"},{\"name\":\"topic\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"partition\",\"type\":\"int\"},{\"name\":\"isLeader\",\"type\":\"boolean\"},{\"name\":\"inReassignment\",\"type\":\"boolean\"},{\"name\":\"underReplicated\",\"type\":\"boolean\"},{\"name\":\"bytesIn1MinMeanRate\",\"type\":\"long\"},{\"name\":\"bytesIn5MinMeanRate\",\"type\":\"long\"},{\"name\":\"bytesIn15MinMeanRate\",\"type\":\"long\"},{\"name\":\"bytesOut1MinMeanRate\",\"type\":\"long\"},{\"name\":\"bytesOut5MinMeanRate\",\"type\":\"long\"},{\"name\":\"bytesOut15MinMeanRate\",\"type\":\"long\"},{\"name\":\"startOffset\",\"type\":\"long\"},{\"name\":\"endOffset\",\"type\":\"long\"},{\"name\":\"cpuUsage\",\"type\":\"double\"},{\"name\":\"logSizeInBytes\",\"type\":\"long\"},{\"name\":\"numLogSegments\",\"type\":\"int\"}]}");
  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 ReplicaStat to a ByteBuffer. */
  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
    return ENCODER.encode(this);
  }

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

  @Deprecated public long timestamp;
  @Deprecated public java.lang.String topic;
  @Deprecated public int partition;
  @Deprecated public boolean isLeader;
  @Deprecated public boolean inReassignment;
  @Deprecated public boolean underReplicated;
  @Deprecated public long bytesIn1MinMeanRate;
  @Deprecated public long bytesIn5MinMeanRate;
  @Deprecated public long bytesIn15MinMeanRate;
  @Deprecated public long bytesOut1MinMeanRate;
  @Deprecated public long bytesOut5MinMeanRate;
  @Deprecated public long bytesOut15MinMeanRate;
  @Deprecated public long startOffset;
  @Deprecated public long endOffset;
  @Deprecated public double cpuUsage;
  @Deprecated public long logSizeInBytes;
  @Deprecated public int numLogSegments;

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

  /**
   * All-args constructor.
   * @param timestamp The new value for timestamp
   * @param topic The new value for topic
   * @param partition The new value for partition
   * @param isLeader The new value for isLeader
   * @param inReassignment The new value for inReassignment
   * @param underReplicated The new value for underReplicated
   * @param bytesIn1MinMeanRate The new value for bytesIn1MinMeanRate
   * @param bytesIn5MinMeanRate The new value for bytesIn5MinMeanRate
   * @param bytesIn15MinMeanRate The new value for bytesIn15MinMeanRate
   * @param bytesOut1MinMeanRate The new value for bytesOut1MinMeanRate
   * @param bytesOut5MinMeanRate The new value for bytesOut5MinMeanRate
   * @param bytesOut15MinMeanRate The new value for bytesOut15MinMeanRate
   * @param startOffset The new value for startOffset
   * @param endOffset The new value for endOffset
   * @param cpuUsage The new value for cpuUsage
   * @param logSizeInBytes The new value for logSizeInBytes
   * @param numLogSegments The new value for numLogSegments
   */
  public ReplicaStat(java.lang.Long timestamp, java.lang.String topic, java.lang.Integer partition, java.lang.Boolean isLeader, java.lang.Boolean inReassignment, java.lang.Boolean underReplicated, java.lang.Long bytesIn1MinMeanRate, java.lang.Long bytesIn5MinMeanRate, java.lang.Long bytesIn15MinMeanRate, java.lang.Long bytesOut1MinMeanRate, java.lang.Long bytesOut5MinMeanRate, java.lang.Long bytesOut15MinMeanRate, java.lang.Long startOffset, java.lang.Long endOffset, java.lang.Double cpuUsage, java.lang.Long logSizeInBytes, java.lang.Integer numLogSegments) {
    this.timestamp = timestamp;
    this.topic = topic;
    this.partition = partition;
    this.isLeader = isLeader;
    this.inReassignment = inReassignment;
    this.underReplicated = underReplicated;
    this.bytesIn1MinMeanRate = bytesIn1MinMeanRate;
    this.bytesIn5MinMeanRate = bytesIn5MinMeanRate;
    this.bytesIn15MinMeanRate = bytesIn15MinMeanRate;
    this.bytesOut1MinMeanRate = bytesOut1MinMeanRate;
    this.bytesOut5MinMeanRate = bytesOut5MinMeanRate;
    this.bytesOut15MinMeanRate = bytesOut15MinMeanRate;
    this.startOffset = startOffset;
    this.endOffset = endOffset;
    this.cpuUsage = cpuUsage;
    this.logSizeInBytes = logSizeInBytes;
    this.numLogSegments = numLogSegments;
  }

  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 timestamp;
    case 1: return topic;
    case 2: return partition;
    case 3: return isLeader;
    case 4: return inReassignment;
    case 5: return underReplicated;
    case 6: return bytesIn1MinMeanRate;
    case 7: return bytesIn5MinMeanRate;
    case 8: return bytesIn15MinMeanRate;
    case 9: return bytesOut1MinMeanRate;
    case 10: return bytesOut5MinMeanRate;
    case 11: return bytesOut15MinMeanRate;
    case 12: return startOffset;
    case 13: return endOffset;
    case 14: return cpuUsage;
    case 15: return logSizeInBytes;
    case 16: return numLogSegments;
    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: timestamp = (java.lang.Long)value$; break;
    case 1: topic = (java.lang.String)value$; break;
    case 2: partition = (java.lang.Integer)value$; break;
    case 3: isLeader = (java.lang.Boolean)value$; break;
    case 4: inReassignment = (java.lang.Boolean)value$; break;
    case 5: underReplicated = (java.lang.Boolean)value$; break;
    case 6: bytesIn1MinMeanRate = (java.lang.Long)value$; break;
    case 7: bytesIn5MinMeanRate = (java.lang.Long)value$; break;
    case 8: bytesIn15MinMeanRate = (java.lang.Long)value$; break;
    case 9: bytesOut1MinMeanRate = (java.lang.Long)value$; break;
    case 10: bytesOut5MinMeanRate = (java.lang.Long)value$; break;
    case 11: bytesOut15MinMeanRate = (java.lang.Long)value$; break;
    case 12: startOffset = (java.lang.Long)value$; break;
    case 13: endOffset = (java.lang.Long)value$; break;
    case 14: cpuUsage = (java.lang.Double)value$; break;
    case 15: logSizeInBytes = (java.lang.Long)value$; break;
    case 16: numLogSegments = (java.lang.Integer)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * Gets the value of the 'cpuUsage' field.
   * @return The value of the 'cpuUsage' field.
   */
  public java.lang.Double getCpuUsage() {
    return cpuUsage;
  }

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

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

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

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

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

  /**
   * Creates a new ReplicaStat RecordBuilder.
   * @return A new ReplicaStat RecordBuilder
   */
  public static com.pinterest.doctorkafka.ReplicaStat.Builder newBuilder() {
    return new com.pinterest.doctorkafka.ReplicaStat.Builder();
  }

  /**
   * Creates a new ReplicaStat RecordBuilder by copying an existing Builder.
   * @param other The existing builder to copy.
   * @return A new ReplicaStat RecordBuilder
   */
  public static com.pinterest.doctorkafka.ReplicaStat.Builder newBuilder(com.pinterest.doctorkafka.ReplicaStat.Builder other) {
    return new com.pinterest.doctorkafka.ReplicaStat.Builder(other);
  }

  /**
   * Creates a new ReplicaStat RecordBuilder by copying an existing ReplicaStat instance.
   * @param other The existing instance to copy.
   * @return A new ReplicaStat RecordBuilder
   */
  public static com.pinterest.doctorkafka.ReplicaStat.Builder newBuilder(com.pinterest.doctorkafka.ReplicaStat other) {
    return new com.pinterest.doctorkafka.ReplicaStat.Builder(other);
  }

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

    private long timestamp;
    private java.lang.String topic;
    private int partition;
    private boolean isLeader;
    private boolean inReassignment;
    private boolean underReplicated;
    private long bytesIn1MinMeanRate;
    private long bytesIn5MinMeanRate;
    private long bytesIn15MinMeanRate;
    private long bytesOut1MinMeanRate;
    private long bytesOut5MinMeanRate;
    private long bytesOut15MinMeanRate;
    private long startOffset;
    private long endOffset;
    private double cpuUsage;
    private long logSizeInBytes;
    private int numLogSegments;

    /** 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(com.pinterest.doctorkafka.ReplicaStat.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.timestamp)) {
        this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.topic)) {
        this.topic = data().deepCopy(fields()[1].schema(), other.topic);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.partition)) {
        this.partition = data().deepCopy(fields()[2].schema(), other.partition);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.isLeader)) {
        this.isLeader = data().deepCopy(fields()[3].schema(), other.isLeader);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.inReassignment)) {
        this.inReassignment = data().deepCopy(fields()[4].schema(), other.inReassignment);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.underReplicated)) {
        this.underReplicated = data().deepCopy(fields()[5].schema(), other.underReplicated);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.bytesIn1MinMeanRate)) {
        this.bytesIn1MinMeanRate = data().deepCopy(fields()[6].schema(), other.bytesIn1MinMeanRate);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.bytesIn5MinMeanRate)) {
        this.bytesIn5MinMeanRate = data().deepCopy(fields()[7].schema(), other.bytesIn5MinMeanRate);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.bytesIn15MinMeanRate)) {
        this.bytesIn15MinMeanRate = data().deepCopy(fields()[8].schema(), other.bytesIn15MinMeanRate);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.bytesOut1MinMeanRate)) {
        this.bytesOut1MinMeanRate = data().deepCopy(fields()[9].schema(), other.bytesOut1MinMeanRate);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.bytesOut5MinMeanRate)) {
        this.bytesOut5MinMeanRate = data().deepCopy(fields()[10].schema(), other.bytesOut5MinMeanRate);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.bytesOut15MinMeanRate)) {
        this.bytesOut15MinMeanRate = data().deepCopy(fields()[11].schema(), other.bytesOut15MinMeanRate);
        fieldSetFlags()[11] = true;
      }
      if (isValidValue(fields()[12], other.startOffset)) {
        this.startOffset = data().deepCopy(fields()[12].schema(), other.startOffset);
        fieldSetFlags()[12] = true;
      }
      if (isValidValue(fields()[13], other.endOffset)) {
        this.endOffset = data().deepCopy(fields()[13].schema(), other.endOffset);
        fieldSetFlags()[13] = true;
      }
      if (isValidValue(fields()[14], other.cpuUsage)) {
        this.cpuUsage = data().deepCopy(fields()[14].schema(), other.cpuUsage);
        fieldSetFlags()[14] = true;
      }
      if (isValidValue(fields()[15], other.logSizeInBytes)) {
        this.logSizeInBytes = data().deepCopy(fields()[15].schema(), other.logSizeInBytes);
        fieldSetFlags()[15] = true;
      }
      if (isValidValue(fields()[16], other.numLogSegments)) {
        this.numLogSegments = data().deepCopy(fields()[16].schema(), other.numLogSegments);
        fieldSetFlags()[16] = true;
      }
    }

    /**
     * Creates a Builder by copying an existing ReplicaStat instance
     * @param other The existing instance to copy.
     */
    private Builder(com.pinterest.doctorkafka.ReplicaStat other) {
            super(SCHEMA$);
      if (isValidValue(fields()[0], other.timestamp)) {
        this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.topic)) {
        this.topic = data().deepCopy(fields()[1].schema(), other.topic);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.partition)) {
        this.partition = data().deepCopy(fields()[2].schema(), other.partition);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.isLeader)) {
        this.isLeader = data().deepCopy(fields()[3].schema(), other.isLeader);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.inReassignment)) {
        this.inReassignment = data().deepCopy(fields()[4].schema(), other.inReassignment);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.underReplicated)) {
        this.underReplicated = data().deepCopy(fields()[5].schema(), other.underReplicated);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.bytesIn1MinMeanRate)) {
        this.bytesIn1MinMeanRate = data().deepCopy(fields()[6].schema(), other.bytesIn1MinMeanRate);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.bytesIn5MinMeanRate)) {
        this.bytesIn5MinMeanRate = data().deepCopy(fields()[7].schema(), other.bytesIn5MinMeanRate);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.bytesIn15MinMeanRate)) {
        this.bytesIn15MinMeanRate = data().deepCopy(fields()[8].schema(), other.bytesIn15MinMeanRate);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.bytesOut1MinMeanRate)) {
        this.bytesOut1MinMeanRate = data().deepCopy(fields()[9].schema(), other.bytesOut1MinMeanRate);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.bytesOut5MinMeanRate)) {
        this.bytesOut5MinMeanRate = data().deepCopy(fields()[10].schema(), other.bytesOut5MinMeanRate);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.bytesOut15MinMeanRate)) {
        this.bytesOut15MinMeanRate = data().deepCopy(fields()[11].schema(), other.bytesOut15MinMeanRate);
        fieldSetFlags()[11] = true;
      }
      if (isValidValue(fields()[12], other.startOffset)) {
        this.startOffset = data().deepCopy(fields()[12].schema(), other.startOffset);
        fieldSetFlags()[12] = true;
      }
      if (isValidValue(fields()[13], other.endOffset)) {
        this.endOffset = data().deepCopy(fields()[13].schema(), other.endOffset);
        fieldSetFlags()[13] = true;
      }
      if (isValidValue(fields()[14], other.cpuUsage)) {
        this.cpuUsage = data().deepCopy(fields()[14].schema(), other.cpuUsage);
        fieldSetFlags()[14] = true;
      }
      if (isValidValue(fields()[15], other.logSizeInBytes)) {
        this.logSizeInBytes = data().deepCopy(fields()[15].schema(), other.logSizeInBytes);
        fieldSetFlags()[15] = true;
      }
      if (isValidValue(fields()[16], other.numLogSegments)) {
        this.numLogSegments = data().deepCopy(fields()[16].schema(), other.numLogSegments);
        fieldSetFlags()[16] = true;
      }
    }

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

    /**
      * Sets the value of the 'timestamp' field.
      * @param value The value of 'timestamp'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setTimestamp(long value) {
      validate(fields()[0], value);
      this.timestamp = value;
      fieldSetFlags()[0] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'timestamp' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearTimestamp() {
      fieldSetFlags()[0] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'topic' field.
      * @param value The value of 'topic'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setTopic(java.lang.String value) {
      validate(fields()[1], value);
      this.topic = value;
      fieldSetFlags()[1] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'topic' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearTopic() {
      topic = null;
      fieldSetFlags()[1] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'partition' field.
      * @param value The value of 'partition'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setPartition(int value) {
      validate(fields()[2], value);
      this.partition = value;
      fieldSetFlags()[2] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'partition' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearPartition() {
      fieldSetFlags()[2] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'isLeader' field.
      * @param value The value of 'isLeader'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setIsLeader(boolean value) {
      validate(fields()[3], value);
      this.isLeader = value;
      fieldSetFlags()[3] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'isLeader' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearIsLeader() {
      fieldSetFlags()[3] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'inReassignment' field.
      * @param value The value of 'inReassignment'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setInReassignment(boolean value) {
      validate(fields()[4], value);
      this.inReassignment = value;
      fieldSetFlags()[4] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'inReassignment' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearInReassignment() {
      fieldSetFlags()[4] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'underReplicated' field.
      * @param value The value of 'underReplicated'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setUnderReplicated(boolean value) {
      validate(fields()[5], value);
      this.underReplicated = value;
      fieldSetFlags()[5] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'underReplicated' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearUnderReplicated() {
      fieldSetFlags()[5] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'bytesIn1MinMeanRate' field.
      * @param value The value of 'bytesIn1MinMeanRate'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setBytesIn1MinMeanRate(long value) {
      validate(fields()[6], value);
      this.bytesIn1MinMeanRate = value;
      fieldSetFlags()[6] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'bytesIn1MinMeanRate' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearBytesIn1MinMeanRate() {
      fieldSetFlags()[6] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'bytesIn5MinMeanRate' field.
      * @param value The value of 'bytesIn5MinMeanRate'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setBytesIn5MinMeanRate(long value) {
      validate(fields()[7], value);
      this.bytesIn5MinMeanRate = value;
      fieldSetFlags()[7] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'bytesIn5MinMeanRate' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearBytesIn5MinMeanRate() {
      fieldSetFlags()[7] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'bytesIn15MinMeanRate' field.
      * @param value The value of 'bytesIn15MinMeanRate'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setBytesIn15MinMeanRate(long value) {
      validate(fields()[8], value);
      this.bytesIn15MinMeanRate = value;
      fieldSetFlags()[8] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'bytesIn15MinMeanRate' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearBytesIn15MinMeanRate() {
      fieldSetFlags()[8] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'bytesOut1MinMeanRate' field.
      * @param value The value of 'bytesOut1MinMeanRate'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setBytesOut1MinMeanRate(long value) {
      validate(fields()[9], value);
      this.bytesOut1MinMeanRate = value;
      fieldSetFlags()[9] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'bytesOut1MinMeanRate' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearBytesOut1MinMeanRate() {
      fieldSetFlags()[9] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'bytesOut5MinMeanRate' field.
      * @param value The value of 'bytesOut5MinMeanRate'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setBytesOut5MinMeanRate(long value) {
      validate(fields()[10], value);
      this.bytesOut5MinMeanRate = value;
      fieldSetFlags()[10] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'bytesOut5MinMeanRate' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearBytesOut5MinMeanRate() {
      fieldSetFlags()[10] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'bytesOut15MinMeanRate' field.
      * @param value The value of 'bytesOut15MinMeanRate'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setBytesOut15MinMeanRate(long value) {
      validate(fields()[11], value);
      this.bytesOut15MinMeanRate = value;
      fieldSetFlags()[11] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'bytesOut15MinMeanRate' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearBytesOut15MinMeanRate() {
      fieldSetFlags()[11] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'startOffset' field.
      * @param value The value of 'startOffset'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setStartOffset(long value) {
      validate(fields()[12], value);
      this.startOffset = value;
      fieldSetFlags()[12] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'startOffset' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearStartOffset() {
      fieldSetFlags()[12] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'endOffset' field.
      * @param value The value of 'endOffset'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setEndOffset(long value) {
      validate(fields()[13], value);
      this.endOffset = value;
      fieldSetFlags()[13] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'endOffset' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearEndOffset() {
      fieldSetFlags()[13] = false;
      return this;
    }

    /**
      * Gets the value of the 'cpuUsage' field.
      * @return The value.
      */
    public java.lang.Double getCpuUsage() {
      return cpuUsage;
    }

    /**
      * Sets the value of the 'cpuUsage' field.
      * @param value The value of 'cpuUsage'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setCpuUsage(double value) {
      validate(fields()[14], value);
      this.cpuUsage = value;
      fieldSetFlags()[14] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'cpuUsage' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearCpuUsage() {
      fieldSetFlags()[14] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'logSizeInBytes' field.
      * @param value The value of 'logSizeInBytes'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setLogSizeInBytes(long value) {
      validate(fields()[15], value);
      this.logSizeInBytes = value;
      fieldSetFlags()[15] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'logSizeInBytes' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearLogSizeInBytes() {
      fieldSetFlags()[15] = false;
      return this;
    }

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

    /**
      * Sets the value of the 'numLogSegments' field.
      * @param value The value of 'numLogSegments'.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder setNumLogSegments(int value) {
      validate(fields()[16], value);
      this.numLogSegments = value;
      fieldSetFlags()[16] = true;
      return this;
    }

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


    /**
      * Clears the value of the 'numLogSegments' field.
      * @return This builder.
      */
    public com.pinterest.doctorkafka.ReplicaStat.Builder clearNumLogSegments() {
      fieldSetFlags()[16] = false;
      return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    public ReplicaStat build() {
      try {
        ReplicaStat record = new ReplicaStat();
        record.timestamp = fieldSetFlags()[0] ? this.timestamp : (java.lang.Long) defaultValue(fields()[0]);
        record.topic = fieldSetFlags()[1] ? this.topic : (java.lang.String) defaultValue(fields()[1]);
        record.partition = fieldSetFlags()[2] ? this.partition : (java.lang.Integer) defaultValue(fields()[2]);
        record.isLeader = fieldSetFlags()[3] ? this.isLeader : (java.lang.Boolean) defaultValue(fields()[3]);
        record.inReassignment = fieldSetFlags()[4] ? this.inReassignment : (java.lang.Boolean) defaultValue(fields()[4]);
        record.underReplicated = fieldSetFlags()[5] ? this.underReplicated : (java.lang.Boolean) defaultValue(fields()[5]);
        record.bytesIn1MinMeanRate = fieldSetFlags()[6] ? this.bytesIn1MinMeanRate : (java.lang.Long) defaultValue(fields()[6]);
        record.bytesIn5MinMeanRate = fieldSetFlags()[7] ? this.bytesIn5MinMeanRate : (java.lang.Long) defaultValue(fields()[7]);
        record.bytesIn15MinMeanRate = fieldSetFlags()[8] ? this.bytesIn15MinMeanRate : (java.lang.Long) defaultValue(fields()[8]);
        record.bytesOut1MinMeanRate = fieldSetFlags()[9] ? this.bytesOut1MinMeanRate : (java.lang.Long) defaultValue(fields()[9]);
        record.bytesOut5MinMeanRate = fieldSetFlags()[10] ? this.bytesOut5MinMeanRate : (java.lang.Long) defaultValue(fields()[10]);
        record.bytesOut15MinMeanRate = fieldSetFlags()[11] ? this.bytesOut15MinMeanRate : (java.lang.Long) defaultValue(fields()[11]);
        record.startOffset = fieldSetFlags()[12] ? this.startOffset : (java.lang.Long) defaultValue(fields()[12]);
        record.endOffset = fieldSetFlags()[13] ? this.endOffset : (java.lang.Long) defaultValue(fields()[13]);
        record.cpuUsage = fieldSetFlags()[14] ? this.cpuUsage : (java.lang.Double) defaultValue(fields()[14]);
        record.logSizeInBytes = fieldSetFlags()[15] ? this.logSizeInBytes : (java.lang.Long) defaultValue(fields()[15]);
        record.numLogSegments = fieldSetFlags()[16] ? this.numLogSegments : (java.lang.Integer) defaultValue(fields()[16]);
        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