org.graylog.plugins.sidecar.rest.requests.AutoValue_RegistrationRequest Maven / Gradle / Ivy
package org.graylog.plugins.sidecar.rest.requests;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.graylog.plugins.sidecar.rest.models.NodeDetails;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_RegistrationRequest extends RegistrationRequest {
private final @NotNull @Size(min = 1) String nodeName;
private final NodeDetails nodeDetails;
AutoValue_RegistrationRequest(
@NotNull @Size(min = 1) String nodeName,
NodeDetails nodeDetails) {
if (nodeName == null) {
throw new NullPointerException("Null nodeName");
}
this.nodeName = nodeName;
if (nodeDetails == null) {
throw new NullPointerException("Null nodeDetails");
}
this.nodeDetails = nodeDetails;
}
@JsonProperty("node_name")
@Override
public @NotNull @Size(min = 1) String nodeName() {
return nodeName;
}
@JsonProperty("node_details")
@Override
public NodeDetails nodeDetails() {
return nodeDetails;
}
@Override
public String toString() {
return "RegistrationRequest{"
+ "nodeName=" + nodeName + ", "
+ "nodeDetails=" + nodeDetails
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof RegistrationRequest) {
RegistrationRequest that = (RegistrationRequest) o;
return this.nodeName.equals(that.nodeName())
&& this.nodeDetails.equals(that.nodeDetails());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= nodeName.hashCode();
h$ *= 1000003;
h$ ^= nodeDetails.hashCode();
return h$;
}
}