Class InvalidStateTransitionErrorBuilder

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

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

     InvalidStateTransitionError invalidStateTransitionError = InvalidStateTransitionError.builder()
             .message("{message}")
             .currentState(ProcessingState.PROCESSING)
             .newState(ProcessingState.PROCESSING)
             .build()
 
  • Constructor Details

    • InvalidStateTransitionErrorBuilder

      public InvalidStateTransitionErrorBuilder()
  • Method Details

    • message

      public InvalidStateTransitionErrorBuilder message(String message)

      A plain language description of the cause of an error.

      Parameters:
      message - value to be set
      Returns:
      Builder
    • currentState

      public InvalidStateTransitionErrorBuilder currentState(ProcessingState currentState)

      Every Import Operation is assigned one of the following states.

      Parameters:
      currentState - value to be set
      Returns:
      Builder
    • newState

      Every Import Operation is assigned one of the following states.

      Parameters:
      newState - value to be set
      Returns:
      Builder
    • getMessage

      public String getMessage()

      A plain language description of the cause of an error.

      Returns:
      message
    • getCurrentState

      public ProcessingState getCurrentState()

      Every Import Operation is assigned one of the following states.

      Returns:
      currentState
    • getNewState

      public ProcessingState getNewState()

      Every Import Operation is assigned one of the following states.

      Returns:
      newState
    • build

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

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

      factory method for an instance of InvalidStateTransitionErrorBuilder
      Returns:
      builder
    • of

      create builder for InvalidStateTransitionError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder