toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var author = this.author;
  var remoteAddress = this.remoteAddress;
  var creationDate = this.creationDate;
  var summary = this.summary;
  var description = this.description;
  var category = this.category;
  var sysAdmin = this.sysAdmin;
  var affectedObject = this.affectedObject;
  var changedValues = this.changedValues;
  var associatedObjects = this.associatedObjects;

  final json = <String, Object?>{};
  if (author != null) {
    json[r'author'] = author.toJson();
  }
  json[r'remoteAddress'] = remoteAddress;
  if (creationDate != null) {
    json[r'creationDate'] = creationDate;
  }
  if (summary != null) {
    json[r'summary'] = summary;
  }
  if (description != null) {
    json[r'description'] = description;
  }
  if (category != null) {
    json[r'category'] = category;
  }
  json[r'sysAdmin'] = sysAdmin;
  if (affectedObject != null) {
    json[r'affectedObject'] = affectedObject.toJson();
  }
  json[r'changedValues'] = changedValues.map((i) => i.toJson()).toList();
  json[r'associatedObjects'] =
      associatedObjects.map((i) => i.toJson()).toList();
  return json;
}