Interface EnumValueIsUsedError

All Superinterfaces:
ErrorObject

public interface EnumValueIsUsedError extends ErrorObject

Returned when an enum value cannot be removed from an Attribute as it is being used by a Product.

The error is returned as a failed response to the Remove EnumValues from AttributeDefinition update action.


Example to create an instance using the builder pattern

     EnumValueIsUsedError enumValueIsUsedError = EnumValueIsUsedError.builder()
             .message("{message}")
             .build()
 
  • Field Details

    • ENUM_VALUE_IS_USED

      static final String ENUM_VALUE_IS_USED
      discriminator value for EnumValueIsUsedError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • setMessage

      void setMessage(String message)

      "$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • of

      static EnumValueIsUsedError of()
      factory method
      Returns:
      instance of EnumValueIsUsedError
    • of

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

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

      static EnumValueIsUsedErrorBuilder builder()
      builder factory method for EnumValueIsUsedError
      Returns:
      builder
    • builder

      create builder for EnumValueIsUsedError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withEnumValueIsUsedError

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