Class OverCapacityErrorBuilder

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

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

     OverCapacityError overCapacityError = OverCapacityError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • OverCapacityErrorBuilder

      public OverCapacityErrorBuilder()
  • Method Details

    • message

      public OverCapacityErrorBuilder message(String message)

      Plain text description of the error.

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

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

      Error-specific additional fields.

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

      public OverCapacityErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public String getMessage()

      Plain text description of the error.

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • build

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

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

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

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