Use replace enum to enum class.