org.graylog.plugins.sidecar.rest.responses.AutoValue_ValidationResponse Maven / Gradle / Ivy
package org.graylog.plugins.sidecar.rest.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ValidationResponse extends ValidationResponse {
private final boolean error;
private final String errorMessage;
AutoValue_ValidationResponse(
boolean error,
@Nullable String errorMessage) {
this.error = error;
this.errorMessage = errorMessage;
}
@JsonProperty
@Override
public boolean error() {
return error;
}
@JsonProperty
@Nullable
@Override
public String errorMessage() {
return errorMessage;
}
@Override
public String toString() {
return "ValidationResponse{"
+ "error=" + error + ", "
+ "errorMessage=" + errorMessage
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ValidationResponse) {
ValidationResponse that = (ValidationResponse) o;
return this.error == that.error()
&& (this.errorMessage == null ? that.errorMessage() == null : this.errorMessage.equals(that.errorMessage()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= error ? 1231 : 1237;
h$ *= 1000003;
h$ ^= (errorMessage == null) ? 0 : errorMessage.hashCode();
return h$;
}
}