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

org.graylog.storage.errors.AutoValue_ResponseError Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.storage.errors;

import javax.annotation.processing.Generated;

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

  private final IndexerError error;

  private final int status;

  private AutoValue_ResponseError(
      IndexerError error,
      int status) {
    this.error = error;
    this.status = status;
  }

  @Override
  public IndexerError error() {
    return error;
  }

  @Override
  public int status() {
    return status;
  }

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

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ResponseError) {
      ResponseError that = (ResponseError) o;
      return this.error.equals(that.error())
          && this.status == that.status();
    }
    return false;
  }

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

  static final class Builder extends ResponseError.Builder {
    private IndexerError error;
    private Integer status;
    Builder() {
    }
    @Override
    public ResponseError.Builder error(IndexerError error) {
      if (error == null) {
        throw new NullPointerException("Null error");
      }
      this.error = error;
      return this;
    }
    @Override
    public ResponseError.Builder status(int status) {
      this.status = status;
      return this;
    }
    @Override
    public ResponseError build() {
      String missing = "";
      if (this.error == null) {
        missing += " error";
      }
      if (this.status == null) {
        missing += " status";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ResponseError(
          this.error,
          this.status);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy