org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.$AutoValue_AggregationWidget Maven / Gradle / Ivy
package org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.viewwidgets.AggregationConfig;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_AggregationWidget extends AggregationWidget {
private final String id;
private final String type;
private final String filter;
private final TimeRange timerange;
private final ElasticsearchQueryString query;
private final Set streams;
private final AggregationConfig config;
$AutoValue_AggregationWidget(
String id,
String type,
@Nullable String filter,
TimeRange timerange,
ElasticsearchQueryString query,
Set streams,
AggregationConfig config) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
this.filter = filter;
if (timerange == null) {
throw new NullPointerException("Null timerange");
}
this.timerange = timerange;
if (query == null) {
throw new NullPointerException("Null query");
}
this.query = query;
if (streams == null) {
throw new NullPointerException("Null streams");
}
this.streams = streams;
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
}
@JsonProperty("id")
@Override
public String id() {
return id;
}
@JsonProperty("type")
@Override
String type() {
return type;
}
@JsonProperty("filter")
@Nullable
@Override
String filter() {
return filter;
}
@JsonProperty("timerange")
@Override
TimeRange timerange() {
return timerange;
}
@JsonProperty("query")
@Override
ElasticsearchQueryString query() {
return query;
}
@JsonProperty("streams")
@Override
Set streams() {
return streams;
}
@JsonProperty("config")
@Override
public AggregationConfig config() {
return config;
}
@Override
public String toString() {
return "AggregationWidget{"
+ "id=" + id + ", "
+ "type=" + type + ", "
+ "filter=" + filter + ", "
+ "timerange=" + timerange + ", "
+ "query=" + query + ", "
+ "streams=" + streams + ", "
+ "config=" + config
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AggregationWidget) {
AggregationWidget that = (AggregationWidget) o;
return this.id.equals(that.id())
&& this.type.equals(that.type())
&& (this.filter == null ? that.filter() == null : this.filter.equals(that.filter()))
&& this.timerange.equals(that.timerange())
&& this.query.equals(that.query())
&& this.streams.equals(that.streams())
&& this.config.equals(that.config());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= id.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= (filter == null) ? 0 : filter.hashCode();
h$ *= 1000003;
h$ ^= timerange.hashCode();
h$ *= 1000003;
h$ ^= query.hashCode();
h$ *= 1000003;
h$ ^= streams.hashCode();
h$ *= 1000003;
h$ ^= config.hashCode();
return h$;
}
static class Builder extends AggregationWidget.Builder {
private String id;
private String type;
private String filter;
private TimeRange timerange;
private ElasticsearchQueryString query;
private Set streams;
private AggregationConfig config;
Builder() {
}
@Override
public AggregationWidget.Builder id(String id) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
return this;
}
@Override
public AggregationWidget.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public AggregationWidget.Builder filter(String filter) {
this.filter = filter;
return this;
}
@Override
public AggregationWidget.Builder timerange(TimeRange timerange) {
if (timerange == null) {
throw new NullPointerException("Null timerange");
}
this.timerange = timerange;
return this;
}
@Override
AggregationWidget.Builder query(ElasticsearchQueryString query) {
if (query == null) {
throw new NullPointerException("Null query");
}
this.query = query;
return this;
}
@Override
public AggregationWidget.Builder streams(Set streams) {
if (streams == null) {
throw new NullPointerException("Null streams");
}
this.streams = streams;
return this;
}
@Override
public AggregationWidget.Builder config(AggregationConfig config) {
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
return this;
}
@Override
public AggregationWidget build() {
String missing = "";
if (this.id == null) {
missing += " id";
}
if (this.type == null) {
missing += " type";
}
if (this.timerange == null) {
missing += " timerange";
}
if (this.query == null) {
missing += " query";
}
if (this.streams == null) {
missing += " streams";
}
if (this.config == null) {
missing += " config";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_AggregationWidget(
this.id,
this.type,
this.filter,
this.timerange,
this.query,
this.streams,
this.config);
}
}
}