Class RequiredFieldErrorBuilder

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

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

     RequiredFieldError requiredFieldError = RequiredFieldError.builder()
             .message("{message}")
             .field("{field}")
             .build()
 
  • Constructor Details

    • RequiredFieldErrorBuilder

      public RequiredFieldErrorBuilder()
  • Method Details

    • message

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

      public RequiredFieldErrorBuilder field(String field)

      The name of the field.

      Parameters:
      field - 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
    • build

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

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

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

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