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

org.graylog2.storage.versionprobe.AutoValue_Error Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog2.storage.versionprobe;

import java.util.Optional;
import javax.annotation.Generated;

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

  private final Optional type;

  private final Optional reason;

  AutoValue_Error(
      Optional type,
      Optional reason) {
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
    if (reason == null) {
      throw new NullPointerException("Null reason");
    }
    this.reason = reason;
  }

  @Override
  public Optional type() {
    return type;
  }

  @Override
  public Optional reason() {
    return reason;
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy