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

org.graylog.plugins.views.search.rest.AutoValue_MappedFieldTypeDTO Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog.plugins.views.search.rest;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.graylog2.indexer.fieldtypes.FieldTypes;

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

  private final String name;

  private final FieldTypes.Type type;

  AutoValue_MappedFieldTypeDTO(
      String name,
      FieldTypes.Type type) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
  }

  @JsonProperty("name")
  @Override
  public String name() {
    return name;
  }

  @JsonProperty("type")
  @Override
  public FieldTypes.Type type() {
    return type;
  }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy