Interface EnumKeyAlreadyExistsError

All Superinterfaces:
ErrorObject

public interface EnumKeyAlreadyExistsError extends ErrorObject

Returned when an AttributeEnumType or AttributeLocalizedEnumType contains a key that already exists.


Example to create an instance using the builder pattern

     EnumKeyAlreadyExistsError enumKeyAlreadyExistsError = EnumKeyAlreadyExistsError.builder()
             .message("{message}")
             .conflictingEnumKey("{conflictingEnumKey}")
             .conflictingAttributeName("{conflictingAttributeName}")
             .build()
 
  • Field Details

    • ENUM_KEY_ALREADY_EXISTS

      static final String ENUM_KEY_ALREADY_EXISTS
      discriminator value for EnumKeyAlreadyExistsError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "The $attributeName attribute definition already contains an enum value with the key $enumKey."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • getConflictingEnumKey

      @NotNull @NotNull String getConflictingEnumKey()

      Conflicting enum key.

      Returns:
      conflictingEnumKey
    • getConflictingAttributeName

      @NotNull @NotNull String getConflictingAttributeName()

      Name of the conflicting Attribute.

      Returns:
      conflictingAttributeName
    • setMessage

      void setMessage(String message)

      "The $attributeName attribute definition already contains an enum value with the key $enumKey."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • setConflictingEnumKey

      void setConflictingEnumKey(String conflictingEnumKey)

      Conflicting enum key.

      Parameters:
      conflictingEnumKey - value to be set
    • setConflictingAttributeName

      void setConflictingAttributeName(String conflictingAttributeName)

      Name of the conflicting Attribute.

      Parameters:
      conflictingAttributeName - value to be set
    • of

      factory method
      Returns:
      instance of EnumKeyAlreadyExistsError
    • of

      factory method to create a shallow copy EnumKeyAlreadyExistsError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of EnumKeyAlreadyExistsError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for EnumKeyAlreadyExistsError
      Returns:
      builder
    • builder

      create builder for EnumKeyAlreadyExistsError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withEnumKeyAlreadyExistsError

      default <T> T withEnumKeyAlreadyExistsError(Function<EnumKeyAlreadyExistsError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<EnumKeyAlreadyExistsError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference