convert enum SpannerSegmentType into enum class