toJson method

Map<String, Object?> toJson()

Implementation

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

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (type != null) {
    json[r'type'] = type;
  }
  if (status != null) {
    json[r'status'] = status;
  }
  if (title != null) {
    json[r'title'] = title;
  }
  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;
  }
  if (authorId != null) {
    json[r'authorId'] = authorId;
  }
  if (createdAt != null) {
    json[r'createdAt'] = createdAt.toIso8601String();
  }
  if (version != null) {
    json[r'version'] = version.toJson();
  }
  if (body != null) {
    json[r'body'] = body.toJson();
  }
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  return json;
}