Package ai.shipeasy.admin.model
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ErrorCreate an instance of Error given an JSON stringgetCode()Get codeExtra context (validation details, conflicting field, referenced row).getError()Human-readable error message.Actionable guidance for resolving this error — what to check or change next.inthashCode()instructions(String instructions) voidvoidvoidvoidsetInstructions(String instructions) toJson()Convert an instance of Error to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ERROR
- See Also:
-
SERIALIZED_NAME_CODE
- See Also:
-
SERIALIZED_NAME_DETAIL
- See Also:
-
SERIALIZED_NAME_INSTRUCTIONS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Error
public Error()
-
-
Method Details
-
error
-
getError
Human-readable error message.- Returns:
- error
-
setError
-
code
-
getCode
Get code- Returns:
- code
-
setCode
-
detail
-
getDetail
Extra context (validation details, conflicting field, referenced row).- Returns:
- detail
-
setDetail
-
instructions
-
getInstructions
Actionable guidance for resolving this error — what to check or change next.- Returns:
- instructions
-
setInstructions
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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
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
Convert an instance of Error to an JSON string- Returns:
- JSON string
-