asText

Casts this MessageData as a Text and retrieves its aws.sdk.kotlin.services.qconnect.model.TextMessage value. Throws an exception if the MessageData is not a Text.