Interface ReferenceExistsError
- All Superinterfaces:
ErrorObject
Returned when a resource cannot be deleted because it is being referenced by another resource.
Example to create an instance using the builder pattern
ReferenceExistsError referenceExistsError = ReferenceExistsError.builder()
.message("{message}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ReferenceExistsError -
Method Summary
Modifier and TypeMethodDescriptionstatic ReferenceExistsErrorBuilder
builder()
builder factory method for ReferenceExistsErrorstatic ReferenceExistsErrorBuilder
builder
(ReferenceExistsError template) create builder for ReferenceExistsError instancestatic ReferenceExistsError
deepCopy
(ReferenceExistsError template) factory method to create a deep copy of ReferenceExistsError@NotNull String
getCode()
Error identifier.@NotNull String
"Can not delete a $resource while it is referenced by at least one $referencedBy."
Type of referenced resource.static ReferenceExistsError
of()
factory methodstatic ReferenceExistsError
of
(ReferenceExistsError template) factory method to create a shallow copy ReferenceExistsErrorvoid
setMessage
(String message) "Can not delete a $resource while it is referenced by at least one $referencedBy."
void
setReferencedBy
(ReferenceTypeId referencedBy) Type of referenced resource.static com.fasterxml.jackson.core.type.TypeReference<ReferenceExistsError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReferenceExistsError
(Function<ReferenceExistsError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
REFERENCE_EXISTS
discriminator value for ReferenceExistsError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Can not delete a $resource while it is referenced by at least one $referencedBy."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getReferencedBy
ReferenceTypeId getReferencedBy()Type of referenced resource.
- Returns:
- referencedBy
-
setMessage
"Can not delete a $resource while it is referenced by at least one $referencedBy."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setReferencedBy
Type of referenced resource.
- Parameters:
referencedBy
- value to be set
-
of
factory method- Returns:
- instance of ReferenceExistsError
-
of
factory method to create a shallow copy ReferenceExistsError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ReferenceExistsError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ReferenceExistsError- Returns:
- builder
-
builder
create builder for ReferenceExistsError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withReferenceExistsError
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
-