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

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

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

import java.util.EnumSet;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

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

  private final String name;

  private final EnumSet roles;

  private final String ip;

  @Nullable
  private final String host;

  private final ByteSize diskTotal;

  private final ByteSize diskUsed;

  private final ByteSize diskAvailable;

  private final Double diskUsedPercent;

  AutoValue_NodeDiskUsageStats(
      String name,
      EnumSet roles,
      String ip,
      @Nullable String host,
      ByteSize diskTotal,
      ByteSize diskUsed,
      ByteSize diskAvailable,
      Double diskUsedPercent) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (roles == null) {
      throw new NullPointerException("Null roles");
    }
    this.roles = roles;
    if (ip == null) {
      throw new NullPointerException("Null ip");
    }
    this.ip = ip;
    this.host = host;
    if (diskTotal == null) {
      throw new NullPointerException("Null diskTotal");
    }
    this.diskTotal = diskTotal;
    if (diskUsed == null) {
      throw new NullPointerException("Null diskUsed");
    }
    this.diskUsed = diskUsed;
    if (diskAvailable == null) {
      throw new NullPointerException("Null diskAvailable");
    }
    this.diskAvailable = diskAvailable;
    if (diskUsedPercent == null) {
      throw new NullPointerException("Null diskUsedPercent");
    }
    this.diskUsedPercent = diskUsedPercent;
  }

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

  @Override
  public EnumSet roles() {
    return roles;
  }

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

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

  @Override
  public ByteSize diskTotal() {
    return diskTotal;
  }

  @Override
  public ByteSize diskUsed() {
    return diskUsed;
  }

  @Override
  public ByteSize diskAvailable() {
    return diskAvailable;
  }

  @Override
  public Double diskUsedPercent() {
    return diskUsedPercent;
  }

  @Override
  public String toString() {
    return "NodeDiskUsageStats{"
        + "name=" + name + ", "
        + "roles=" + roles + ", "
        + "ip=" + ip + ", "
        + "host=" + host + ", "
        + "diskTotal=" + diskTotal + ", "
        + "diskUsed=" + diskUsed + ", "
        + "diskAvailable=" + diskAvailable + ", "
        + "diskUsedPercent=" + diskUsedPercent
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NodeDiskUsageStats) {
      NodeDiskUsageStats that = (NodeDiskUsageStats) o;
      return this.name.equals(that.name())
          && this.roles.equals(that.roles())
          && this.ip.equals(that.ip())
          && (this.host == null ? that.host() == null : this.host.equals(that.host()))
          && this.diskTotal.equals(that.diskTotal())
          && this.diskUsed.equals(that.diskUsed())
          && this.diskAvailable.equals(that.diskAvailable())
          && this.diskUsedPercent.equals(that.diskUsedPercent());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy