Class Error

java.lang.Object
ai.shipeasy.admin.model.Error

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class Error extends Object
Uniform error envelope returned by every admin endpoint on a non-2xx status. `error` is the human-readable message; `code` is the stable machine code (present whenever the failure maps to a catalogued `ErrorCode`); `detail` carries extra context (validation paths, conflicting field); `instructions` is optional actionable guidance for resolving the error.
  • Field Details

  • Constructor Details

    • Error

      public Error()
  • Method Details

    • error

      public Error error(@Nonnull String error)
    • getError

      @Nonnull public String getError()
      Human-readable error message.
      Returns:
      error
    • setError

      public void setError(@Nonnull String error)
    • code

      public Error code(@Nullable ErrorCode code)
    • getCode

      @Nullable public ErrorCode getCode()
      Get code
      Returns:
      code
    • setCode

      public void setCode(@Nullable ErrorCode code)
    • detail

      public Error detail(@Nullable String detail)
    • getDetail

      @Nullable public String getDetail()
      Extra context (validation details, conflicting field, referenced row).
      Returns:
      detail
    • setDetail

      public void setDetail(@Nullable String detail)
    • instructions

      public Error instructions(@Nullable String instructions)
    • getInstructions

      @Nullable public String getInstructions()
      Actionable guidance for resolving this error — what to check or change next.
      Returns:
      instructions
    • setInstructions

      public void setInstructions(@Nullable String instructions)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Error
    • fromJson

      public static Error fromJson(String jsonString) throws IOException
      Create an instance of Error given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Error
      Throws:
      IOException - if the JSON string is invalid with respect to Error
    • toJson

      public String toJson()
      Convert an instance of Error to an JSON string
      Returns:
      JSON string