Class EnumKeyDoesNotExistErrorBuilder

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

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

     EnumKeyDoesNotExistError enumKeyDoesNotExistError = EnumKeyDoesNotExistError.builder()
             .message("{message}")
             .conflictingEnumKey("{conflictingEnumKey}")
             .conflictingAttributeName("{conflictingAttributeName}")
             .build()
 
  • Constructor Details

    • EnumKeyDoesNotExistErrorBuilder

      public EnumKeyDoesNotExistErrorBuilder()
  • Method Details

    • message

      public EnumKeyDoesNotExistErrorBuilder message(String message)

      "The $fieldName field definition does not contain an enum value with the key $enumKey."

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

      Error-specific additional fields.

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

      public EnumKeyDoesNotExistErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public EnumKeyDoesNotExistErrorBuilder conflictingEnumKey(String conflictingEnumKey)

      Conflicting enum key.

      Parameters:
      conflictingEnumKey - value to be set
      Returns:
      Builder
    • conflictingAttributeName

      public EnumKeyDoesNotExistErrorBuilder conflictingAttributeName(String conflictingAttributeName)

      Name of the conflicting Attribute.

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

      public String getMessage()

      "The $fieldName field definition does not contain an enum value with the key $enumKey."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • getConflictingEnumKey

      public String getConflictingEnumKey()

      Conflicting enum key.

      Returns:
      conflictingEnumKey
    • getConflictingAttributeName

      public String getConflictingAttributeName()

      Name of the conflicting Attribute.

      Returns:
      conflictingAttributeName
    • build

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

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

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

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