Interface ProductTypeChangeEnumKeyAction
- All Superinterfaces:
ProductTypeUpdateAction
,ResourceUpdateAction<ProductTypeUpdateAction>
Updates the key of a single enum value
in an AttributeEnumType AttributeDefinition, AttributeLocalizedEnumType AttributeDefinition, AttributeSetType of AttributeEnumType AttributeDefinition, or AttributeSetType of AttributeLocalizedEnumType AttributeDefinition.
If the AttributeDefinition does not contain an enum with the referenced key, a EnumKeyDoesNotExist error is returned.
All Products will be updated to the new key in an eventually consistent way.
Example to create an instance using the builder pattern
ProductTypeChangeEnumKeyAction productTypeChangeEnumKeyAction = ProductTypeChangeEnumKeyAction.builder()
.attributeName("{attributeName}")
.key("{key}")
.newKey("{newKey}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductTypeChangeEnumKeyAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductTypeChangeEnumKeyActionbuilder
(ProductTypeChangeEnumKeyAction template) create builder for ProductTypeChangeEnumKeyAction instancedeepCopy
(ProductTypeChangeEnumKeyAction template) factory method to create a deep copy of ProductTypeChangeEnumKeyAction@NotNull String
Name of the AttributeDefinition to update.@NotNull String
getKey()
Existing key to be changed.@NotNull String
New key to be set.of()
factory methodof
(ProductTypeChangeEnumKeyAction template) factory method to create a shallow copy ProductTypeChangeEnumKeyActionvoid
setAttributeName
(String attributeName) Name of the AttributeDefinition to update.void
Existing key to be changed.void
New key to be set.static com.fasterxml.jackson.core.type.TypeReference<ProductTypeChangeEnumKeyAction>
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_ENUM_KEY
discriminator value for ProductTypeChangeEnumKeyAction- See Also:
-
-
Method Details
-
getAttributeName
Name of the AttributeDefinition to update.
- Returns:
- attributeName
-
getKey
Existing key to be changed.
- Returns:
- key
-
getNewKey
New key to be set.
- Returns:
- newKey
-
setAttributeName
Name of the AttributeDefinition to update.
- Parameters:
attributeName
- value to be set
-
setKey
Existing key to be changed.
- Parameters:
key
- value to be set
-
setNewKey
New key to be set.
- Parameters:
newKey
- value to be set
-
of
factory method- Returns:
- instance of ProductTypeChangeEnumKeyAction
-
of
factory method to create a shallow copy ProductTypeChangeEnumKeyAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductTypeChangeEnumKeyAction deepCopy(@Nullable ProductTypeChangeEnumKeyAction template) factory method to create a deep copy of ProductTypeChangeEnumKeyAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTypeChangeEnumKeyAction- Returns:
- builder
-
builder
create builder for ProductTypeChangeEnumKeyAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductTypeChangeEnumKeyAction
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<ProductTypeChangeEnumKeyAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-