Class GenericErrorBuilder

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

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

     GenericError genericError = GenericError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • GenericErrorBuilder

      public GenericErrorBuilder()
  • Method Details

    • message

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

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

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

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

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

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