toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var globalId = this.globalId;
  var id = this.id;
  var contentId = this.contentId;
  var status = this.status;
  var title = this.title;
  var description = this.description;
  var body = this.body;
  var creator = this.creator;
  var assignee = this.assignee;
  var completeUser = this.completeUser;
  var createDate = this.createDate;
  var dueDate = this.dueDate;
  var updateDate = this.updateDate;
  var completeDate = this.completeDate;
  var links = this.links;

  final json = <String, Object?>{};
  json[r'globalId'] = globalId;
  json[r'id'] = id;
  json[r'contentId'] = contentId;
  json[r'status'] = status;
  if (title != null) {
    json[r'title'] = title;
  }
  if (description != null) {
    json[r'description'] = description;
  }
  if (body != null) {
    json[r'body'] = body;
  }
  json[r'creator'] = creator;
  if (assignee != null) {
    json[r'assignee'] = assignee;
  }
  if (completeUser != null) {
    json[r'completeUser'] = completeUser;
  }
  json[r'createDate'] = createDate;
  if (dueDate != null) {
    json[r'dueDate'] = dueDate;
  }
  if (updateDate != null) {
    json[r'updateDate'] = updateDate;
  }
  if (completeDate != null) {
    json[r'completeDate'] = completeDate;
  }
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  return json;
}