Interface DuplicateAttributeValueError

All Superinterfaces:
ErrorObject

public interface DuplicateAttributeValueError extends ErrorObject

Returned when the Unique AttributeConstraint criteria are not met during an Update Product request.


Example to create an instance using the builder pattern

     DuplicateAttributeValueError duplicateAttributeValueError = DuplicateAttributeValueError.builder()
             .message("{message}")
             .attribute(attributeBuilder -> attributeBuilder)
             .build()
 
  • Field Details

    • DUPLICATE_ATTRIBUTE_VALUE

      static final String DUPLICATE_ATTRIBUTE_VALUE
      discriminator value for DuplicateAttributeValueError
      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()

      "Attribute can't have the same value in a different variant."

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

      @NotNull @Valid @NotNull @Valid Attribute getAttribute()

      Conflicting Attributes.

      Returns:
      attribute
    • setMessage

      void setMessage(String message)

      "Attribute can't have the same value in a different variant."

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

      void setAttribute(Attribute attribute)

      Conflicting Attributes.

      Parameters:
      attribute - value to be set
    • of

      factory method
      Returns:
      instance of DuplicateAttributeValueError
    • of

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

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

      builder factory method for DuplicateAttributeValueError
      Returns:
      builder
    • builder

      create builder for DuplicateAttributeValueError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDuplicateAttributeValueError

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