toJson method
Implementation
Map<String, Object?> toJson() {
var id = this.id;
var status = this.status;
var title = this.title;
var createdAt = this.createdAt;
var pageId = this.pageId;
var blogPostId = this.blogPostId;
var customContentId = this.customContentId;
var mediaType = this.mediaType;
var mediaTypeDescription = this.mediaTypeDescription;
var comment = this.comment;
var fileId = this.fileId;
var fileSize = this.fileSize;
var webuiLink = this.webuiLink;
var downloadLink = this.downloadLink;
var version = this.version;
var links = this.links;
final json = <String, Object?>{};
if (id != null) {
json[r'id'] = id;
}
if (status != null) {
json[r'status'] = status;
}
if (title != null) {
json[r'title'] = title;
}
if (createdAt != null) {
json[r'createdAt'] = createdAt.toIso8601String();
}
if (pageId != null) {
json[r'pageId'] = pageId;
}
if (blogPostId != null) {
json[r'blogPostId'] = blogPostId;
}
if (customContentId != null) {
json[r'customContentId'] = customContentId;
}
if (mediaType != null) {
json[r'mediaType'] = mediaType;
}
if (mediaTypeDescription != null) {
json[r'mediaTypeDescription'] = mediaTypeDescription;
}
if (comment != null) {
json[r'comment'] = comment;
}
if (fileId != null) {
json[r'fileId'] = fileId;
}
if (fileSize != null) {
json[r'fileSize'] = fileSize;
}
if (webuiLink != null) {
json[r'webuiLink'] = webuiLink;
}
if (downloadLink != null) {
json[r'downloadLink'] = downloadLink;
}
if (version != null) {
json[r'version'] = version.toJson();
}
if (links != null) {
json[r'_links'] = links.toJson();
}
return json;
}