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

com.cerner.beadledom.json.common.model.AutoValue_ErrorDetail Maven / Gradle / Ivy

The newest version!
package com.cerner.beadledom.json.common.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String domain;

  private final String reason;

  private final String message;

  private final String locationType;

  private final String location;

  private AutoValue_ErrorDetail(
      @Nullable String domain,
      @Nullable String reason,
      @Nullable String message,
      @Nullable String locationType,
      @Nullable String location) {
    this.domain = domain;
    this.reason = reason;
    this.message = message;
    this.locationType = locationType;
    this.location = location;
  }

  @Nullable
  @JsonProperty("domain")
  @ApiModelProperty("A subsystem or context where an error occurred")
  @Override
  public String domain() {
    return domain;
  }

  @Nullable
  @JsonProperty("reason")
  @ApiModelProperty("short name or key for an error")
  @Override
  public String reason() {
    return reason;
  }

  @Nullable
  @JsonProperty("message")
  @ApiModelProperty("Human readable description of an error")
  @Override
  public String message() {
    return message;
  }

  @Nullable
  @JsonProperty("locationType")
  @ApiModelProperty("Location or type of the value that caused an error")
  @Override
  public String locationType() {
    return locationType;
  }

  @Nullable
  @JsonProperty("location")
  @ApiModelProperty("Name of the value that caused an error")
  @Override
  public String location() {
    return location;
  }

  @Override
  public String toString() {
    return "ErrorDetail{"
        + "domain=" + domain + ", "
        + "reason=" + reason + ", "
        + "message=" + message + ", "
        + "locationType=" + locationType + ", "
        + "location=" + location
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ErrorDetail) {
      ErrorDetail that = (ErrorDetail) o;
      return (this.domain == null ? that.domain() == null : this.domain.equals(that.domain()))
          && (this.reason == null ? that.reason() == null : this.reason.equals(that.reason()))
          && (this.message == null ? that.message() == null : this.message.equals(that.message()))
          && (this.locationType == null ? that.locationType() == null : this.locationType.equals(that.locationType()))
          && (this.location == null ? that.location() == null : this.location.equals(that.location()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (domain == null) ? 0 : domain.hashCode();
    h$ *= 1000003;
    h$ ^= (reason == null) ? 0 : reason.hashCode();
    h$ *= 1000003;
    h$ ^= (message == null) ? 0 : message.hashCode();
    h$ *= 1000003;
    h$ ^= (locationType == null) ? 0 : locationType.hashCode();
    h$ *= 1000003;
    h$ ^= (location == null) ? 0 : location.hashCode();
    return h$;
  }

  static final class Builder extends ErrorDetail.Builder {
    private String domain;
    private String reason;
    private String message;
    private String locationType;
    private String location;
    Builder() {
    }
    @Override
    public ErrorDetail.Builder domain(String domain) {
      this.domain = domain;
      return this;
    }
    @Override
    public ErrorDetail.Builder reason(String reason) {
      this.reason = reason;
      return this;
    }
    @Override
    public ErrorDetail.Builder message(String message) {
      this.message = message;
      return this;
    }
    @Override
    public ErrorDetail.Builder locationType(String locationType) {
      this.locationType = locationType;
      return this;
    }
    @Override
    public ErrorDetail.Builder location(String location) {
      this.location = location;
      return this;
    }
    @Override
    public ErrorDetail build() {
      return new AutoValue_ErrorDetail(
          this.domain,
          this.reason,
          this.message,
          this.locationType,
          this.location);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy