core.Map<core.String, core.dynamic> toJson() => { if (attachment != null) 'attachment': attachment!, };