Package com.anthropic.models
Class ErrorResponse
-
- All Implemented Interfaces:
public final class ErrorResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classErrorResponse.BuilderA builder for ErrorResponse.
-
Method Summary
Modifier and Type Method Description final ErrorObjecterror()final Optional<String>requestId()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("error")final JsonField<ErrorObject>_error()Returns the raw JSON value of error. final JsonField<String>_requestId()Returns the raw JSON value of requestId. final Map<String, JsonValue>_additionalProperties()final ErrorResponse.BuildertoBuilder()final ErrorResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ErrorResponse.Builderbuilder()Returns a mutable builder for constructing an instance of ErrorResponse. -
-
Method Detail
-
error
final ErrorObject error()
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("error")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_error
final JsonField<ErrorObject> _error()
Returns the raw JSON value of error.
Unlike error, this method doesn't throw if the JSON field has an unexpected type.
-
_requestId
final JsonField<String> _requestId()
Returns the raw JSON value of requestId.
Unlike requestId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ErrorResponse.Builder toBuilder()
-
validate
final ErrorResponse validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ErrorResponse.Builder builder()
Returns a mutable builder for constructing an instance of ErrorResponse.
The following fields are required:
.error() .requestId()
-
-
-
-