package space.nstart.pcp.pcp_types_lib.message

import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import space.nstart.pcp.pcp_types_lib.utils.json.KafkaEventDeserializer
import space.nstart.pcp.pcp_types_lib.utils.json.KafkaEventSerializer

@JsonDeserialize(using = KafkaEventDeserializer::class)
@JsonSerialize(using = KafkaEventSerializer::class)
sealed interface KafkaEvent {
    fun enumCast() = this as? Enum<*>
}