Class InvalidInputErrorBuilder

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

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

     InvalidInputError invalidInputError = InvalidInputError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • InvalidInputErrorBuilder

      public InvalidInputErrorBuilder()
  • Method Details

    • message

      public InvalidInputErrorBuilder message(String message)

      Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

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

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

      Error-specific additional fields.

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

      public InvalidInputErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public String getMessage()

      Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • build

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

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

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

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