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

org.graylog2.plugin.indexer.searches.timeranges.AutoValue_KeywordRange Maven / Gradle / Ivy

package org.graylog2.plugin.indexer.searches.timeranges;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;

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

  private final String type;

  private final String keyword;

  private final String timezone;

  private AutoValue_KeywordRange(
      String type,
      String keyword,
      String timezone) {
    this.type = type;
    this.keyword = keyword;
    this.timezone = timezone;
  }

  @JsonProperty
  @Override
  public String type() {
    return type;
  }

  @JsonProperty
  @Override
  public String keyword() {
    return keyword;
  }

  @JsonProperty
  @Override
  public String timezone() {
    return timezone;
  }

  @Override
  public String toString() {
    return "KeywordRange{"
        + "type=" + type + ", "
        + "keyword=" + keyword + ", "
        + "timezone=" + timezone
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof KeywordRange) {
      KeywordRange that = (KeywordRange) o;
      return this.type.equals(that.type())
          && this.keyword.equals(that.keyword())
          && this.timezone.equals(that.timezone());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= keyword.hashCode();
    h$ *= 1000003;
    h$ ^= timezone.hashCode();
    return h$;
  }

  static final class Builder extends KeywordRange.Builder {
    private String type;
    private String keyword;
    private String timezone;
    Builder() {
    }
    @Override
    public KeywordRange.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public KeywordRange.Builder keyword(String keyword) {
      if (keyword == null) {
        throw new NullPointerException("Null keyword");
      }
      this.keyword = keyword;
      return this;
    }
    @Override
    String keyword() {
      if (keyword == null) {
        throw new IllegalStateException("Property \"keyword\" has not been set");
      }
      return keyword;
    }
    @Override
    public KeywordRange.Builder timezone(String timezone) {
      if (timezone == null) {
        throw new NullPointerException("Null timezone");
      }
      this.timezone = timezone;
      return this;
    }
    @Override
    String timezone() {
      if (timezone == null) {
        throw new IllegalStateException("Property \"timezone\" has not been set");
      }
      return timezone;
    }
    @Override
    KeywordRange autoBuild() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.keyword == null) {
        missing += " keyword";
      }
      if (this.timezone == null) {
        missing += " timezone";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_KeywordRange(
          this.type,
          this.keyword,
          this.timezone);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy