toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var status = this.status;
  var title = this.title;
  var blogPostId = this.blogPostId;
  var pageId = this.pageId;
  var parentCommentId = this.parentCommentId;
  var version = this.version;
  var body = this.body;
  var resolutionLastModifierId = this.resolutionLastModifierId;
  var resolutionLastModifiedAt = this.resolutionLastModifiedAt;
  var resolutionStatus = this.resolutionStatus;
  var properties = this.properties;
  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 (blogPostId != null) {
    json[r'blogPostId'] = blogPostId;
  }
  if (pageId != null) {
    json[r'pageId'] = pageId;
  }
  if (parentCommentId != null) {
    json[r'parentCommentId'] = parentCommentId;
  }
  if (version != null) {
    json[r'version'] = version.toJson();
  }
  if (body != null) {
    json[r'body'] = body.toJson();
  }
  if (resolutionLastModifierId != null) {
    json[r'resolutionLastModifierId'] = resolutionLastModifierId;
  }
  if (resolutionLastModifiedAt != null) {
    json[r'resolutionLastModifiedAt'] =
        resolutionLastModifiedAt.toIso8601String();
  }
  if (resolutionStatus != null) {
    json[r'resolutionStatus'] = resolutionStatus;
  }
  if (properties != null) {
    json[r'properties'] = properties.toJson();
  }
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  return json;
}