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

org.graylog2.indexer.cluster.health.AutoValue_NodeFileDescriptorStats Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.indexer.cluster.health;

import java.util.Optional;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NodeFileDescriptorStats extends NodeFileDescriptorStats {

  private final String name;

  private final String ip;

  private final String host;

  private final Optional fileDescriptorMax;

  AutoValue_NodeFileDescriptorStats(
      String name,
      String ip,
      @Nullable String host,
      Optional fileDescriptorMax) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (ip == null) {
      throw new NullPointerException("Null ip");
    }
    this.ip = ip;
    this.host = host;
    if (fileDescriptorMax == null) {
      throw new NullPointerException("Null fileDescriptorMax");
    }
    this.fileDescriptorMax = fileDescriptorMax;
  }

  @Override
  public String name() {
    return name;
  }

  @Override
  public String ip() {
    return ip;
  }

  @Nullable
  @Override
  public String host() {
    return host;
  }

  @Override
  public Optional fileDescriptorMax() {
    return fileDescriptorMax;
  }

  @Override
  public String toString() {
    return "NodeFileDescriptorStats{"
        + "name=" + name + ", "
        + "ip=" + ip + ", "
        + "host=" + host + ", "
        + "fileDescriptorMax=" + fileDescriptorMax
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NodeFileDescriptorStats) {
      NodeFileDescriptorStats that = (NodeFileDescriptorStats) o;
      return this.name.equals(that.name())
          && this.ip.equals(that.ip())
          && (this.host == null ? that.host() == null : this.host.equals(that.host()))
          && this.fileDescriptorMax.equals(that.fileDescriptorMax());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= ip.hashCode();
    h$ *= 1000003;
    h$ ^= (host == null) ? 0 : host.hashCode();
    h$ *= 1000003;
    h$ ^= fileDescriptorMax.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy