Use the Type field to determine which variant is active, then access the corresponding field:
switch predictionContent.Type { case components.PredictionContentTypeStr: // predictionContent.Str is populated case components.PredictionContentTypeArrayOfPredictionContentText: // predictionContent.ArrayOfPredictionContentText is populated}