org.graylog.plugins.views.search.views.widgets.aggregation.$AutoValue_PivotDTO Maven / Gradle / Ivy
package org.graylog.plugins.views.search.views.widgets.aggregation;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_PivotDTO extends PivotDTO {
private final String field;
private final String type;
private final PivotConfigDTO config;
$AutoValue_PivotDTO(
String field,
String type,
PivotConfigDTO config) {
if (field == null) {
throw new NullPointerException("Null field");
}
this.field = field;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
}
@JsonProperty("field")
@Override
public String field() {
return field;
}
@JsonProperty("type")
@Override
public String type() {
return type;
}
@JsonProperty("config")
@Override
public PivotConfigDTO config() {
return config;
}
@Override
public String toString() {
return "PivotDTO{"
+ "field=" + field + ", "
+ "type=" + type + ", "
+ "config=" + config
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PivotDTO) {
PivotDTO that = (PivotDTO) 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 class Builder extends PivotDTO.Builder {
private String field;
private String type;
private PivotConfigDTO config;
Builder() {
}
@Override
public PivotDTO.Builder field(String field) {
if (field == null) {
throw new NullPointerException("Null field");
}
this.field = field;
return this;
}
@Override
public PivotDTO.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public PivotDTO.Builder config(PivotConfigDTO config) {
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
return this;
}
@Override
public PivotDTO 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_PivotDTO(
this.field,
this.type,
this.config);
}
}
}