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