Interface InvalidOperationError

All Superinterfaces:
ErrorObject

public interface InvalidOperationError extends ErrorObject

Returned when the resources involved in the request are not in a valid state for the operation.

The client application should validate the constraints described in the error message before sending the request.


Example to create an instance using the builder pattern

     InvalidOperationError invalidOperationError = InvalidOperationError.builder()
             .message("{message}")
             .build()
 
  • Field Details

    • INVALID_OPERATION

      static final String INVALID_OPERATION
      discriminator value for InvalidOperationError
      See Also:
  • 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()

      Plain text description of the error.

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

      void setMessage(String message)

      Plain text description of the error.

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

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

      factory method to create a shallow copy InvalidOperationError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static InvalidOperationErrorBuilder builder()
      builder factory method for InvalidOperationError
      Returns:
      builder
    • builder

      create builder for InvalidOperationError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInvalidOperationError

      default <T> T withInvalidOperationError(Function<InvalidOperationError,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<InvalidOperationError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference