Interface DuplicateAttributeValuesError

All Superinterfaces:
ErrorObject

public interface DuplicateAttributeValuesError extends ErrorObject

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


Example to create an instance using the builder pattern

     DuplicateAttributeValuesError duplicateAttributeValuesError = DuplicateAttributeValuesError.builder()
             .message("{message}")
             .plusAttributes(attributesBuilder -> attributesBuilder)
             .build()
 
  • Field Details

    • DUPLICATE_ATTRIBUTE_VALUES

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

      "The set of attributes must be unique across all variants."

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

      @NotNull @Valid @NotNull @Valid List<Attribute> getAttributes()

      Conflicting Attributes.

      Returns:
      attributes
    • setMessage

      void setMessage(String message)

      "The set of attributes must be unique across all variants."

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

      void setAttributes(Attribute... attributes)

      Conflicting Attributes.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      Conflicting Attributes.

      Parameters:
      attributes - values to be set
    • of

      factory method
      Returns:
      instance of DuplicateAttributeValuesError
    • of

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

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

      builder factory method for DuplicateAttributeValuesError
      Returns:
      builder
    • builder

      create builder for DuplicateAttributeValuesError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDuplicateAttributeValuesError

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