org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.viewwidgets.AutoValue_Pivot Maven / Gradle / Ivy
package org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.viewwidgets;
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 String type;
private final PivotConfig config;
private AutoValue_Pivot(
String field,
String type,
PivotConfig config) {
this.field = field;
this.type = type;
this.config = config;
}
@JsonProperty("field")
@Override
public String field() {
return field;
}
@JsonProperty("type")
@Override
public String type() {
return type;
}
@JsonProperty("config")
@Override
public PivotConfig config() {
return config;
}
@Override
public String toString() {
return "Pivot{"
+ "field=" + field + ", "
+ "type=" + type + ", "
+ "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.type.equals(that.type())
&& this.config.equals(that.config());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= field.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= config.hashCode();
return h$;
}
static final class Builder extends Pivot.Builder {
private String field;
private String type;
private PivotConfig 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 type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public Pivot.Builder config(PivotConfig 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.type == null) {
missing += " type";
}
if (this.config == null) {
missing += " config";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_Pivot(
this.field,
this.type,
this.config);
}
}
}