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