org.graylog2.rest.models.system.cluster.responses.$AutoValue_NodeSummary Maven / Gradle / Ivy
package org.graylog2.rest.models.system.cluster.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_NodeSummary extends NodeSummary {
private final String clusterId;
private final String nodeId;
private final String type;
private final boolean isLeader;
private final String transportAddress;
private final String lastSeen;
private final String shortNodeId;
private final String hostname;
$AutoValue_NodeSummary(
String clusterId,
String nodeId,
String type,
boolean isLeader,
String transportAddress,
String lastSeen,
String shortNodeId,
String hostname) {
if (clusterId == null) {
throw new NullPointerException("Null clusterId");
}
this.clusterId = clusterId;
if (nodeId == null) {
throw new NullPointerException("Null nodeId");
}
this.nodeId = nodeId;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
this.isLeader = isLeader;
if (transportAddress == null) {
throw new NullPointerException("Null transportAddress");
}
this.transportAddress = transportAddress;
if (lastSeen == null) {
throw new NullPointerException("Null lastSeen");
}
this.lastSeen = lastSeen;
if (shortNodeId == null) {
throw new NullPointerException("Null shortNodeId");
}
this.shortNodeId = shortNodeId;
if (hostname == null) {
throw new NullPointerException("Null hostname");
}
this.hostname = hostname;
}
@JsonProperty
@Override
public String clusterId() {
return clusterId;
}
@JsonProperty
@Override
public String nodeId() {
return nodeId;
}
@JsonProperty
@Override
public String type() {
return type;
}
@JsonProperty("is_leader")
@Override
public boolean isLeader() {
return isLeader;
}
@JsonProperty
@Override
public String transportAddress() {
return transportAddress;
}
@JsonProperty
@Override
public String lastSeen() {
return lastSeen;
}
@JsonProperty
@Override
public String shortNodeId() {
return shortNodeId;
}
@JsonProperty
@Override
public String hostname() {
return hostname;
}
@Override
public String toString() {
return "NodeSummary{"
+ "clusterId=" + clusterId + ", "
+ "nodeId=" + nodeId + ", "
+ "type=" + type + ", "
+ "isLeader=" + isLeader + ", "
+ "transportAddress=" + transportAddress + ", "
+ "lastSeen=" + lastSeen + ", "
+ "shortNodeId=" + shortNodeId + ", "
+ "hostname=" + hostname
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof NodeSummary) {
NodeSummary that = (NodeSummary) o;
return this.clusterId.equals(that.clusterId())
&& this.nodeId.equals(that.nodeId())
&& this.type.equals(that.type())
&& this.isLeader == that.isLeader()
&& this.transportAddress.equals(that.transportAddress())
&& this.lastSeen.equals(that.lastSeen())
&& this.shortNodeId.equals(that.shortNodeId())
&& this.hostname.equals(that.hostname());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= clusterId.hashCode();
h$ *= 1000003;
h$ ^= nodeId.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= isLeader ? 1231 : 1237;
h$ *= 1000003;
h$ ^= transportAddress.hashCode();
h$ *= 1000003;
h$ ^= lastSeen.hashCode();
h$ *= 1000003;
h$ ^= shortNodeId.hashCode();
h$ *= 1000003;
h$ ^= hostname.hashCode();
return h$;
}
}