Map<String, dynamic> toJson() { return <String, dynamic>{ if (document != null) r'document': document, if (self != null) r'self': self, }; }