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

org.graylog2.indexer.searches.AutoValue_SearchesClusterConfig Maven / Gradle / Ivy

There is a newer version: 6.0.6
Show newest version

package org.graylog2.indexer.searches;

import java.util.Map;
import java.util.Set;
import javax.annotation.Generated;
import org.joda.time.Period;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SearchesClusterConfig extends SearchesClusterConfig {

  private final Period queryTimeRangeLimit;
  private final Map relativeTimerangeOptions;
  private final Map surroundingTimerangeOptions;
  private final Set surroundingFilterFields;

  private AutoValue_SearchesClusterConfig(
      Period queryTimeRangeLimit,
      Map relativeTimerangeOptions,
      Map surroundingTimerangeOptions,
      Set surroundingFilterFields) {
    if (queryTimeRangeLimit == null) {
      throw new NullPointerException("Null queryTimeRangeLimit");
    }
    this.queryTimeRangeLimit = queryTimeRangeLimit;
    if (relativeTimerangeOptions == null) {
      throw new NullPointerException("Null relativeTimerangeOptions");
    }
    this.relativeTimerangeOptions = relativeTimerangeOptions;
    if (surroundingTimerangeOptions == null) {
      throw new NullPointerException("Null surroundingTimerangeOptions");
    }
    this.surroundingTimerangeOptions = surroundingTimerangeOptions;
    if (surroundingFilterFields == null) {
      throw new NullPointerException("Null surroundingFilterFields");
    }
    this.surroundingFilterFields = surroundingFilterFields;
  }

  @com.fasterxml.jackson.annotation.JsonProperty(value = "query_time_range_limit")
  @Override
  public Period queryTimeRangeLimit() {
    return queryTimeRangeLimit;
  }

  @com.fasterxml.jackson.annotation.JsonProperty(value = "relative_timerange_options")
  @Override
  public Map relativeTimerangeOptions() {
    return relativeTimerangeOptions;
  }

  @com.fasterxml.jackson.annotation.JsonProperty(value = "surrounding_timerange_options")
  @Override
  public Map surroundingTimerangeOptions() {
    return surroundingTimerangeOptions;
  }

  @com.fasterxml.jackson.annotation.JsonProperty(value = "surrounding_filter_fields")
  @Override
  public Set surroundingFilterFields() {
    return surroundingFilterFields;
  }

  @Override
  public String toString() {
    return "SearchesClusterConfig{"
        + "queryTimeRangeLimit=" + queryTimeRangeLimit + ", "
        + "relativeTimerangeOptions=" + relativeTimerangeOptions + ", "
        + "surroundingTimerangeOptions=" + surroundingTimerangeOptions + ", "
        + "surroundingFilterFields=" + surroundingFilterFields
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SearchesClusterConfig) {
      SearchesClusterConfig that = (SearchesClusterConfig) o;
      return (this.queryTimeRangeLimit.equals(that.queryTimeRangeLimit()))
           && (this.relativeTimerangeOptions.equals(that.relativeTimerangeOptions()))
           && (this.surroundingTimerangeOptions.equals(that.surroundingTimerangeOptions()))
           && (this.surroundingFilterFields.equals(that.surroundingFilterFields()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= queryTimeRangeLimit.hashCode();
    h *= 1000003;
    h ^= relativeTimerangeOptions.hashCode();
    h *= 1000003;
    h ^= surroundingTimerangeOptions.hashCode();
    h *= 1000003;
    h ^= surroundingFilterFields.hashCode();
    return h;
  }

  @Override
  public SearchesClusterConfig.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends SearchesClusterConfig.Builder {
    private Period queryTimeRangeLimit;
    private Map relativeTimerangeOptions;
    private Map surroundingTimerangeOptions;
    private Set surroundingFilterFields;
    Builder() {
    }
    Builder(SearchesClusterConfig source) {
      this.queryTimeRangeLimit = source.queryTimeRangeLimit();
      this.relativeTimerangeOptions = source.relativeTimerangeOptions();
      this.surroundingTimerangeOptions = source.surroundingTimerangeOptions();
      this.surroundingFilterFields = source.surroundingFilterFields();
    }
    @Override
    public SearchesClusterConfig.Builder queryTimeRangeLimit(Period queryTimeRangeLimit) {
      this.queryTimeRangeLimit = queryTimeRangeLimit;
      return this;
    }
    @Override
    public SearchesClusterConfig.Builder relativeTimerangeOptions(Map relativeTimerangeOptions) {
      this.relativeTimerangeOptions = relativeTimerangeOptions;
      return this;
    }
    @Override
    public SearchesClusterConfig.Builder surroundingTimerangeOptions(Map surroundingTimerangeOptions) {
      this.surroundingTimerangeOptions = surroundingTimerangeOptions;
      return this;
    }
    @Override
    public SearchesClusterConfig.Builder surroundingFilterFields(Set surroundingFilterFields) {
      this.surroundingFilterFields = surroundingFilterFields;
      return this;
    }
    @Override
    public SearchesClusterConfig build() {
      String missing = "";
      if (queryTimeRangeLimit == null) {
        missing += " queryTimeRangeLimit";
      }
      if (relativeTimerangeOptions == null) {
        missing += " relativeTimerangeOptions";
      }
      if (surroundingTimerangeOptions == null) {
        missing += " surroundingTimerangeOptions";
      }
      if (surroundingFilterFields == null) {
        missing += " surroundingFilterFields";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_SearchesClusterConfig(
          this.queryTimeRangeLimit,
          this.relativeTimerangeOptions,
          this.surroundingTimerangeOptions,
          this.surroundingFilterFields);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy