convert enum DurationType to enum class