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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ReferencedResourceNotFoundError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ReferencedResourceNotFoundErrorbuilder(ReferencedResourceNotFoundError template) create builder for ReferencedResourceNotFoundError instancecopyDeep()deepCopy(ReferencedResourceNotFoundError template) factory method to create a deep copy of ReferencedResourceNotFoundError@NotNull StringgetCode()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 ReferenceTypeIdType of referenced resource.of()factory methodof(ReferencedResourceNotFoundError template) factory method to create a shallow copy ReferencedResourceNotFoundErrorvoidUnique identifier of the referenced resource, if known.voidUser-defined unique identifier of the referenced resource, if known.voidsetMessage(String message) "The referenced object of type $typeId $predicate was not found.voidsetTypeId(ReferenceTypeId typeId) Type of referenced resource.static com.fasterxml.jackson.core.type.TypeReference<ReferencedResourceNotFoundError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor 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:ErrorObjectError identifier.
- Specified by:
getCodein 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:
getMessagein 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:
setMessagein 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
-
copyDeep
ReferencedResourceNotFoundError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-