Interface MaxResourceLimitExceededError
- All Superinterfaces:
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 Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MaxResourceLimitExceededError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MaxResourceLimitExceededErrorbuilder
(MaxResourceLimitExceededError template) create builder for MaxResourceLimitExceededError instancedeepCopy
(MaxResourceLimitExceededError template) factory method to create a deep copy of MaxResourceLimitExceededError@NotNull String
getCode()
Error identifier.@NotNull ReferenceTypeId
Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).@NotNull String
"You have exceeded the limit of $limit resources of type $resourceTypeId."
of()
factory methodof
(MaxResourceLimitExceededError template) factory method to create a shallow copy MaxResourceLimitExceededErrorvoid
setExceededResource
(ReferenceTypeId exceededResource) Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).void
setMessage
(String message) "You have exceeded the limit of $limit resources of type $resourceTypeId."
static com.fasterxml.jackson.core.type.TypeReference<MaxResourceLimitExceededError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
MAX_RESOURCE_LIMIT_EXCEEDED
discriminator value for MaxResourceLimitExceededError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"You have exceeded the limit of $limit resources of type $resourceTypeId."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getExceededResource
Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).
- Returns:
- exceededResource
-
setMessage
"You have exceeded the limit of $limit resources of type $resourceTypeId."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setExceededResource
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
@Nullable static MaxResourceLimitExceededError deepCopy(@Nullable MaxResourceLimitExceededError template) 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
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-