org.graylog.plugins.views.search.searchtypes.pivot.buckets.AutoValue_Values Maven / Gradle / Ivy
package org.graylog.plugins.views.search.searchtypes.pivot.buckets;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Values extends Values {
private final String type;
private final String field;
private final int limit;
private AutoValue_Values(
String type,
String field,
int limit) {
this.type = type;
this.field = field;
this.limit = limit;
}
@Override
public String type() {
return type;
}
@JsonProperty
@Override
public String field() {
return field;
}
@JsonProperty
@Override
public int limit() {
return limit;
}
@Override
public String toString() {
return "Values{"
+ "type=" + type + ", "
+ "field=" + field + ", "
+ "limit=" + limit
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Values) {
Values that = (Values) o;
return (this.type.equals(that.type()))
&& (this.field.equals(that.field()))
&& (this.limit == that.limit());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= field.hashCode();
h$ *= 1000003;
h$ ^= limit;
return h$;
}
static final class Builder extends Values.Builder {
private String type;
private String field;
private Integer limit;
Builder() {
}
@Override
public Values.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public Values.Builder field(String field) {
if (field == null) {
throw new NullPointerException("Null field");
}
this.field = field;
return this;
}
@Override
public Values.Builder limit(int limit) {
this.limit = limit;
return this;
}
@Override
public Values build() {
String missing = "";
if (this.type == null) {
missing += " type";
}
if (this.field == null) {
missing += " field";
}
if (this.limit == null) {
missing += " limit";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_Values(
this.type,
this.field,
this.limit);
}
}
}