@override Object toJson() { return { if (mimeType.isNotDefault) 'mimeType': mimeType, if (data != null) 'data': encodeBytes(data), }; }