toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var links = this.links;
  var author = this.author;
  var created = this.created;
  var filename = this.filename;
  var mimeType = this.mimeType;
  var size = this.size;

  final json = <String, Object?>{};
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  if (author != null) {
    json[r'author'] = author.toJson();
  }
  if (created != null) {
    json[r'created'] = created.toJson();
  }
  if (filename != null) {
    json[r'filename'] = filename;
  }
  if (mimeType != null) {
    json[r'mimeType'] = mimeType;
  }
  if (size != null) {
    json[r'size'] = size;
  }
  return json;
}