Use the Type field to determine which variant is active, then access the corresponding field:
switch document.Type { case operations.DocumentTypeStr: // document.Str is populated case operations.DocumentTypeDocumentRequest: // document.DocumentRequest is populated}