Class RestServiceError


  • public class RestServiceError
    extends Object
    RestServiceError
    • Constructor Detail

      • RestServiceError

        public RestServiceError()
    • Method Detail

      • detail

        public RestServiceError detail​(String detail)
        A human-readable explanation specific to this occurrence of the problem.
        Parameters:
        detail -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getDetail

        public String getDetail()
        A human-readable explanation specific to this occurrence of the problem.
        Returns:
        detail
      • setDetail

        public void setDetail​(String detail)
        A human-readable explanation specific to this occurrence of the problem.
        Parameters:
        detail -
      • errorCode

        public RestServiceError errorCode​(String errorCode)
        A code that identifies the problem type.
        Parameters:
        errorCode -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getErrorCode

        public String getErrorCode()
        A code that identifies the problem type.
        Returns:
        errorCode
      • setErrorCode

        public void setErrorCode​(String errorCode)
        A code that identifies the problem type.
        Parameters:
        errorCode -
      • instance

        public RestServiceError instance​(String instance)
        A unique URI that identifies the specific occurrence of the problem.
        Parameters:
        instance -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getInstance

        public String getInstance()
        A unique URI that identifies the specific occurrence of the problem.
        Returns:
        instance
      • setInstance

        public void setInstance​(String instance)
        A unique URI that identifies the specific occurrence of the problem.
        Parameters:
        instance -
      • invalidFields

        public RestServiceError invalidFields​(List<InvalidField> invalidFields)
        Detailed explanation of each validation error, when applicable.
        Parameters:
        invalidFields -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getInvalidFields

        public List<InvalidField> getInvalidFields()
        Detailed explanation of each validation error, when applicable.
        Returns:
        invalidFields
      • setInvalidFields

        public void setInvalidFields​(List<InvalidField> invalidFields)
        Detailed explanation of each validation error, when applicable.
        Parameters:
        invalidFields -
      • requestId

        public RestServiceError requestId​(String requestId)
        A unique reference for the request, essentially the same as `pspReference`.
        Parameters:
        requestId -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getRequestId

        public String getRequestId()
        A unique reference for the request, essentially the same as `pspReference`.
        Returns:
        requestId
      • setRequestId

        public void setRequestId​(String requestId)
        A unique reference for the request, essentially the same as `pspReference`.
        Parameters:
        requestId -
      • response

        public RestServiceError response​(Object response)
        response
        Parameters:
        response -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getResponse

        public Object getResponse()
        response
        Returns:
        response
      • setResponse

        public void setResponse​(Object response)
        response
        Parameters:
        response -
      • status

        public RestServiceError status​(Integer status)
        The HTTP status code.
        Parameters:
        status -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getStatus

        public Integer getStatus()
        The HTTP status code.
        Returns:
        status
      • setStatus

        public void setStatus​(Integer status)
        The HTTP status code.
        Parameters:
        status -
      • title

        public RestServiceError title​(String title)
        A short, human-readable summary of the problem type.
        Parameters:
        title -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • getTitle

        public String getTitle()
        A short, human-readable summary of the problem type.
        Returns:
        title
      • setTitle

        public void setTitle​(String title)
        A short, human-readable summary of the problem type.
        Parameters:
        title -
      • type

        public RestServiceError type​(String type)
        A URI that identifies the problem type, pointing to human-readable documentation on this problem type.
        Parameters:
        type -
        Returns:
        the current RestServiceError instance, allowing for method chaining
      • 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)
        A URI that identifies the problem type, pointing to human-readable documentation on this problem type.
        Parameters:
        type -
      • equals

        public boolean equals​(Object o)
        Return true if this RestServiceError object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

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

        public static RestServiceError fromJson​(String jsonString)
                                         throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of RestServiceError given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of RestServiceError
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to RestServiceError
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of RestServiceError to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException