org.graylog2.indexer.cluster.AutoValue_NodeFileDescriptorStats Maven / Gradle / Ivy
package org.graylog2.indexer.cluster;
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 ^= this.name.hashCode();
h *= 1000003;
h ^= this.ip.hashCode();
h *= 1000003;
h ^= (host == null) ? 0 : this.host.hashCode();
h *= 1000003;
h ^= this.fileDescriptorMax.hashCode();
return h;
}
}