org.graylog.plugins.views.search.views.widgets.aggregation.$AutoValue_SeriesDTO 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_SeriesDTO extends SeriesDTO {
private final SeriesConfigDTO config;
private final String function;
$AutoValue_SeriesDTO(
SeriesConfigDTO config,
String function) {
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
if (function == null) {
throw new NullPointerException("Null function");
}
this.function = function;
}
@JsonProperty("config")
@Override
public SeriesConfigDTO config() {
return config;
}
@JsonProperty("function")
@Override
public String function() {
return function;
}
@Override
public String toString() {
return "SeriesDTO{"
+ "config=" + config + ", "
+ "function=" + function
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SeriesDTO) {
SeriesDTO that = (SeriesDTO) o;
return this.config.equals(that.config())
&& this.function.equals(that.function());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= config.hashCode();
h$ *= 1000003;
h$ ^= function.hashCode();
return h$;
}
static class Builder extends SeriesDTO.Builder {
private SeriesConfigDTO config;
private String function;
Builder() {
}
@Override
public SeriesDTO.Builder config(SeriesConfigDTO config) {
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
return this;
}
@Override
public SeriesDTO.Builder function(String function) {
if (function == null) {
throw new NullPointerException("Null function");
}
this.function = function;
return this;
}
@Override
public SeriesDTO build() {
String missing = "";
if (this.config == null) {
missing += " config";
}
if (this.function == null) {
missing += " function";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_SeriesDTO(
this.config,
this.function);
}
}
}