toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var type = this.type;
  var status = this.status;
  var spaceId = this.spaceId;
  var pageId = this.pageId;
  var blogPostId = this.blogPostId;
  var customContentId = this.customContentId;
  var title = this.title;
  var body = this.body;
  var version = this.version;

  final json = <String, Object?>{};
  json[r'id'] = id;
  json[r'type'] = type;
  json[r'status'] = status.value;
  if (spaceId != null) {
    json[r'spaceId'] = spaceId;
  }
  if (pageId != null) {
    json[r'pageId'] = pageId;
  }
  if (blogPostId != null) {
    json[r'blogPostId'] = blogPostId;
  }
  if (customContentId != null) {
    json[r'customContentId'] = customContentId;
  }
  json[r'title'] = title;
  json[r'body'] = body;
  json[r'version'] = version.toJson();
  return json;
}