Interface AttributeDefinitionTypeConflictError
- All Superinterfaces:
ErrorObject
Returned when the type
is different for an AttributeDefinition using the same name
in multiple Product Types.
The error is returned as a failed response to the Create ProductType request.
Example to create an instance using the builder pattern
AttributeDefinitionTypeConflictError attributeDefinitionTypeConflictError = AttributeDefinitionTypeConflictError.builder()
.message("{message}")
.conflictingProductTypeId("{conflictingProductTypeId}")
.conflictingProductTypeName("{conflictingProductTypeName}")
.conflictingAttributeName("{conflictingAttributeName}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for AttributeDefinitionTypeConflictError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for AttributeDefinitionTypeConflictErrorbuilder
(AttributeDefinitionTypeConflictError template) create builder for AttributeDefinitionTypeConflictError instancedeepCopy
(AttributeDefinitionTypeConflictError template) factory method to create a deep copy of AttributeDefinitionTypeConflictError@NotNull String
getCode()
Error identifier.@NotNull String
Name of the conflicting Attribute.@NotNull String
Unique identifier of the Product Type containing the conflicting name.@NotNull String
Name of the Product Type containing the conflicting name.@NotNull String
"The attribute with name $attributeName has a different type on product type $productTypeName."
of()
factory methodof
(AttributeDefinitionTypeConflictError template) factory method to create a shallow copy AttributeDefinitionTypeConflictErrorvoid
setConflictingAttributeName
(String conflictingAttributeName) Name of the conflicting Attribute.void
setConflictingProductTypeId
(String conflictingProductTypeId) Unique identifier of the Product Type containing the conflicting name.void
setConflictingProductTypeName
(String conflictingProductTypeName) Name of the Product Type containing the conflicting name.void
setMessage
(String message) "The attribute with name $attributeName has a different type on product type $productTypeName."
static com.fasterxml.jackson.core.type.TypeReference<AttributeDefinitionTypeConflictError>
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
-
ATTRIBUTE_DEFINITION_TYPE_CONFLICT
discriminator value for AttributeDefinitionTypeConflictError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The attribute with name $attributeName has a different type on product type $productTypeName."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getConflictingProductTypeId
Unique identifier of the Product Type containing the conflicting name.
- Returns:
- conflictingProductTypeId
-
getConflictingProductTypeName
Name of the Product Type containing the conflicting name.
- Returns:
- conflictingProductTypeName
-
getConflictingAttributeName
Name of the conflicting Attribute.
- Returns:
- conflictingAttributeName
-
setMessage
"The attribute with name $attributeName has a different type on product type $productTypeName."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setConflictingProductTypeId
Unique identifier of the Product Type containing the conflicting name.
- Parameters:
conflictingProductTypeId
- value to be set
-
setConflictingProductTypeName
Name of the Product Type containing the conflicting name.
- Parameters:
conflictingProductTypeName
- value to be set
-
setConflictingAttributeName
Name of the conflicting Attribute.
- Parameters:
conflictingAttributeName
- value to be set
-
of
factory method- Returns:
- instance of AttributeDefinitionTypeConflictError
-
of
factory method to create a shallow copy AttributeDefinitionTypeConflictError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static AttributeDefinitionTypeConflictError deepCopy(@Nullable AttributeDefinitionTypeConflictError template) factory method to create a deep copy of AttributeDefinitionTypeConflictError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AttributeDefinitionTypeConflictError- Returns:
- builder
-
builder
static AttributeDefinitionTypeConflictErrorBuilder builder(AttributeDefinitionTypeConflictError template) create builder for AttributeDefinitionTypeConflictError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAttributeDefinitionTypeConflictError
default <T> T withAttributeDefinitionTypeConflictError(Function<AttributeDefinitionTypeConflictError, 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<AttributeDefinitionTypeConflictError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-