toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
json[r'attachmentId'] = this.attachmentId;
if (this.bucket != null) {
json[r'bucket'] = this.bucket;
} else {
json[r'bucket'] = null;
}
json[r'userId'] = this.userId;
if (this.contentType != null) {
json[r'contentType'] = this.contentType;
} else {
json[r'contentType'] = null;
}
if (this.contentLength != null) {
json[r'contentLength'] = this.contentLength;
} else {
json[r'contentLength'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}