convert enum DynamicType to enum class