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