toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var author = this.author;
  var comment = this.comment;
  var created = this.created;
  var id = this.id;
  var issueId = this.issueId;
  var properties = this.properties;
  var self = this.self;
  var started = this.started;
  var timeSpent = this.timeSpent;
  var timeSpentSeconds = this.timeSpentSeconds;
  var updateAuthor = this.updateAuthor;
  var updated = this.updated;
  var visibility = this.visibility;

  final json = <String, Object?>{};
  if (author != null) {
    json[r'author'] = author.toJson();
  }
  if (comment != null) {
    json[r'comment'] = comment;
  }
  if (created != null) {
    json[r'created'] = created.toIso8601String();
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (issueId != null) {
    json[r'issueId'] = issueId;
  }
  json[r'properties'] = properties.map((i) => i.toJson()).toList();
  if (self != null) {
    json[r'self'] = self;
  }
  if (started != null) {
    json[r'started'] = started.toIso8601String();
  }
  if (timeSpent != null) {
    json[r'timeSpent'] = timeSpent;
  }
  if (timeSpentSeconds != null) {
    json[r'timeSpentSeconds'] = timeSpentSeconds;
  }
  if (updateAuthor != null) {
    json[r'updateAuthor'] = updateAuthor.toJson();
  }
  if (updated != null) {
    json[r'updated'] = updated.toIso8601String();
  }
  if (visibility != null) {
    json[r'visibility'] = visibility.toJson();
  }
  return json;
}