Interface ObjectNotFoundError
- All Superinterfaces:
ErrorObject
Returned if the requested resource was not found or the Product Search index is inactive.
Example to create an instance using the builder pattern
ObjectNotFoundError objectNotFoundError = ObjectNotFoundError.builder()
.message("{message}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectNotFoundErrorBuilder
builder()
builder factory method for ObjectNotFoundErrorstatic ObjectNotFoundErrorBuilder
builder
(ObjectNotFoundError template) create builder for ObjectNotFoundError instancestatic ObjectNotFoundError
deepCopy
(ObjectNotFoundError template) factory method to create a deep copy of ObjectNotFoundError@NotNull String
getCode()
Error identifier.@NotNull String
"A $resourceType with identifier $id was unexpectedly not found."
orstatic ObjectNotFoundError
of()
factory methodstatic ObjectNotFoundError
of
(ObjectNotFoundError template) factory method to create a shallow copy ObjectNotFoundErrorvoid
setMessage
(String message) "A $resourceType with identifier $id was unexpectedly not found."
orstatic com.fasterxml.jackson.core.type.TypeReference<ObjectNotFoundError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withObjectNotFoundError
(Function<ObjectNotFoundError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
OBJECT_NOT_FOUND
discriminator value for ObjectNotFoundError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"A $resourceType with identifier $id was unexpectedly not found."
or"No index found for project"
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
"A $resourceType with identifier $id was unexpectedly not found."
or"No index found for project"
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of ObjectNotFoundError
-
of
factory method to create a shallow copy ObjectNotFoundError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ObjectNotFoundError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ObjectNotFoundError- Returns:
- builder
-
builder
create builder for ObjectNotFoundError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withObjectNotFoundError
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
-