Interface InvalidFieldError
- All Superinterfaces:
ErrorObject
A given field is not supported. This error occurs, for example, if the field variants
, which is not supported by Product Import, is sent to the Product Import endpoint.
Example to create an instance using the builder pattern
InvalidFieldError invalidFieldError = InvalidFieldError.builder()
.message("{message}")
.field("{field}")
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic InvalidFieldErrorBuilder
builder()
builder factory method for InvalidFieldErrorstatic InvalidFieldErrorBuilder
builder
(InvalidFieldError template) create builder for InvalidFieldError instancecopyDeep()
static InvalidFieldError
deepCopy
(InvalidFieldError template) factory method to create a deep copy of InvalidFieldErrorThe set of allowed values for the field, if any.@NotNull String
getField()
The name of the field.@NotNull Object
The invalid value.The index of the resource in the import request that contains the invalid field.static InvalidFieldError
of()
factory methodstatic InvalidFieldError
of
(InvalidFieldError template) factory method to create a shallow copy InvalidFieldErrorvoid
setAllowedValues
(Object... allowedValues) The set of allowed values for the field, if any.void
setAllowedValues
(List<Object> allowedValues) The set of allowed values for the field, if any.void
The name of the field.void
setInvalidValue
(Object invalidValue) The invalid value.void
setResourceIndex
(Long resourceIndex) The index of the resource in the import request that contains the invalid field.static com.fasterxml.jackson.core.type.TypeReference<InvalidFieldError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withInvalidFieldError
(Function<InvalidFieldError, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.errors.ErrorObject
getCode, getMessage, setMessage, withErrorObject
-
Field Details
-
INVALID_FIELD
discriminator value for InvalidFieldError- See Also:
-
-
Method Details
-
getField
The name of the field.
- Returns:
- field
-
getInvalidValue
The invalid value.
- Returns:
- invalidValue
-
getAllowedValues
The set of allowed values for the field, if any.
- Returns:
- allowedValues
-
getResourceIndex
Long getResourceIndex()The index of the resource in the import request that contains the invalid field.
- Returns:
- resourceIndex
-
setField
The name of the field.
- Parameters:
field
- value to be set
-
setInvalidValue
The invalid value.
- Parameters:
invalidValue
- value to be set
-
setAllowedValues
The set of allowed values for the field, if any.
- Parameters:
allowedValues
- values to be set
-
setAllowedValues
The set of allowed values for the field, if any.
- Parameters:
allowedValues
- values to be set
-
setResourceIndex
The index of the resource in the import request that contains the invalid field.
- Parameters:
resourceIndex
- value to be set
-
of
factory method- Returns:
- instance of InvalidFieldError
-
of
factory method to create a shallow copy InvalidFieldError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
InvalidFieldError copyDeep()- Specified by:
copyDeep
in interfaceErrorObject
-
deepCopy
factory method to create a deep copy of InvalidFieldError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InvalidFieldError- Returns:
- builder
-
builder
create builder for InvalidFieldError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withInvalidFieldError
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
-