Interface AttributeDefinitionAlreadyExistsError
- All Superinterfaces:
ErrorObject
Returned when the name of the AttributeDefinition conflicts with an existing Attribute.
The error is returned as a failed response to the Create ProductType request or Change AttributeDefinition Name update action.
Example to create an instance using the builder pattern
AttributeDefinitionAlreadyExistsError attributeDefinitionAlreadyExistsError = AttributeDefinitionAlreadyExistsError.builder()
.message("{message}")
.conflictingProductTypeId("{conflictingProductTypeId}")
.conflictingProductTypeName("{conflictingProductTypeName}")
.conflictingAttributeName("{conflictingAttributeName}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for AttributeDefinitionAlreadyExistsError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for AttributeDefinitionAlreadyExistsErrorbuilder(AttributeDefinitionAlreadyExistsError template) create builder for AttributeDefinitionAlreadyExistsError instancecopyDeep()factory method to create a deep copy of AttributeDefinitionAlreadyExistsError@NotNull StringgetCode()Error identifier.@NotNull StringName of the conflicting Attribute.@NotNull StringUnique identifier of the Product Type containing the conflicting name.@NotNull StringName of the Product Type containing the conflicting name.@NotNull String"An attribute definition with name $attributeName already exists on product type $productTypeName."of()factory methodof(AttributeDefinitionAlreadyExistsError template) factory method to create a shallow copy AttributeDefinitionAlreadyExistsErrorvoidsetConflictingAttributeName(String conflictingAttributeName) Name of the conflicting Attribute.voidsetConflictingProductTypeId(String conflictingProductTypeId) Unique identifier of the Product Type containing the conflicting name.voidsetConflictingProductTypeName(String conflictingProductTypeName) Name of the Product Type containing the conflicting name.voidsetMessage(String message) "An attribute definition with name $attributeName already exists on product type $productTypeName."static com.fasterxml.jackson.core.type.TypeReference<AttributeDefinitionAlreadyExistsError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
ATTRIBUTE_DEFINITION_ALREADY_EXISTS
discriminator value for AttributeDefinitionAlreadyExistsError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"An attribute definition with name $attributeName already exists on product type $productTypeName."- Specified by:
getMessagein 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
"An attribute definition with name $attributeName already exists on product type $productTypeName."- Specified by:
setMessagein 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 AttributeDefinitionAlreadyExistsError
-
of
factory method to create a shallow copy AttributeDefinitionAlreadyExistsError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
AttributeDefinitionAlreadyExistsError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static AttributeDefinitionAlreadyExistsError deepCopy(@Nullable AttributeDefinitionAlreadyExistsError template) factory method to create a deep copy of AttributeDefinitionAlreadyExistsError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AttributeDefinitionAlreadyExistsError- Returns:
- builder
-
builder
static AttributeDefinitionAlreadyExistsErrorBuilder builder(AttributeDefinitionAlreadyExistsError template) create builder for AttributeDefinitionAlreadyExistsError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withAttributeDefinitionAlreadyExistsError
default <T> T withAttributeDefinitionAlreadyExistsError(Function<AttributeDefinitionAlreadyExistsError, 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<AttributeDefinitionAlreadyExistsError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-