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

org.graylog2.shared.messageq.AutoValue_MessageQueueReader_Metrics Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog2.shared.messageq;

import com.codahale.metrics.Meter;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_MessageQueueReader_Metrics extends MessageQueueReader.Metrics {

  private final Meter readMessages;

  private final Meter readBytes;

  private AutoValue_MessageQueueReader_Metrics(
      Meter readMessages,
      Meter readBytes) {
    this.readMessages = readMessages;
    this.readBytes = readBytes;
  }

  @Override
  public Meter readMessages() {
    return readMessages;
  }

  @Override
  public Meter readBytes() {
    return readBytes;
  }

  @Override
  public String toString() {
    return "Metrics{"
        + "readMessages=" + readMessages + ", "
        + "readBytes=" + readBytes
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof MessageQueueReader.Metrics) {
      MessageQueueReader.Metrics that = (MessageQueueReader.Metrics) o;
      return this.readMessages.equals(that.readMessages())
          && this.readBytes.equals(that.readBytes());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= readMessages.hashCode();
    h$ *= 1000003;
    h$ ^= readBytes.hashCode();
    return h$;
  }

  static final class Builder extends MessageQueueReader.Metrics.Builder {
    private Meter readMessages;
    private Meter readBytes;
    Builder() {
    }
    @Override
    public MessageQueueReader.Metrics.Builder readMessages(Meter readMessages) {
      if (readMessages == null) {
        throw new NullPointerException("Null readMessages");
      }
      this.readMessages = readMessages;
      return this;
    }
    @Override
    public MessageQueueReader.Metrics.Builder readBytes(Meter readBytes) {
      if (readBytes == null) {
        throw new NullPointerException("Null readBytes");
      }
      this.readBytes = readBytes;
      return this;
    }
    @Override
    public MessageQueueReader.Metrics build() {
      if (this.readMessages == null
          || this.readBytes == null) {
        StringBuilder missing = new StringBuilder();
        if (this.readMessages == null) {
          missing.append(" readMessages");
        }
        if (this.readBytes == null) {
          missing.append(" readBytes");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_MessageQueueReader_Metrics(
          this.readMessages,
          this.readBytes);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy