Class ObjectNotFoundErrorBuilder

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

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

     ObjectNotFoundError objectNotFoundError = ObjectNotFoundError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • ObjectNotFoundErrorBuilder

      public ObjectNotFoundErrorBuilder()
  • Method Details

    • message

      public ObjectNotFoundErrorBuilder message(String message)

      "A $resourceType with identifier $id was unexpectedly not found."

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

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

      Error-specific additional fields.

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

      public ObjectNotFoundErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public String getMessage()

      "A $resourceType with identifier $id was unexpectedly not found."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • build

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

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

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

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