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

org.graylog.plugins.views.search.engine.suggestions.AutoValue_SuggestionResponse Maven / Gradle / Ivy

package org.graylog.plugins.views.search.engine.suggestions;

import java.util.List;
import java.util.Optional;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String field;

  private final String input;

  private final List suggestions;

  private final Optional suggestionError;

  private final Long sumOtherDocsCount;

  AutoValue_SuggestionResponse(
      String field,
      String input,
      List suggestions,
      Optional suggestionError,
      @Nullable Long sumOtherDocsCount) {
    if (field == null) {
      throw new NullPointerException("Null field");
    }
    this.field = field;
    if (input == null) {
      throw new NullPointerException("Null input");
    }
    this.input = input;
    if (suggestions == null) {
      throw new NullPointerException("Null suggestions");
    }
    this.suggestions = suggestions;
    if (suggestionError == null) {
      throw new NullPointerException("Null suggestionError");
    }
    this.suggestionError = suggestionError;
    this.sumOtherDocsCount = sumOtherDocsCount;
  }

  @Override
  public String field() {
    return field;
  }

  @Override
  public String input() {
    return input;
  }

  @Override
  public List suggestions() {
    return suggestions;
  }

  @Override
  public Optional suggestionError() {
    return suggestionError;
  }

  @Nullable
  @Override
  public Long sumOtherDocsCount() {
    return sumOtherDocsCount;
  }

  @Override
  public String toString() {
    return "SuggestionResponse{"
        + "field=" + field + ", "
        + "input=" + input + ", "
        + "suggestions=" + suggestions + ", "
        + "suggestionError=" + suggestionError + ", "
        + "sumOtherDocsCount=" + sumOtherDocsCount
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SuggestionResponse) {
      SuggestionResponse that = (SuggestionResponse) o;
      return this.field.equals(that.field())
          && this.input.equals(that.input())
          && this.suggestions.equals(that.suggestions())
          && this.suggestionError.equals(that.suggestionError())
          && (this.sumOtherDocsCount == null ? that.sumOtherDocsCount() == null : this.sumOtherDocsCount.equals(that.sumOtherDocsCount()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= field.hashCode();
    h$ *= 1000003;
    h$ ^= input.hashCode();
    h$ *= 1000003;
    h$ ^= suggestions.hashCode();
    h$ *= 1000003;
    h$ ^= suggestionError.hashCode();
    h$ *= 1000003;
    h$ ^= (sumOtherDocsCount == null) ? 0 : sumOtherDocsCount.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy