Class ResourceNotFoundErrorBuilder

java.lang.Object
com.commercetools.api.models.error.ResourceNotFoundErrorBuilder
All Implemented Interfaces:
Builder<ResourceNotFoundError>

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

     ResourceNotFoundError resourceNotFoundError = ResourceNotFoundError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • ResourceNotFoundErrorBuilder

      public ResourceNotFoundErrorBuilder()
  • Method Details

    • message

      public ResourceNotFoundErrorBuilder message(String message)

      "The Resource with ID $resourceId was not found."

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

      public ResourceNotFoundErrorBuilder values(Map<String,Object> values)

      Error-specific additional fields.

      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      public ResourceNotFoundErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • getMessage

      public String getMessage()

      "The Resource with ID $resourceId was not found."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • build

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

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

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

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