org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.viewwidgets.AutoValue_NumberVisualizationConfig 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_NumberVisualizationConfig extends NumberVisualizationConfig {
private final boolean trend;
private final NumberVisualizationConfig.TrendPreference trendPreference;
private AutoValue_NumberVisualizationConfig(
boolean trend,
NumberVisualizationConfig.TrendPreference trendPreference) {
this.trend = trend;
this.trendPreference = trendPreference;
}
@JsonProperty
@Override
public boolean trend() {
return trend;
}
@JsonProperty
@Override
public NumberVisualizationConfig.TrendPreference trendPreference() {
return trendPreference;
}
@Override
public String toString() {
return "NumberVisualizationConfig{"
+ "trend=" + trend + ", "
+ "trendPreference=" + trendPreference
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof NumberVisualizationConfig) {
NumberVisualizationConfig that = (NumberVisualizationConfig) o;
return (this.trend == that.trend())
&& (this.trendPreference.equals(that.trendPreference()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= trend ? 1231 : 1237;
h$ *= 1000003;
h$ ^= trendPreference.hashCode();
return h$;
}
static final class Builder extends NumberVisualizationConfig.Builder {
private Boolean trend;
private NumberVisualizationConfig.TrendPreference trendPreference;
Builder() {
}
@Override
public NumberVisualizationConfig.Builder trend(boolean trend) {
this.trend = trend;
return this;
}
@Override
public NumberVisualizationConfig.Builder trendPreference(NumberVisualizationConfig.TrendPreference trendPreference) {
if (trendPreference == null) {
throw new NullPointerException("Null trendPreference");
}
this.trendPreference = trendPreference;
return this;
}
@Override
public NumberVisualizationConfig build() {
String missing = "";
if (this.trend == null) {
missing += " trend";
}
if (this.trendPreference == null) {
missing += " trendPreference";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_NumberVisualizationConfig(
this.trend,
this.trendPreference);
}
}
}