Class ResourceCreationErrorBuilder

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

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

     ResourceCreationError resourceCreationError = ResourceCreationError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • ResourceCreationErrorBuilder

      public ResourceCreationErrorBuilder()
  • Method Details

    • message

      public ResourceCreationErrorBuilder message(String message)

      A plain language description of the cause of an error.

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

      public ResourceCreationErrorBuilder resource(@Nullable Object resource)
      set the value to the resource
      Parameters:
      resource - value to be set
      Returns:
      Builder
    • getMessage

      public String getMessage()

      A plain language description of the cause of an error.

      Returns:
      message
    • getResource

      @Nullable public Object getResource()
      value of resource}
      Returns:
      resource
    • build

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

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

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

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