toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
if (this.provider != null) {
json[r'provider'] = this.provider;
} else {
json[r'provider'] = null;
}
if (this.accountId != null) {
json[r'accountId'] = this.accountId;
} else {
json[r'accountId'] = null;
}
json[r'name'] = this.name;
json[r'size'] = this.size;
json[r'mimeType'] = this.mimeType;
if (this.folderId != null) {
json[r'folderId'] = this.folderId;
} else {
json[r'folderId'] = null;
}
json[r'storageType'] = this.storageType;
if (this.downloadUrl != null) {
json[r'downloadUrl'] = this.downloadUrl;
} else {
json[r'downloadUrl'] = null;
}
json[r'metadata'] = this.metadata;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}