Class InvalidFieldErrorBuilder

java.lang.Object
com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder
All Implemented Interfaces:
Builder<InvalidFieldError>

public class InvalidFieldErrorBuilder extends Object implements Builder<InvalidFieldError>
InvalidFieldErrorBuilder
Example to create an instance using the builder pattern

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

    • InvalidFieldErrorBuilder

      public InvalidFieldErrorBuilder()
  • Method Details

    • message

      public InvalidFieldErrorBuilder message(String message)
      set the value to the message
      Parameters:
      message - value to be set
      Returns:
      Builder
    • field

      public InvalidFieldErrorBuilder field(String field)

      The name of the field.

      Parameters:
      field - value to be set
      Returns:
      Builder
    • invalidValue

      public InvalidFieldErrorBuilder invalidValue(Object invalidValue)

      The invalid value.

      Parameters:
      invalidValue - value to be set
      Returns:
      Builder
    • allowedValues

      public InvalidFieldErrorBuilder allowedValues(@Nullable Object... allowedValues)

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

      Parameters:
      allowedValues - value to be set
      Returns:
      Builder
    • allowedValues

      public InvalidFieldErrorBuilder allowedValues(@Nullable List<Object> allowedValues)

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

      Parameters:
      allowedValues - value to be set
      Returns:
      Builder
    • plusAllowedValues

      public InvalidFieldErrorBuilder plusAllowedValues(@Nullable Object... allowedValues)

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

      Parameters:
      allowedValues - value to be set
      Returns:
      Builder
    • resourceIndex

      public InvalidFieldErrorBuilder resourceIndex(@Nullable Long resourceIndex)
      set the value to the resourceIndex
      Parameters:
      resourceIndex - value to be set
      Returns:
      Builder
    • getMessage

      public String getMessage()
      value of message}
      Returns:
      message
    • getField

      public String getField()

      The name of the field.

      Returns:
      field
    • getInvalidValue

      public Object getInvalidValue()

      The invalid value.

      Returns:
      invalidValue
    • getAllowedValues

      @Nullable public List<Object> getAllowedValues()

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

      Returns:
      allowedValues
    • getResourceIndex

      @Nullable public Long getResourceIndex()
      value of resourceIndex}
      Returns:
      resourceIndex
    • build

      public InvalidFieldError build()
      builds InvalidFieldError with checking for non-null required values
      Specified by:
      build in interface Builder<InvalidFieldError>
      Returns:
      InvalidFieldError
    • buildUnchecked

      public InvalidFieldError buildUnchecked()
      builds InvalidFieldError without checking for non-null required values
      Returns:
      InvalidFieldError
    • of

      public static InvalidFieldErrorBuilder of()
      factory method for an instance of InvalidFieldErrorBuilder
      Returns:
      builder
    • of

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