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.1
Show newest version
package org.graylog2.indexer.searches;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.Generated;
import org.joda.time.Period;

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

  private final Period queryTimeRangeLimit;

  private final Map relativeTimerangeOptions;

  private final Map surroundingTimerangeOptions;

  private final Set surroundingFilterFields;

  private final Set analysisDisabledFields;

  $AutoValue_SearchesClusterConfig(
      Period queryTimeRangeLimit,
      Map relativeTimerangeOptions,
      Map surroundingTimerangeOptions,
      Set surroundingFilterFields,
      Set analysisDisabledFields) {
    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;
    if (analysisDisabledFields == null) {
      throw new NullPointerException("Null analysisDisabledFields");
    }
    this.analysisDisabledFields = analysisDisabledFields;
  }

  @JsonProperty("query_time_range_limit")
  @Override
  public Period queryTimeRangeLimit() {
    return queryTimeRangeLimit;
  }

  @JsonProperty("relative_timerange_options")
  @Override
  public Map relativeTimerangeOptions() {
    return relativeTimerangeOptions;
  }

  @JsonProperty("surrounding_timerange_options")
  @Override
  public Map surroundingTimerangeOptions() {
    return surroundingTimerangeOptions;
  }

  @JsonProperty("surrounding_filter_fields")
  @Override
  public Set surroundingFilterFields() {
    return surroundingFilterFields;
  }

  @JsonProperty("analysis_disabled_fields")
  @Override
  public Set analysisDisabledFields() {
    return analysisDisabledFields;
  }

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

  @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())
          && this.analysisDisabledFields.equals(that.analysisDisabledFields());
    }
    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();
    h$ *= 1000003;
    h$ ^= analysisDisabledFields.hashCode();
    return h$;
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy