Class ErrorObjectBuilder

java.lang.Object
com.commercetools.history.models.change_history.ErrorObjectBuilder
All Implemented Interfaces:
Builder<ErrorObject>

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

     ErrorObject errorObject = ErrorObject.builder()
             .code("{code}")
             .message("{message}")
             .build()
 
  • Constructor Details

    • ErrorObjectBuilder

      public ErrorObjectBuilder()
  • Method Details

    • code

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

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

      public String getCode()
      value of code}
      Returns:
      code
    • getMessage

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

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

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

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

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