Serializes the attachment to a JSON-friendly map.
Map<String, dynamic> toMap() => <String, dynamic>{ 'name': name, 'contentType': contentType, };