$NewSongDataFromJson function

NewSongData $NewSongDataFromJson(
  1. Map<String, dynamic> json
)

Implementation

NewSongData $NewSongDataFromJson(Map<String, dynamic> json) {
  final NewSongData newSongData = NewSongData();
  final bool? starred = jsonConvert.convert<bool>(json['starred']);
  if (starred != null) {
    newSongData.starred = starred;
  }
  final int? popularity = jsonConvert.convert<int>(json['popularity']);
  if (popularity != null) {
    newSongData.popularity = popularity;
  }
  final int? starredNum = jsonConvert.convert<int>(json['starredNum']);
  if (starredNum != null) {
    newSongData.starredNum = starredNum;
  }
  final int? playedNum = jsonConvert.convert<int>(json['playedNum']);
  if (playedNum != null) {
    newSongData.playedNum = playedNum;
  }
  final int? dayPlays = jsonConvert.convert<int>(json['dayPlays']);
  if (dayPlays != null) {
    newSongData.dayPlays = dayPlays;
  }
  final int? hearTime = jsonConvert.convert<int>(json['hearTime']);
  if (hearTime != null) {
    newSongData.hearTime = hearTime;
  }
  final String? mp3Url = jsonConvert.convert<String>(json['mp3Url']);
  if (mp3Url != null) {
    newSongData.mp3Url = mp3Url;
  }
  final NewSongDataPrivilege? privilege = jsonConvert.convert<NewSongDataPrivilege>(
      json['privilege']);
  if (privilege != null) {
    newSongData.privilege = privilege;
  }
  final int? st = jsonConvert.convert<int>(json['st']);
  if (st != null) {
    newSongData.st = st;
  }
  final bool? exclusive = jsonConvert.convert<bool>(json['exclusive']);
  if (exclusive != null) {
    newSongData.exclusive = exclusive;
  }
  final List<NewSongDataArtists>? artists = (json['artists'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<NewSongDataArtists>(e) as NewSongDataArtists).toList();
  if (artists != null) {
    newSongData.artists = artists;
  }
  final int? score = jsonConvert.convert<int>(json['score']);
  if (score != null) {
    newSongData.score = score;
  }
  final NewSongDataHMusic? hMusic = jsonConvert.convert<NewSongDataHMusic>(json['hMusic']);
  if (hMusic != null) {
    newSongData.hMusic = hMusic;
  }
  final NewSongDataMMusic? mMusic = jsonConvert.convert<NewSongDataMMusic>(json['mMusic']);
  if (mMusic != null) {
    newSongData.mMusic = mMusic;
  }
  final NewSongDataLMusic? lMusic = jsonConvert.convert<NewSongDataLMusic>(json['lMusic']);
  if (lMusic != null) {
    newSongData.lMusic = lMusic;
  }
  final NewSongDataAlbum? album = jsonConvert.convert<NewSongDataAlbum>(json['album']);
  if (album != null) {
    newSongData.album = album;
  }
  final String? commentThreadId = jsonConvert.convert<String>(json['commentThreadId']);
  if (commentThreadId != null) {
    newSongData.commentThreadId = commentThreadId;
  }
  final int? fee = jsonConvert.convert<int>(json['fee']);
  if (fee != null) {
    newSongData.fee = fee;
  }
  final int? mvid = jsonConvert.convert<int>(json['mvid']);
  if (mvid != null) {
    newSongData.mvid = mvid;
  }
  final String? copyFrom = jsonConvert.convert<String>(json['copyFrom']);
  if (copyFrom != null) {
    newSongData.copyFrom = copyFrom;
  }
  final String? ringtone = jsonConvert.convert<String>(json['ringtone']);
  if (ringtone != null) {
    newSongData.ringtone = ringtone;
  }
  final String? disc = jsonConvert.convert<String>(json['disc']);
  if (disc != null) {
    newSongData.disc = disc;
  }
  final int? no = jsonConvert.convert<int>(json['no']);
  if (no != null) {
    newSongData.no = no;
  }
  final int? rtype = jsonConvert.convert<int>(json['rtype']);
  if (rtype != null) {
    newSongData.rtype = rtype;
  }
  final int? copyrightId = jsonConvert.convert<int>(json['copyrightId']);
  if (copyrightId != null) {
    newSongData.copyrightId = copyrightId;
  }
  final NewSongDataBMusic? bMusic = jsonConvert.convert<NewSongDataBMusic>(json['bMusic']);
  if (bMusic != null) {
    newSongData.bMusic = bMusic;
  }
  final String? rtUrl = jsonConvert.convert<String>(json['rtUrl']);
  if (rtUrl != null) {
    newSongData.rtUrl = rtUrl;
  }
  final int? ftype = jsonConvert.convert<int>(json['ftype']);
  if (ftype != null) {
    newSongData.ftype = ftype;
  }
  final int? position = jsonConvert.convert<int>(json['position']);
  if (position != null) {
    newSongData.position = position;
  }
  final int? duration = jsonConvert.convert<int>(json['duration']);
  if (duration != null) {
    newSongData.duration = duration;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    newSongData.status = status;
  }
  final List<dynamic>? alias = (json['alias'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (alias != null) {
    newSongData.alias = alias;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    newSongData.name = name;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    newSongData.id = id;
  }
  return newSongData;
}