Interface MaxResourceLimitExceededError

All Superinterfaces:
ErrorObject

public interface MaxResourceLimitExceededError extends ErrorObject

Returned when a resource type cannot be created as it has reached its limits.

The limits must be adjusted for this resource before sending the request again.


Example to create an instance using the builder pattern

     MaxResourceLimitExceededError maxResourceLimitExceededError = MaxResourceLimitExceededError.builder()
             .message("{message}")
             .exceededResource(ReferenceTypeId.APPROVAL_FLOW)
             .build()
 
  • Field Details

    • MAX_RESOURCE_LIMIT_EXCEEDED

      static final String MAX_RESOURCE_LIMIT_EXCEEDED
      discriminator value for MaxResourceLimitExceededError
      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()

      "You have exceeded the limit of $limit resources of type $resourceTypeId."

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

      @NotNull @NotNull ReferenceTypeId getExceededResource()

      Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).

      Returns:
      exceededResource
    • setMessage

      void setMessage(String message)

      "You have exceeded the limit of $limit resources of type $resourceTypeId."

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

      void setExceededResource(ReferenceTypeId exceededResource)

      Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).

      Parameters:
      exceededResource - value to be set
    • of

      factory method
      Returns:
      instance of MaxResourceLimitExceededError
    • of

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

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

      builder factory method for MaxResourceLimitExceededError
      Returns:
      builder
    • builder

      create builder for MaxResourceLimitExceededError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMaxResourceLimitExceededError

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