Interface ProductTypeChangeAttributeNameAction
- All Superinterfaces:
ProductTypeUpdateAction
,ResourceUpdateAction<ProductTypeUpdateAction>
Renames an AttributeDefinition and also renames all corresponding Attributes on all Products with this ProductType. The renaming of the Attributes is eventually consistent.
If the AttributeDefinition name to be changed does not exist, an AttributeNameDoesNotExist error is returned.
Example to create an instance using the builder pattern
ProductTypeChangeAttributeNameAction productTypeChangeAttributeNameAction = ProductTypeChangeAttributeNameAction.builder()
.attributeName("{attributeName}")
.newAttributeName("{newAttributeName}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for ProductTypeChangeAttributeNameAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductTypeChangeAttributeNameActionbuilder
(ProductTypeChangeAttributeNameAction template) create builder for ProductTypeChangeAttributeNameAction instancedeepCopy
(ProductTypeChangeAttributeNameAction template) factory method to create a deep copy of ProductTypeChangeAttributeNameAction@NotNull String
Name of the AttributeDefinition to update.@NotNull String
New user-defined name of the Attribute that is unique to the Project.of()
factory methodof
(ProductTypeChangeAttributeNameAction template) factory method to create a shallow copy ProductTypeChangeAttributeNameActionvoid
setAttributeName
(String attributeName) Name of the AttributeDefinition to update.void
setNewAttributeName
(String newAttributeName) New user-defined name of the Attribute that is unique to the Project.static com.fasterxml.jackson.core.type.TypeReference<ProductTypeChangeAttributeNameAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product_type.ProductTypeUpdateAction
getAction, withProductTypeUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
CHANGE_ATTRIBUTE_NAME
discriminator value for ProductTypeChangeAttributeNameAction- See Also:
-
-
Method Details
-
getAttributeName
Name of the AttributeDefinition to update.
- Returns:
- attributeName
-
getNewAttributeName
New user-defined name of the Attribute that is unique to the Project.
When using the same
name
for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. An exception to this are the values of anenum
orlenum
type and sets thereof.- Returns:
- newAttributeName
-
setAttributeName
Name of the AttributeDefinition to update.
- Parameters:
attributeName
- value to be set
-
setNewAttributeName
New user-defined name of the Attribute that is unique to the Project.
When using the same
name
for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. An exception to this are the values of anenum
orlenum
type and sets thereof.- Parameters:
newAttributeName
- value to be set
-
of
factory method- Returns:
- instance of ProductTypeChangeAttributeNameAction
-
of
factory method to create a shallow copy ProductTypeChangeAttributeNameAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductTypeChangeAttributeNameAction deepCopy(@Nullable ProductTypeChangeAttributeNameAction template) factory method to create a deep copy of ProductTypeChangeAttributeNameAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTypeChangeAttributeNameAction- Returns:
- builder
-
builder
static ProductTypeChangeAttributeNameActionBuilder builder(ProductTypeChangeAttributeNameAction template) create builder for ProductTypeChangeAttributeNameAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductTypeChangeAttributeNameAction
default <T> T withProductTypeChangeAttributeNameAction(Function<ProductTypeChangeAttributeNameAction, 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<ProductTypeChangeAttributeNameAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-