toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var latest = this.latest;
  var createdBy = this.createdBy;
  var ownedBy = this.ownedBy;
  var lastOwnedBy = this.lastOwnedBy;
  var createdDate = this.createdDate;
  var lastUpdated = this.lastUpdated;
  var previousVersion = this.previousVersion;
  var contributors = this.contributors;
  var nextVersion = this.nextVersion;
  var expandable = this.expandable;
  var links = this.links;

  final json = <String, Object?>{};
  json[r'latest'] = latest;
  if (createdBy != null) {
    json[r'createdBy'] = createdBy.toJson();
  }
  if (ownedBy != null) {
    json[r'ownedBy'] = ownedBy.toJson();
  }
  if (lastOwnedBy != null) {
    json[r'lastOwnedBy'] = lastOwnedBy.toJson();
  }
  if (createdDate != null) {
    json[r'createdDate'] = createdDate.toIso8601String();
  }
  if (lastUpdated != null) {
    json[r'lastUpdated'] = lastUpdated.toJson();
  }
  if (previousVersion != null) {
    json[r'previousVersion'] = previousVersion.toJson();
  }
  if (contributors != null) {
    json[r'contributors'] = contributors.toJson();
  }
  if (nextVersion != null) {
    json[r'nextVersion'] = nextVersion.toJson();
  }
  if (expandable != null) {
    json[r'_expandable'] = expandable.toJson();
  }
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  return json;
}