Interface ProductTypeChangeEnumKeyAction

All Superinterfaces:
ProductTypeUpdateAction, ResourceUpdateAction<ProductTypeUpdateAction>

public interface ProductTypeChangeEnumKeyAction extends 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 Details

    • CHANGE_ENUM_KEY

      static final String CHANGE_ENUM_KEY
      discriminator value for ProductTypeChangeEnumKeyAction
      See Also:
  • Method Details

    • getAttributeName

      @NotNull @NotNull String getAttributeName()

      Name of the AttributeDefinition to update.

      Returns:
      attributeName
    • getKey

      @NotNull @NotNull String getKey()

      Existing key to be changed.

      Returns:
      key
    • getNewKey

      @NotNull @NotNull String getNewKey()

      New key to be set.

      Returns:
      newKey
    • setAttributeName

      void setAttributeName(String attributeName)

      Name of the AttributeDefinition to update.

      Parameters:
      attributeName - value to be set
    • setKey

      void setKey(String key)

      Existing key to be changed.

      Parameters:
      key - value to be set
    • setNewKey

      void setNewKey(String newKey)

      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

      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

      default <T> T withProductTypeChangeEnumKeyAction(Function<ProductTypeChangeEnumKeyAction,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<ProductTypeChangeEnumKeyAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference