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

org.graylog2.plugin.rest.AutoValue_ValidationApiError Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog2.plugin.rest;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
import javax.annotation.processing.Generated;
import org.graylog2.plugin.database.validators.ValidationResult;

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

  private final String message;

  private final Map> validationErrors;

  AutoValue_ValidationApiError(
      String message,
      Map> validationErrors) {
    if (message == null) {
      throw new NullPointerException("Null message");
    }
    this.message = message;
    if (validationErrors == null) {
      throw new NullPointerException("Null validationErrors");
    }
    this.validationErrors = validationErrors;
  }

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

  @JsonProperty
  @Override
  public Map> validationErrors() {
    return validationErrors;
  }

  @Override
  public String toString() {
    return "ValidationApiError{"
        + "message=" + message + ", "
        + "validationErrors=" + validationErrors
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ValidationApiError) {
      ValidationApiError that = (ValidationApiError) o;
      return this.message.equals(that.message())
          && this.validationErrors.equals(that.validationErrors());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy