Package com.adyen.model.balanceplatform
Class RestServiceError
- java.lang.Object
-
- com.adyen.model.balanceplatform.RestServiceError
-
public class RestServiceError extends Object
RestServiceError
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestServiceError.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DETAILstatic StringSERIALIZED_NAME_ERROR_CODEstatic StringSERIALIZED_NAME_INSTANCEstatic StringSERIALIZED_NAME_INVALID_FIELDSstatic StringSERIALIZED_NAME_REQUEST_IDstatic StringSERIALIZED_NAME_RESPONSEstatic StringSERIALIZED_NAME_STATUSstatic StringSERIALIZED_NAME_TITLEstatic StringSERIALIZED_NAME_TYPE
-
Constructor Summary
Constructors Constructor Description RestServiceError()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RestServiceErroraddInvalidFieldsItem(InvalidField invalidFieldsItem)RestServiceErrordetail(String detail)booleanequals(Object o)RestServiceErrorerrorCode(String errorCode)static RestServiceErrorfromJson(String jsonString)Create an instance of RestServiceError given an JSON stringStringgetDetail()A human-readable explanation specific to this occurrence of the problem.StringgetErrorCode()A code that identifies the problem type.StringgetInstance()A unique URI that identifies the specific occurrence of the problem.List<InvalidField>getInvalidFields()Detailed explanation of each validation error, when applicable.StringgetRequestId()A unique reference for the request, essentially the same as `pspReference`.JSONObjectgetResponse()Get responseIntegergetStatus()The HTTP status code.StringgetTitle()A short, human-readable summary of the problem type.StringgetType()A URI that identifies the problem type, pointing to human-readable documentation on this problem type.inthashCode()RestServiceErrorinstance(String instance)RestServiceErrorinvalidFields(List<InvalidField> invalidFields)RestServiceErrorrequestId(String requestId)RestServiceErrorresponse(JSONObject response)voidsetDetail(String detail)voidsetErrorCode(String errorCode)voidsetInstance(String instance)voidsetInvalidFields(List<InvalidField> invalidFields)voidsetRequestId(String requestId)voidsetResponse(JSONObject response)voidsetStatus(Integer status)voidsetTitle(String title)voidsetType(String type)RestServiceErrorstatus(Integer status)RestServiceErrortitle(String title)StringtoJson()Convert an instance of RestServiceError to an JSON stringStringtoString()RestServiceErrortype(String type)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj, boolean strictValidation)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_DETAIL
public static final String SERIALIZED_NAME_DETAIL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ERROR_CODE
public static final String SERIALIZED_NAME_ERROR_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_INSTANCE
public static final String SERIALIZED_NAME_INSTANCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_INVALID_FIELDS
public static final String SERIALIZED_NAME_INVALID_FIELDS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REQUEST_ID
public static final String SERIALIZED_NAME_REQUEST_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RESPONSE
public static final String SERIALIZED_NAME_RESPONSE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_STATUS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TITLE
public static final String SERIALIZED_NAME_TITLE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
detail
public RestServiceError detail(String detail)
-
getDetail
public String getDetail()
A human-readable explanation specific to this occurrence of the problem.- Returns:
- detail
-
setDetail
public void setDetail(String detail)
-
errorCode
public RestServiceError errorCode(String errorCode)
-
getErrorCode
public String getErrorCode()
A code that identifies the problem type.- Returns:
- errorCode
-
setErrorCode
public void setErrorCode(String errorCode)
-
instance
public RestServiceError instance(String instance)
-
getInstance
public String getInstance()
A unique URI that identifies the specific occurrence of the problem.- Returns:
- instance
-
setInstance
public void setInstance(String instance)
-
invalidFields
public RestServiceError invalidFields(List<InvalidField> invalidFields)
-
addInvalidFieldsItem
public RestServiceError addInvalidFieldsItem(InvalidField invalidFieldsItem)
-
getInvalidFields
public List<InvalidField> getInvalidFields()
Detailed explanation of each validation error, when applicable.- Returns:
- invalidFields
-
setInvalidFields
public void setInvalidFields(List<InvalidField> invalidFields)
-
requestId
public RestServiceError requestId(String requestId)
-
getRequestId
public String getRequestId()
A unique reference for the request, essentially the same as `pspReference`.- Returns:
- requestId
-
setRequestId
public void setRequestId(String requestId)
-
response
public RestServiceError response(JSONObject response)
-
getResponse
public JSONObject getResponse()
Get response- Returns:
- response
-
setResponse
public void setResponse(JSONObject response)
-
status
public RestServiceError status(Integer status)
-
getStatus
public Integer getStatus()
The HTTP status code.- Returns:
- status
-
setStatus
public void setStatus(Integer status)
-
title
public RestServiceError title(String title)
-
getTitle
public String getTitle()
A short, human-readable summary of the problem type.- Returns:
- title
-
setTitle
public void setTitle(String title)
-
type
public RestServiceError type(String type)
-
getType
public String getType()
A URI that identifies the problem type, pointing to human-readable documentation on this problem type.- Returns:
- type
-
setType
public void setType(String type)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException- Throws:
IOException
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj, boolean strictValidation) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON ObjectstrictValidation- reject (new) fields missing from the specifications- Throws:
IOException- if the JSON Object is invalid with respect to RestServiceError
-
fromJson
public static RestServiceError fromJson(String jsonString) throws IOException
Create an instance of RestServiceError given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of RestServiceError
- Throws:
IOException- if the JSON string is invalid with respect to RestServiceError
-
toJson
public String toJson()
Convert an instance of RestServiceError to an JSON string- Returns:
- JSON string
-
-