Interface DuplicateFieldError
- All Superinterfaces:
ErrorObject
The given value already exists for a field that is checked for unique values.
Example to create an instance using the builder pattern
DuplicateFieldError duplicateFieldError = DuplicateFieldError.builder()
.message("{message}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DuplicateFieldErrorBuilder
builder()
builder factory method for DuplicateFieldErrorstatic DuplicateFieldErrorBuilder
builder
(DuplicateFieldError template) create builder for DuplicateFieldError instancestatic DuplicateFieldError
deepCopy
(DuplicateFieldError template) factory method to create a deep copy of DuplicateFieldErrorThe offending duplicate value.getField()
The name of the field.static DuplicateFieldError
of()
factory methodstatic DuplicateFieldError
of
(DuplicateFieldError template) factory method to create a shallow copy DuplicateFieldErrorvoid
setDuplicateValue
(Object duplicateValue) The offending duplicate value.void
The name of the field.static com.fasterxml.jackson.core.type.TypeReference<DuplicateFieldError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDuplicateFieldError
(Function<DuplicateFieldError, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.errors.ErrorObject
getCode, getMessage, setMessage, withErrorObject
-
Field Details
-
DUPLICATE_FIELD
discriminator value for DuplicateFieldError- See Also:
-
-
Method Details
-
getField
String getField()The name of the field.
- Returns:
- field
-
getDuplicateValue
Object getDuplicateValue()The offending duplicate value.
- Returns:
- duplicateValue
-
setField
The name of the field.
- Parameters:
field
- value to be set
-
setDuplicateValue
The offending duplicate value.
- Parameters:
duplicateValue
- value to be set
-
of
factory method- Returns:
- instance of DuplicateFieldError
-
of
factory method to create a shallow copy DuplicateFieldError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DuplicateFieldError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DuplicateFieldError- Returns:
- builder
-
builder
create builder for DuplicateFieldError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDuplicateFieldError
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
-