Interface DuplicateAttributeValueError
- All Superinterfaces:
ErrorObject
Returned when the Unique
AttributeConstraint criteria are not met during an Update Product request.
Example to create an instance using the builder pattern
DuplicateAttributeValueError duplicateAttributeValueError = DuplicateAttributeValueError.builder()
.message("{message}")
.attribute(attributeBuilder -> attributeBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DuplicateAttributeValueError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DuplicateAttributeValueErrorbuilder
(DuplicateAttributeValueError template) create builder for DuplicateAttributeValueError instancestatic DuplicateAttributeValueError
deepCopy
(DuplicateAttributeValueError template) factory method to create a deep copy of DuplicateAttributeValueError@NotNull @Valid Attribute
Conflicting Attributes.@NotNull String
getCode()
Error identifier.@NotNull String
"Attribute can't have the same value in a different variant."
static DuplicateAttributeValueError
of()
factory methodstatic DuplicateAttributeValueError
of
(DuplicateAttributeValueError template) factory method to create a shallow copy DuplicateAttributeValueErrorvoid
setAttribute
(Attribute attribute) Conflicting Attributes.void
setMessage
(String message) "Attribute can't have the same value in a different variant."
static com.fasterxml.jackson.core.type.TypeReference<DuplicateAttributeValueError>
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
-
DUPLICATE_ATTRIBUTE_VALUE
discriminator value for DuplicateAttributeValueError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Attribute can't have the same value in a different variant."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getAttribute
Conflicting Attributes.
- Returns:
- attribute
-
setMessage
"Attribute can't have the same value in a different variant."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setAttribute
Conflicting Attributes.
- Parameters:
attribute
- value to be set
-
of
factory method- Returns:
- instance of DuplicateAttributeValueError
-
of
factory method to create a shallow copy DuplicateAttributeValueError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static DuplicateAttributeValueError deepCopy(@Nullable DuplicateAttributeValueError template) factory method to create a deep copy of DuplicateAttributeValueError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicateAttributeValueError- Returns:
- builder
-
builder
create builder for DuplicateAttributeValueError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicateAttributeValueError
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
-