Interface ProductTypeRemoveEnumValuesAction

All Superinterfaces:
ProductTypeUpdateAction, ResourceUpdateAction<ProductTypeUpdateAction>

public interface ProductTypeRemoveEnumValuesAction extends ProductTypeUpdateAction

Removes enum values from an AttributeDefinition of AttributeEnumType, AttributeLocalizedEnumType, AttributeSetType of AttributeEnumType, or AttributeSetType of AttributeLocalizedEnumType.

If the Attribute is not required, the Attributes of all Products using those enum keys will also be removed in an eventually consistent way. If the Attribute is required, the operation returns an EnumValueIsUsed error.


Example to create an instance using the builder pattern

     ProductTypeRemoveEnumValuesAction productTypeRemoveEnumValuesAction = ProductTypeRemoveEnumValuesAction.builder()
             .attributeName("{attributeName}")
             .plusKeys(keysBuilder -> keysBuilder)
             .build()
 
  • Field Details

    • REMOVE_ENUM_VALUES

      static final String REMOVE_ENUM_VALUES
      discriminator value for ProductTypeRemoveEnumValuesAction
      See Also:
  • Method Details

    • getAttributeName

      @NotNull @NotNull String getAttributeName()

      Name of the AttributeDefinition to update.

      Returns:
      attributeName
    • getKeys

      @NotNull @NotNull List<String> getKeys()

      Keys of AttributeEnumType or AttributeLocalizedEnumType to remove.

      Returns:
      keys
    • setAttributeName

      void setAttributeName(String attributeName)

      Name of the AttributeDefinition to update.

      Parameters:
      attributeName - value to be set
    • setKeys

      void setKeys(String... keys)

      Keys of AttributeEnumType or AttributeLocalizedEnumType to remove.

      Parameters:
      keys - values to be set
    • setKeys

      void setKeys(List<String> keys)

      Keys of AttributeEnumType or AttributeLocalizedEnumType to remove.

      Parameters:
      keys - values to be set
    • of

      factory method
      Returns:
      instance of ProductTypeRemoveEnumValuesAction
    • of

      factory method to create a shallow copy ProductTypeRemoveEnumValuesAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductTypeRemoveEnumValuesAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductTypeRemoveEnumValuesAction
      Returns:
      builder
    • builder

      create builder for ProductTypeRemoveEnumValuesAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductTypeRemoveEnumValuesAction

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