Class BadGatewayErrorBuilder

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

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

     BadGatewayError badGatewayError = BadGatewayError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • BadGatewayErrorBuilder

      public BadGatewayErrorBuilder()
  • Method Details

    • message

      public BadGatewayErrorBuilder message(String message)

      Plain text description of the error.

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

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

      Error-specific additional fields.

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

      public BadGatewayErrorBuilder 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 BadGatewayError build()
      builds BadGatewayError with checking for non-null required values
      Specified by:
      build in interface Builder<BadGatewayError>
      Returns:
      BadGatewayError
    • buildUnchecked

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

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

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