Map<String, dynamic> toMap() { return <String, dynamic>{ 'action': action, 'threatId': threatId, 'type': type, }; }