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.0.6
Show newest version


package org.graylog2.indexer.cluster.health;

import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.elasticsearch.common.unit.ByteSizeValue;

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

  private final String name;

  private final String ip;

  private final String host;

  private final ByteSizeValue diskTotal;

  private final ByteSizeValue diskUsed;

  private final ByteSizeValue diskAvailable;

  private final Double diskUsedPercent;

  AutoValue_NodeDiskUsageStats(
      String name,
      String ip,
      @Nullable String host,
      ByteSizeValue diskTotal,
      ByteSizeValue diskUsed,
      ByteSizeValue diskAvailable,
      Double diskUsedPercent) {
    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 (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 String ip() {
    return ip;
  }

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

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

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

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

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

  @Override
  public String toString() {
    return "NodeDiskUsageStats{"
         + "name=" + name + ", "
         + "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.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$ ^= 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