org.graylog2.rest.resources.search.responses.AutoValue_QueryParseError Maven / Gradle / Ivy
package org.graylog2.rest.resources.search.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_QueryParseError extends QueryParseError {
private final String message;
private final Collection details;
private final Integer line;
private final Integer column;
AutoValue_QueryParseError(
String message,
Collection details,
@Nullable Integer line,
@Nullable Integer column) {
if (message == null) {
throw new NullPointerException("Null message");
}
this.message = message;
if (details == null) {
throw new NullPointerException("Null details");
}
this.details = details;
this.line = line;
this.column = column;
}
@JsonProperty
@Override
public String message() {
return message;
}
@JsonProperty
@Override
public Collection details() {
return details;
}
@JsonProperty
@Nullable
@Override
public Integer line() {
return line;
}
@JsonProperty
@Nullable
@Override
public Integer column() {
return column;
}
@Override
public String toString() {
return "QueryParseError{"
+ "message=" + message + ", "
+ "details=" + details + ", "
+ "line=" + line + ", "
+ "column=" + column
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof QueryParseError) {
QueryParseError that = (QueryParseError) o;
return this.message.equals(that.message())
&& this.details.equals(that.details())
&& (this.line == null ? that.line() == null : this.line.equals(that.line()))
&& (this.column == null ? that.column() == null : this.column.equals(that.column()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= message.hashCode();
h$ *= 1000003;
h$ ^= details.hashCode();
h$ *= 1000003;
h$ ^= (line == null) ? 0 : line.hashCode();
h$ *= 1000003;
h$ ^= (column == null) ? 0 : column.hashCode();
return h$;
}
}