Class InvalidJsonInputErrorBuilder

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

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

     InvalidJsonInputError invalidJsonInputError = InvalidJsonInputError.builder()
             .message("{message}")
             .detailedErrorMessage("{detailedErrorMessage}")
             .build()
 
  • Constructor Details

    • InvalidJsonInputErrorBuilder

      public InvalidJsonInputErrorBuilder()
  • Method Details

    • message

      public InvalidJsonInputErrorBuilder message(String message)

      "Request body does not contain valid JSON."

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

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

      Error-specific additional fields.

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

      public InvalidJsonInputErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public InvalidJsonInputErrorBuilder detailedErrorMessage(String detailedErrorMessage)

      Further explanation about why the JSON is invalid.

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

      public String getMessage()

      "Request body does not contain valid JSON."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • getDetailedErrorMessage

      public String getDetailedErrorMessage()

      Further explanation about why the JSON is invalid.

      Returns:
      detailedErrorMessage
    • build

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

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

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

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