toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.author != null) {
    json[r'author'] = this.author;
  } else {
    json[r'author'] = null;
  }
  if (this.slug != null) {
    json[r'slug'] = this.slug;
  } else {
    json[r'slug'] = null;
  }
  if (this.category != null) {
    json[r'category'] = this.category;
  } else {
    json[r'category'] = null;
  }
  if (this.license != null) {
    json[r'license'] = this.license;
  } else {
    json[r'license'] = null;
  }
  if (this.language != null) {
    json[r'language'] = this.language;
  } else {
    json[r'language'] = null;
  }
  if (this.downloads != null) {
    json[r'downloads'] = this.downloads;
  } else {
    json[r'downloads'] = null;
  }
  if (this.downloadsAll != null) {
    json[r'downloads_all'] = this.downloadsAll;
  } else {
    json[r'downloads_all'] = null;
  }
  if (this.likes != null) {
    json[r'likes'] = this.likes;
  } else {
    json[r'likes'] = null;
  }
  if (this.trendingScore != null) {
    json[r'trending_score'] = this.trendingScore;
  } else {
    json[r'trending_score'] = null;
  }
  if (this.gated != null) {
    json[r'gated'] = this.gated;
  } else {
    json[r'gated'] = null;
  }
  if (this.mainSizeBytes != null) {
    json[r'main_size_bytes'] = this.mainSizeBytes;
  } else {
    json[r'main_size_bytes'] = null;
  }
  if (this.sizeDisplay != null) {
    json[r'size_display'] = this.sizeDisplay;
  } else {
    json[r'size_display'] = null;
  }
  if (this.ageDays != null) {
    json[r'age_days'] = this.ageDays;
  } else {
    json[r'age_days'] = null;
  }
  if (this.isTrending != null) {
    json[r'is_trending'] = this.isTrending;
  } else {
    json[r'is_trending'] = null;
  }
  if (this.justAdded != null) {
    json[r'just_added'] = this.justAdded;
  } else {
    json[r'just_added'] = null;
  }
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
    json[r'tags'] = this.tags;
  if (this.hfUrl != null) {
    json[r'hf_url'] = this.hfUrl;
  } else {
    json[r'hf_url'] = null;
  }
  if (this.createdAt != null) {
    json[r'created_at'] = this.createdAt;
  } else {
    json[r'created_at'] = null;
  }
  if (this.lastModifiedAt != null) {
    json[r'last_modified_at'] = this.lastModifiedAt;
  } else {
    json[r'last_modified_at'] = null;
  }
  if (this.firstSeenAt != null) {
    json[r'first_seen_at'] = this.firstSeenAt;
  } else {
    json[r'first_seen_at'] = null;
  }
    json[r'files'] = this.files;
  if (this.passport != null) {
    json[r'passport'] = this.passport;
  } else {
    json[r'passport'] = null;
  }
  return json;
}