Interface InvalidInputError

All Superinterfaces:
ErrorObject

public interface InvalidInputError extends ErrorObject

Returned when an invalid input has been sent.


Example to create an instance using the builder pattern

     InvalidInputError invalidInputError = InvalidInputError.builder()
             .message("{message}")
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • setMessage

      void setMessage(String message)

      Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • of

      static InvalidInputError of()
      factory method
      Returns:
      instance of InvalidInputError
    • of

      static InvalidInputError of(InvalidInputError template)
      factory method to create a shallow copy InvalidInputError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of InvalidInputError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static InvalidInputErrorBuilder builder()
      builder factory method for InvalidInputError
      Returns:
      builder
    • builder

      static InvalidInputErrorBuilder builder(InvalidInputError template)
      create builder for InvalidInputError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInvalidInputError

      default <T> T withInvalidInputError(Function<InvalidInputError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<InvalidInputError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference