Interface InvalidFieldError

All Superinterfaces:
ErrorObject

public interface InvalidFieldError extends ErrorObject

A given field is not supported. This error occurs, for example, if the field variants, which is not supported by Product Import, is sent to the Product Import endpoint.


Example to create an instance using the builder pattern

     InvalidFieldError invalidFieldError = InvalidFieldError.builder()
             .message("{message}")
             .field("{field}")
             .build()
 
  • Field Details

  • Method Details

    • getField

      @NotNull @NotNull String getField()

      The name of the field.

      Returns:
      field
    • getInvalidValue

      @NotNull @NotNull Object getInvalidValue()

      The invalid value.

      Returns:
      invalidValue
    • getAllowedValues

      List<Object> getAllowedValues()

      The set of allowed values for the field, if any.

      Returns:
      allowedValues
    • getResourceIndex

      Long getResourceIndex()
      Returns:
      resourceIndex
    • setField

      void setField(String field)

      The name of the field.

      Parameters:
      field - value to be set
    • setInvalidValue

      void setInvalidValue(Object invalidValue)

      The invalid value.

      Parameters:
      invalidValue - value to be set
    • setAllowedValues

      void setAllowedValues(Object... allowedValues)

      The set of allowed values for the field, if any.

      Parameters:
      allowedValues - values to be set
    • setAllowedValues

      void setAllowedValues(List<Object> allowedValues)

      The set of allowed values for the field, if any.

      Parameters:
      allowedValues - values to be set
    • setResourceIndex

      void setResourceIndex(Long resourceIndex)
      set resourceIndex
      Parameters:
      resourceIndex - value to be set
    • of

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

      static InvalidFieldError of(InvalidFieldError template)
      factory method to create a shallow copy InvalidFieldError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static InvalidFieldErrorBuilder builder()
      builder factory method for InvalidFieldError
      Returns:
      builder
    • builder

      static InvalidFieldErrorBuilder builder(InvalidFieldError template)
      create builder for InvalidFieldError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInvalidFieldError

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