Interface ReferencedResourceNotFoundError
- All Superinterfaces:
ErrorObject
Returned when a resource referenced by a Reference or a ResourceIdentifier could not be found.
Example to create an instance using the builder pattern
ReferencedResourceNotFoundError referencedResourceNotFoundError = ReferencedResourceNotFoundError.builder()
.message("{message}")
.typeId(ReferenceTypeId.APPROVAL_FLOW)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ReferencedResourceNotFoundError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ReferencedResourceNotFoundErrorbuilder
(ReferencedResourceNotFoundError template) create builder for ReferencedResourceNotFoundError instancedeepCopy
(ReferencedResourceNotFoundError template) factory method to create a deep copy of ReferencedResourceNotFoundError@NotNull String
getCode()
Error identifier.getId()
Unique identifier of the referenced resource, if known.getKey()
User-defined unique identifier of the referenced resource, if known.@NotNull String
"The referenced object of type $typeId $predicate was not found.
@NotNull ReferenceTypeId
Type of referenced resource.of()
factory methodof
(ReferencedResourceNotFoundError template) factory method to create a shallow copy ReferencedResourceNotFoundErrorvoid
Unique identifier of the referenced resource, if known.void
User-defined unique identifier of the referenced resource, if known.void
setMessage
(String message) "The referenced object of type $typeId $predicate was not found.
void
setTypeId
(ReferenceTypeId typeId) Type of referenced resource.static com.fasterxml.jackson.core.type.TypeReference<ReferencedResourceNotFoundError>
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
-
REFERENCED_RESOURCE_NOT_FOUND
discriminator value for ReferencedResourceNotFoundError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getTypeId
Type of referenced resource.
- Returns:
- typeId
-
getId
String getId()Unique identifier of the referenced resource, if known.
- Returns:
- id
-
getKey
String getKey()User-defined unique identifier of the referenced resource, if known.
- Returns:
- key
-
setMessage
"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setTypeId
Type of referenced resource.
- Parameters:
typeId
- value to be set
-
setId
Unique identifier of the referenced resource, if known.
- Parameters:
id
- value to be set
-
setKey
User-defined unique identifier of the referenced resource, if known.
- Parameters:
key
- value to be set
-
of
factory method- Returns:
- instance of ReferencedResourceNotFoundError
-
of
factory method to create a shallow copy ReferencedResourceNotFoundError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ReferencedResourceNotFoundError deepCopy(@Nullable ReferencedResourceNotFoundError template) factory method to create a deep copy of ReferencedResourceNotFoundError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ReferencedResourceNotFoundError- Returns:
- builder
-
builder
create builder for ReferencedResourceNotFoundError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withReferencedResourceNotFoundError
default <T> T withReferencedResourceNotFoundError(Function<ReferencedResourceNotFoundError, 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<ReferencedResourceNotFoundError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-