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

com.oneops.infoblox.model.$AutoValue_Error Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version

package com.oneops.infoblox.model;

import com.squareup.moshi.Json;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String error;
  private final String code;
  private final String text;
  private final String trace;

  $AutoValue_Error(
      String error,
      String code,
      String text,
      @Nullable String trace) {
    if (error == null) {
      throw new NullPointerException("Null error");
    }
    this.error = error;
    if (code == null) {
      throw new NullPointerException("Null code");
    }
    this.code = code;
    if (text == null) {
      throw new NullPointerException("Null text");
    }
    this.text = text;
    this.trace = trace;
  }

  @Json(name = "Error")
  @Override
  public String error() {
    return error;
  }

  @Override
  public String code() {
    return code;
  }

  @Override
  public String text() {
    return text;
  }

  @Nullable
  @Override
  public String trace() {
    return trace;
  }

  @Override
  public String toString() {
    return "Error{"
         + "error=" + error + ", "
         + "code=" + code + ", "
         + "text=" + text + ", "
         + "trace=" + trace
        + "}";
  }

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

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.error.hashCode();
    h *= 1000003;
    h ^= this.code.hashCode();
    h *= 1000003;
    h ^= this.text.hashCode();
    h *= 1000003;
    h ^= (trace == null) ? 0 : this.trace.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy