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

org.graylog.plugins.sidecar.rest.responses.AutoValue_ValidationResponse Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.plugins.sidecar.rest.responses;

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

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

  private final boolean error;

  private final String errorMessage;

  AutoValue_ValidationResponse(
      boolean error,
      @Nullable String errorMessage) {
    this.error = error;
    this.errorMessage = errorMessage;
  }

  @JsonProperty
  @Override
  public boolean error() {
    return error;
  }

  @JsonProperty
  @Nullable
  @Override
  public String errorMessage() {
    return errorMessage;
  }

  @Override
  public String toString() {
    return "ValidationResponse{"
        + "error=" + error + ", "
        + "errorMessage=" + errorMessage
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ValidationResponse) {
      ValidationResponse that = (ValidationResponse) o;
      return this.error == that.error()
          && (this.errorMessage == null ? that.errorMessage() == null : this.errorMessage.equals(that.errorMessage()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= error ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= (errorMessage == null) ? 0 : errorMessage.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy