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