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

org.graylog2.contentpacks.model.entities.AutoValue_KeywordRangeEntity Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version


package org.graylog2.contentpacks.model.entities;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.graylog2.contentpacks.model.entities.references.ValueReference;

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

  private final ModelTypeEntity type;

  private final ValueReference keyword;

  private AutoValue_KeywordRangeEntity(
      ModelTypeEntity type,
      ValueReference keyword) {
    this.type = type;
    this.keyword = keyword;
  }

  @JsonProperty(value = "type")
  @Override
  public ModelTypeEntity type() {
    return type;
  }

  @JsonProperty(value = "keyword")
  @Override
  public ValueReference keyword() {
    return keyword;
  }

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

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

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

  static final class Builder extends KeywordRangeEntity.Builder {
    private ModelTypeEntity type;
    private ValueReference keyword;
    Builder() {
    }
    @Override
    public KeywordRangeEntity.Builder type(ModelTypeEntity type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    KeywordRangeEntity.Builder keyword(ValueReference keyword) {
      if (keyword == null) {
        throw new NullPointerException("Null keyword");
      }
      this.keyword = keyword;
      return this;
    }
    @Override
    KeywordRangeEntity autoBuild() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.keyword == null) {
        missing += " keyword";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_KeywordRangeEntity(
          this.type,
          this.keyword);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy