Class ConcurrentModificationErrorBuilder

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

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

     ConcurrentModificationError concurrentModificationError = ConcurrentModificationError.builder()
             .message("{message}")
             .currentVersion(1)
             .build()
 
  • Constructor Details

    • ConcurrentModificationErrorBuilder

      public ConcurrentModificationErrorBuilder()
  • Method Details

    • message

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

      public ConcurrentModificationErrorBuilder specifiedVersion(@Nullable Long specifiedVersion)

      The version specified in the failed request.

      Parameters:
      specifiedVersion - value to be set
      Returns:
      Builder
    • currentVersion

      public ConcurrentModificationErrorBuilder currentVersion(Long currentVersion)

      The current version of the resource.

      Parameters:
      currentVersion - value to be set
      Returns:
      Builder
    • conflictedResource

      public ConcurrentModificationErrorBuilder conflictedResource(@Nullable Object conflictedResource)

      The resource in conflict.

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

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

      @Nullable public Long getSpecifiedVersion()

      The version specified in the failed request.

      Returns:
      specifiedVersion
    • getCurrentVersion

      public Long getCurrentVersion()

      The current version of the resource.

      Returns:
      currentVersion
    • getConflictedResource

      @Nullable public Object getConflictedResource()

      The resource in conflict.

      Returns:
      conflictedResource
    • build

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

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

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

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