toJson method

Map<String, Object?> toJson()

Implementation

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

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