All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.graylog.plugins.views.search.views.widgets.aggregation.AutoValue_NumberVisualizationConfigDTO Maven / Gradle / Ivy

There is a newer version: 5.2.7
Show newest version
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")
final class AutoValue_NumberVisualizationConfigDTO extends NumberVisualizationConfigDTO {

  private final boolean trend;

  private final NumberVisualizationConfigDTO.TrendPreference trendPreference;

  private AutoValue_NumberVisualizationConfigDTO(
      boolean trend,
      NumberVisualizationConfigDTO.TrendPreference trendPreference) {
    this.trend = trend;
    this.trendPreference = trendPreference;
  }

  @JsonProperty
  @Override
  public boolean trend() {
    return trend;
  }

  @JsonProperty
  @Override
  public NumberVisualizationConfigDTO.TrendPreference trendPreference() {
    return trendPreference;
  }

  @Override
  public String toString() {
    return "NumberVisualizationConfigDTO{"
         + "trend=" + trend + ", "
         + "trendPreference=" + trendPreference
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NumberVisualizationConfigDTO) {
      NumberVisualizationConfigDTO that = (NumberVisualizationConfigDTO) 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 NumberVisualizationConfigDTO.Builder {
    private Boolean trend;
    private NumberVisualizationConfigDTO.TrendPreference trendPreference;
    Builder() {
    }
    @Override
    public NumberVisualizationConfigDTO.Builder trend(boolean trend) {
      this.trend = trend;
      return this;
    }
    @Override
    public NumberVisualizationConfigDTO.Builder trendPreference(NumberVisualizationConfigDTO.TrendPreference trendPreference) {
      if (trendPreference == null) {
        throw new NullPointerException("Null trendPreference");
      }
      this.trendPreference = trendPreference;
      return this;
    }
    @Override
    public NumberVisualizationConfigDTO 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_NumberVisualizationConfigDTO(
          this.trend,
          this.trendPreference);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy