org.graylog.plugins.views.search.searchtypes.pivot.AutoValue_SeriesSort Maven / Gradle / Ivy
package org.graylog.plugins.views.search.searchtypes.pivot;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SeriesSort extends SeriesSort {
private final String type;
private final String field;
private final SortSpec.Direction direction;
AutoValue_SeriesSort(
String type,
String field,
SortSpec.Direction direction) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (field == null) {
throw new NullPointerException("Null field");
}
this.field = field;
if (direction == null) {
throw new NullPointerException("Null direction");
}
this.direction = direction;
}
@JsonProperty("type")
@Override
public String type() {
return type;
}
@JsonProperty("field")
@Override
public String field() {
return field;
}
@JsonProperty("direction")
@Override
public SortSpec.Direction direction() {
return direction;
}
@Override
public String toString() {
return "SeriesSort{"
+ "type=" + type + ", "
+ "field=" + field + ", "
+ "direction=" + direction
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SeriesSort) {
SeriesSort that = (SeriesSort) o;
return this.type.equals(that.type())
&& this.field.equals(that.field())
&& this.direction.equals(that.direction());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= field.hashCode();
h$ *= 1000003;
h$ ^= direction.hashCode();
return h$;
}
}