Class EnumValueIsUsedErrorBuilder

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

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

     EnumValueIsUsedError enumValueIsUsedError = EnumValueIsUsedError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • EnumValueIsUsedErrorBuilder

      public EnumValueIsUsedErrorBuilder()
  • Method Details

    • message

      public EnumValueIsUsedErrorBuilder message(String message)

      "$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

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

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

      Error-specific additional fields.

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

      public EnumValueIsUsedErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public String getMessage()

      "$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • build

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

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

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

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