diff --git a/flutter b/flutter new file mode 160000 index 0000000..90673a4 --- /dev/null +++ b/flutter @@ -0,0 +1 @@ +Subproject commit 90673a4eef275d1a6692c26ac80d6d746d41a73a diff --git a/lib/api/album/entity/album_info_entity.dart b/lib/api/album/entity/album_info_entity.dart index 7ff0f56..bf68ac9 100644 --- a/lib/api/album/entity/album_info_entity.dart +++ b/lib/api/album/entity/album_info_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/album_info_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/album_info_entity.g.dart'; +part 'album_info_entity.g.dart'; @JsonSerializable() class AlbumInfoEntity { @@ -12,9 +12,9 @@ class AlbumInfoEntity { AlbumInfoEntity(); - factory AlbumInfoEntity.fromJson(Map json) => $AlbumInfoEntityFromJson(json); + factory AlbumInfoEntity.fromJson(Map json) => _$AlbumInfoEntityFromJson(json); - Map toJson() => $AlbumInfoEntityToJson(this); + Map toJson() => _$AlbumInfoEntityToJson(this); @override String toString() { @@ -62,9 +62,9 @@ class AlbumInfoSongs { AlbumInfoSongs(); - factory AlbumInfoSongs.fromJson(Map json) => $AlbumInfoSongsFromJson(json); + factory AlbumInfoSongs.fromJson(Map json) => _$AlbumInfoSongsFromJson(json); - Map toJson() => $AlbumInfoSongsToJson(this); + Map toJson() => _$AlbumInfoSongsToJson(this); @override String toString() { @@ -80,9 +80,9 @@ class AlbumInfoSongsAr { AlbumInfoSongsAr(); - factory AlbumInfoSongsAr.fromJson(Map json) => $AlbumInfoSongsArFromJson(json); + factory AlbumInfoSongsAr.fromJson(Map json) => _$AlbumInfoSongsArFromJson(json); - Map toJson() => $AlbumInfoSongsArToJson(this); + Map toJson() => _$AlbumInfoSongsArToJson(this); @override String toString() { @@ -101,9 +101,9 @@ class AlbumInfoSongsAl { AlbumInfoSongsAl(); - factory AlbumInfoSongsAl.fromJson(Map json) => $AlbumInfoSongsAlFromJson(json); + factory AlbumInfoSongsAl.fromJson(Map json) => _$AlbumInfoSongsAlFromJson(json); - Map toJson() => $AlbumInfoSongsAlToJson(this); + Map toJson() => _$AlbumInfoSongsAlToJson(this); @override String toString() { @@ -121,9 +121,9 @@ class AlbumInfoSongsH { AlbumInfoSongsH(); - factory AlbumInfoSongsH.fromJson(Map json) => $AlbumInfoSongsHFromJson(json); + factory AlbumInfoSongsH.fromJson(Map json) => _$AlbumInfoSongsHFromJson(json); - Map toJson() => $AlbumInfoSongsHToJson(this); + Map toJson() => _$AlbumInfoSongsHToJson(this); @override String toString() { @@ -141,9 +141,9 @@ class AlbumInfoSongsSq { AlbumInfoSongsSq(); - factory AlbumInfoSongsSq.fromJson(Map json) => $AlbumInfoSongsSqFromJson(json); + factory AlbumInfoSongsSq.fromJson(Map json) => _$AlbumInfoSongsSqFromJson(json); - Map toJson() => $AlbumInfoSongsSqToJson(this); + Map toJson() => _$AlbumInfoSongsSqToJson(this); @override String toString() { @@ -161,9 +161,9 @@ class AlbumInfoSongsL { AlbumInfoSongsL(); - factory AlbumInfoSongsL.fromJson(Map json) => $AlbumInfoSongsLFromJson(json); + factory AlbumInfoSongsL.fromJson(Map json) => _$AlbumInfoSongsLFromJson(json); - Map toJson() => $AlbumInfoSongsLToJson(this); + Map toJson() => _$AlbumInfoSongsLToJson(this); @override String toString() { @@ -181,9 +181,9 @@ class AlbumInfoSongsM { AlbumInfoSongsM(); - factory AlbumInfoSongsM.fromJson(Map json) => $AlbumInfoSongsMFromJson(json); + factory AlbumInfoSongsM.fromJson(Map json) => _$AlbumInfoSongsMFromJson(json); - Map toJson() => $AlbumInfoSongsMToJson(this); + Map toJson() => _$AlbumInfoSongsMToJson(this); @override String toString() { @@ -225,9 +225,9 @@ class AlbumInfoSongsPrivilege { AlbumInfoSongsPrivilege(); - factory AlbumInfoSongsPrivilege.fromJson(Map json) => $AlbumInfoSongsPrivilegeFromJson(json); + factory AlbumInfoSongsPrivilege.fromJson(Map json) => _$AlbumInfoSongsPrivilegeFromJson(json); - Map toJson() => $AlbumInfoSongsPrivilegeToJson(this); + Map toJson() => _$AlbumInfoSongsPrivilegeToJson(this); @override String toString() { @@ -246,9 +246,9 @@ class AlbumInfoSongsPrivilegeFreeTrialPrivilege { AlbumInfoSongsPrivilegeFreeTrialPrivilege(); - factory AlbumInfoSongsPrivilegeFreeTrialPrivilege.fromJson(Map json) => $AlbumInfoSongsPrivilegeFreeTrialPrivilegeFromJson(json); + factory AlbumInfoSongsPrivilegeFreeTrialPrivilege.fromJson(Map json) => _$AlbumInfoSongsPrivilegeFreeTrialPrivilegeFromJson(json); - Map toJson() => $AlbumInfoSongsPrivilegeFreeTrialPrivilegeToJson(this); + Map toJson() => _$AlbumInfoSongsPrivilegeFreeTrialPrivilegeToJson(this); @override String toString() { @@ -265,9 +265,9 @@ class AlbumInfoSongsPrivilegeChargeInfoList { AlbumInfoSongsPrivilegeChargeInfoList(); - factory AlbumInfoSongsPrivilegeChargeInfoList.fromJson(Map json) => $AlbumInfoSongsPrivilegeChargeInfoListFromJson(json); + factory AlbumInfoSongsPrivilegeChargeInfoList.fromJson(Map json) => _$AlbumInfoSongsPrivilegeChargeInfoListFromJson(json); - Map toJson() => $AlbumInfoSongsPrivilegeChargeInfoListToJson(this); + Map toJson() => _$AlbumInfoSongsPrivilegeChargeInfoListToJson(this); @override String toString() { @@ -310,9 +310,9 @@ class AlbumInfoAlbum { AlbumInfoAlbum(); - factory AlbumInfoAlbum.fromJson(Map json) => $AlbumInfoAlbumFromJson(json); + factory AlbumInfoAlbum.fromJson(Map json) => _$AlbumInfoAlbumFromJson(json); - Map toJson() => $AlbumInfoAlbumToJson(this); + Map toJson() => _$AlbumInfoAlbumToJson(this); @override String toString() { @@ -340,9 +340,9 @@ class AlbumInfoAlbumArtists { AlbumInfoAlbumArtists(); - factory AlbumInfoAlbumArtists.fromJson(Map json) => $AlbumInfoAlbumArtistsFromJson(json); + factory AlbumInfoAlbumArtists.fromJson(Map json) => _$AlbumInfoAlbumArtistsFromJson(json); - Map toJson() => $AlbumInfoAlbumArtistsToJson(this); + Map toJson() => _$AlbumInfoAlbumArtistsToJson(this); @override String toString() { @@ -373,9 +373,9 @@ class AlbumInfoAlbumArtist { AlbumInfoAlbumArtist(); - factory AlbumInfoAlbumArtist.fromJson(Map json) => $AlbumInfoAlbumArtistFromJson(json); + factory AlbumInfoAlbumArtist.fromJson(Map json) => _$AlbumInfoAlbumArtistFromJson(json); - Map toJson() => $AlbumInfoAlbumArtistToJson(this); + Map toJson() => _$AlbumInfoAlbumArtistToJson(this); @override String toString() { @@ -398,9 +398,9 @@ class AlbumInfoAlbumInfo { AlbumInfoAlbumInfo(); - factory AlbumInfoAlbumInfo.fromJson(Map json) => $AlbumInfoAlbumInfoFromJson(json); + factory AlbumInfoAlbumInfo.fromJson(Map json) => _$AlbumInfoAlbumInfoFromJson(json); - Map toJson() => $AlbumInfoAlbumInfoToJson(this); + Map toJson() => _$AlbumInfoAlbumInfoToJson(this); @override String toString() { @@ -424,9 +424,9 @@ class AlbumInfoAlbumInfoCommentThread { AlbumInfoAlbumInfoCommentThread(); - factory AlbumInfoAlbumInfoCommentThread.fromJson(Map json) => $AlbumInfoAlbumInfoCommentThreadFromJson(json); + factory AlbumInfoAlbumInfoCommentThread.fromJson(Map json) => _$AlbumInfoAlbumInfoCommentThreadFromJson(json); - Map toJson() => $AlbumInfoAlbumInfoCommentThreadToJson(this); + Map toJson() => _$AlbumInfoAlbumInfoCommentThreadToJson(this); @override String toString() { @@ -447,9 +447,9 @@ class AlbumInfoAlbumInfoCommentThreadResourceInfo { AlbumInfoAlbumInfoCommentThreadResourceInfo(); - factory AlbumInfoAlbumInfoCommentThreadResourceInfo.fromJson(Map json) => $AlbumInfoAlbumInfoCommentThreadResourceInfoFromJson(json); + factory AlbumInfoAlbumInfoCommentThreadResourceInfo.fromJson(Map json) => _$AlbumInfoAlbumInfoCommentThreadResourceInfoFromJson(json); - Map toJson() => $AlbumInfoAlbumInfoCommentThreadResourceInfoToJson(this); + Map toJson() => _$AlbumInfoAlbumInfoCommentThreadResourceInfoToJson(this); @override String toString() { diff --git a/lib/api/album/entity/album_info_entity.g.dart b/lib/api/album/entity/album_info_entity.g.dart new file mode 100644 index 0000000..ff9224e --- /dev/null +++ b/lib/api/album/entity/album_info_entity.g.dart @@ -0,0 +1,572 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'album_info_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +AlbumInfoEntity _$AlbumInfoEntityFromJson(Map json) => + AlbumInfoEntity() + ..resourceState = json['resourceState'] as bool? + ..songs = (json['songs'] as List?) + ?.map((e) => AlbumInfoSongs.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt() + ..album = json['album'] == null + ? null + : AlbumInfoAlbum.fromJson(json['album'] as Map); + +Map _$AlbumInfoEntityToJson(AlbumInfoEntity instance) => + { + 'resourceState': instance.resourceState, + 'songs': instance.songs, + 'code': instance.code, + 'album': instance.album, + }; + +AlbumInfoSongs _$AlbumInfoSongsFromJson(Map json) => + AlbumInfoSongs() + ..rtUrls = json['rtUrls'] as List? + ..ar = (json['ar'] as List?) + ?.map((e) => AlbumInfoSongsAr.fromJson(e as Map)) + .toList() + ..al = json['al'] == null + ? null + : AlbumInfoSongsAl.fromJson(json['al'] as Map) + ..st = (json['st'] as num?)?.toInt() + ..noCopyrightRcmd = json['noCopyrightRcmd'] + ..songJumpInfo = json['songJumpInfo'] + ..djId = (json['djId'] as num?)?.toInt() + ..no = (json['no'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..mv = (json['mv'] as num?)?.toInt() + ..t = (json['t'] as num?)?.toInt() + ..v = (json['v'] as num?)?.toInt() + ..cd = json['cd'] as String? + ..rtype = (json['rtype'] as num?)?.toInt() + ..rurl = json['rurl'] + ..pst = (json['pst'] as num?)?.toInt() + ..alia = json['alia'] as List? + ..pop = (json['pop'] as num?)?.toDouble() + ..rt = json['rt'] as String? + ..mst = (json['mst'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..crbt = json['crbt'] + ..cf = json['cf'] as String? + ..dt = (json['dt'] as num?)?.toInt() + ..h = json['h'] == null + ? null + : AlbumInfoSongsH.fromJson(json['h'] as Map) + ..sq = json['sq'] == null + ? null + : AlbumInfoSongsSq.fromJson(json['sq'] as Map) + ..hr = json['hr'] + ..l = json['l'] == null + ? null + : AlbumInfoSongsL.fromJson(json['l'] as Map) + ..rtUrl = json['rtUrl'] + ..ftype = (json['ftype'] as num?)?.toInt() + ..a = json['a'] + ..m = json['m'] == null + ? null + : AlbumInfoSongsM.fromJson(json['m'] as Map) + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..privilege = json['privilege'] == null + ? null + : AlbumInfoSongsPrivilege.fromJson( + json['privilege'] as Map); + +Map _$AlbumInfoSongsToJson(AlbumInfoSongs instance) => + { + 'rtUrls': instance.rtUrls, + 'ar': instance.ar, + 'al': instance.al, + 'st': instance.st, + 'noCopyrightRcmd': instance.noCopyrightRcmd, + 'songJumpInfo': instance.songJumpInfo, + 'djId': instance.djId, + 'no': instance.no, + 'fee': instance.fee, + 'mv': instance.mv, + 't': instance.t, + 'v': instance.v, + 'cd': instance.cd, + 'rtype': instance.rtype, + 'rurl': instance.rurl, + 'pst': instance.pst, + 'alia': instance.alia, + 'pop': instance.pop, + 'rt': instance.rt, + 'mst': instance.mst, + 'cp': instance.cp, + 'crbt': instance.crbt, + 'cf': instance.cf, + 'dt': instance.dt, + 'h': instance.h, + 'sq': instance.sq, + 'hr': instance.hr, + 'l': instance.l, + 'rtUrl': instance.rtUrl, + 'ftype': instance.ftype, + 'a': instance.a, + 'm': instance.m, + 'name': instance.name, + 'id': instance.id, + 'privilege': instance.privilege, + }; + +AlbumInfoSongsAr _$AlbumInfoSongsArFromJson(Map json) => + AlbumInfoSongsAr() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..tns = (json['tns'] as List?)?.map((e) => e as String).toList(); + +Map _$AlbumInfoSongsArToJson(AlbumInfoSongsAr instance) => + { + 'id': instance.id, + 'name': instance.name, + 'tns': instance.tns, + }; + +AlbumInfoSongsAl _$AlbumInfoSongsAlFromJson(Map json) => + AlbumInfoSongsAl() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..picUrl = json['picUrl'] as String? + ..picStr = json['picStr'] as String? + ..pic = (json['pic'] as num?)?.toInt(); + +Map _$AlbumInfoSongsAlToJson(AlbumInfoSongsAl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'picUrl': instance.picUrl, + 'picStr': instance.picStr, + 'pic': instance.pic, + }; + +AlbumInfoSongsH _$AlbumInfoSongsHFromJson(Map json) => + AlbumInfoSongsH() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$AlbumInfoSongsHToJson(AlbumInfoSongsH instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +AlbumInfoSongsSq _$AlbumInfoSongsSqFromJson(Map json) => + AlbumInfoSongsSq() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$AlbumInfoSongsSqToJson(AlbumInfoSongsSq instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +AlbumInfoSongsL _$AlbumInfoSongsLFromJson(Map json) => + AlbumInfoSongsL() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$AlbumInfoSongsLToJson(AlbumInfoSongsL instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +AlbumInfoSongsM _$AlbumInfoSongsMFromJson(Map json) => + AlbumInfoSongsM() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$AlbumInfoSongsMToJson(AlbumInfoSongsM instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +AlbumInfoSongsPrivilege _$AlbumInfoSongsPrivilegeFromJson( + Map json) => + AlbumInfoSongsPrivilege() + ..id = (json['id'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..payed = (json['payed'] as num?)?.toInt() + ..st = (json['st'] as num?)?.toInt() + ..pl = (json['pl'] as num?)?.toInt() + ..dl = (json['dl'] as num?)?.toInt() + ..sp = (json['sp'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..subp = (json['subp'] as num?)?.toInt() + ..cs = json['cs'] as bool? + ..maxbr = (json['maxbr'] as num?)?.toInt() + ..fl = (json['fl'] as num?)?.toInt() + ..toast = json['toast'] as bool? + ..flag = (json['flag'] as num?)?.toInt() + ..preSell = json['preSell'] as bool? + ..playMaxbr = (json['playMaxbr'] as num?)?.toInt() + ..downloadMaxbr = (json['downloadMaxbr'] as num?)?.toInt() + ..maxBrLevel = json['maxBrLevel'] as String? + ..playMaxBrLevel = json['playMaxBrLevel'] as String? + ..downloadMaxBrLevel = json['downloadMaxBrLevel'] as String? + ..plLevel = json['plLevel'] as String? + ..dlLevel = json['dlLevel'] as String? + ..flLevel = json['flLevel'] as String? + ..rscl = json['rscl'] + ..freeTrialPrivilege = json['freeTrialPrivilege'] == null + ? null + : AlbumInfoSongsPrivilegeFreeTrialPrivilege.fromJson( + json['freeTrialPrivilege'] as Map) + ..rightSource = (json['rightSource'] as num?)?.toInt() + ..chargeInfoList = (json['chargeInfoList'] as List?) + ?.map((e) => AlbumInfoSongsPrivilegeChargeInfoList.fromJson( + e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message']; + +Map _$AlbumInfoSongsPrivilegeToJson( + AlbumInfoSongsPrivilege instance) => + { + 'id': instance.id, + 'fee': instance.fee, + 'payed': instance.payed, + 'st': instance.st, + 'pl': instance.pl, + 'dl': instance.dl, + 'sp': instance.sp, + 'cp': instance.cp, + 'subp': instance.subp, + 'cs': instance.cs, + 'maxbr': instance.maxbr, + 'fl': instance.fl, + 'toast': instance.toast, + 'flag': instance.flag, + 'preSell': instance.preSell, + 'playMaxbr': instance.playMaxbr, + 'downloadMaxbr': instance.downloadMaxbr, + 'maxBrLevel': instance.maxBrLevel, + 'playMaxBrLevel': instance.playMaxBrLevel, + 'downloadMaxBrLevel': instance.downloadMaxBrLevel, + 'plLevel': instance.plLevel, + 'dlLevel': instance.dlLevel, + 'flLevel': instance.flLevel, + 'rscl': instance.rscl, + 'freeTrialPrivilege': instance.freeTrialPrivilege, + 'rightSource': instance.rightSource, + 'chargeInfoList': instance.chargeInfoList, + 'code': instance.code, + 'message': instance.message, + }; + +AlbumInfoSongsPrivilegeFreeTrialPrivilege + _$AlbumInfoSongsPrivilegeFreeTrialPrivilegeFromJson( + Map json) => + AlbumInfoSongsPrivilegeFreeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool? + ..listenType = json['listenType'] + ..cannotListenReason = json['cannotListenReason'] + ..playReason = json['playReason'] + ..freeLimitTagType = json['freeLimitTagType']; + +Map _$AlbumInfoSongsPrivilegeFreeTrialPrivilegeToJson( + AlbumInfoSongsPrivilegeFreeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + 'listenType': instance.listenType, + 'cannotListenReason': instance.cannotListenReason, + 'playReason': instance.playReason, + 'freeLimitTagType': instance.freeLimitTagType, + }; + +AlbumInfoSongsPrivilegeChargeInfoList + _$AlbumInfoSongsPrivilegeChargeInfoListFromJson( + Map json) => + AlbumInfoSongsPrivilegeChargeInfoList() + ..rate = (json['rate'] as num?)?.toInt() + ..chargeUrl = json['chargeUrl'] + ..chargeMessage = json['chargeMessage'] + ..chargeType = (json['chargeType'] as num?)?.toInt(); + +Map _$AlbumInfoSongsPrivilegeChargeInfoListToJson( + AlbumInfoSongsPrivilegeChargeInfoList instance) => + { + 'rate': instance.rate, + 'chargeUrl': instance.chargeUrl, + 'chargeMessage': instance.chargeMessage, + 'chargeType': instance.chargeType, + }; + +AlbumInfoAlbum _$AlbumInfoAlbumFromJson(Map json) => + AlbumInfoAlbum() + ..songs = json['songs'] as List? + ..paid = json['paid'] as bool? + ..onSale = json['onSale'] as bool? + ..mark = (json['mark'] as num?)?.toInt() + ..awardTags = json['awardTags'] + ..displayTags = json['displayTags'] + ..artists = (json['artists'] as List?) + ?.map( + (e) => AlbumInfoAlbumArtists.fromJson(e as Map)) + .toList() + ..picId = (json['picId'] as num?)?.toInt() + ..artist = json['artist'] == null + ? null + : AlbumInfoAlbumArtist.fromJson( + json['artist'] as Map) + ..copyrightId = (json['copyrightId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..publishTime = (json['publishTime'] as num?)?.toInt() + ..company = json['company'] as String? + ..picUrl = json['picUrl'] as String? + ..commentThreadId = json['commentThreadId'] as String? + ..blurPicUrl = json['blurPicUrl'] as String? + ..companyId = (json['companyId'] as num?)?.toInt() + ..pic = (json['pic'] as num?)?.toInt() + ..status = (json['status'] as num?)?.toInt() + ..subType = json['subType'] as String? + ..alias = json['alias'] as List? + ..description = json['description'] as String? + ..tags = json['tags'] as String? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..type = json['type'] as String? + ..size = (json['size'] as num?)?.toInt() + ..picidStr = json['picidStr'] as String? + ..info = json['info'] == null + ? null + : AlbumInfoAlbumInfo.fromJson(json['info'] as Map); + +Map _$AlbumInfoAlbumToJson(AlbumInfoAlbum instance) => + { + 'songs': instance.songs, + 'paid': instance.paid, + 'onSale': instance.onSale, + 'mark': instance.mark, + 'awardTags': instance.awardTags, + 'displayTags': instance.displayTags, + 'artists': instance.artists, + 'picId': instance.picId, + 'artist': instance.artist, + 'copyrightId': instance.copyrightId, + 'briefDesc': instance.briefDesc, + 'publishTime': instance.publishTime, + 'company': instance.company, + 'picUrl': instance.picUrl, + 'commentThreadId': instance.commentThreadId, + 'blurPicUrl': instance.blurPicUrl, + 'companyId': instance.companyId, + 'pic': instance.pic, + 'status': instance.status, + 'subType': instance.subType, + 'alias': instance.alias, + 'description': instance.description, + 'tags': instance.tags, + 'name': instance.name, + 'id': instance.id, + 'type': instance.type, + 'size': instance.size, + 'picidStr': instance.picidStr, + 'info': instance.info, + }; + +AlbumInfoAlbumArtists _$AlbumInfoAlbumArtistsFromJson( + Map json) => + AlbumInfoAlbumArtists() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..picUrl = json['picUrl'] as String? + ..img1v1Url = json['img1v1Url'] as String? + ..followed = json['followed'] as bool? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$AlbumInfoAlbumArtistsToJson( + AlbumInfoAlbumArtists instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'picUrl': instance.picUrl, + 'img1v1Url': instance.img1v1Url, + 'followed': instance.followed, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'img1v1idStr': instance.img1v1idStr, + }; + +AlbumInfoAlbumArtist _$AlbumInfoAlbumArtistFromJson( + Map json) => + AlbumInfoAlbumArtist() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..picUrl = json['picUrl'] as String? + ..img1v1Url = json['img1v1Url'] as String? + ..followed = json['followed'] as bool? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..picidStr = json['picidStr'] as String? + ..transNames = (json['transNames'] as List?) + ?.map((e) => e as String) + .toList() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$AlbumInfoAlbumArtistToJson( + AlbumInfoAlbumArtist instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'picUrl': instance.picUrl, + 'img1v1Url': instance.img1v1Url, + 'followed': instance.followed, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'picidStr': instance.picidStr, + 'transNames': instance.transNames, + 'img1v1idStr': instance.img1v1idStr, + }; + +AlbumInfoAlbumInfo _$AlbumInfoAlbumInfoFromJson(Map json) => + AlbumInfoAlbumInfo() + ..commentThread = json['commentThread'] == null + ? null + : AlbumInfoAlbumInfoCommentThread.fromJson( + json['commentThread'] as Map) + ..latestLikedUsers = json['latestLikedUsers'] + ..liked = json['liked'] as bool? + ..comments = json['comments'] + ..resourceType = (json['resourceType'] as num?)?.toInt() + ..resourceId = (json['resourceId'] as num?)?.toInt() + ..commentCount = (json['commentCount'] as num?)?.toInt() + ..likedCount = (json['likedCount'] as num?)?.toInt() + ..shareCount = (json['shareCount'] as num?)?.toInt() + ..threadId = json['threadId'] as String?; + +Map _$AlbumInfoAlbumInfoToJson(AlbumInfoAlbumInfo instance) => + { + 'commentThread': instance.commentThread, + 'latestLikedUsers': instance.latestLikedUsers, + 'liked': instance.liked, + 'comments': instance.comments, + 'resourceType': instance.resourceType, + 'resourceId': instance.resourceId, + 'commentCount': instance.commentCount, + 'likedCount': instance.likedCount, + 'shareCount': instance.shareCount, + 'threadId': instance.threadId, + }; + +AlbumInfoAlbumInfoCommentThread _$AlbumInfoAlbumInfoCommentThreadFromJson( + Map json) => + AlbumInfoAlbumInfoCommentThread() + ..id = json['id'] as String? + ..resourceInfo = json['resourceInfo'] == null + ? null + : AlbumInfoAlbumInfoCommentThreadResourceInfo.fromJson( + json['resourceInfo'] as Map) + ..resourceType = (json['resourceType'] as num?)?.toInt() + ..commentCount = (json['commentCount'] as num?)?.toInt() + ..likedCount = (json['likedCount'] as num?)?.toInt() + ..shareCount = (json['shareCount'] as num?)?.toInt() + ..hotCount = (json['hotCount'] as num?)?.toInt() + ..latestLikedUsers = json['latestLikedUsers'] + ..resourceId = (json['resourceId'] as num?)?.toInt() + ..resourceOwnerId = (json['resourceOwnerId'] as num?)?.toInt() + ..resourceTitle = json['resourceTitle'] as String?; + +Map _$AlbumInfoAlbumInfoCommentThreadToJson( + AlbumInfoAlbumInfoCommentThread instance) => + { + 'id': instance.id, + 'resourceInfo': instance.resourceInfo, + 'resourceType': instance.resourceType, + 'commentCount': instance.commentCount, + 'likedCount': instance.likedCount, + 'shareCount': instance.shareCount, + 'hotCount': instance.hotCount, + 'latestLikedUsers': instance.latestLikedUsers, + 'resourceId': instance.resourceId, + 'resourceOwnerId': instance.resourceOwnerId, + 'resourceTitle': instance.resourceTitle, + }; + +AlbumInfoAlbumInfoCommentThreadResourceInfo + _$AlbumInfoAlbumInfoCommentThreadResourceInfoFromJson( + Map json) => + AlbumInfoAlbumInfoCommentThreadResourceInfo() + ..id = (json['id'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..name = json['name'] as String? + ..imgUrl = json['imgUrl'] as String? + ..creator = json['creator'] + ..encodedId = json['encodedId'] + ..subTitle = json['subTitle'] + ..webUrl = json['webUrl']; + +Map _$AlbumInfoAlbumInfoCommentThreadResourceInfoToJson( + AlbumInfoAlbumInfoCommentThreadResourceInfo instance) => + { + 'id': instance.id, + 'userId': instance.userId, + 'name': instance.name, + 'imgUrl': instance.imgUrl, + 'creator': instance.creator, + 'encodedId': instance.encodedId, + 'subTitle': instance.subTitle, + 'webUrl': instance.webUrl, + }; diff --git a/lib/api/album/entity/new_album_entity.dart b/lib/api/album/entity/new_album_entity.dart index fed38a7..c41189a 100644 --- a/lib/api/album/entity/new_album_entity.dart +++ b/lib/api/album/entity/new_album_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/new_album_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/new_album_entity.g.dart'; +part 'new_album_entity.g.dart'; @JsonSerializable() class NewAlbumEntity { @@ -11,9 +11,9 @@ class NewAlbumEntity { NewAlbumEntity(); - factory NewAlbumEntity.fromJson(Map json) => $NewAlbumEntityFromJson(json); + factory NewAlbumEntity.fromJson(Map json) => _$NewAlbumEntityFromJson(json); - Map toJson() => $NewAlbumEntityToJson(this); + Map toJson() => _$NewAlbumEntityToJson(this); @override String toString() { @@ -55,9 +55,9 @@ class NewAlbumAlbums { NewAlbumAlbums(); - factory NewAlbumAlbums.fromJson(Map json) => $NewAlbumAlbumsFromJson(json); + factory NewAlbumAlbums.fromJson(Map json) => _$NewAlbumAlbumsFromJson(json); - Map toJson() => $NewAlbumAlbumsToJson(this); + Map toJson() => _$NewAlbumAlbumsToJson(this); @override String toString() { @@ -85,9 +85,9 @@ class NewAlbumAlbumsArtists { NewAlbumAlbumsArtists(); - factory NewAlbumAlbumsArtists.fromJson(Map json) => $NewAlbumAlbumsArtistsFromJson(json); + factory NewAlbumAlbumsArtists.fromJson(Map json) => _$NewAlbumAlbumsArtistsFromJson(json); - Map toJson() => $NewAlbumAlbumsArtistsToJson(this); + Map toJson() => _$NewAlbumAlbumsArtistsToJson(this); @override String toString() { @@ -118,9 +118,9 @@ class NewAlbumAlbumsArtist { NewAlbumAlbumsArtist(); - factory NewAlbumAlbumsArtist.fromJson(Map json) => $NewAlbumAlbumsArtistFromJson(json); + factory NewAlbumAlbumsArtist.fromJson(Map json) => _$NewAlbumAlbumsArtistFromJson(json); - Map toJson() => $NewAlbumAlbumsArtistToJson(this); + Map toJson() => _$NewAlbumAlbumsArtistToJson(this); @override String toString() { diff --git a/lib/api/album/entity/new_album_entity.g.dart b/lib/api/album/entity/new_album_entity.g.dart new file mode 100644 index 0000000..1e5da3d --- /dev/null +++ b/lib/api/album/entity/new_album_entity.g.dart @@ -0,0 +1,171 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'new_album_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +NewAlbumEntity _$NewAlbumEntityFromJson(Map json) => + NewAlbumEntity() + ..total = (json['total'] as num?)?.toInt() + ..albums = (json['albums'] as List?) + ?.map((e) => NewAlbumAlbums.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$NewAlbumEntityToJson(NewAlbumEntity instance) => + { + 'total': instance.total, + 'albums': instance.albums, + 'code': instance.code, + }; + +NewAlbumAlbums _$NewAlbumAlbumsFromJson(Map json) => + NewAlbumAlbums() + ..songs = json['songs'] as List? + ..paid = json['paid'] as bool? + ..onSale = json['onSale'] as bool? + ..mark = (json['mark'] as num?)?.toInt() + ..awardTags = json['awardTags'] + ..displayTags = json['displayTags'] + ..artists = (json['artists'] as List?) + ?.map( + (e) => NewAlbumAlbumsArtists.fromJson(e as Map)) + .toList() + ..copyrightId = (json['copyrightId'] as num?)?.toInt() + ..picId = (json['picId'] as num?)?.toInt() + ..artist = json['artist'] == null + ? null + : NewAlbumAlbumsArtist.fromJson( + json['artist'] as Map) + ..briefDesc = json['briefDesc'] as String? + ..publishTime = (json['publishTime'] as num?)?.toInt() + ..company = json['company'] as String? + ..picUrl = json['picUrl'] as String? + ..commentThreadId = json['commentThreadId'] as String? + ..blurPicUrl = json['blurPicUrl'] as String? + ..companyId = (json['companyId'] as num?)?.toInt() + ..pic = (json['pic'] as num?)?.toInt() + ..alias = json['alias'] as List? + ..status = (json['status'] as num?)?.toInt() + ..subType = json['subType'] as String? + ..description = json['description'] as String? + ..tags = json['tags'] as String? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..type = json['type'] as String? + ..size = (json['size'] as num?)?.toInt() + ..picidStr = json['picidStr'] as String?; + +Map _$NewAlbumAlbumsToJson(NewAlbumAlbums instance) => + { + 'songs': instance.songs, + 'paid': instance.paid, + 'onSale': instance.onSale, + 'mark': instance.mark, + 'awardTags': instance.awardTags, + 'displayTags': instance.displayTags, + 'artists': instance.artists, + 'copyrightId': instance.copyrightId, + 'picId': instance.picId, + 'artist': instance.artist, + 'briefDesc': instance.briefDesc, + 'publishTime': instance.publishTime, + 'company': instance.company, + 'picUrl': instance.picUrl, + 'commentThreadId': instance.commentThreadId, + 'blurPicUrl': instance.blurPicUrl, + 'companyId': instance.companyId, + 'pic': instance.pic, + 'alias': instance.alias, + 'status': instance.status, + 'subType': instance.subType, + 'description': instance.description, + 'tags': instance.tags, + 'name': instance.name, + 'id': instance.id, + 'type': instance.type, + 'size': instance.size, + 'picidStr': instance.picidStr, + }; + +NewAlbumAlbumsArtists _$NewAlbumAlbumsArtistsFromJson( + Map json) => + NewAlbumAlbumsArtists() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..picUrl = json['picUrl'] as String? + ..img1v1Url = json['img1v1Url'] as String? + ..followed = json['followed'] as bool? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$NewAlbumAlbumsArtistsToJson( + NewAlbumAlbumsArtists instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'picUrl': instance.picUrl, + 'img1v1Url': instance.img1v1Url, + 'followed': instance.followed, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'img1v1idStr': instance.img1v1idStr, + }; + +NewAlbumAlbumsArtist _$NewAlbumAlbumsArtistFromJson( + Map json) => + NewAlbumAlbumsArtist() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..picUrl = json['picUrl'] as String? + ..img1v1Url = json['img1v1Url'] as String? + ..followed = json['followed'] as bool? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..picidStr = json['picidStr'] as String? + ..transNames = (json['transNames'] as List?) + ?.map((e) => e as String) + .toList() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$NewAlbumAlbumsArtistToJson( + NewAlbumAlbumsArtist instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'picUrl': instance.picUrl, + 'img1v1Url': instance.img1v1Url, + 'followed': instance.followed, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'picidStr': instance.picidStr, + 'transNames': instance.transNames, + 'img1v1idStr': instance.img1v1idStr, + }; diff --git a/lib/api/mv/entity/mv_url_entity.dart b/lib/api/mv/entity/mv_url_entity.dart index e8769c2..405f58a 100644 --- a/lib/api/mv/entity/mv_url_entity.dart +++ b/lib/api/mv/entity/mv_url_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/mv_url_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/mv_url_entity.g.dart'; +part 'mv_url_entity.g.dart'; @JsonSerializable() class MvUrlEntity { @@ -10,9 +10,9 @@ class MvUrlEntity { MvUrlEntity(); - factory MvUrlEntity.fromJson(Map json) => $MvUrlEntityFromJson(json); + factory MvUrlEntity.fromJson(Map json) => _$MvUrlEntityFromJson(json); - Map toJson() => $MvUrlEntityToJson(this); + Map toJson() => _$MvUrlEntityToJson(this); @override String toString() { @@ -36,9 +36,9 @@ class MvUrlData { MvUrlData(); - factory MvUrlData.fromJson(Map json) => $MvUrlDataFromJson(json); + factory MvUrlData.fromJson(Map json) => _$MvUrlDataFromJson(json); - Map toJson() => $MvUrlDataToJson(this); + Map toJson() => _$MvUrlDataToJson(this); @override String toString() { diff --git a/lib/api/mv/entity/mv_url_entity.g.dart b/lib/api/mv/entity/mv_url_entity.g.dart new file mode 100644 index 0000000..5416b17 --- /dev/null +++ b/lib/api/mv/entity/mv_url_entity.g.dart @@ -0,0 +1,46 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'mv_url_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +MvUrlEntity _$MvUrlEntityFromJson(Map json) => MvUrlEntity() + ..code = (json['code'] as num?)?.toInt() + ..data = json['data'] == null + ? null + : MvUrlData.fromJson(json['data'] as Map); + +Map _$MvUrlEntityToJson(MvUrlEntity instance) => + { + 'code': instance.code, + 'data': instance.data, + }; + +MvUrlData _$MvUrlDataFromJson(Map json) => MvUrlData() + ..id = (json['id'] as num?)?.toInt() + ..url = json['url'] as String? + ..r = (json['r'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..md5 = json['md5'] as String? + ..code = (json['code'] as num?)?.toInt() + ..expi = (json['expi'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..mvFee = (json['mvFee'] as num?)?.toInt() + ..st = (json['st'] as num?)?.toInt() + ..msg = json['msg'] as String?; + +Map _$MvUrlDataToJson(MvUrlData instance) => { + 'id': instance.id, + 'url': instance.url, + 'r': instance.r, + 'size': instance.size, + 'md5': instance.md5, + 'code': instance.code, + 'expi': instance.expi, + 'fee': instance.fee, + 'mvFee': instance.mvFee, + 'st': instance.st, + 'msg': instance.msg, + }; diff --git a/lib/api/playlist/entity/catalogue_entity.dart b/lib/api/playlist/entity/catalogue_entity.dart index bd75262..21e8e7d 100644 --- a/lib/api/playlist/entity/catalogue_entity.dart +++ b/lib/api/playlist/entity/catalogue_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/catalogue_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/catalogue_entity.g.dart'; +part 'catalogue_entity.g.dart'; @JsonSerializable() class CatalogueEntity { @@ -12,9 +12,9 @@ class CatalogueEntity { CatalogueEntity(); - factory CatalogueEntity.fromJson(Map json) => $CatalogueEntityFromJson(json); + factory CatalogueEntity.fromJson(Map json) => _$CatalogueEntityFromJson(json); - Map toJson() => $CatalogueEntityToJson(this); + Map toJson() => _$CatalogueEntityToJson(this); @override String toString() { @@ -36,9 +36,9 @@ class CatalogueAll { CatalogueAll(); - factory CatalogueAll.fromJson(Map json) => $CatalogueAllFromJson(json); + factory CatalogueAll.fromJson(Map json) => _$CatalogueAllFromJson(json); - Map toJson() => $CatalogueAllToJson(this); + Map toJson() => _$CatalogueAllToJson(this); @override String toString() { @@ -60,9 +60,9 @@ class CatalogueSub { CatalogueSub(); - factory CatalogueSub.fromJson(Map json) => $CatalogueSubFromJson(json); + factory CatalogueSub.fromJson(Map json) => _$CatalogueSubFromJson(json); - Map toJson() => $CatalogueSubToJson(this); + Map toJson() => _$CatalogueSubToJson(this); @override String toString() { diff --git a/lib/api/playlist/entity/catalogue_entity.g.dart b/lib/api/playlist/entity/catalogue_entity.g.dart new file mode 100644 index 0000000..9f7d981 --- /dev/null +++ b/lib/api/playlist/entity/catalogue_entity.g.dart @@ -0,0 +1,74 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'catalogue_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CatalogueEntity _$CatalogueEntityFromJson(Map json) => + CatalogueEntity() + ..code = (json['code'] as num?)?.toInt() + ..all = json['all'] == null + ? null + : CatalogueAll.fromJson(json['all'] as Map) + ..sub = (json['sub'] as List?) + ?.map((e) => CatalogueSub.fromJson(e as Map)) + .toList() + ..categories = json['categories'] as Map?; + +Map _$CatalogueEntityToJson(CatalogueEntity instance) => + { + 'code': instance.code, + 'all': instance.all, + 'sub': instance.sub, + 'categories': instance.categories, + }; + +CatalogueAll _$CatalogueAllFromJson(Map json) => CatalogueAll() + ..name = json['name'] as String? + ..resourceCount = (json['resourceCount'] as num?)?.toInt() + ..imgId = (json['imgId'] as num?)?.toInt() + ..imgUrl = json['imgUrl'] + ..type = (json['type'] as num?)?.toInt() + ..category = (json['category'] as num?)?.toInt() + ..resourceType = (json['resourceType'] as num?)?.toInt() + ..hot = json['hot'] as bool? + ..activity = json['activity'] as bool?; + +Map _$CatalogueAllToJson(CatalogueAll instance) => + { + 'name': instance.name, + 'resourceCount': instance.resourceCount, + 'imgId': instance.imgId, + 'imgUrl': instance.imgUrl, + 'type': instance.type, + 'category': instance.category, + 'resourceType': instance.resourceType, + 'hot': instance.hot, + 'activity': instance.activity, + }; + +CatalogueSub _$CatalogueSubFromJson(Map json) => CatalogueSub() + ..name = json['name'] as String? + ..resourceCount = (json['resourceCount'] as num?)?.toInt() + ..imgId = (json['imgId'] as num?)?.toInt() + ..imgUrl = json['imgUrl'] + ..type = (json['type'] as num?)?.toInt() + ..category = (json['category'] as num?)?.toInt() + ..resourceType = (json['resourceType'] as num?)?.toInt() + ..hot = json['hot'] as bool? + ..activity = json['activity'] as bool?; + +Map _$CatalogueSubToJson(CatalogueSub instance) => + { + 'name': instance.name, + 'resourceCount': instance.resourceCount, + 'imgId': instance.imgId, + 'imgUrl': instance.imgUrl, + 'type': instance.type, + 'category': instance.category, + 'resourceType': instance.resourceType, + 'hot': instance.hot, + 'activity': instance.activity, + }; diff --git a/lib/api/playlist/entity/create_playlist_entity.dart b/lib/api/playlist/entity/create_playlist_entity.dart index cbf7459..b29cbd9 100644 --- a/lib/api/playlist/entity/create_playlist_entity.dart +++ b/lib/api/playlist/entity/create_playlist_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/create_playlist_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/create_playlist_entity.g.dart'; +part 'create_playlist_entity.g.dart'; @JsonSerializable() class CreatePlaylistEntity { @@ -11,9 +11,9 @@ class CreatePlaylistEntity { CreatePlaylistEntity(); - factory CreatePlaylistEntity.fromJson(Map json) => $CreatePlaylistEntityFromJson(json); + factory CreatePlaylistEntity.fromJson(Map json) => _$CreatePlaylistEntityFromJson(json); - Map toJson() => $CreatePlaylistEntityToJson(this); + Map toJson() => _$CreatePlaylistEntityToJson(this); @override String toString() { @@ -71,9 +71,9 @@ class CreatePlaylistPlaylist { CreatePlaylistPlaylist(); - factory CreatePlaylistPlaylist.fromJson(Map json) => $CreatePlaylistPlaylistFromJson(json); + factory CreatePlaylistPlaylist.fromJson(Map json) => _$CreatePlaylistPlaylistFromJson(json); - Map toJson() => $CreatePlaylistPlaylistToJson(this); + Map toJson() => _$CreatePlaylistPlaylistToJson(this); @override String toString() { diff --git a/lib/api/playlist/entity/create_playlist_entity.g.dart b/lib/api/playlist/entity/create_playlist_entity.g.dart new file mode 100644 index 0000000..784df3a --- /dev/null +++ b/lib/api/playlist/entity/create_playlist_entity.g.dart @@ -0,0 +1,122 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_playlist_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CreatePlaylistEntity _$CreatePlaylistEntityFromJson( + Map json) => + CreatePlaylistEntity() + ..code = (json['code'] as num?)?.toInt() + ..playlist = json['playlist'] == null + ? null + : CreatePlaylistPlaylist.fromJson( + json['playlist'] as Map) + ..id = (json['id'] as num?)?.toInt(); + +Map _$CreatePlaylistEntityToJson( + CreatePlaylistEntity instance) => + { + 'code': instance.code, + 'playlist': instance.playlist, + 'id': instance.id, + }; + +CreatePlaylistPlaylist _$CreatePlaylistPlaylistFromJson( + Map json) => + CreatePlaylistPlaylist() + ..subscribers = json['subscribers'] as List? + ..subscribed = json['subscribed'] + ..creator = json['creator'] + ..artists = json['artists'] + ..tracks = json['tracks'] + ..top = json['top'] as bool? + ..updateFrequency = json['updateFrequency'] + ..backgroundCoverId = (json['backgroundCoverId'] as num?)?.toInt() + ..backgroundCoverUrl = json['backgroundCoverUrl'] + ..titleImage = (json['titleImage'] as num?)?.toInt() + ..titleImageUrl = json['titleImageUrl'] + ..englishTitle = json['englishTitle'] + ..opRecommend = json['opRecommend'] as bool? + ..recommendInfo = json['recommendInfo'] + ..subscribedCount = (json['subscribedCount'] as num?)?.toInt() + ..cloudTrackCount = (json['cloudTrackCount'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..totalDuration = (json['totalDuration'] as num?)?.toInt() + ..coverImgId = (json['coverImgId'] as num?)?.toInt() + ..privacy = (json['privacy'] as num?)?.toInt() + ..trackUpdateTime = (json['trackUpdateTime'] as num?)?.toInt() + ..trackCount = (json['trackCount'] as num?)?.toInt() + ..updateTime = (json['updateTime'] as num?)?.toInt() + ..commentThreadId = json['commentThreadId'] as String? + ..coverImgUrl = json['coverImgUrl'] as String? + ..specialType = (json['specialType'] as num?)?.toInt() + ..anonimous = json['anonimous'] as bool? + ..createTime = (json['createTime'] as num?)?.toInt() + ..highQuality = json['highQuality'] as bool? + ..newImported = json['newImported'] as bool? + ..trackNumberUpdateTime = (json['trackNumberUpdateTime'] as num?)?.toInt() + ..playCount = (json['playCount'] as num?)?.toInt() + ..adType = (json['adType'] as num?)?.toInt() + ..description = json['description'] + ..tags = json['tags'] as List? + ..ordered = json['ordered'] as bool? + ..status = (json['status'] as num?)?.toInt() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..coverimgidStr = json['coverimgidStr'] as String? + ..sharedUsers = json['sharedUsers'] + ..shareStatus = json['shareStatus'] + ..copied = json['copied'] as bool? + ..containsTracks = json['containsTracks'] as bool?; + +Map _$CreatePlaylistPlaylistToJson( + CreatePlaylistPlaylist instance) => + { + 'subscribers': instance.subscribers, + 'subscribed': instance.subscribed, + 'creator': instance.creator, + 'artists': instance.artists, + 'tracks': instance.tracks, + 'top': instance.top, + 'updateFrequency': instance.updateFrequency, + 'backgroundCoverId': instance.backgroundCoverId, + 'backgroundCoverUrl': instance.backgroundCoverUrl, + 'titleImage': instance.titleImage, + 'titleImageUrl': instance.titleImageUrl, + 'englishTitle': instance.englishTitle, + 'opRecommend': instance.opRecommend, + 'recommendInfo': instance.recommendInfo, + 'subscribedCount': instance.subscribedCount, + 'cloudTrackCount': instance.cloudTrackCount, + 'userId': instance.userId, + 'totalDuration': instance.totalDuration, + 'coverImgId': instance.coverImgId, + 'privacy': instance.privacy, + 'trackUpdateTime': instance.trackUpdateTime, + 'trackCount': instance.trackCount, + 'updateTime': instance.updateTime, + 'commentThreadId': instance.commentThreadId, + 'coverImgUrl': instance.coverImgUrl, + 'specialType': instance.specialType, + 'anonimous': instance.anonimous, + 'createTime': instance.createTime, + 'highQuality': instance.highQuality, + 'newImported': instance.newImported, + 'trackNumberUpdateTime': instance.trackNumberUpdateTime, + 'playCount': instance.playCount, + 'adType': instance.adType, + 'description': instance.description, + 'tags': instance.tags, + 'ordered': instance.ordered, + 'status': instance.status, + 'name': instance.name, + 'id': instance.id, + 'coverimgidStr': instance.coverimgidStr, + 'sharedUsers': instance.sharedUsers, + 'shareStatus': instance.shareStatus, + 'copied': instance.copied, + 'containsTracks': instance.containsTracks, + }; diff --git a/lib/api/playlist/entity/high_quality_tags_entity.dart b/lib/api/playlist/entity/high_quality_tags_entity.dart index ee17aff..59ce7ef 100644 --- a/lib/api/playlist/entity/high_quality_tags_entity.dart +++ b/lib/api/playlist/entity/high_quality_tags_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/high_quality_tags_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/high_quality_tags_entity.g.dart'; +part 'high_quality_tags_entity.g.dart'; @JsonSerializable() class HighQualityTagsEntity { @@ -10,9 +10,9 @@ class HighQualityTagsEntity { HighQualityTagsEntity(); - factory HighQualityTagsEntity.fromJson(Map json) => $HighQualityTagsEntityFromJson(json); + factory HighQualityTagsEntity.fromJson(Map json) => _$HighQualityTagsEntityFromJson(json); - Map toJson() => $HighQualityTagsEntityToJson(this); + Map toJson() => _$HighQualityTagsEntityToJson(this); @override String toString() { @@ -30,9 +30,9 @@ class HighQualityTagsTags { HighQualityTagsTags(); - factory HighQualityTagsTags.fromJson(Map json) => $HighQualityTagsTagsFromJson(json); + factory HighQualityTagsTags.fromJson(Map json) => _$HighQualityTagsTagsFromJson(json); - Map toJson() => $HighQualityTagsTagsToJson(this); + Map toJson() => _$HighQualityTagsTagsToJson(this); @override String toString() { diff --git a/lib/api/playlist/entity/high_quality_tags_entity.g.dart b/lib/api/playlist/entity/high_quality_tags_entity.g.dart new file mode 100644 index 0000000..e6fdc3a --- /dev/null +++ b/lib/api/playlist/entity/high_quality_tags_entity.g.dart @@ -0,0 +1,40 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'high_quality_tags_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +HighQualityTagsEntity _$HighQualityTagsEntityFromJson( + Map json) => + HighQualityTagsEntity() + ..tags = (json['tags'] as List?) + ?.map((e) => HighQualityTagsTags.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$HighQualityTagsEntityToJson( + HighQualityTagsEntity instance) => + { + 'tags': instance.tags, + 'code': instance.code, + }; + +HighQualityTagsTags _$HighQualityTagsTagsFromJson(Map json) => + HighQualityTagsTags() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..type = (json['type'] as num?)?.toInt() + ..category = (json['category'] as num?)?.toInt() + ..hot = json['hot'] as bool?; + +Map _$HighQualityTagsTagsToJson( + HighQualityTagsTags instance) => + { + 'id': instance.id, + 'name': instance.name, + 'type': instance.type, + 'category': instance.category, + 'hot': instance.hot, + }; diff --git a/lib/api/playlist/entity/playlist_detail_entity.dart b/lib/api/playlist/entity/playlist_detail_entity.dart index 55b80c0..5e207cb 100644 --- a/lib/api/playlist/entity/playlist_detail_entity.dart +++ b/lib/api/playlist/entity/playlist_detail_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/playlist_detail_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/playlist_detail_entity.g.dart'; +part 'playlist_detail_entity.g.dart'; @JsonSerializable() class PlaylistDetailEntity { @@ -18,9 +18,9 @@ class PlaylistDetailEntity { PlaylistDetailEntity(); - factory PlaylistDetailEntity.fromJson(Map json) => $PlaylistDetailEntityFromJson(json); + factory PlaylistDetailEntity.fromJson(Map json) => _$PlaylistDetailEntityFromJson(json); - Map toJson() => $PlaylistDetailEntityToJson(this); + Map toJson() => _$PlaylistDetailEntityToJson(this); @override String toString() { @@ -94,9 +94,9 @@ class PlaylistDetailPlaylist { PlaylistDetailPlaylist(); - factory PlaylistDetailPlaylist.fromJson(Map json) => $PlaylistDetailPlaylistFromJson(json); + factory PlaylistDetailPlaylist.fromJson(Map json) => _$PlaylistDetailPlaylistFromJson(json); - Map toJson() => $PlaylistDetailPlaylistToJson(this); + Map toJson() => _$PlaylistDetailPlaylistToJson(this); @override String toString() { @@ -141,9 +141,9 @@ class PlaylistDetailPlaylistSubscribers { PlaylistDetailPlaylistSubscribers(); - factory PlaylistDetailPlaylistSubscribers.fromJson(Map json) => $PlaylistDetailPlaylistSubscribersFromJson(json); + factory PlaylistDetailPlaylistSubscribers.fromJson(Map json) => _$PlaylistDetailPlaylistSubscribersFromJson(json); - Map toJson() => $PlaylistDetailPlaylistSubscribersToJson(this); + Map toJson() => _$PlaylistDetailPlaylistSubscribersToJson(this); @override String toString() { @@ -188,9 +188,9 @@ class PlaylistDetailPlaylistCreator { PlaylistDetailPlaylistCreator(); - factory PlaylistDetailPlaylistCreator.fromJson(Map json) => $PlaylistDetailPlaylistCreatorFromJson(json); + factory PlaylistDetailPlaylistCreator.fromJson(Map json) => _$PlaylistDetailPlaylistCreatorFromJson(json); - Map toJson() => $PlaylistDetailPlaylistCreatorToJson(this); + Map toJson() => _$PlaylistDetailPlaylistCreatorToJson(this); @override String toString() { @@ -206,9 +206,9 @@ class PlaylistDetailPlaylistCreatorAvatarDetail { PlaylistDetailPlaylistCreatorAvatarDetail(); - factory PlaylistDetailPlaylistCreatorAvatarDetail.fromJson(Map json) => $PlaylistDetailPlaylistCreatorAvatarDetailFromJson(json); + factory PlaylistDetailPlaylistCreatorAvatarDetail.fromJson(Map json) => _$PlaylistDetailPlaylistCreatorAvatarDetailFromJson(json); - Map toJson() => $PlaylistDetailPlaylistCreatorAvatarDetailToJson(this); + Map toJson() => _$PlaylistDetailPlaylistCreatorAvatarDetailToJson(this); @override String toString() { @@ -271,9 +271,9 @@ class PlaylistDetailPlaylistTracks { PlaylistDetailPlaylistTracks(); - factory PlaylistDetailPlaylistTracks.fromJson(Map json) => $PlaylistDetailPlaylistTracksFromJson(json); + factory PlaylistDetailPlaylistTracks.fromJson(Map json) => _$PlaylistDetailPlaylistTracksFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksToJson(this); @override String toString() { @@ -290,9 +290,9 @@ class PlaylistDetailPlaylistTracksAr { PlaylistDetailPlaylistTracksAr(); - factory PlaylistDetailPlaylistTracksAr.fromJson(Map json) => $PlaylistDetailPlaylistTracksArFromJson(json); + factory PlaylistDetailPlaylistTracksAr.fromJson(Map json) => _$PlaylistDetailPlaylistTracksArFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksArToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksArToJson(this); @override String toString() { @@ -312,9 +312,9 @@ class PlaylistDetailPlaylistTracksAl { PlaylistDetailPlaylistTracksAl(); - factory PlaylistDetailPlaylistTracksAl.fromJson(Map json) => $PlaylistDetailPlaylistTracksAlFromJson(json); + factory PlaylistDetailPlaylistTracksAl.fromJson(Map json) => _$PlaylistDetailPlaylistTracksAlFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksAlToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksAlToJson(this); @override String toString() { @@ -331,9 +331,9 @@ class PlaylistDetailPlaylistTracksH { PlaylistDetailPlaylistTracksH(); - factory PlaylistDetailPlaylistTracksH.fromJson(Map json) => $PlaylistDetailPlaylistTracksHFromJson(json); + factory PlaylistDetailPlaylistTracksH.fromJson(Map json) => _$PlaylistDetailPlaylistTracksHFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksHToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksHToJson(this); @override String toString() { @@ -350,9 +350,9 @@ class PlaylistDetailPlaylistTracksM { PlaylistDetailPlaylistTracksM(); - factory PlaylistDetailPlaylistTracksM.fromJson(Map json) => $PlaylistDetailPlaylistTracksMFromJson(json); + factory PlaylistDetailPlaylistTracksM.fromJson(Map json) => _$PlaylistDetailPlaylistTracksMFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksMToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksMToJson(this); @override String toString() { @@ -369,9 +369,9 @@ class PlaylistDetailPlaylistTracksL { PlaylistDetailPlaylistTracksL(); - factory PlaylistDetailPlaylistTracksL.fromJson(Map json) => $PlaylistDetailPlaylistTracksLFromJson(json); + factory PlaylistDetailPlaylistTracksL.fromJson(Map json) => _$PlaylistDetailPlaylistTracksLFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksLToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksLToJson(this); @override String toString() { @@ -388,9 +388,9 @@ class PlaylistDetailPlaylistTracksSq { PlaylistDetailPlaylistTracksSq(); - factory PlaylistDetailPlaylistTracksSq.fromJson(Map json) => $PlaylistDetailPlaylistTracksSqFromJson(json); + factory PlaylistDetailPlaylistTracksSq.fromJson(Map json) => _$PlaylistDetailPlaylistTracksSqFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksSqToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksSqToJson(this); @override String toString() { @@ -407,9 +407,9 @@ class PlaylistDetailPlaylistTracksHr { PlaylistDetailPlaylistTracksHr(); - factory PlaylistDetailPlaylistTracksHr.fromJson(Map json) => $PlaylistDetailPlaylistTracksHrFromJson(json); + factory PlaylistDetailPlaylistTracksHr.fromJson(Map json) => _$PlaylistDetailPlaylistTracksHrFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTracksHrToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTracksHrToJson(this); @override String toString() { @@ -434,9 +434,9 @@ class PlaylistDetailPlaylistTrackIds { PlaylistDetailPlaylistTrackIds(); - factory PlaylistDetailPlaylistTrackIds.fromJson(Map json) => $PlaylistDetailPlaylistTrackIdsFromJson(json); + factory PlaylistDetailPlaylistTrackIds.fromJson(Map json) => _$PlaylistDetailPlaylistTrackIdsFromJson(json); - Map toJson() => $PlaylistDetailPlaylistTrackIdsToJson(this); + Map toJson() => _$PlaylistDetailPlaylistTrackIdsToJson(this); @override String toString() { @@ -450,9 +450,9 @@ class PlaylistDetailPlaylistBizExtInfo { PlaylistDetailPlaylistBizExtInfo(); - factory PlaylistDetailPlaylistBizExtInfo.fromJson(Map json) => $PlaylistDetailPlaylistBizExtInfoFromJson(json); + factory PlaylistDetailPlaylistBizExtInfo.fromJson(Map json) => _$PlaylistDetailPlaylistBizExtInfoFromJson(json); - Map toJson() => $PlaylistDetailPlaylistBizExtInfoToJson(this); + Map toJson() => _$PlaylistDetailPlaylistBizExtInfoToJson(this); @override String toString() { @@ -499,9 +499,9 @@ class PlaylistDetailPrivileges { PlaylistDetailPrivileges(); - factory PlaylistDetailPrivileges.fromJson(Map json) => $PlaylistDetailPrivilegesFromJson(json); + factory PlaylistDetailPrivileges.fromJson(Map json) => _$PlaylistDetailPrivilegesFromJson(json); - Map toJson() => $PlaylistDetailPrivilegesToJson(this); + Map toJson() => _$PlaylistDetailPrivilegesToJson(this); @override String toString() { @@ -520,9 +520,9 @@ class PlaylistDetailPrivilegesFreeTrialPrivilege { PlaylistDetailPrivilegesFreeTrialPrivilege(); - factory PlaylistDetailPrivilegesFreeTrialPrivilege.fromJson(Map json) => $PlaylistDetailPrivilegesFreeTrialPrivilegeFromJson(json); + factory PlaylistDetailPrivilegesFreeTrialPrivilege.fromJson(Map json) => _$PlaylistDetailPrivilegesFreeTrialPrivilegeFromJson(json); - Map toJson() => $PlaylistDetailPrivilegesFreeTrialPrivilegeToJson(this); + Map toJson() => _$PlaylistDetailPrivilegesFreeTrialPrivilegeToJson(this); @override String toString() { @@ -539,9 +539,9 @@ class PlaylistDetailPrivilegesChargeInfoList { PlaylistDetailPrivilegesChargeInfoList(); - factory PlaylistDetailPrivilegesChargeInfoList.fromJson(Map json) => $PlaylistDetailPrivilegesChargeInfoListFromJson(json); + factory PlaylistDetailPrivilegesChargeInfoList.fromJson(Map json) => _$PlaylistDetailPrivilegesChargeInfoListFromJson(json); - Map toJson() => $PlaylistDetailPrivilegesChargeInfoListToJson(this); + Map toJson() => _$PlaylistDetailPrivilegesChargeInfoListToJson(this); @override String toString() { diff --git a/lib/api/playlist/entity/playlist_detail_entity.g.dart b/lib/api/playlist/entity/playlist_detail_entity.g.dart new file mode 100644 index 0000000..f1db80f --- /dev/null +++ b/lib/api/playlist/entity/playlist_detail_entity.g.dart @@ -0,0 +1,762 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'playlist_detail_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PlaylistDetailEntity _$PlaylistDetailEntityFromJson( + Map json) => + PlaylistDetailEntity() + ..code = (json['code'] as num?)?.toInt() + ..relatedVideos = json['relatedVideos'] + ..playlist = json['playlist'] == null + ? null + : PlaylistDetailPlaylist.fromJson( + json['playlist'] as Map) + ..urls = json['urls'] + ..privileges = (json['privileges'] as List?) + ?.map((e) => + PlaylistDetailPrivileges.fromJson(e as Map)) + .toList() + ..sharedPrivilege = json['sharedPrivilege'] + ..resEntrance = json['resEntrance'] + ..fromUsers = json['fromUsers'] + ..fromUserCount = (json['fromUserCount'] as num?)?.toInt() + ..songFromUsers = json['songFromUsers']; + +Map _$PlaylistDetailEntityToJson( + PlaylistDetailEntity instance) => + { + 'code': instance.code, + 'relatedVideos': instance.relatedVideos, + 'playlist': instance.playlist, + 'urls': instance.urls, + 'privileges': instance.privileges, + 'sharedPrivilege': instance.sharedPrivilege, + 'resEntrance': instance.resEntrance, + 'fromUsers': instance.fromUsers, + 'fromUserCount': instance.fromUserCount, + 'songFromUsers': instance.songFromUsers, + }; + +PlaylistDetailPlaylist _$PlaylistDetailPlaylistFromJson( + Map json) => + PlaylistDetailPlaylist() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..coverImgId = (json['coverImgId'] as num?)?.toInt() + ..coverImgUrl = json['coverImgUrl'] as String? + ..coverimgidStr = json['coverimgidStr'] as String? + ..adType = (json['adType'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..createTime = (json['createTime'] as num?)?.toInt() + ..status = (json['status'] as num?)?.toInt() + ..opRecommend = json['opRecommend'] as bool? + ..highQuality = json['highQuality'] as bool? + ..newImported = json['newImported'] as bool? + ..updateTime = (json['updateTime'] as num?)?.toInt() + ..trackCount = (json['trackCount'] as num?)?.toInt() + ..specialType = (json['specialType'] as num?)?.toInt() + ..privacy = (json['privacy'] as num?)?.toInt() + ..trackUpdateTime = (json['trackUpdateTime'] as num?)?.toInt() + ..commentThreadId = json['commentThreadId'] as String? + ..playCount = (json['playCount'] as num?)?.toInt() + ..trackNumberUpdateTime = (json['trackNumberUpdateTime'] as num?)?.toInt() + ..subscribedCount = (json['subscribedCount'] as num?)?.toInt() + ..cloudTrackCount = (json['cloudTrackCount'] as num?)?.toInt() + ..ordered = json['ordered'] as bool? + ..description = json['description'] as String? + ..tags = json['tags'] as List? + ..updateFrequency = json['updateFrequency'] as String? + ..backgroundCoverId = (json['backgroundCoverId'] as num?)?.toInt() + ..backgroundCoverUrl = json['backgroundCoverUrl'] as String? + ..titleImage = (json['titleImage'] as num?)?.toInt() + ..titleImageUrl = json['titleImageUrl'] as String? + ..detailPageTitle = json['detailPageTitle'] as String? + ..englishTitle = json['englishTitle'] as String? + ..officialPlaylistType = json['officialPlaylistType'] as String? + ..copied = json['copied'] as bool? + ..relateResType = json['relateResType'] as String? + ..coverStatus = (json['coverStatus'] as num?)?.toInt() + ..subscribers = (json['subscribers'] as List?) + ?.map((e) => PlaylistDetailPlaylistSubscribers.fromJson( + e as Map)) + .toList() + ..subscribed = json['subscribed'] as bool? + ..creator = json['creator'] == null + ? null + : PlaylistDetailPlaylistCreator.fromJson( + json['creator'] as Map) + ..tracks = (json['tracks'] as List?) + ?.map((e) => + PlaylistDetailPlaylistTracks.fromJson(e as Map)) + .toList() + ..videoIds = json['videoIds'] + ..videos = json['videos'] + ..trackIds = (json['trackIds'] as List?) + ?.map((e) => PlaylistDetailPlaylistTrackIds.fromJson( + e as Map)) + .toList() + ..bannedTrackIds = json['bannedTrackIds'] + ..mvResourceInfos = json['mvResourceInfos'] + ..shareCount = (json['shareCount'] as num?)?.toInt() + ..commentCount = (json['commentCount'] as num?)?.toInt() + ..remixVideo = json['remixVideo'] + ..newDetailPageRemixVideo = json['newDetailPageRemixVideo'] + ..sharedUsers = json['sharedUsers'] + ..historySharedUsers = json['historySharedUsers'] + ..gradeStatus = json['gradeStatus'] as String? + ..score = json['score'] + ..algTags = json['algTags'] + ..distributeTags = json['distributeTags'] as List? + ..trialMode = (json['trialMode'] as num?)?.toInt() + ..displayTags = json['displayTags'] + ..displayUserInfoAsTagOnly = json['displayUserInfoAsTagOnly'] as bool? + ..playlistType = json['playlistType'] as String? + ..bizExtInfo = json['bizExtInfo'] == null + ? null + : PlaylistDetailPlaylistBizExtInfo.fromJson( + json['bizExtInfo'] as Map); + +Map _$PlaylistDetailPlaylistToJson( + PlaylistDetailPlaylist instance) => + { + 'id': instance.id, + 'name': instance.name, + 'coverImgId': instance.coverImgId, + 'coverImgUrl': instance.coverImgUrl, + 'coverimgidStr': instance.coverimgidStr, + 'adType': instance.adType, + 'userId': instance.userId, + 'createTime': instance.createTime, + 'status': instance.status, + 'opRecommend': instance.opRecommend, + 'highQuality': instance.highQuality, + 'newImported': instance.newImported, + 'updateTime': instance.updateTime, + 'trackCount': instance.trackCount, + 'specialType': instance.specialType, + 'privacy': instance.privacy, + 'trackUpdateTime': instance.trackUpdateTime, + 'commentThreadId': instance.commentThreadId, + 'playCount': instance.playCount, + 'trackNumberUpdateTime': instance.trackNumberUpdateTime, + 'subscribedCount': instance.subscribedCount, + 'cloudTrackCount': instance.cloudTrackCount, + 'ordered': instance.ordered, + 'description': instance.description, + 'tags': instance.tags, + 'updateFrequency': instance.updateFrequency, + 'backgroundCoverId': instance.backgroundCoverId, + 'backgroundCoverUrl': instance.backgroundCoverUrl, + 'titleImage': instance.titleImage, + 'titleImageUrl': instance.titleImageUrl, + 'detailPageTitle': instance.detailPageTitle, + 'englishTitle': instance.englishTitle, + 'officialPlaylistType': instance.officialPlaylistType, + 'copied': instance.copied, + 'relateResType': instance.relateResType, + 'coverStatus': instance.coverStatus, + 'subscribers': instance.subscribers, + 'subscribed': instance.subscribed, + 'creator': instance.creator, + 'tracks': instance.tracks, + 'videoIds': instance.videoIds, + 'videos': instance.videos, + 'trackIds': instance.trackIds, + 'bannedTrackIds': instance.bannedTrackIds, + 'mvResourceInfos': instance.mvResourceInfos, + 'shareCount': instance.shareCount, + 'commentCount': instance.commentCount, + 'remixVideo': instance.remixVideo, + 'newDetailPageRemixVideo': instance.newDetailPageRemixVideo, + 'sharedUsers': instance.sharedUsers, + 'historySharedUsers': instance.historySharedUsers, + 'gradeStatus': instance.gradeStatus, + 'score': instance.score, + 'algTags': instance.algTags, + 'distributeTags': instance.distributeTags, + 'trialMode': instance.trialMode, + 'displayTags': instance.displayTags, + 'displayUserInfoAsTagOnly': instance.displayUserInfoAsTagOnly, + 'playlistType': instance.playlistType, + 'bizExtInfo': instance.bizExtInfo, + }; + +PlaylistDetailPlaylistSubscribers _$PlaylistDetailPlaylistSubscribersFromJson( + Map json) => + PlaylistDetailPlaylistSubscribers() + ..defaultAvatar = json['defaultAvatar'] as bool? + ..province = (json['province'] as num?)?.toInt() + ..authStatus = (json['authStatus'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..avatarUrl = json['avatarUrl'] as String? + ..accountStatus = (json['accountStatus'] as num?)?.toInt() + ..gender = (json['gender'] as num?)?.toInt() + ..city = (json['city'] as num?)?.toInt() + ..birthday = (json['birthday'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..userType = (json['userType'] as num?)?.toInt() + ..nickname = json['nickname'] as String? + ..signature = json['signature'] as String? + ..description = json['description'] as String? + ..detailDescription = json['detailDescription'] as String? + ..avatarImgId = (json['avatarImgId'] as num?)?.toInt() + ..backgroundImgId = (json['backgroundImgId'] as num?)?.toInt() + ..backgroundUrl = json['backgroundUrl'] as String? + ..authority = (json['authority'] as num?)?.toInt() + ..mutual = json['mutual'] as bool? + ..expertTags = json['expertTags'] + ..experts = json['experts'] + ..djStatus = (json['djStatus'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..remarkName = json['remarkName'] + ..authenticationTypes = (json['authenticationTypes'] as num?)?.toInt() + ..avatarDetail = json['avatarDetail'] + ..avatarImgIdStr = json['avatarImgIdStr'] as String? + ..backgroundImgIdStr = json['backgroundImgIdStr'] as String? + ..anchor = json['anchor'] as bool? + ..avatarimgidStr = json['avatarimgidStr'] as String?; + +Map _$PlaylistDetailPlaylistSubscribersToJson( + PlaylistDetailPlaylistSubscribers instance) => + { + 'defaultAvatar': instance.defaultAvatar, + 'province': instance.province, + 'authStatus': instance.authStatus, + 'followed': instance.followed, + 'avatarUrl': instance.avatarUrl, + 'accountStatus': instance.accountStatus, + 'gender': instance.gender, + 'city': instance.city, + 'birthday': instance.birthday, + 'userId': instance.userId, + 'userType': instance.userType, + 'nickname': instance.nickname, + 'signature': instance.signature, + 'description': instance.description, + 'detailDescription': instance.detailDescription, + 'avatarImgId': instance.avatarImgId, + 'backgroundImgId': instance.backgroundImgId, + 'backgroundUrl': instance.backgroundUrl, + 'authority': instance.authority, + 'mutual': instance.mutual, + 'expertTags': instance.expertTags, + 'experts': instance.experts, + 'djStatus': instance.djStatus, + 'vipType': instance.vipType, + 'remarkName': instance.remarkName, + 'authenticationTypes': instance.authenticationTypes, + 'avatarDetail': instance.avatarDetail, + 'avatarImgIdStr': instance.avatarImgIdStr, + 'backgroundImgIdStr': instance.backgroundImgIdStr, + 'anchor': instance.anchor, + 'avatarimgidStr': instance.avatarimgidStr, + }; + +PlaylistDetailPlaylistCreator _$PlaylistDetailPlaylistCreatorFromJson( + Map json) => + PlaylistDetailPlaylistCreator() + ..defaultAvatar = json['defaultAvatar'] as bool? + ..province = (json['province'] as num?)?.toInt() + ..authStatus = (json['authStatus'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..avatarUrl = json['avatarUrl'] as String? + ..accountStatus = (json['accountStatus'] as num?)?.toInt() + ..gender = (json['gender'] as num?)?.toInt() + ..city = (json['city'] as num?)?.toInt() + ..birthday = (json['birthday'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..userType = (json['userType'] as num?)?.toInt() + ..nickname = json['nickname'] as String? + ..signature = json['signature'] as String? + ..description = json['description'] as String? + ..detailDescription = json['detailDescription'] as String? + ..avatarImgId = (json['avatarImgId'] as num?)?.toInt() + ..backgroundImgId = (json['backgroundImgId'] as num?)?.toInt() + ..backgroundUrl = json['backgroundUrl'] as String? + ..authority = (json['authority'] as num?)?.toInt() + ..mutual = json['mutual'] as bool? + ..expertTags = json['expertTags'] + ..experts = json['experts'] + ..djStatus = (json['djStatus'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..remarkName = json['remarkName'] + ..authenticationTypes = (json['authenticationTypes'] as num?)?.toInt() + ..avatarDetail = json['avatarDetail'] == null + ? null + : PlaylistDetailPlaylistCreatorAvatarDetail.fromJson( + json['avatarDetail'] as Map) + ..avatarImgIdStr = json['avatarImgIdStr'] as String? + ..backgroundImgIdStr = json['backgroundImgIdStr'] as String? + ..anchor = json['anchor'] as bool? + ..avatarimgidStr = json['avatarimgidStr'] as String?; + +Map _$PlaylistDetailPlaylistCreatorToJson( + PlaylistDetailPlaylistCreator instance) => + { + 'defaultAvatar': instance.defaultAvatar, + 'province': instance.province, + 'authStatus': instance.authStatus, + 'followed': instance.followed, + 'avatarUrl': instance.avatarUrl, + 'accountStatus': instance.accountStatus, + 'gender': instance.gender, + 'city': instance.city, + 'birthday': instance.birthday, + 'userId': instance.userId, + 'userType': instance.userType, + 'nickname': instance.nickname, + 'signature': instance.signature, + 'description': instance.description, + 'detailDescription': instance.detailDescription, + 'avatarImgId': instance.avatarImgId, + 'backgroundImgId': instance.backgroundImgId, + 'backgroundUrl': instance.backgroundUrl, + 'authority': instance.authority, + 'mutual': instance.mutual, + 'expertTags': instance.expertTags, + 'experts': instance.experts, + 'djStatus': instance.djStatus, + 'vipType': instance.vipType, + 'remarkName': instance.remarkName, + 'authenticationTypes': instance.authenticationTypes, + 'avatarDetail': instance.avatarDetail, + 'avatarImgIdStr': instance.avatarImgIdStr, + 'backgroundImgIdStr': instance.backgroundImgIdStr, + 'anchor': instance.anchor, + 'avatarimgidStr': instance.avatarimgidStr, + }; + +PlaylistDetailPlaylistCreatorAvatarDetail + _$PlaylistDetailPlaylistCreatorAvatarDetailFromJson( + Map json) => + PlaylistDetailPlaylistCreatorAvatarDetail() + ..userType = (json['userType'] as num?)?.toInt() + ..identityLevel = (json['identityLevel'] as num?)?.toInt() + ..identityIconUrl = json['identityIconUrl'] as String?; + +Map _$PlaylistDetailPlaylistCreatorAvatarDetailToJson( + PlaylistDetailPlaylistCreatorAvatarDetail instance) => + { + 'userType': instance.userType, + 'identityLevel': instance.identityLevel, + 'identityIconUrl': instance.identityIconUrl, + }; + +PlaylistDetailPlaylistTracks _$PlaylistDetailPlaylistTracksFromJson( + Map json) => + PlaylistDetailPlaylistTracks() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..pst = (json['pst'] as num?)?.toInt() + ..t = (json['t'] as num?)?.toInt() + ..ar = (json['ar'] as List?) + ?.map((e) => PlaylistDetailPlaylistTracksAr.fromJson( + e as Map)) + .toList() + ..alia = json['alia'] as List? + ..pop = (json['pop'] as num?)?.toDouble() + ..st = (json['st'] as num?)?.toInt() + ..rt = json['rt'] as String? + ..fee = (json['fee'] as num?)?.toInt() + ..v = (json['v'] as num?)?.toInt() + ..crbt = json['crbt'] + ..cf = json['cf'] as String? + ..al = json['al'] == null + ? null + : PlaylistDetailPlaylistTracksAl.fromJson( + json['al'] as Map) + ..dt = (json['dt'] as num?)?.toInt() + ..h = json['h'] == null + ? null + : PlaylistDetailPlaylistTracksH.fromJson( + json['h'] as Map) + ..m = json['m'] == null + ? null + : PlaylistDetailPlaylistTracksM.fromJson( + json['m'] as Map) + ..l = json['l'] == null + ? null + : PlaylistDetailPlaylistTracksL.fromJson( + json['l'] as Map) + ..sq = json['sq'] == null + ? null + : PlaylistDetailPlaylistTracksSq.fromJson( + json['sq'] as Map) + ..hr = json['hr'] == null + ? null + : PlaylistDetailPlaylistTracksHr.fromJson( + json['hr'] as Map) + ..a = json['a'] + ..cd = json['cd'] as String? + ..no = (json['no'] as num?)?.toInt() + ..rtUrl = json['rtUrl'] + ..ftype = (json['ftype'] as num?)?.toInt() + ..rtUrls = json['rtUrls'] as List? + ..djId = (json['djId'] as num?)?.toInt() + ..copyright = (json['copyright'] as num?)?.toInt() + ..sId = (json['sId'] as num?)?.toInt() + ..mark = (json['mark'] as num?)?.toInt() + ..originCoverType = (json['originCoverType'] as num?)?.toInt() + ..originSongSimpleData = json['originSongSimpleData'] + ..tagPicList = json['tagPicList'] + ..resourceState = json['resourceState'] as bool? + ..version = (json['version'] as num?)?.toInt() + ..songJumpInfo = json['songJumpInfo'] + ..entertainmentTags = json['entertainmentTags'] + ..awardTags = json['awardTags'] + ..single = (json['single'] as num?)?.toInt() + ..noCopyrightRcmd = json['noCopyrightRcmd'] + ..alg = json['alg'] as String? + ..displayReason = json['displayReason'] + ..rtype = (json['rtype'] as num?)?.toInt() + ..rurl = json['rurl'] + ..mst = (json['mst'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..mv = (json['mv'] as num?)?.toInt() + ..publishTime = (json['publishTime'] as num?)?.toInt() + ..tns = (json['tns'] as List?)?.map((e) => e as String).toList(); + +Map _$PlaylistDetailPlaylistTracksToJson( + PlaylistDetailPlaylistTracks instance) => + { + 'name': instance.name, + 'id': instance.id, + 'pst': instance.pst, + 't': instance.t, + 'ar': instance.ar, + 'alia': instance.alia, + 'pop': instance.pop, + 'st': instance.st, + 'rt': instance.rt, + 'fee': instance.fee, + 'v': instance.v, + 'crbt': instance.crbt, + 'cf': instance.cf, + 'al': instance.al, + 'dt': instance.dt, + 'h': instance.h, + 'm': instance.m, + 'l': instance.l, + 'sq': instance.sq, + 'hr': instance.hr, + 'a': instance.a, + 'cd': instance.cd, + 'no': instance.no, + 'rtUrl': instance.rtUrl, + 'ftype': instance.ftype, + 'rtUrls': instance.rtUrls, + 'djId': instance.djId, + 'copyright': instance.copyright, + 'sId': instance.sId, + 'mark': instance.mark, + 'originCoverType': instance.originCoverType, + 'originSongSimpleData': instance.originSongSimpleData, + 'tagPicList': instance.tagPicList, + 'resourceState': instance.resourceState, + 'version': instance.version, + 'songJumpInfo': instance.songJumpInfo, + 'entertainmentTags': instance.entertainmentTags, + 'awardTags': instance.awardTags, + 'single': instance.single, + 'noCopyrightRcmd': instance.noCopyrightRcmd, + 'alg': instance.alg, + 'displayReason': instance.displayReason, + 'rtype': instance.rtype, + 'rurl': instance.rurl, + 'mst': instance.mst, + 'cp': instance.cp, + 'mv': instance.mv, + 'publishTime': instance.publishTime, + 'tns': instance.tns, + }; + +PlaylistDetailPlaylistTracksAr _$PlaylistDetailPlaylistTracksArFromJson( + Map json) => + PlaylistDetailPlaylistTracksAr() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..tns = json['tns'] as List? + ..alias = json['alias'] as List?; + +Map _$PlaylistDetailPlaylistTracksArToJson( + PlaylistDetailPlaylistTracksAr instance) => + { + 'id': instance.id, + 'name': instance.name, + 'tns': instance.tns, + 'alias': instance.alias, + }; + +PlaylistDetailPlaylistTracksAl _$PlaylistDetailPlaylistTracksAlFromJson( + Map json) => + PlaylistDetailPlaylistTracksAl() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..picUrl = json['picUrl'] as String? + ..tns = json['tns'] as List? + ..picStr = json['picStr'] as String? + ..pic = (json['pic'] as num?)?.toInt(); + +Map _$PlaylistDetailPlaylistTracksAlToJson( + PlaylistDetailPlaylistTracksAl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'picUrl': instance.picUrl, + 'tns': instance.tns, + 'picStr': instance.picStr, + 'pic': instance.pic, + }; + +PlaylistDetailPlaylistTracksH _$PlaylistDetailPlaylistTracksHFromJson( + Map json) => + PlaylistDetailPlaylistTracksH() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble(); + +Map _$PlaylistDetailPlaylistTracksHToJson( + PlaylistDetailPlaylistTracksH instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + }; + +PlaylistDetailPlaylistTracksM _$PlaylistDetailPlaylistTracksMFromJson( + Map json) => + PlaylistDetailPlaylistTracksM() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble(); + +Map _$PlaylistDetailPlaylistTracksMToJson( + PlaylistDetailPlaylistTracksM instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + }; + +PlaylistDetailPlaylistTracksL _$PlaylistDetailPlaylistTracksLFromJson( + Map json) => + PlaylistDetailPlaylistTracksL() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble(); + +Map _$PlaylistDetailPlaylistTracksLToJson( + PlaylistDetailPlaylistTracksL instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + }; + +PlaylistDetailPlaylistTracksSq _$PlaylistDetailPlaylistTracksSqFromJson( + Map json) => + PlaylistDetailPlaylistTracksSq() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble(); + +Map _$PlaylistDetailPlaylistTracksSqToJson( + PlaylistDetailPlaylistTracksSq instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + }; + +PlaylistDetailPlaylistTracksHr _$PlaylistDetailPlaylistTracksHrFromJson( + Map json) => + PlaylistDetailPlaylistTracksHr() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble(); + +Map _$PlaylistDetailPlaylistTracksHrToJson( + PlaylistDetailPlaylistTracksHr instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + }; + +PlaylistDetailPlaylistTrackIds _$PlaylistDetailPlaylistTrackIdsFromJson( + Map json) => + PlaylistDetailPlaylistTrackIds() + ..id = (json['id'] as num?)?.toInt() + ..v = (json['v'] as num?)?.toInt() + ..t = (json['t'] as num?)?.toInt() + ..at = (json['at'] as num?)?.toInt() + ..alg = json['alg'] as String? + ..uid = (json['uid'] as num?)?.toInt() + ..rcmdReason = json['rcmdReason'] as String? + ..rcmdReasonTitle = json['rcmdReasonTitle'] as String? + ..sc = json['sc'] + ..f = json['f'] + ..sr = json['sr'] + ..dpr = json['dpr']; + +Map _$PlaylistDetailPlaylistTrackIdsToJson( + PlaylistDetailPlaylistTrackIds instance) => + { + 'id': instance.id, + 'v': instance.v, + 't': instance.t, + 'at': instance.at, + 'alg': instance.alg, + 'uid': instance.uid, + 'rcmdReason': instance.rcmdReason, + 'rcmdReasonTitle': instance.rcmdReasonTitle, + 'sc': instance.sc, + 'f': instance.f, + 'sr': instance.sr, + 'dpr': instance.dpr, + }; + +PlaylistDetailPlaylistBizExtInfo _$PlaylistDetailPlaylistBizExtInfoFromJson( + Map json) => + PlaylistDetailPlaylistBizExtInfo(); + +Map _$PlaylistDetailPlaylistBizExtInfoToJson( + PlaylistDetailPlaylistBizExtInfo instance) => + {}; + +PlaylistDetailPrivileges _$PlaylistDetailPrivilegesFromJson( + Map json) => + PlaylistDetailPrivileges() + ..id = (json['id'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..payed = (json['payed'] as num?)?.toInt() + ..realPayed = (json['realPayed'] as num?)?.toInt() + ..st = (json['st'] as num?)?.toInt() + ..pl = (json['pl'] as num?)?.toInt() + ..dl = (json['dl'] as num?)?.toInt() + ..sp = (json['sp'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..subp = (json['subp'] as num?)?.toInt() + ..cs = json['cs'] as bool? + ..maxbr = (json['maxbr'] as num?)?.toInt() + ..fl = (json['fl'] as num?)?.toInt() + ..pc = json['pc'] + ..toast = json['toast'] as bool? + ..flag = (json['flag'] as num?)?.toInt() + ..paidBigBang = json['paidBigBang'] as bool? + ..preSell = json['preSell'] as bool? + ..playMaxbr = (json['playMaxbr'] as num?)?.toInt() + ..downloadMaxbr = (json['downloadMaxbr'] as num?)?.toInt() + ..maxBrLevel = json['maxBrLevel'] as String? + ..playMaxBrLevel = json['playMaxBrLevel'] as String? + ..downloadMaxBrLevel = json['downloadMaxBrLevel'] as String? + ..plLevel = json['plLevel'] as String? + ..dlLevel = json['dlLevel'] as String? + ..flLevel = json['flLevel'] as String? + ..rscl = json['rscl'] + ..freeTrialPrivilege = json['freeTrialPrivilege'] == null + ? null + : PlaylistDetailPrivilegesFreeTrialPrivilege.fromJson( + json['freeTrialPrivilege'] as Map) + ..rightSource = (json['rightSource'] as num?)?.toInt() + ..chargeInfoList = (json['chargeInfoList'] as List?) + ?.map((e) => PlaylistDetailPrivilegesChargeInfoList.fromJson( + e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message'] + ..plLevels = json['plLevels'] + ..dlLevels = json['dlLevels']; + +Map _$PlaylistDetailPrivilegesToJson( + PlaylistDetailPrivileges instance) => + { + 'id': instance.id, + 'fee': instance.fee, + 'payed': instance.payed, + 'realPayed': instance.realPayed, + 'st': instance.st, + 'pl': instance.pl, + 'dl': instance.dl, + 'sp': instance.sp, + 'cp': instance.cp, + 'subp': instance.subp, + 'cs': instance.cs, + 'maxbr': instance.maxbr, + 'fl': instance.fl, + 'pc': instance.pc, + 'toast': instance.toast, + 'flag': instance.flag, + 'paidBigBang': instance.paidBigBang, + 'preSell': instance.preSell, + 'playMaxbr': instance.playMaxbr, + 'downloadMaxbr': instance.downloadMaxbr, + 'maxBrLevel': instance.maxBrLevel, + 'playMaxBrLevel': instance.playMaxBrLevel, + 'downloadMaxBrLevel': instance.downloadMaxBrLevel, + 'plLevel': instance.plLevel, + 'dlLevel': instance.dlLevel, + 'flLevel': instance.flLevel, + 'rscl': instance.rscl, + 'freeTrialPrivilege': instance.freeTrialPrivilege, + 'rightSource': instance.rightSource, + 'chargeInfoList': instance.chargeInfoList, + 'code': instance.code, + 'message': instance.message, + 'plLevels': instance.plLevels, + 'dlLevels': instance.dlLevels, + }; + +PlaylistDetailPrivilegesFreeTrialPrivilege + _$PlaylistDetailPrivilegesFreeTrialPrivilegeFromJson( + Map json) => + PlaylistDetailPrivilegesFreeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool? + ..listenType = (json['listenType'] as num?)?.toInt() + ..cannotListenReason = (json['cannotListenReason'] as num?)?.toInt() + ..playReason = json['playReason'] + ..freeLimitTagType = json['freeLimitTagType']; + +Map _$PlaylistDetailPrivilegesFreeTrialPrivilegeToJson( + PlaylistDetailPrivilegesFreeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + 'listenType': instance.listenType, + 'cannotListenReason': instance.cannotListenReason, + 'playReason': instance.playReason, + 'freeLimitTagType': instance.freeLimitTagType, + }; + +PlaylistDetailPrivilegesChargeInfoList + _$PlaylistDetailPrivilegesChargeInfoListFromJson( + Map json) => + PlaylistDetailPrivilegesChargeInfoList() + ..rate = (json['rate'] as num?)?.toInt() + ..chargeUrl = json['chargeUrl'] + ..chargeMessage = json['chargeMessage'] + ..chargeType = (json['chargeType'] as num?)?.toInt(); + +Map _$PlaylistDetailPrivilegesChargeInfoListToJson( + PlaylistDetailPrivilegesChargeInfoList instance) => + { + 'rate': instance.rate, + 'chargeUrl': instance.chargeUrl, + 'chargeMessage': instance.chargeMessage, + 'chargeType': instance.chargeType, + }; diff --git a/lib/api/recommend/entity/recommend_resource_entity.dart b/lib/api/recommend/entity/recommend_resource_entity.dart index 0b9d768..5e33186 100644 --- a/lib/api/recommend/entity/recommend_resource_entity.dart +++ b/lib/api/recommend/entity/recommend_resource_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/recommend_resource_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/recommend_resource_entity.g.dart'; +part 'recommend_resource_entity.g.dart'; @JsonSerializable() class RecommendResourceEntity { @@ -12,9 +12,9 @@ class RecommendResourceEntity { RecommendResourceEntity(); - factory RecommendResourceEntity.fromJson(Map json) => $RecommendResourceEntityFromJson(json); + factory RecommendResourceEntity.fromJson(Map json) => _$RecommendResourceEntityFromJson(json); - Map toJson() => $RecommendResourceEntityToJson(this); + Map toJson() => _$RecommendResourceEntityToJson(this); @override String toString() { @@ -38,9 +38,9 @@ class RecommendResourceRecommend { RecommendResourceRecommend(); - factory RecommendResourceRecommend.fromJson(Map json) => $RecommendResourceRecommendFromJson(json); + factory RecommendResourceRecommend.fromJson(Map json) => _$RecommendResourceRecommendFromJson(json); - Map toJson() => $RecommendResourceRecommendToJson(this); + Map toJson() => _$RecommendResourceRecommendToJson(this); @override String toString() { @@ -79,9 +79,9 @@ class RecommendResourceRecommendCreator { RecommendResourceRecommendCreator(); - factory RecommendResourceRecommendCreator.fromJson(Map json) => $RecommendResourceRecommendCreatorFromJson(json); + factory RecommendResourceRecommendCreator.fromJson(Map json) => _$RecommendResourceRecommendCreatorFromJson(json); - Map toJson() => $RecommendResourceRecommendCreatorToJson(this); + Map toJson() => _$RecommendResourceRecommendCreatorToJson(this); @override String toString() { diff --git a/lib/api/recommend/entity/recommend_resource_entity.g.dart b/lib/api/recommend/entity/recommend_resource_entity.g.dart new file mode 100644 index 0000000..3693800 --- /dev/null +++ b/lib/api/recommend/entity/recommend_resource_entity.g.dart @@ -0,0 +1,124 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'recommend_resource_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +RecommendResourceEntity _$RecommendResourceEntityFromJson( + Map json) => + RecommendResourceEntity() + ..code = (json['code'] as num?)?.toInt() + ..featureFirst = json['featureFirst'] as bool? + ..haveRcmdSongs = json['haveRcmdSongs'] as bool? + ..recommend = (json['recommend'] as List) + .map((e) => + RecommendResourceRecommend.fromJson(e as Map)) + .toList(); + +Map _$RecommendResourceEntityToJson( + RecommendResourceEntity instance) => + { + 'code': instance.code, + 'featureFirst': instance.featureFirst, + 'haveRcmdSongs': instance.haveRcmdSongs, + 'recommend': instance.recommend, + }; + +RecommendResourceRecommend _$RecommendResourceRecommendFromJson( + Map json) => + RecommendResourceRecommend() + ..id = (json['id'] as num?)?.toInt() + ..type = (json['type'] as num?)?.toInt() + ..name = json['name'] as String? + ..copywriter = json['copywriter'] as String? + ..picUrl = json['picUrl'] as String? + ..playcount = (json['playcount'] as num?)?.toInt() + ..createTime = (json['createTime'] as num?)?.toInt() + ..creator = json['creator'] == null + ? null + : RecommendResourceRecommendCreator.fromJson( + json['creator'] as Map) + ..trackCount = (json['trackCount'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..alg = json['alg'] as String?; + +Map _$RecommendResourceRecommendToJson( + RecommendResourceRecommend instance) => + { + 'id': instance.id, + 'type': instance.type, + 'name': instance.name, + 'copywriter': instance.copywriter, + 'picUrl': instance.picUrl, + 'playcount': instance.playcount, + 'createTime': instance.createTime, + 'creator': instance.creator, + 'trackCount': instance.trackCount, + 'userId': instance.userId, + 'alg': instance.alg, + }; + +RecommendResourceRecommendCreator _$RecommendResourceRecommendCreatorFromJson( + Map json) => + RecommendResourceRecommendCreator() + ..accountStatus = (json['accountStatus'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..province = (json['province'] as num?)?.toInt() + ..avatarUrl = json['avatarUrl'] as String? + ..authStatus = (json['authStatus'] as num?)?.toInt() + ..userType = (json['userType'] as num?)?.toInt() + ..nickname = json['nickname'] as String? + ..gender = (json['gender'] as num?)?.toInt() + ..birthday = (json['birthday'] as num?)?.toInt() + ..city = (json['city'] as num?)?.toInt() + ..backgroundUrl = json['backgroundUrl'] as String? + ..avatarImgId = (json['avatarImgId'] as num?)?.toInt() + ..backgroundImgId = (json['backgroundImgId'] as num?)?.toInt() + ..detailDescription = json['detailDescription'] as String? + ..defaultAvatar = json['defaultAvatar'] as bool? + ..expertTags = (json['expertTags'] as List?) + ?.map((e) => e as String) + .toList() + ..djStatus = (json['djStatus'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..mutual = json['mutual'] as bool? + ..remarkName = json['remarkName'] as String? + ..avatarImgIdStr = json['avatarImgIdStr'] as String? + ..backgroundImgIdStr = json['backgroundImgIdStr'] as String? + ..description = json['description'] as String? + ..userId = (json['userId'] as num?)?.toInt() + ..signature = json['signature'] as String? + ..authority = (json['authority'] as num?)?.toInt(); + +Map _$RecommendResourceRecommendCreatorToJson( + RecommendResourceRecommendCreator instance) => + { + 'accountStatus': instance.accountStatus, + 'vipType': instance.vipType, + 'province': instance.province, + 'avatarUrl': instance.avatarUrl, + 'authStatus': instance.authStatus, + 'userType': instance.userType, + 'nickname': instance.nickname, + 'gender': instance.gender, + 'birthday': instance.birthday, + 'city': instance.city, + 'backgroundUrl': instance.backgroundUrl, + 'avatarImgId': instance.avatarImgId, + 'backgroundImgId': instance.backgroundImgId, + 'detailDescription': instance.detailDescription, + 'defaultAvatar': instance.defaultAvatar, + 'expertTags': instance.expertTags, + 'djStatus': instance.djStatus, + 'followed': instance.followed, + 'mutual': instance.mutual, + 'remarkName': instance.remarkName, + 'avatarImgIdStr': instance.avatarImgIdStr, + 'backgroundImgIdStr': instance.backgroundImgIdStr, + 'description': instance.description, + 'userId': instance.userId, + 'signature': instance.signature, + 'authority': instance.authority, + }; diff --git a/lib/api/recommend/entity/recommend_song_entity.dart b/lib/api/recommend/entity/recommend_song_entity.dart index c3c305b..4618906 100644 --- a/lib/api/recommend/entity/recommend_song_entity.dart +++ b/lib/api/recommend/entity/recommend_song_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/recommend_song_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/recommend_song_entity.g.dart'; +part 'recommend_song_entity.g.dart'; @JsonSerializable() class RecommendSongEntity { @@ -10,9 +10,9 @@ class RecommendSongEntity { RecommendSongEntity(); - factory RecommendSongEntity.fromJson(Map json) => $RecommendSongEntityFromJson(json); + factory RecommendSongEntity.fromJson(Map json) => _$RecommendSongEntityFromJson(json); - Map toJson() => $RecommendSongEntityToJson(this); + Map toJson() => _$RecommendSongEntityToJson(this); @override String toString() { @@ -30,9 +30,9 @@ class RecommendSongData { RecommendSongData(); - factory RecommendSongData.fromJson(Map json) => $RecommendSongDataFromJson(json); + factory RecommendSongData.fromJson(Map json) => _$RecommendSongDataFromJson(json); - Map toJson() => $RecommendSongDataToJson(this); + Map toJson() => _$RecommendSongDataToJson(this); @override String toString() { @@ -96,9 +96,9 @@ class RecommendSongDataDailySongs { RecommendSongDataDailySongs(); - factory RecommendSongDataDailySongs.fromJson(Map json) => $RecommendSongDataDailySongsFromJson(json); + factory RecommendSongDataDailySongs.fromJson(Map json) => _$RecommendSongDataDailySongsFromJson(json); - Map toJson() => $RecommendSongDataDailySongsToJson(this); + Map toJson() => _$RecommendSongDataDailySongsToJson(this); @override String toString() { @@ -115,9 +115,9 @@ class RecommendSongDataDailySongsAr { RecommendSongDataDailySongsAr(); - factory RecommendSongDataDailySongsAr.fromJson(Map json) => $RecommendSongDataDailySongsArFromJson(json); + factory RecommendSongDataDailySongsAr.fromJson(Map json) => _$RecommendSongDataDailySongsArFromJson(json); - Map toJson() => $RecommendSongDataDailySongsArToJson(this); + Map toJson() => _$RecommendSongDataDailySongsArToJson(this); @override String toString() { @@ -137,9 +137,9 @@ class RecommendSongDataDailySongsAl { RecommendSongDataDailySongsAl(); - factory RecommendSongDataDailySongsAl.fromJson(Map json) => $RecommendSongDataDailySongsAlFromJson(json); + factory RecommendSongDataDailySongsAl.fromJson(Map json) => _$RecommendSongDataDailySongsAlFromJson(json); - Map toJson() => $RecommendSongDataDailySongsAlToJson(this); + Map toJson() => _$RecommendSongDataDailySongsAlToJson(this); @override String toString() { @@ -157,9 +157,9 @@ class RecommendSongDataDailySongsH { RecommendSongDataDailySongsH(); - factory RecommendSongDataDailySongsH.fromJson(Map json) => $RecommendSongDataDailySongsHFromJson(json); + factory RecommendSongDataDailySongsH.fromJson(Map json) => _$RecommendSongDataDailySongsHFromJson(json); - Map toJson() => $RecommendSongDataDailySongsHToJson(this); + Map toJson() => _$RecommendSongDataDailySongsHToJson(this); @override String toString() { @@ -177,9 +177,9 @@ class RecommendSongDataDailySongsM { RecommendSongDataDailySongsM(); - factory RecommendSongDataDailySongsM.fromJson(Map json) => $RecommendSongDataDailySongsMFromJson(json); + factory RecommendSongDataDailySongsM.fromJson(Map json) => _$RecommendSongDataDailySongsMFromJson(json); - Map toJson() => $RecommendSongDataDailySongsMToJson(this); + Map toJson() => _$RecommendSongDataDailySongsMToJson(this); @override String toString() { @@ -197,9 +197,9 @@ class RecommendSongDataDailySongsL { RecommendSongDataDailySongsL(); - factory RecommendSongDataDailySongsL.fromJson(Map json) => $RecommendSongDataDailySongsLFromJson(json); + factory RecommendSongDataDailySongsL.fromJson(Map json) => _$RecommendSongDataDailySongsLFromJson(json); - Map toJson() => $RecommendSongDataDailySongsLToJson(this); + Map toJson() => _$RecommendSongDataDailySongsLToJson(this); @override String toString() { @@ -217,9 +217,9 @@ class RecommendSongDataDailySongsSq { RecommendSongDataDailySongsSq(); - factory RecommendSongDataDailySongsSq.fromJson(Map json) => $RecommendSongDataDailySongsSqFromJson(json); + factory RecommendSongDataDailySongsSq.fromJson(Map json) => _$RecommendSongDataDailySongsSqFromJson(json); - Map toJson() => $RecommendSongDataDailySongsSqToJson(this); + Map toJson() => _$RecommendSongDataDailySongsSqToJson(this); @override String toString() { @@ -237,9 +237,9 @@ class RecommendSongDataDailySongsHr { RecommendSongDataDailySongsHr(); - factory RecommendSongDataDailySongsHr.fromJson(Map json) => $RecommendSongDataDailySongsHrFromJson(json); + factory RecommendSongDataDailySongsHr.fromJson(Map json) => _$RecommendSongDataDailySongsHrFromJson(json); - Map toJson() => $RecommendSongDataDailySongsHrToJson(this); + Map toJson() => _$RecommendSongDataDailySongsHrToJson(this); @override String toString() { @@ -284,9 +284,9 @@ class RecommendSongDataDailySongsPrivilege { RecommendSongDataDailySongsPrivilege(); - factory RecommendSongDataDailySongsPrivilege.fromJson(Map json) => $RecommendSongDataDailySongsPrivilegeFromJson(json); + factory RecommendSongDataDailySongsPrivilege.fromJson(Map json) => _$RecommendSongDataDailySongsPrivilegeFromJson(json); - Map toJson() => $RecommendSongDataDailySongsPrivilegeToJson(this); + Map toJson() => _$RecommendSongDataDailySongsPrivilegeToJson(this); @override String toString() { @@ -305,9 +305,9 @@ class RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege { RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege(); - factory RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege.fromJson(Map json) => $RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeFromJson(json); + factory RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege.fromJson(Map json) => _$RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeFromJson(json); - Map toJson() => $RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeToJson(this); + Map toJson() => _$RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeToJson(this); @override String toString() { @@ -324,9 +324,9 @@ class RecommendSongDataDailySongsPrivilegeChargeInfoList { RecommendSongDataDailySongsPrivilegeChargeInfoList(); - factory RecommendSongDataDailySongsPrivilegeChargeInfoList.fromJson(Map json) => $RecommendSongDataDailySongsPrivilegeChargeInfoListFromJson(json); + factory RecommendSongDataDailySongsPrivilegeChargeInfoList.fromJson(Map json) => _$RecommendSongDataDailySongsPrivilegeChargeInfoListFromJson(json); - Map toJson() => $RecommendSongDataDailySongsPrivilegeChargeInfoListToJson(this); + Map toJson() => _$RecommendSongDataDailySongsPrivilegeChargeInfoListToJson(this); @override String toString() { @@ -343,9 +343,9 @@ class RecommendSongDataRecommendReasons { RecommendSongDataRecommendReasons(); - factory RecommendSongDataRecommendReasons.fromJson(Map json) => $RecommendSongDataRecommendReasonsFromJson(json); + factory RecommendSongDataRecommendReasons.fromJson(Map json) => _$RecommendSongDataRecommendReasonsFromJson(json); - Map toJson() => $RecommendSongDataRecommendReasonsToJson(this); + Map toJson() => _$RecommendSongDataRecommendReasonsToJson(this); @override String toString() { diff --git a/lib/api/recommend/entity/recommend_song_entity.g.dart b/lib/api/recommend/entity/recommend_song_entity.g.dart new file mode 100644 index 0000000..cd7926f --- /dev/null +++ b/lib/api/recommend/entity/recommend_song_entity.g.dart @@ -0,0 +1,448 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'recommend_song_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +RecommendSongEntity _$RecommendSongEntityFromJson(Map json) => + RecommendSongEntity() + ..code = (json['code'] as num?)?.toInt() + ..data = json['data'] == null + ? null + : RecommendSongData.fromJson(json['data'] as Map); + +Map _$RecommendSongEntityToJson( + RecommendSongEntity instance) => + { + 'code': instance.code, + 'data': instance.data, + }; + +RecommendSongData _$RecommendSongDataFromJson(Map json) => + RecommendSongData() + ..dailySongs = (json['dailySongs'] as List?) + ?.map((e) => + RecommendSongDataDailySongs.fromJson(e as Map)) + .toList() + ..orderSongs = json['orderSongs'] as List? + ..recommendReasons = (json['recommendReasons'] as List?) + ?.map((e) => RecommendSongDataRecommendReasons.fromJson( + e as Map)) + .toList() + ..mvResourceInfos = json['mvResourceInfos'] + ..demote = json['demote'] as bool?; + +Map _$RecommendSongDataToJson(RecommendSongData instance) => + { + 'dailySongs': instance.dailySongs, + 'orderSongs': instance.orderSongs, + 'recommendReasons': instance.recommendReasons, + 'mvResourceInfos': instance.mvResourceInfos, + 'demote': instance.demote, + }; + +RecommendSongDataDailySongs _$RecommendSongDataDailySongsFromJson( + Map json) => + RecommendSongDataDailySongs() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..pst = (json['pst'] as num?)?.toInt() + ..t = (json['t'] as num?)?.toInt() + ..ar = (json['ar'] as List?) + ?.map((e) => + RecommendSongDataDailySongsAr.fromJson(e as Map)) + .toList() + ..alia = json['alia'] as List? + ..pop = (json['pop'] as num?)?.toDouble() + ..st = (json['st'] as num?)?.toInt() + ..rt = json['rt'] as String? + ..fee = (json['fee'] as num?)?.toInt() + ..v = (json['v'] as num?)?.toInt() + ..crbt = json['crbt'] + ..cf = json['cf'] as String? + ..al = json['al'] == null + ? null + : RecommendSongDataDailySongsAl.fromJson( + json['al'] as Map) + ..dt = (json['dt'] as num?)?.toInt() + ..h = json['h'] == null + ? null + : RecommendSongDataDailySongsH.fromJson( + json['h'] as Map) + ..m = json['m'] == null + ? null + : RecommendSongDataDailySongsM.fromJson( + json['m'] as Map) + ..l = json['l'] == null + ? null + : RecommendSongDataDailySongsL.fromJson( + json['l'] as Map) + ..sq = json['sq'] == null + ? null + : RecommendSongDataDailySongsSq.fromJson( + json['sq'] as Map) + ..hr = json['hr'] == null + ? null + : RecommendSongDataDailySongsHr.fromJson( + json['hr'] as Map) + ..a = json['a'] + ..cd = json['cd'] as String? + ..no = (json['no'] as num?)?.toInt() + ..rtUrl = json['rtUrl'] + ..ftype = (json['ftype'] as num?)?.toInt() + ..rtUrls = json['rtUrls'] as List? + ..djId = (json['djId'] as num?)?.toInt() + ..copyright = (json['copyright'] as num?)?.toInt() + ..sId = (json['sId'] as num?)?.toInt() + ..mark = (json['mark'] as num?)?.toInt() + ..originCoverType = (json['originCoverType'] as num?)?.toInt() + ..originSongSimpleData = json['originSongSimpleData'] + ..tagPicList = json['tagPicList'] + ..resourceState = json['resourceState'] as bool? + ..version = (json['version'] as num?)?.toInt() + ..songJumpInfo = json['songJumpInfo'] + ..entertainmentTags = json['entertainmentTags'] + ..single = (json['single'] as num?)?.toInt() + ..noCopyrightRcmd = json['noCopyrightRcmd'] + ..rtype = (json['rtype'] as num?)?.toInt() + ..rurl = json['rurl'] + ..cp = (json['cp'] as num?)?.toInt() + ..mv = (json['mv'] as num?)?.toInt() + ..mst = (json['mst'] as num?)?.toInt() + ..publishTime = (json['publishTime'] as num?)?.toInt() + ..reason = json['reason'] as String? + ..recommendReason = json['recommendReason'] as String? + ..privilege = json['privilege'] == null + ? null + : RecommendSongDataDailySongsPrivilege.fromJson( + json['privilege'] as Map) + ..alg = json['alg'] as String? + ..tns = (json['tns'] as List?)?.map((e) => e as String).toList(); + +Map _$RecommendSongDataDailySongsToJson( + RecommendSongDataDailySongs instance) => + { + 'name': instance.name, + 'id': instance.id, + 'pst': instance.pst, + 't': instance.t, + 'ar': instance.ar, + 'alia': instance.alia, + 'pop': instance.pop, + 'st': instance.st, + 'rt': instance.rt, + 'fee': instance.fee, + 'v': instance.v, + 'crbt': instance.crbt, + 'cf': instance.cf, + 'al': instance.al, + 'dt': instance.dt, + 'h': instance.h, + 'm': instance.m, + 'l': instance.l, + 'sq': instance.sq, + 'hr': instance.hr, + 'a': instance.a, + 'cd': instance.cd, + 'no': instance.no, + 'rtUrl': instance.rtUrl, + 'ftype': instance.ftype, + 'rtUrls': instance.rtUrls, + 'djId': instance.djId, + 'copyright': instance.copyright, + 'sId': instance.sId, + 'mark': instance.mark, + 'originCoverType': instance.originCoverType, + 'originSongSimpleData': instance.originSongSimpleData, + 'tagPicList': instance.tagPicList, + 'resourceState': instance.resourceState, + 'version': instance.version, + 'songJumpInfo': instance.songJumpInfo, + 'entertainmentTags': instance.entertainmentTags, + 'single': instance.single, + 'noCopyrightRcmd': instance.noCopyrightRcmd, + 'rtype': instance.rtype, + 'rurl': instance.rurl, + 'cp': instance.cp, + 'mv': instance.mv, + 'mst': instance.mst, + 'publishTime': instance.publishTime, + 'reason': instance.reason, + 'recommendReason': instance.recommendReason, + 'privilege': instance.privilege, + 'alg': instance.alg, + 'tns': instance.tns, + }; + +RecommendSongDataDailySongsAr _$RecommendSongDataDailySongsArFromJson( + Map json) => + RecommendSongDataDailySongsAr() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..tns = json['tns'] as List? + ..alias = json['alias'] as List?; + +Map _$RecommendSongDataDailySongsArToJson( + RecommendSongDataDailySongsAr instance) => + { + 'id': instance.id, + 'name': instance.name, + 'tns': instance.tns, + 'alias': instance.alias, + }; + +RecommendSongDataDailySongsAl _$RecommendSongDataDailySongsAlFromJson( + Map json) => + RecommendSongDataDailySongsAl() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..picUrl = json['picUrl'] as String? + ..tns = json['tns'] as List? + ..picStr = json['picStr'] as String? + ..pic = (json['pic'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsAlToJson( + RecommendSongDataDailySongsAl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'picUrl': instance.picUrl, + 'tns': instance.tns, + 'picStr': instance.picStr, + 'pic': instance.pic, + }; + +RecommendSongDataDailySongsH _$RecommendSongDataDailySongsHFromJson( + Map json) => + RecommendSongDataDailySongsH() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsHToJson( + RecommendSongDataDailySongsH instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +RecommendSongDataDailySongsM _$RecommendSongDataDailySongsMFromJson( + Map json) => + RecommendSongDataDailySongsM() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsMToJson( + RecommendSongDataDailySongsM instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +RecommendSongDataDailySongsL _$RecommendSongDataDailySongsLFromJson( + Map json) => + RecommendSongDataDailySongsL() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsLToJson( + RecommendSongDataDailySongsL instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +RecommendSongDataDailySongsSq _$RecommendSongDataDailySongsSqFromJson( + Map json) => + RecommendSongDataDailySongsSq() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsSqToJson( + RecommendSongDataDailySongsSq instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +RecommendSongDataDailySongsHr _$RecommendSongDataDailySongsHrFromJson( + Map json) => + RecommendSongDataDailySongsHr() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsHrToJson( + RecommendSongDataDailySongsHr instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +RecommendSongDataDailySongsPrivilege + _$RecommendSongDataDailySongsPrivilegeFromJson(Map json) => + RecommendSongDataDailySongsPrivilege() + ..id = (json['id'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..payed = (json['payed'] as num?)?.toInt() + ..realPayed = (json['realPayed'] as num?)?.toInt() + ..st = (json['st'] as num?)?.toInt() + ..pl = (json['pl'] as num?)?.toInt() + ..dl = (json['dl'] as num?)?.toInt() + ..sp = (json['sp'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..subp = (json['subp'] as num?)?.toInt() + ..cs = json['cs'] as bool? + ..maxbr = (json['maxbr'] as num?)?.toInt() + ..fl = (json['fl'] as num?)?.toInt() + ..pc = json['pc'] + ..toast = json['toast'] as bool? + ..flag = (json['flag'] as num?)?.toInt() + ..paidBigBang = json['paidBigBang'] as bool? + ..preSell = json['preSell'] as bool? + ..playMaxbr = (json['playMaxbr'] as num?)?.toInt() + ..downloadMaxbr = (json['downloadMaxbr'] as num?)?.toInt() + ..maxBrLevel = json['maxBrLevel'] as String? + ..playMaxBrLevel = json['playMaxBrLevel'] as String? + ..downloadMaxBrLevel = json['downloadMaxBrLevel'] as String? + ..plLevel = json['plLevel'] as String? + ..dlLevel = json['dlLevel'] as String? + ..flLevel = json['flLevel'] as String? + ..rscl = json['rscl'] + ..freeTrialPrivilege = json['freeTrialPrivilege'] == null + ? null + : RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege.fromJson( + json['freeTrialPrivilege'] as Map) + ..rightSource = (json['rightSource'] as num?)?.toInt() + ..chargeInfoList = (json['chargeInfoList'] as List?) + ?.map((e) => + RecommendSongDataDailySongsPrivilegeChargeInfoList.fromJson( + e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message']; + +Map _$RecommendSongDataDailySongsPrivilegeToJson( + RecommendSongDataDailySongsPrivilege instance) => + { + 'id': instance.id, + 'fee': instance.fee, + 'payed': instance.payed, + 'realPayed': instance.realPayed, + 'st': instance.st, + 'pl': instance.pl, + 'dl': instance.dl, + 'sp': instance.sp, + 'cp': instance.cp, + 'subp': instance.subp, + 'cs': instance.cs, + 'maxbr': instance.maxbr, + 'fl': instance.fl, + 'pc': instance.pc, + 'toast': instance.toast, + 'flag': instance.flag, + 'paidBigBang': instance.paidBigBang, + 'preSell': instance.preSell, + 'playMaxbr': instance.playMaxbr, + 'downloadMaxbr': instance.downloadMaxbr, + 'maxBrLevel': instance.maxBrLevel, + 'playMaxBrLevel': instance.playMaxBrLevel, + 'downloadMaxBrLevel': instance.downloadMaxBrLevel, + 'plLevel': instance.plLevel, + 'dlLevel': instance.dlLevel, + 'flLevel': instance.flLevel, + 'rscl': instance.rscl, + 'freeTrialPrivilege': instance.freeTrialPrivilege, + 'rightSource': instance.rightSource, + 'chargeInfoList': instance.chargeInfoList, + 'code': instance.code, + 'message': instance.message, + }; + +RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege + _$RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeFromJson( + Map json) => + RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool? + ..listenType = json['listenType'] + ..cannotListenReason = json['cannotListenReason'] + ..playReason = json['playReason'] + ..freeLimitTagType = json['freeLimitTagType']; + +Map + _$RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeToJson( + RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + 'listenType': instance.listenType, + 'cannotListenReason': instance.cannotListenReason, + 'playReason': instance.playReason, + 'freeLimitTagType': instance.freeLimitTagType, + }; + +RecommendSongDataDailySongsPrivilegeChargeInfoList + _$RecommendSongDataDailySongsPrivilegeChargeInfoListFromJson( + Map json) => + RecommendSongDataDailySongsPrivilegeChargeInfoList() + ..rate = (json['rate'] as num?)?.toInt() + ..chargeUrl = json['chargeUrl'] + ..chargeMessage = json['chargeMessage'] + ..chargeType = (json['chargeType'] as num?)?.toInt(); + +Map _$RecommendSongDataDailySongsPrivilegeChargeInfoListToJson( + RecommendSongDataDailySongsPrivilegeChargeInfoList instance) => + { + 'rate': instance.rate, + 'chargeUrl': instance.chargeUrl, + 'chargeMessage': instance.chargeMessage, + 'chargeType': instance.chargeType, + }; + +RecommendSongDataRecommendReasons _$RecommendSongDataRecommendReasonsFromJson( + Map json) => + RecommendSongDataRecommendReasons() + ..songId = (json['songId'] as num?)?.toInt() + ..reason = json['reason'] as String? + ..reasonId = json['reasonId'] as String? + ..targetUrl = json['targetUrl']; + +Map _$RecommendSongDataRecommendReasonsToJson( + RecommendSongDataRecommendReasons instance) => + { + 'songId': instance.songId, + 'reason': instance.reason, + 'reasonId': instance.reasonId, + 'targetUrl': instance.targetUrl, + }; diff --git a/lib/api/song/entity/new_song_entity.dart b/lib/api/song/entity/new_song_entity.dart index 9dfc9a4..38511de 100644 --- a/lib/api/song/entity/new_song_entity.dart +++ b/lib/api/song/entity/new_song_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/new_song_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/new_song_entity.g.dart'; +part 'new_song_entity.g.dart'; @JsonSerializable() class NewSongEntity { @@ -10,9 +10,9 @@ class NewSongEntity { NewSongEntity(); - factory NewSongEntity.fromJson(Map json) => $NewSongEntityFromJson(json); + factory NewSongEntity.fromJson(Map json) => _$NewSongEntityFromJson(json); - Map toJson() => $NewSongEntityToJson(this); + Map toJson() => _$NewSongEntityToJson(this); @override String toString() { @@ -59,9 +59,9 @@ class NewSongData { NewSongData(); - factory NewSongData.fromJson(Map json) => $NewSongDataFromJson(json); + factory NewSongData.fromJson(Map json) => _$NewSongDataFromJson(json); - Map toJson() => $NewSongDataToJson(this); + Map toJson() => _$NewSongDataToJson(this); @override String toString() { @@ -100,9 +100,9 @@ class NewSongDataPrivilege { NewSongDataPrivilege(); - factory NewSongDataPrivilege.fromJson(Map json) => $NewSongDataPrivilegeFromJson(json); + factory NewSongDataPrivilege.fromJson(Map json) => _$NewSongDataPrivilegeFromJson(json); - Map toJson() => $NewSongDataPrivilegeToJson(this); + Map toJson() => _$NewSongDataPrivilegeToJson(this); @override String toString() { @@ -119,9 +119,9 @@ class NewSongDataPrivilegeFreeTrialPrivilege { NewSongDataPrivilegeFreeTrialPrivilege(); - factory NewSongDataPrivilegeFreeTrialPrivilege.fromJson(Map json) => $NewSongDataPrivilegeFreeTrialPrivilegeFromJson(json); + factory NewSongDataPrivilegeFreeTrialPrivilege.fromJson(Map json) => _$NewSongDataPrivilegeFreeTrialPrivilegeFromJson(json); - Map toJson() => $NewSongDataPrivilegeFreeTrialPrivilegeToJson(this); + Map toJson() => _$NewSongDataPrivilegeFreeTrialPrivilegeToJson(this); @override String toString() { @@ -138,9 +138,9 @@ class NewSongDataPrivilegeChargeInfoList { NewSongDataPrivilegeChargeInfoList(); - factory NewSongDataPrivilegeChargeInfoList.fromJson(Map json) => $NewSongDataPrivilegeChargeInfoListFromJson(json); + factory NewSongDataPrivilegeChargeInfoList.fromJson(Map json) => _$NewSongDataPrivilegeChargeInfoListFromJson(json); - Map toJson() => $NewSongDataPrivilegeChargeInfoListToJson(this); + Map toJson() => _$NewSongDataPrivilegeChargeInfoListToJson(this); @override String toString() { @@ -168,9 +168,9 @@ class NewSongDataArtists { NewSongDataArtists(); - factory NewSongDataArtists.fromJson(Map json) => $NewSongDataArtistsFromJson(json); + factory NewSongDataArtists.fromJson(Map json) => _$NewSongDataArtistsFromJson(json); - Map toJson() => $NewSongDataArtistsToJson(this); + Map toJson() => _$NewSongDataArtistsToJson(this); @override String toString() { @@ -192,9 +192,9 @@ class NewSongDataHMusic { NewSongDataHMusic(); - factory NewSongDataHMusic.fromJson(Map json) => $NewSongDataHMusicFromJson(json); + factory NewSongDataHMusic.fromJson(Map json) => _$NewSongDataHMusicFromJson(json); - Map toJson() => $NewSongDataHMusicToJson(this); + Map toJson() => _$NewSongDataHMusicToJson(this); @override String toString() { @@ -216,9 +216,9 @@ class NewSongDataMMusic { NewSongDataMMusic(); - factory NewSongDataMMusic.fromJson(Map json) => $NewSongDataMMusicFromJson(json); + factory NewSongDataMMusic.fromJson(Map json) => _$NewSongDataMMusicFromJson(json); - Map toJson() => $NewSongDataMMusicToJson(this); + Map toJson() => _$NewSongDataMMusicToJson(this); @override String toString() { @@ -240,9 +240,9 @@ class NewSongDataLMusic { NewSongDataLMusic(); - factory NewSongDataLMusic.fromJson(Map json) => $NewSongDataLMusicFromJson(json); + factory NewSongDataLMusic.fromJson(Map json) => _$NewSongDataLMusicFromJson(json); - Map toJson() => $NewSongDataLMusicToJson(this); + Map toJson() => _$NewSongDataLMusicToJson(this); @override String toString() { @@ -280,9 +280,9 @@ class NewSongDataAlbum { NewSongDataAlbum(); - factory NewSongDataAlbum.fromJson(Map json) => $NewSongDataAlbumFromJson(json); + factory NewSongDataAlbum.fromJson(Map json) => _$NewSongDataAlbumFromJson(json); - Map toJson() => $NewSongDataAlbumToJson(this); + Map toJson() => _$NewSongDataAlbumToJson(this); @override String toString() { @@ -310,9 +310,9 @@ class NewSongDataAlbumArtists { NewSongDataAlbumArtists(); - factory NewSongDataAlbumArtists.fromJson(Map json) => $NewSongDataAlbumArtistsFromJson(json); + factory NewSongDataAlbumArtists.fromJson(Map json) => _$NewSongDataAlbumArtistsFromJson(json); - Map toJson() => $NewSongDataAlbumArtistsToJson(this); + Map toJson() => _$NewSongDataAlbumArtistsToJson(this); @override String toString() { @@ -340,9 +340,9 @@ class NewSongDataAlbumArtist { NewSongDataAlbumArtist(); - factory NewSongDataAlbumArtist.fromJson(Map json) => $NewSongDataAlbumArtistFromJson(json); + factory NewSongDataAlbumArtist.fromJson(Map json) => _$NewSongDataAlbumArtistFromJson(json); - Map toJson() => $NewSongDataAlbumArtistToJson(this); + Map toJson() => _$NewSongDataAlbumArtistToJson(this); @override String toString() { @@ -364,9 +364,9 @@ class NewSongDataBMusic { NewSongDataBMusic(); - factory NewSongDataBMusic.fromJson(Map json) => $NewSongDataBMusicFromJson(json); + factory NewSongDataBMusic.fromJson(Map json) => _$NewSongDataBMusicFromJson(json); - Map toJson() => $NewSongDataBMusicToJson(this); + Map toJson() => _$NewSongDataBMusicToJson(this); @override String toString() { diff --git a/lib/api/song/entity/new_song_entity.g.dart b/lib/api/song/entity/new_song_entity.g.dart new file mode 100644 index 0000000..d28e2e2 --- /dev/null +++ b/lib/api/song/entity/new_song_entity.g.dart @@ -0,0 +1,480 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'new_song_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +NewSongEntity _$NewSongEntityFromJson(Map json) => + NewSongEntity() + ..data = (json['data'] as List?) + ?.map((e) => NewSongData.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$NewSongEntityToJson(NewSongEntity instance) => + { + 'data': instance.data, + 'code': instance.code, + }; + +NewSongData _$NewSongDataFromJson(Map json) => NewSongData() + ..starred = json['starred'] as bool? + ..popularity = (json['popularity'] as num?)?.toInt() + ..starredNum = (json['starredNum'] as num?)?.toInt() + ..playedNum = (json['playedNum'] as num?)?.toInt() + ..dayPlays = (json['dayPlays'] as num?)?.toInt() + ..hearTime = (json['hearTime'] as num?)?.toInt() + ..mp3Url = json['mp3Url'] as String? + ..privilege = json['privilege'] == null + ? null + : NewSongDataPrivilege.fromJson(json['privilege'] as Map) + ..st = (json['st'] as num?)?.toInt() + ..exclusive = json['exclusive'] as bool? + ..artists = (json['artists'] as List?) + ?.map((e) => NewSongDataArtists.fromJson(e as Map)) + .toList() + ..score = (json['score'] as num?)?.toInt() + ..hMusic = json['hMusic'] == null + ? null + : NewSongDataHMusic.fromJson(json['hMusic'] as Map) + ..mMusic = json['mMusic'] == null + ? null + : NewSongDataMMusic.fromJson(json['mMusic'] as Map) + ..lMusic = json['lMusic'] == null + ? null + : NewSongDataLMusic.fromJson(json['lMusic'] as Map) + ..album = json['album'] == null + ? null + : NewSongDataAlbum.fromJson(json['album'] as Map) + ..commentThreadId = json['commentThreadId'] as String? + ..fee = (json['fee'] as num?)?.toInt() + ..mvid = (json['mvid'] as num?)?.toInt() + ..copyFrom = json['copyFrom'] as String? + ..ringtone = json['ringtone'] as String? + ..disc = json['disc'] as String? + ..no = (json['no'] as num?)?.toInt() + ..rtype = (json['rtype'] as num?)?.toInt() + ..copyrightId = (json['copyrightId'] as num?)?.toInt() + ..bMusic = json['bMusic'] == null + ? null + : NewSongDataBMusic.fromJson(json['bMusic'] as Map) + ..rtUrl = json['rtUrl'] as String? + ..ftype = (json['ftype'] as num?)?.toInt() + ..position = (json['position'] as num?)?.toInt() + ..duration = (json['duration'] as num?)?.toInt() + ..status = (json['status'] as num?)?.toInt() + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt(); + +Map _$NewSongDataToJson(NewSongData instance) => + { + 'starred': instance.starred, + 'popularity': instance.popularity, + 'starredNum': instance.starredNum, + 'playedNum': instance.playedNum, + 'dayPlays': instance.dayPlays, + 'hearTime': instance.hearTime, + 'mp3Url': instance.mp3Url, + 'privilege': instance.privilege, + 'st': instance.st, + 'exclusive': instance.exclusive, + 'artists': instance.artists, + 'score': instance.score, + 'hMusic': instance.hMusic, + 'mMusic': instance.mMusic, + 'lMusic': instance.lMusic, + 'album': instance.album, + 'commentThreadId': instance.commentThreadId, + 'fee': instance.fee, + 'mvid': instance.mvid, + 'copyFrom': instance.copyFrom, + 'ringtone': instance.ringtone, + 'disc': instance.disc, + 'no': instance.no, + 'rtype': instance.rtype, + 'copyrightId': instance.copyrightId, + 'bMusic': instance.bMusic, + 'rtUrl': instance.rtUrl, + 'ftype': instance.ftype, + 'position': instance.position, + 'duration': instance.duration, + 'status': instance.status, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + }; + +NewSongDataPrivilege _$NewSongDataPrivilegeFromJson( + Map json) => + NewSongDataPrivilege() + ..id = (json['id'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..payed = (json['payed'] as num?)?.toInt() + ..st = (json['st'] as num?)?.toInt() + ..pl = (json['pl'] as num?)?.toInt() + ..dl = (json['dl'] as num?)?.toInt() + ..sp = (json['sp'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..subp = (json['subp'] as num?)?.toInt() + ..cs = json['cs'] as bool? + ..maxbr = (json['maxbr'] as num?)?.toInt() + ..fl = (json['fl'] as num?)?.toInt() + ..toast = json['toast'] as bool? + ..flag = (json['flag'] as num?)?.toInt() + ..preSell = json['preSell'] as bool? + ..playMaxbr = (json['playMaxbr'] as num?)?.toInt() + ..downloadMaxbr = (json['downloadMaxbr'] as num?)?.toInt() + ..maxBrLevel = json['maxBrLevel'] as String? + ..playMaxBrLevel = json['playMaxBrLevel'] as String? + ..downloadMaxBrLevel = json['downloadMaxBrLevel'] as String? + ..plLevel = json['plLevel'] as String? + ..dlLevel = json['dlLevel'] as String? + ..flLevel = json['flLevel'] as String? + ..freeTrialPrivilege = json['freeTrialPrivilege'] == null + ? null + : NewSongDataPrivilegeFreeTrialPrivilege.fromJson( + json['freeTrialPrivilege'] as Map) + ..rightSource = (json['rightSource'] as num?)?.toInt() + ..chargeInfoList = (json['chargeInfoList'] as List?) + ?.map((e) => NewSongDataPrivilegeChargeInfoList.fromJson( + e as Map)) + .toList(); + +Map _$NewSongDataPrivilegeToJson( + NewSongDataPrivilege instance) => + { + 'id': instance.id, + 'fee': instance.fee, + 'payed': instance.payed, + 'st': instance.st, + 'pl': instance.pl, + 'dl': instance.dl, + 'sp': instance.sp, + 'cp': instance.cp, + 'subp': instance.subp, + 'cs': instance.cs, + 'maxbr': instance.maxbr, + 'fl': instance.fl, + 'toast': instance.toast, + 'flag': instance.flag, + 'preSell': instance.preSell, + 'playMaxbr': instance.playMaxbr, + 'downloadMaxbr': instance.downloadMaxbr, + 'maxBrLevel': instance.maxBrLevel, + 'playMaxBrLevel': instance.playMaxBrLevel, + 'downloadMaxBrLevel': instance.downloadMaxBrLevel, + 'plLevel': instance.plLevel, + 'dlLevel': instance.dlLevel, + 'flLevel': instance.flLevel, + 'freeTrialPrivilege': instance.freeTrialPrivilege, + 'rightSource': instance.rightSource, + 'chargeInfoList': instance.chargeInfoList, + }; + +NewSongDataPrivilegeFreeTrialPrivilege + _$NewSongDataPrivilegeFreeTrialPrivilegeFromJson( + Map json) => + NewSongDataPrivilegeFreeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool? + ..listenType = (json['listenType'] as num?)?.toInt() + ..cannotListenReason = (json['cannotListenReason'] as num?)?.toInt(); + +Map _$NewSongDataPrivilegeFreeTrialPrivilegeToJson( + NewSongDataPrivilegeFreeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + 'listenType': instance.listenType, + 'cannotListenReason': instance.cannotListenReason, + }; + +NewSongDataPrivilegeChargeInfoList _$NewSongDataPrivilegeChargeInfoListFromJson( + Map json) => + NewSongDataPrivilegeChargeInfoList() + ..rate = (json['rate'] as num?)?.toInt() + ..chargeUrl = json['chargeUrl'] as String? + ..chargeMessage = json['chargeMessage'] as String? + ..chargeType = (json['chargeType'] as num?)?.toInt(); + +Map _$NewSongDataPrivilegeChargeInfoListToJson( + NewSongDataPrivilegeChargeInfoList instance) => + { + 'rate': instance.rate, + 'chargeUrl': instance.chargeUrl, + 'chargeMessage': instance.chargeMessage, + 'chargeType': instance.chargeType, + }; + +NewSongDataArtists _$NewSongDataArtistsFromJson(Map json) => + NewSongDataArtists() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..picUrl = json['picUrl'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..img1v1Url = json['img1v1Url'] as String? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$NewSongDataArtistsToJson(NewSongDataArtists instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'followed': instance.followed, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'picUrl': instance.picUrl, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'img1v1Url': instance.img1v1Url, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'img1v1idStr': instance.img1v1idStr, + }; + +NewSongDataHMusic _$NewSongDataHMusicFromJson(Map json) => + NewSongDataHMusic() + ..volumeDelta = (json['volumeDelta'] as num?)?.toInt() + ..playTime = (json['playTime'] as num?)?.toInt() + ..dfsId = (json['dfsId'] as num?)?.toInt() + ..bitrate = (json['bitrate'] as num?)?.toInt() + ..sr = (json['sr'] as num?)?.toInt() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..extension = json['extension'] as String?; + +Map _$NewSongDataHMusicToJson(NewSongDataHMusic instance) => + { + 'volumeDelta': instance.volumeDelta, + 'playTime': instance.playTime, + 'dfsId': instance.dfsId, + 'bitrate': instance.bitrate, + 'sr': instance.sr, + 'name': instance.name, + 'id': instance.id, + 'size': instance.size, + 'extension': instance.extension, + }; + +NewSongDataMMusic _$NewSongDataMMusicFromJson(Map json) => + NewSongDataMMusic() + ..volumeDelta = (json['volumeDelta'] as num?)?.toInt() + ..playTime = (json['playTime'] as num?)?.toInt() + ..dfsId = (json['dfsId'] as num?)?.toInt() + ..bitrate = (json['bitrate'] as num?)?.toInt() + ..sr = (json['sr'] as num?)?.toInt() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..extension = json['extension'] as String?; + +Map _$NewSongDataMMusicToJson(NewSongDataMMusic instance) => + { + 'volumeDelta': instance.volumeDelta, + 'playTime': instance.playTime, + 'dfsId': instance.dfsId, + 'bitrate': instance.bitrate, + 'sr': instance.sr, + 'name': instance.name, + 'id': instance.id, + 'size': instance.size, + 'extension': instance.extension, + }; + +NewSongDataLMusic _$NewSongDataLMusicFromJson(Map json) => + NewSongDataLMusic() + ..volumeDelta = (json['volumeDelta'] as num?)?.toInt() + ..playTime = (json['playTime'] as num?)?.toInt() + ..dfsId = (json['dfsId'] as num?)?.toInt() + ..bitrate = (json['bitrate'] as num?)?.toInt() + ..sr = (json['sr'] as num?)?.toInt() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..extension = json['extension'] as String?; + +Map _$NewSongDataLMusicToJson(NewSongDataLMusic instance) => + { + 'volumeDelta': instance.volumeDelta, + 'playTime': instance.playTime, + 'dfsId': instance.dfsId, + 'bitrate': instance.bitrate, + 'sr': instance.sr, + 'name': instance.name, + 'id': instance.id, + 'size': instance.size, + 'extension': instance.extension, + }; + +NewSongDataAlbum _$NewSongDataAlbumFromJson(Map json) => + NewSongDataAlbum() + ..paid = json['paid'] as bool? + ..onSale = json['onSale'] as bool? + ..picId = (json['picId'] as num?)?.toInt() + ..artists = (json['artists'] as List?) + ?.map((e) => + NewSongDataAlbumArtists.fromJson(e as Map)) + .toList() + ..briefDesc = json['briefDesc'] as String? + ..publishTime = (json['publishTime'] as num?)?.toInt() + ..picUrl = json['picUrl'] as String? + ..commentThreadId = json['commentThreadId'] as String? + ..artist = json['artist'] == null + ? null + : NewSongDataAlbumArtist.fromJson( + json['artist'] as Map) + ..copyrightId = (json['copyrightId'] as num?)?.toInt() + ..company = json['company'] as String? + ..subType = json['subType'] as String? + ..blurPicUrl = json['blurPicUrl'] as String? + ..companyId = (json['companyId'] as num?)?.toInt() + ..pic = (json['pic'] as num?)?.toInt() + ..status = (json['status'] as num?)?.toInt() + ..description = json['description'] as String? + ..alias = json['alias'] as List? + ..tags = json['tags'] as String? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..type = json['type'] as String? + ..size = (json['size'] as num?)?.toInt() + ..picidStr = json['picidStr'] as String?; + +Map _$NewSongDataAlbumToJson(NewSongDataAlbum instance) => + { + 'paid': instance.paid, + 'onSale': instance.onSale, + 'picId': instance.picId, + 'artists': instance.artists, + 'briefDesc': instance.briefDesc, + 'publishTime': instance.publishTime, + 'picUrl': instance.picUrl, + 'commentThreadId': instance.commentThreadId, + 'artist': instance.artist, + 'copyrightId': instance.copyrightId, + 'company': instance.company, + 'subType': instance.subType, + 'blurPicUrl': instance.blurPicUrl, + 'companyId': instance.companyId, + 'pic': instance.pic, + 'status': instance.status, + 'description': instance.description, + 'alias': instance.alias, + 'tags': instance.tags, + 'name': instance.name, + 'id': instance.id, + 'type': instance.type, + 'size': instance.size, + 'picidStr': instance.picidStr, + }; + +NewSongDataAlbumArtists _$NewSongDataAlbumArtistsFromJson( + Map json) => + NewSongDataAlbumArtists() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..picUrl = json['picUrl'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..img1v1Url = json['img1v1Url'] as String? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$NewSongDataAlbumArtistsToJson( + NewSongDataAlbumArtists instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'followed': instance.followed, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'picUrl': instance.picUrl, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'img1v1Url': instance.img1v1Url, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'img1v1idStr': instance.img1v1idStr, + }; + +NewSongDataAlbumArtist _$NewSongDataAlbumArtistFromJson( + Map json) => + NewSongDataAlbumArtist() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..picId = (json['picId'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..picUrl = json['picUrl'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..img1v1Url = json['img1v1Url'] as String? + ..trans = json['trans'] as String? + ..alias = json['alias'] as List? + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..img1v1idStr = json['img1v1idStr'] as String?; + +Map _$NewSongDataAlbumArtistToJson( + NewSongDataAlbumArtist instance) => + { + 'img1v1Id': instance.img1v1Id, + 'topicPerson': instance.topicPerson, + 'followed': instance.followed, + 'picId': instance.picId, + 'briefDesc': instance.briefDesc, + 'picUrl': instance.picUrl, + 'musicSize': instance.musicSize, + 'albumSize': instance.albumSize, + 'img1v1Url': instance.img1v1Url, + 'trans': instance.trans, + 'alias': instance.alias, + 'name': instance.name, + 'id': instance.id, + 'img1v1idStr': instance.img1v1idStr, + }; + +NewSongDataBMusic _$NewSongDataBMusicFromJson(Map json) => + NewSongDataBMusic() + ..volumeDelta = (json['volumeDelta'] as num?)?.toInt() + ..playTime = (json['playTime'] as num?)?.toInt() + ..dfsId = (json['dfsId'] as num?)?.toInt() + ..bitrate = (json['bitrate'] as num?)?.toInt() + ..sr = (json['sr'] as num?)?.toInt() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..extension = json['extension'] as String?; + +Map _$NewSongDataBMusicToJson(NewSongDataBMusic instance) => + { + 'volumeDelta': instance.volumeDelta, + 'playTime': instance.playTime, + 'dfsId': instance.dfsId, + 'bitrate': instance.bitrate, + 'sr': instance.sr, + 'name': instance.name, + 'id': instance.id, + 'size': instance.size, + 'extension': instance.extension, + }; diff --git a/lib/api/song/entity/song_detail_entity.dart b/lib/api/song/entity/song_detail_entity.dart index 1b5889c..49aa316 100644 --- a/lib/api/song/entity/song_detail_entity.dart +++ b/lib/api/song/entity/song_detail_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/song_detail_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/song_detail_entity.g.dart'; +part 'song_detail_entity.g.dart'; @JsonSerializable() class SongDetailEntity { @@ -11,9 +11,9 @@ class SongDetailEntity { SongDetailEntity(); - factory SongDetailEntity.fromJson(Map json) => $SongDetailEntityFromJson(json); + factory SongDetailEntity.fromJson(Map json) => _$SongDetailEntityFromJson(json); - Map toJson() => $SongDetailEntityToJson(this); + Map toJson() => _$SongDetailEntityToJson(this); @override String toString() { @@ -74,9 +74,9 @@ class SongDetailSongs { SongDetailSongs(); - factory SongDetailSongs.fromJson(Map json) => $SongDetailSongsFromJson(json); + factory SongDetailSongs.fromJson(Map json) => _$SongDetailSongsFromJson(json); - Map toJson() => $SongDetailSongsToJson(this); + Map toJson() => _$SongDetailSongsToJson(this); @override String toString() { @@ -93,9 +93,9 @@ class SongDetailSongsAr { SongDetailSongsAr(); - factory SongDetailSongsAr.fromJson(Map json) => $SongDetailSongsArFromJson(json); + factory SongDetailSongsAr.fromJson(Map json) => _$SongDetailSongsArFromJson(json); - Map toJson() => $SongDetailSongsArToJson(this); + Map toJson() => _$SongDetailSongsArToJson(this); @override String toString() { @@ -113,9 +113,9 @@ class SongDetailSongsAl { SongDetailSongsAl(); - factory SongDetailSongsAl.fromJson(Map json) => $SongDetailSongsAlFromJson(json); + factory SongDetailSongsAl.fromJson(Map json) => _$SongDetailSongsAlFromJson(json); - Map toJson() => $SongDetailSongsAlToJson(this); + Map toJson() => _$SongDetailSongsAlToJson(this); @override String toString() { @@ -133,9 +133,9 @@ class SongDetailSongsH { SongDetailSongsH(); - factory SongDetailSongsH.fromJson(Map json) => $SongDetailSongsHFromJson(json); + factory SongDetailSongsH.fromJson(Map json) => _$SongDetailSongsHFromJson(json); - Map toJson() => $SongDetailSongsHToJson(this); + Map toJson() => _$SongDetailSongsHToJson(this); @override String toString() { @@ -153,9 +153,9 @@ class SongDetailSongsM { SongDetailSongsM(); - factory SongDetailSongsM.fromJson(Map json) => $SongDetailSongsMFromJson(json); + factory SongDetailSongsM.fromJson(Map json) => _$SongDetailSongsMFromJson(json); - Map toJson() => $SongDetailSongsMToJson(this); + Map toJson() => _$SongDetailSongsMToJson(this); @override String toString() { @@ -173,9 +173,9 @@ class SongDetailSongsL { SongDetailSongsL(); - factory SongDetailSongsL.fromJson(Map json) => $SongDetailSongsLFromJson(json); + factory SongDetailSongsL.fromJson(Map json) => _$SongDetailSongsLFromJson(json); - Map toJson() => $SongDetailSongsLToJson(this); + Map toJson() => _$SongDetailSongsLToJson(this); @override String toString() { @@ -193,9 +193,9 @@ class SongDetailSongsSq { SongDetailSongsSq(); - factory SongDetailSongsSq.fromJson(Map json) => $SongDetailSongsSqFromJson(json); + factory SongDetailSongsSq.fromJson(Map json) => _$SongDetailSongsSqFromJson(json); - Map toJson() => $SongDetailSongsSqToJson(this); + Map toJson() => _$SongDetailSongsSqToJson(this); @override String toString() { @@ -237,9 +237,9 @@ class SongDetailPrivileges { SongDetailPrivileges(); - factory SongDetailPrivileges.fromJson(Map json) => $SongDetailPrivilegesFromJson(json); + factory SongDetailPrivileges.fromJson(Map json) => _$SongDetailPrivilegesFromJson(json); - Map toJson() => $SongDetailPrivilegesToJson(this); + Map toJson() => _$SongDetailPrivilegesToJson(this); @override String toString() { @@ -258,9 +258,9 @@ class SongDetailPrivilegesFreeTrialPrivilege { SongDetailPrivilegesFreeTrialPrivilege(); - factory SongDetailPrivilegesFreeTrialPrivilege.fromJson(Map json) => $SongDetailPrivilegesFreeTrialPrivilegeFromJson(json); + factory SongDetailPrivilegesFreeTrialPrivilege.fromJson(Map json) => _$SongDetailPrivilegesFreeTrialPrivilegeFromJson(json); - Map toJson() => $SongDetailPrivilegesFreeTrialPrivilegeToJson(this); + Map toJson() => _$SongDetailPrivilegesFreeTrialPrivilegeToJson(this); @override String toString() { @@ -277,9 +277,9 @@ class SongDetailPrivilegesChargeInfoList { SongDetailPrivilegesChargeInfoList(); - factory SongDetailPrivilegesChargeInfoList.fromJson(Map json) => $SongDetailPrivilegesChargeInfoListFromJson(json); + factory SongDetailPrivilegesChargeInfoList.fromJson(Map json) => _$SongDetailPrivilegesChargeInfoListFromJson(json); - Map toJson() => $SongDetailPrivilegesChargeInfoListToJson(this); + Map toJson() => _$SongDetailPrivilegesChargeInfoListToJson(this); @override String toString() { diff --git a/lib/api/song/entity/song_detail_entity.g.dart b/lib/api/song/entity/song_detail_entity.g.dart new file mode 100644 index 0000000..daf8709 --- /dev/null +++ b/lib/api/song/entity/song_detail_entity.g.dart @@ -0,0 +1,349 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'song_detail_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SongDetailEntity _$SongDetailEntityFromJson(Map json) => + SongDetailEntity() + ..songs = (json['songs'] as List?) + ?.map((e) => SongDetailSongs.fromJson(e as Map)) + .toList() + ..privileges = (json['privileges'] as List?) + ?.map((e) => SongDetailPrivileges.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$SongDetailEntityToJson(SongDetailEntity instance) => + { + 'songs': instance.songs, + 'privileges': instance.privileges, + 'code': instance.code, + }; + +SongDetailSongs _$SongDetailSongsFromJson(Map json) => + SongDetailSongs() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..pst = (json['pst'] as num?)?.toInt() + ..t = (json['t'] as num?)?.toInt() + ..ar = (json['ar'] as List?) + ?.map((e) => SongDetailSongsAr.fromJson(e as Map)) + .toList() + ..alia = json['alia'] as List? + ..pop = (json['pop'] as num?)?.toDouble() + ..st = (json['st'] as num?)?.toInt() + ..rt = json['rt'] as String? + ..fee = (json['fee'] as num?)?.toInt() + ..v = (json['v'] as num?)?.toInt() + ..crbt = json['crbt'] + ..cf = json['cf'] as String? + ..al = json['al'] == null + ? null + : SongDetailSongsAl.fromJson(json['al'] as Map) + ..dt = (json['dt'] as num?)?.toInt() + ..h = json['h'] == null + ? null + : SongDetailSongsH.fromJson(json['h'] as Map) + ..m = json['m'] == null + ? null + : SongDetailSongsM.fromJson(json['m'] as Map) + ..l = json['l'] == null + ? null + : SongDetailSongsL.fromJson(json['l'] as Map) + ..sq = json['sq'] == null + ? null + : SongDetailSongsSq.fromJson(json['sq'] as Map) + ..hr = json['hr'] + ..a = json['a'] + ..cd = json['cd'] as String? + ..no = (json['no'] as num?)?.toInt() + ..rtUrl = json['rtUrl'] + ..ftype = (json['ftype'] as num?)?.toInt() + ..rtUrls = json['rtUrls'] as List? + ..djId = (json['djId'] as num?)?.toInt() + ..copyright = (json['copyright'] as num?)?.toInt() + ..sId = (json['sId'] as num?)?.toInt() + ..mark = (json['mark'] as num?)?.toInt() + ..originCoverType = (json['originCoverType'] as num?)?.toInt() + ..originSongSimpleData = json['originSongSimpleData'] + ..tagPicList = json['tagPicList'] + ..resourceState = json['resourceState'] as bool? + ..version = (json['version'] as num?)?.toInt() + ..songJumpInfo = json['songJumpInfo'] + ..entertainmentTags = json['entertainmentTags'] + ..awardTags = json['awardTags'] + ..displayTags = json['displayTags'] + ..single = (json['single'] as num?)?.toInt() + ..noCopyrightRcmd = json['noCopyrightRcmd'] + ..mv = (json['mv'] as num?)?.toInt() + ..rtype = (json['rtype'] as num?)?.toInt() + ..rurl = json['rurl'] + ..mst = (json['mst'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..publishTime = (json['publishTime'] as num?)?.toInt(); + +Map _$SongDetailSongsToJson(SongDetailSongs instance) => + { + 'name': instance.name, + 'id': instance.id, + 'pst': instance.pst, + 't': instance.t, + 'ar': instance.ar, + 'alia': instance.alia, + 'pop': instance.pop, + 'st': instance.st, + 'rt': instance.rt, + 'fee': instance.fee, + 'v': instance.v, + 'crbt': instance.crbt, + 'cf': instance.cf, + 'al': instance.al, + 'dt': instance.dt, + 'h': instance.h, + 'm': instance.m, + 'l': instance.l, + 'sq': instance.sq, + 'hr': instance.hr, + 'a': instance.a, + 'cd': instance.cd, + 'no': instance.no, + 'rtUrl': instance.rtUrl, + 'ftype': instance.ftype, + 'rtUrls': instance.rtUrls, + 'djId': instance.djId, + 'copyright': instance.copyright, + 'sId': instance.sId, + 'mark': instance.mark, + 'originCoverType': instance.originCoverType, + 'originSongSimpleData': instance.originSongSimpleData, + 'tagPicList': instance.tagPicList, + 'resourceState': instance.resourceState, + 'version': instance.version, + 'songJumpInfo': instance.songJumpInfo, + 'entertainmentTags': instance.entertainmentTags, + 'awardTags': instance.awardTags, + 'displayTags': instance.displayTags, + 'single': instance.single, + 'noCopyrightRcmd': instance.noCopyrightRcmd, + 'mv': instance.mv, + 'rtype': instance.rtype, + 'rurl': instance.rurl, + 'mst': instance.mst, + 'cp': instance.cp, + 'publishTime': instance.publishTime, + }; + +SongDetailSongsAr _$SongDetailSongsArFromJson(Map json) => + SongDetailSongsAr() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..tns = json['tns'] as List? + ..alias = json['alias'] as List?; + +Map _$SongDetailSongsArToJson(SongDetailSongsAr instance) => + { + 'id': instance.id, + 'name': instance.name, + 'tns': instance.tns, + 'alias': instance.alias, + }; + +SongDetailSongsAl _$SongDetailSongsAlFromJson(Map json) => + SongDetailSongsAl() + ..id = (json['id'] as num?)?.toInt() + ..name = json['name'] as String? + ..picUrl = json['picUrl'] as String? + ..tns = json['tns'] as List? + ..pic = (json['pic'] as num?)?.toInt(); + +Map _$SongDetailSongsAlToJson(SongDetailSongsAl instance) => + { + 'id': instance.id, + 'name': instance.name, + 'picUrl': instance.picUrl, + 'tns': instance.tns, + 'pic': instance.pic, + }; + +SongDetailSongsH _$SongDetailSongsHFromJson(Map json) => + SongDetailSongsH() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongDetailSongsHToJson(SongDetailSongsH instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongDetailSongsM _$SongDetailSongsMFromJson(Map json) => + SongDetailSongsM() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongDetailSongsMToJson(SongDetailSongsM instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongDetailSongsL _$SongDetailSongsLFromJson(Map json) => + SongDetailSongsL() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongDetailSongsLToJson(SongDetailSongsL instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongDetailSongsSq _$SongDetailSongsSqFromJson(Map json) => + SongDetailSongsSq() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongDetailSongsSqToJson(SongDetailSongsSq instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongDetailPrivileges _$SongDetailPrivilegesFromJson( + Map json) => + SongDetailPrivileges() + ..id = (json['id'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..payed = (json['payed'] as num?)?.toInt() + ..st = (json['st'] as num?)?.toInt() + ..pl = (json['pl'] as num?)?.toInt() + ..dl = (json['dl'] as num?)?.toInt() + ..sp = (json['sp'] as num?)?.toInt() + ..cp = (json['cp'] as num?)?.toInt() + ..subp = (json['subp'] as num?)?.toInt() + ..cs = json['cs'] as bool? + ..maxbr = (json['maxbr'] as num?)?.toInt() + ..fl = (json['fl'] as num?)?.toInt() + ..toast = json['toast'] as bool? + ..flag = (json['flag'] as num?)?.toInt() + ..preSell = json['preSell'] as bool? + ..playMaxbr = (json['playMaxbr'] as num?)?.toInt() + ..downloadMaxbr = (json['downloadMaxbr'] as num?)?.toInt() + ..maxBrLevel = json['maxBrLevel'] as String? + ..playMaxBrLevel = json['playMaxBrLevel'] as String? + ..downloadMaxBrLevel = json['downloadMaxBrLevel'] as String? + ..plLevel = json['plLevel'] as String? + ..dlLevel = json['dlLevel'] as String? + ..flLevel = json['flLevel'] as String? + ..rscl = json['rscl'] + ..freeTrialPrivilege = json['freeTrialPrivilege'] == null + ? null + : SongDetailPrivilegesFreeTrialPrivilege.fromJson( + json['freeTrialPrivilege'] as Map) + ..rightSource = (json['rightSource'] as num?)?.toInt() + ..chargeInfoList = (json['chargeInfoList'] as List?) + ?.map((e) => SongDetailPrivilegesChargeInfoList.fromJson( + e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message']; + +Map _$SongDetailPrivilegesToJson( + SongDetailPrivileges instance) => + { + 'id': instance.id, + 'fee': instance.fee, + 'payed': instance.payed, + 'st': instance.st, + 'pl': instance.pl, + 'dl': instance.dl, + 'sp': instance.sp, + 'cp': instance.cp, + 'subp': instance.subp, + 'cs': instance.cs, + 'maxbr': instance.maxbr, + 'fl': instance.fl, + 'toast': instance.toast, + 'flag': instance.flag, + 'preSell': instance.preSell, + 'playMaxbr': instance.playMaxbr, + 'downloadMaxbr': instance.downloadMaxbr, + 'maxBrLevel': instance.maxBrLevel, + 'playMaxBrLevel': instance.playMaxBrLevel, + 'downloadMaxBrLevel': instance.downloadMaxBrLevel, + 'plLevel': instance.plLevel, + 'dlLevel': instance.dlLevel, + 'flLevel': instance.flLevel, + 'rscl': instance.rscl, + 'freeTrialPrivilege': instance.freeTrialPrivilege, + 'rightSource': instance.rightSource, + 'chargeInfoList': instance.chargeInfoList, + 'code': instance.code, + 'message': instance.message, + }; + +SongDetailPrivilegesFreeTrialPrivilege + _$SongDetailPrivilegesFreeTrialPrivilegeFromJson( + Map json) => + SongDetailPrivilegesFreeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool? + ..listenType = (json['listenType'] as num?)?.toInt() + ..cannotListenReason = (json['cannotListenReason'] as num?)?.toInt() + ..playReason = json['playReason'] + ..freeLimitTagType = json['freeLimitTagType']; + +Map _$SongDetailPrivilegesFreeTrialPrivilegeToJson( + SongDetailPrivilegesFreeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + 'listenType': instance.listenType, + 'cannotListenReason': instance.cannotListenReason, + 'playReason': instance.playReason, + 'freeLimitTagType': instance.freeLimitTagType, + }; + +SongDetailPrivilegesChargeInfoList _$SongDetailPrivilegesChargeInfoListFromJson( + Map json) => + SongDetailPrivilegesChargeInfoList() + ..rate = (json['rate'] as num?)?.toInt() + ..chargeUrl = json['chargeUrl'] + ..chargeMessage = json['chargeMessage'] + ..chargeType = (json['chargeType'] as num?)?.toInt(); + +Map _$SongDetailPrivilegesChargeInfoListToJson( + SongDetailPrivilegesChargeInfoList instance) => + { + 'rate': instance.rate, + 'chargeUrl': instance.chargeUrl, + 'chargeMessage': instance.chargeMessage, + 'chargeType': instance.chargeType, + }; diff --git a/lib/api/song/entity/song_like_check_entity.dart b/lib/api/song/entity/song_like_check_entity.dart index 03e42de..6877967 100644 --- a/lib/api/song/entity/song_like_check_entity.dart +++ b/lib/api/song/entity/song_like_check_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/song_like_check_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/song_like_check_entity.g.dart'; +part 'song_like_check_entity.g.dart'; @JsonSerializable() class SongLikeCheckEntity { @@ -10,9 +10,9 @@ class SongLikeCheckEntity { SongLikeCheckEntity(); - factory SongLikeCheckEntity.fromJson(Map json) => $SongLikeCheckEntityFromJson(json); + factory SongLikeCheckEntity.fromJson(Map json) => _$SongLikeCheckEntityFromJson(json); - Map toJson() => $SongLikeCheckEntityToJson(this); + Map toJson() => _$SongLikeCheckEntityToJson(this); @override String toString() { diff --git a/lib/api/song/entity/song_like_check_entity.g.dart b/lib/api/song/entity/song_like_check_entity.g.dart new file mode 100644 index 0000000..890e23f --- /dev/null +++ b/lib/api/song/entity/song_like_check_entity.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'song_like_check_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SongLikeCheckEntity _$SongLikeCheckEntityFromJson(Map json) => + SongLikeCheckEntity() + ..ids = (json['ids'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$SongLikeCheckEntityToJson( + SongLikeCheckEntity instance) => + { + 'ids': instance.ids, + 'code': instance.code, + }; diff --git a/lib/api/song/entity/song_quality_detail_entity.dart b/lib/api/song/entity/song_quality_detail_entity.dart index 7ec71b9..54702c2 100644 --- a/lib/api/song/entity/song_quality_detail_entity.dart +++ b/lib/api/song/entity/song_quality_detail_entity.dart @@ -1,7 +1,8 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; import 'dart:convert'; -import '../../../generated/json/song_quality_detail_entity.g.dart'; +part 'song_quality_detail_entity.g.dart'; @JsonSerializable() class SongQualityDetailEntity { @@ -14,9 +15,9 @@ class SongQualityDetailEntity { SongQualityDetailEntity(); factory SongQualityDetailEntity.fromJson(Map json) => - $SongQualityDetailEntityFromJson(json); + _$SongQualityDetailEntityFromJson(json); - Map toJson() => $SongQualityDetailEntityToJson(this); + Map toJson() => _$SongQualityDetailEntityToJson(this); @override String toString() { @@ -41,9 +42,9 @@ class SongQualityDetailData { SongQualityDetailData(); factory SongQualityDetailData.fromJson(Map json) => - $SongQualityDetailDataFromJson(json); + _$SongQualityDetailDataFromJson(json); - Map toJson() => $SongQualityDetailDataToJson(this); + Map toJson() => _$SongQualityDetailDataToJson(this); @override String toString() { @@ -62,9 +63,9 @@ class SongQualityDetailDataH { SongQualityDetailDataH(); factory SongQualityDetailDataH.fromJson(Map json) => - $SongQualityDetailDataHFromJson(json); + _$SongQualityDetailDataHFromJson(json); - Map toJson() => $SongQualityDetailDataHToJson(this); + Map toJson() => _$SongQualityDetailDataHToJson(this); @override String toString() { @@ -83,9 +84,9 @@ class SongQualityDetailDataM { SongQualityDetailDataM(); factory SongQualityDetailDataM.fromJson(Map json) => - $SongQualityDetailDataMFromJson(json); + _$SongQualityDetailDataMFromJson(json); - Map toJson() => $SongQualityDetailDataMToJson(this); + Map toJson() => _$SongQualityDetailDataMToJson(this); @override String toString() { @@ -104,9 +105,9 @@ class SongQualityDetailDataL { SongQualityDetailDataL(); factory SongQualityDetailDataL.fromJson(Map json) => - $SongQualityDetailDataLFromJson(json); + _$SongQualityDetailDataLFromJson(json); - Map toJson() => $SongQualityDetailDataLToJson(this); + Map toJson() => _$SongQualityDetailDataLToJson(this); @override String toString() { @@ -125,9 +126,9 @@ class SongQualityDetailDataSq { SongQualityDetailDataSq(); factory SongQualityDetailDataSq.fromJson(Map json) => - $SongQualityDetailDataSqFromJson(json); + _$SongQualityDetailDataSqFromJson(json); - Map toJson() => $SongQualityDetailDataSqToJson(this); + Map toJson() => _$SongQualityDetailDataSqToJson(this); @override String toString() { @@ -146,9 +147,9 @@ class SongQualityDetailDataJm { SongQualityDetailDataJm(); factory SongQualityDetailDataJm.fromJson(Map json) => - $SongQualityDetailDataJmFromJson(json); + _$SongQualityDetailDataJmFromJson(json); - Map toJson() => $SongQualityDetailDataJmToJson(this); + Map toJson() => _$SongQualityDetailDataJmToJson(this); @override String toString() { @@ -167,9 +168,9 @@ class SongQualityDetailDataJe { SongQualityDetailDataJe(); factory SongQualityDetailDataJe.fromJson(Map json) => - $SongQualityDetailDataJeFromJson(json); + _$SongQualityDetailDataJeFromJson(json); - Map toJson() => $SongQualityDetailDataJeToJson(this); + Map toJson() => _$SongQualityDetailDataJeToJson(this); @override String toString() { @@ -188,9 +189,9 @@ class SongQualityDetailDataVi { SongQualityDetailDataVi(); factory SongQualityDetailDataVi.fromJson(Map json) => - $SongQualityDetailDataViFromJson(json); + _$SongQualityDetailDataViFromJson(json); - Map toJson() => $SongQualityDetailDataViToJson(this); + Map toJson() => _$SongQualityDetailDataViToJson(this); @override String toString() { diff --git a/lib/api/song/entity/song_quality_detail_entity.g.dart b/lib/api/song/entity/song_quality_detail_entity.g.dart new file mode 100644 index 0000000..dbe9e91 --- /dev/null +++ b/lib/api/song/entity/song_quality_detail_entity.g.dart @@ -0,0 +1,207 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'song_quality_detail_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SongQualityDetailEntity _$SongQualityDetailEntityFromJson( + Map json) => + SongQualityDetailEntity() + ..data = json['data'] == null + ? null + : SongQualityDetailData.fromJson(json['data'] as Map) + ..code = (json['code'] as num?)?.toInt() + ..message = json['message'] as String? + ..success = json['success'] as bool? + ..error = json['error'] as bool?; + +Map _$SongQualityDetailEntityToJson( + SongQualityDetailEntity instance) => + { + 'data': instance.data, + 'code': instance.code, + 'message': instance.message, + 'success': instance.success, + 'error': instance.error, + }; + +SongQualityDetailData _$SongQualityDetailDataFromJson( + Map json) => + SongQualityDetailData() + ..songId = (json['songId'] as num?)?.toInt() + ..h = json['h'] == null + ? null + : SongQualityDetailDataH.fromJson(json['h'] as Map) + ..m = json['m'] == null + ? null + : SongQualityDetailDataM.fromJson(json['m'] as Map) + ..l = json['l'] == null + ? null + : SongQualityDetailDataL.fromJson(json['l'] as Map) + ..sq = json['sq'] == null + ? null + : SongQualityDetailDataSq.fromJson(json['sq'] as Map) + ..hr = json['hr'] + ..db = json['db'] + ..jm = json['jm'] == null + ? null + : SongQualityDetailDataJm.fromJson(json['jm'] as Map) + ..je = json['je'] == null + ? null + : SongQualityDetailDataJe.fromJson(json['je'] as Map) + ..sk = json['sk'] + ..vi = json['vi'] == null + ? null + : SongQualityDetailDataVi.fromJson( + json['vi'] as Map); + +Map _$SongQualityDetailDataToJson( + SongQualityDetailData instance) => + { + 'songId': instance.songId, + 'h': instance.h, + 'm': instance.m, + 'l': instance.l, + 'sq': instance.sq, + 'hr': instance.hr, + 'db': instance.db, + 'jm': instance.jm, + 'je': instance.je, + 'sk': instance.sk, + 'vi': instance.vi, + }; + +SongQualityDetailDataH _$SongQualityDetailDataHFromJson( + Map json) => + SongQualityDetailDataH() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataHToJson( + SongQualityDetailDataH instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongQualityDetailDataM _$SongQualityDetailDataMFromJson( + Map json) => + SongQualityDetailDataM() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataMToJson( + SongQualityDetailDataM instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongQualityDetailDataL _$SongQualityDetailDataLFromJson( + Map json) => + SongQualityDetailDataL() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataLToJson( + SongQualityDetailDataL instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongQualityDetailDataSq _$SongQualityDetailDataSqFromJson( + Map json) => + SongQualityDetailDataSq() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataSqToJson( + SongQualityDetailDataSq instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongQualityDetailDataJm _$SongQualityDetailDataJmFromJson( + Map json) => + SongQualityDetailDataJm() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataJmToJson( + SongQualityDetailDataJm instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongQualityDetailDataJe _$SongQualityDetailDataJeFromJson( + Map json) => + SongQualityDetailDataJe() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataJeToJson( + SongQualityDetailDataJe instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; + +SongQualityDetailDataVi _$SongQualityDetailDataViFromJson( + Map json) => + SongQualityDetailDataVi() + ..br = (json['br'] as num?)?.toInt() + ..fid = (json['fid'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..vd = (json['vd'] as num?)?.toDouble() + ..sr = (json['sr'] as num?)?.toInt(); + +Map _$SongQualityDetailDataViToJson( + SongQualityDetailDataVi instance) => + { + 'br': instance.br, + 'fid': instance.fid, + 'size': instance.size, + 'vd': instance.vd, + 'sr': instance.sr, + }; diff --git a/lib/api/song/entity/song_url_entity.dart b/lib/api/song/entity/song_url_entity.dart index 89aa958..212d801 100644 --- a/lib/api/song/entity/song_url_entity.dart +++ b/lib/api/song/entity/song_url_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/song_url_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/song_url_entity.g.dart'; +part 'song_url_entity.g.dart'; @JsonSerializable() class SongUrlEntity { @@ -10,9 +10,9 @@ class SongUrlEntity { SongUrlEntity(); - factory SongUrlEntity.fromJson(Map json) => $SongUrlEntityFromJson(json); + factory SongUrlEntity.fromJson(Map json) => _$SongUrlEntityFromJson(json); - Map toJson() => $SongUrlEntityToJson(this); + Map toJson() => _$SongUrlEntityToJson(this); @override String toString() { @@ -50,9 +50,9 @@ class SongUrlData { SongUrlData(); - factory SongUrlData.fromJson(Map json) => $SongUrlDataFromJson(json); + factory SongUrlData.fromJson(Map json) => _$SongUrlDataFromJson(json); - Map toJson() => $SongUrlDataToJson(this); + Map toJson() => _$SongUrlDataToJson(this); @override String toString() { @@ -67,9 +67,9 @@ class SongUrlDataFreeTrialPrivilege { SongUrlDataFreeTrialPrivilege(); - factory SongUrlDataFreeTrialPrivilege.fromJson(Map json) => $SongUrlDataFreeTrialPrivilegeFromJson(json); + factory SongUrlDataFreeTrialPrivilege.fromJson(Map json) => _$SongUrlDataFreeTrialPrivilegeFromJson(json); - Map toJson() => $SongUrlDataFreeTrialPrivilegeToJson(this); + Map toJson() => _$SongUrlDataFreeTrialPrivilegeToJson(this); @override String toString() { @@ -86,9 +86,9 @@ class SongUrlDataFreeTimeTrialPrivilege { SongUrlDataFreeTimeTrialPrivilege(); - factory SongUrlDataFreeTimeTrialPrivilege.fromJson(Map json) => $SongUrlDataFreeTimeTrialPrivilegeFromJson(json); + factory SongUrlDataFreeTimeTrialPrivilege.fromJson(Map json) => _$SongUrlDataFreeTimeTrialPrivilegeFromJson(json); - Map toJson() => $SongUrlDataFreeTimeTrialPrivilegeToJson(this); + Map toJson() => _$SongUrlDataFreeTimeTrialPrivilegeToJson(this); @override String toString() { diff --git a/lib/api/song/entity/song_url_entity.g.dart b/lib/api/song/entity/song_url_entity.g.dart new file mode 100644 index 0000000..b907a9f --- /dev/null +++ b/lib/api/song/entity/song_url_entity.g.dart @@ -0,0 +1,112 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'song_url_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +SongUrlEntity _$SongUrlEntityFromJson(Map json) => + SongUrlEntity() + ..data = (json['data'] as List?) + ?.map((e) => SongUrlData.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$SongUrlEntityToJson(SongUrlEntity instance) => + { + 'data': instance.data, + 'code': instance.code, + }; + +SongUrlData _$SongUrlDataFromJson(Map json) => SongUrlData() + ..id = (json['id'] as num?)?.toInt() + ..url = json['url'] as String? + ..br = (json['br'] as num?)?.toInt() + ..size = (json['size'] as num?)?.toInt() + ..md5 = json['md5'] as String? + ..code = (json['code'] as num?)?.toInt() + ..expi = (json['expi'] as num?)?.toInt() + ..type = json['type'] as String? + ..gain = (json['gain'] as num?)?.toInt() + ..peak = (json['peak'] as num?)?.toInt() + ..closedGain = (json['closedGain'] as num?)?.toInt() + ..closedPeak = (json['closedPeak'] as num?)?.toInt() + ..fee = (json['fee'] as num?)?.toInt() + ..uf = json['uf'] + ..payed = (json['payed'] as num?)?.toInt() + ..flag = (json['flag'] as num?)?.toInt() + ..canExtend = json['canExtend'] as bool? + ..level = json['level'] as String? + ..encodeType = json['encodeType'] as String? + ..freeTrialPrivilege = json['freeTrialPrivilege'] == null + ? null + : SongUrlDataFreeTrialPrivilege.fromJson( + json['freeTrialPrivilege'] as Map) + ..freeTimeTrialPrivilege = json['freeTimeTrialPrivilege'] == null + ? null + : SongUrlDataFreeTimeTrialPrivilege.fromJson( + json['freeTimeTrialPrivilege'] as Map) + ..urlSource = (json['urlSource'] as num?)?.toInt() + ..rightSource = (json['rightSource'] as num?)?.toInt() + ..time = (json['time'] as num?)?.toInt() + ..musicId = json['musicId'] as String?; + +Map _$SongUrlDataToJson(SongUrlData instance) => + { + 'id': instance.id, + 'url': instance.url, + 'br': instance.br, + 'size': instance.size, + 'md5': instance.md5, + 'code': instance.code, + 'expi': instance.expi, + 'type': instance.type, + 'gain': instance.gain, + 'peak': instance.peak, + 'closedGain': instance.closedGain, + 'closedPeak': instance.closedPeak, + 'fee': instance.fee, + 'uf': instance.uf, + 'payed': instance.payed, + 'flag': instance.flag, + 'canExtend': instance.canExtend, + 'level': instance.level, + 'encodeType': instance.encodeType, + 'freeTrialPrivilege': instance.freeTrialPrivilege, + 'freeTimeTrialPrivilege': instance.freeTimeTrialPrivilege, + 'urlSource': instance.urlSource, + 'rightSource': instance.rightSource, + 'time': instance.time, + 'musicId': instance.musicId, + }; + +SongUrlDataFreeTrialPrivilege _$SongUrlDataFreeTrialPrivilegeFromJson( + Map json) => + SongUrlDataFreeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool?; + +Map _$SongUrlDataFreeTrialPrivilegeToJson( + SongUrlDataFreeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + }; + +SongUrlDataFreeTimeTrialPrivilege _$SongUrlDataFreeTimeTrialPrivilegeFromJson( + Map json) => + SongUrlDataFreeTimeTrialPrivilege() + ..resConsumable = json['resConsumable'] as bool? + ..userConsumable = json['userConsumable'] as bool? + ..type = (json['type'] as num?)?.toInt() + ..remainTime = (json['remainTime'] as num?)?.toInt(); + +Map _$SongUrlDataFreeTimeTrialPrivilegeToJson( + SongUrlDataFreeTimeTrialPrivilege instance) => + { + 'resConsumable': instance.resConsumable, + 'userConsumable': instance.userConsumable, + 'type': instance.type, + 'remainTime': instance.remainTime, + }; diff --git a/lib/api/top/entity/top_artist_entity.dart b/lib/api/top/entity/top_artist_entity.dart index 2fd1ea5..67efbd5 100644 --- a/lib/api/top/entity/top_artist_entity.dart +++ b/lib/api/top/entity/top_artist_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/top_artist_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/top_artist_entity.g.dart'; +part 'top_artist_entity.g.dart'; @JsonSerializable() class TopArtistEntity { @@ -11,9 +11,9 @@ class TopArtistEntity { TopArtistEntity(); - factory TopArtistEntity.fromJson(Map json) => $TopArtistEntityFromJson(json); + factory TopArtistEntity.fromJson(Map json) => _$TopArtistEntityFromJson(json); - Map toJson() => $TopArtistEntityToJson(this); + Map toJson() => _$TopArtistEntityToJson(this); @override String toString() { @@ -48,9 +48,9 @@ class TopArtistArtists { TopArtistArtists(); - factory TopArtistArtists.fromJson(Map json) => $TopArtistArtistsFromJson(json); + factory TopArtistArtists.fromJson(Map json) => _$TopArtistArtistsFromJson(json); - Map toJson() => $TopArtistArtistsToJson(this); + Map toJson() => _$TopArtistArtistsToJson(this); @override String toString() { diff --git a/lib/api/top/entity/top_artist_entity.g.dart b/lib/api/top/entity/top_artist_entity.g.dart new file mode 100644 index 0000000..ccd5372 --- /dev/null +++ b/lib/api/top/entity/top_artist_entity.g.dart @@ -0,0 +1,70 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'top_artist_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +TopArtistEntity _$TopArtistEntityFromJson(Map json) => + TopArtistEntity() + ..code = (json['code'] as num?)?.toInt() + ..more = json['more'] as bool? + ..artists = (json['artists'] as List) + .map((e) => TopArtistArtists.fromJson(e as Map)) + .toList(); + +Map _$TopArtistEntityToJson(TopArtistEntity instance) => + { + 'code': instance.code, + 'more': instance.more, + 'artists': instance.artists, + }; + +TopArtistArtists _$TopArtistArtistsFromJson(Map json) => + TopArtistArtists() + ..name = json['name'] as String + ..id = (json['id'] as num?)?.toInt() + ..picId = (json['picId'] as num?)?.toInt() + ..img1v1Id = (json['img1v1Id'] as num?)?.toInt() + ..briefDesc = json['briefDesc'] as String? + ..picUrl = json['picUrl'] as String? + ..img1v1Url = json['img1v1Url'] as String? + ..albumSize = (json['albumSize'] as num?)?.toInt() + ..alias = + (json['alias'] as List?)?.map((e) => e as String).toList() + ..trans = json['trans'] as String? + ..musicSize = (json['musicSize'] as num?)?.toInt() + ..topicPerson = (json['topicPerson'] as num?)?.toInt() + ..isSubed = json['isSubed'] as bool? + ..accountId = (json['accountId'] as num?)?.toInt() + ..picidStr = json['picidStr'] as String? + ..img1v1idStr = json['img1v1idStr'] as String? + ..transNames = json['transNames'] + ..followed = json['followed'] as bool? + ..mvSize = (json['mvSize'] as num?)?.toInt() + ..fansCount = (json['fansCount'] as num?)?.toInt(); + +Map _$TopArtistArtistsToJson(TopArtistArtists instance) => + { + 'name': instance.name, + 'id': instance.id, + 'picId': instance.picId, + 'img1v1Id': instance.img1v1Id, + 'briefDesc': instance.briefDesc, + 'picUrl': instance.picUrl, + 'img1v1Url': instance.img1v1Url, + 'albumSize': instance.albumSize, + 'alias': instance.alias, + 'trans': instance.trans, + 'musicSize': instance.musicSize, + 'topicPerson': instance.topicPerson, + 'isSubed': instance.isSubed, + 'accountId': instance.accountId, + 'picidStr': instance.picidStr, + 'img1v1idStr': instance.img1v1idStr, + 'transNames': instance.transNames, + 'followed': instance.followed, + 'mvSize': instance.mvSize, + 'fansCount': instance.fansCount, + }; diff --git a/lib/api/user/entity/bool_entity.dart b/lib/api/user/entity/bool_entity.dart index 4eee562..b4f4d9d 100644 --- a/lib/api/user/entity/bool_entity.dart +++ b/lib/api/user/entity/bool_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/bool_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/bool_entity.g.dart'; +part 'bool_entity.g.dart'; @JsonSerializable() class BoolEntity { @@ -11,9 +11,9 @@ class BoolEntity { BoolEntity(); - factory BoolEntity.fromJson(Map json) => $BoolEntityFromJson(json); + factory BoolEntity.fromJson(Map json) => _$BoolEntityFromJson(json); - Map toJson() => $BoolEntityToJson(this); + Map toJson() => _$BoolEntityToJson(this); @override String toString() { diff --git a/lib/api/user/entity/bool_entity.g.dart b/lib/api/user/entity/bool_entity.g.dart new file mode 100644 index 0000000..2c51e58 --- /dev/null +++ b/lib/api/user/entity/bool_entity.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bool_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BoolEntity _$BoolEntityFromJson(Map json) => BoolEntity() + ..code = (json['code'] as num?)?.toInt() + ..data = json['data'] as bool? + ..message = json['message'] as String?; + +Map _$BoolEntityToJson(BoolEntity instance) => + { + 'code': instance.code, + 'data': instance.data, + 'message': instance.message, + }; diff --git a/lib/api/user/entity/like_list_entity.dart b/lib/api/user/entity/like_list_entity.dart index a46d110..7f22e83 100644 --- a/lib/api/user/entity/like_list_entity.dart +++ b/lib/api/user/entity/like_list_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/like_list_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/like_list_entity.g.dart'; +part 'like_list_entity.g.dart'; @JsonSerializable() class LikeListEntity { @@ -11,9 +11,9 @@ class LikeListEntity { LikeListEntity(); - factory LikeListEntity.fromJson(Map json) => $LikeListEntityFromJson(json); + factory LikeListEntity.fromJson(Map json) => _$LikeListEntityFromJson(json); - Map toJson() => $LikeListEntityToJson(this); + Map toJson() => _$LikeListEntityToJson(this); @override String toString() { diff --git a/lib/api/user/entity/like_list_entity.g.dart b/lib/api/user/entity/like_list_entity.g.dart new file mode 100644 index 0000000..c87f57b --- /dev/null +++ b/lib/api/user/entity/like_list_entity.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'like_list_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +LikeListEntity _$LikeListEntityFromJson(Map json) => + LikeListEntity() + ..ids = (json['ids'] as List?) + ?.map((e) => (e as num).toInt()) + .toList() + ..checkPoint = (json['checkPoint'] as num?)?.toInt() + ..code = (json['code'] as num?)?.toInt(); + +Map _$LikeListEntityToJson(LikeListEntity instance) => + { + 'ids': instance.ids, + 'checkPoint': instance.checkPoint, + 'code': instance.code, + }; diff --git a/lib/api/user/entity/login_entity.dart b/lib/api/user/entity/login_entity.dart index d68a39b..18b498c 100644 --- a/lib/api/user/entity/login_entity.dart +++ b/lib/api/user/entity/login_entity.dart @@ -1,147 +1,118 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/login_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/login_entity.g.dart'; + +part 'login_entity.g.dart'; @JsonSerializable() class LoginEntity { - int? loginType = 0; - String? clientId = ''; - int? effectTime = 0; - int? code = 0; - LoginAccount? account; - String? token = ''; - LoginProfile? profile; - List? bindings = []; - - LoginEntity(); - - factory LoginEntity.fromJson(Map json) => $LoginEntityFromJson(json); - - Map toJson() => $LoginEntityToJson(this); - - @override - String toString() { - return jsonEncode(this); - } + int? loginType; + String? clientId; + int? effectTime; + int? code; + String? message; + LoginAccount? account; + String? token; + LoginProfile? profile; + List? bindings; + + LoginEntity(); + + factory LoginEntity.fromJson(Map json) => _$LoginEntityFromJson(json); + Map toJson() => _$LoginEntityToJson(this); + @override String toString() => jsonEncode(this); } @JsonSerializable() class LoginAccount { - int? id = 0; - String? userName = ''; - int? type = 0; - int? status = 0; - int? whitelistAuthority = 0; - int? createTime = 0; - String? salt = ''; - int? tokenVersion = 0; - int? ban = 0; - int? baoyueVersion = 0; - int? donateVersion = 0; - int? vipType = 0; - int? viptypeVersion = 0; - bool? anonimousUser = false; - bool? uninitialized = false; - - LoginAccount(); - - factory LoginAccount.fromJson(Map json) => $LoginAccountFromJson(json); - - Map toJson() => $LoginAccountToJson(this); - - @override - String toString() { - return jsonEncode(this); - } + int? id; + String? userName; + int? type; + int? status; + int? whitelistAuthority; + int? createTime; + String? salt; + int? tokenVersion; + int? ban; + int? baoyueVersion; + int? donateVersion; + int? vipType; + int? viptypeVersion; + bool? anonimousUser; + bool? uninitialized; + + LoginAccount(); + factory LoginAccount.fromJson(Map json) => _$LoginAccountFromJson(json); + Map toJson() => _$LoginAccountToJson(this); + @override String toString() => jsonEncode(this); } @JsonSerializable() class LoginProfile { - int? userType = 0; - String? avatarUrl = ''; - int? vipType = 0; - int? authStatus = 0; - int? djStatus = 0; - String? detailDescription = ''; - LoginProfileExperts? experts; - dynamic expertTags; - int? accountStatus = 0; - String? nickname = ''; - int? birthday = 0; - int? gender = 0; - int? province = 0; - int? city = 0; - int? avatarImgId = 0; - int? backgroundImgId = 0; - bool? defaultAvatar = false; - bool? mutual = false; - dynamic remarkName; - bool? followed = false; - String? backgroundUrl = ''; - String? backgroundImgIdStr = ''; - String? avatarImgIdStr = ''; - String? description = ''; - int? userId = 0; - String? signature = ''; - int? authority = 0; - @JSONField(name: "avatarImgId_str") - String? avatarimgidStr = ''; - int? followeds = 0; - int? follows = 0; - int? eventCount = 0; - dynamic avatarDetail; - int? playlistCount = 0; - int? playlistBeSubscribedCount = 0; - - LoginProfile(); - - factory LoginProfile.fromJson(Map json) => $LoginProfileFromJson(json); - - Map toJson() => $LoginProfileToJson(this); - - @override - String toString() { - return jsonEncode(this); - } + int? userType; + String? avatarUrl; + int? vipType; + int? authStatus; + int? djStatus; + String? detailDescription; + LoginProfileExperts? experts; + dynamic expertTags; + int? accountStatus; + String? nickname; + int? birthday; + int? gender; + int? province; + int? city; + int? avatarImgId; + int? backgroundImgId; + bool? defaultAvatar; + bool? mutual; + dynamic remarkName; + bool? followed; + String? backgroundUrl; + String? backgroundImgIdStr; + String? avatarImgIdStr; + String? description; + int? userId; + String? signature; + int? authority; + @JSONField(name: "avatarImgId_str") + String? avatarimgIdStr; + int? followeds; + int? follows; + int? eventCount; + dynamic avatarDetail; + int? playlistCount; + int? playlistBeSubscribedCount; + + LoginProfile(); + factory LoginProfile.fromJson(Map json) => _$LoginProfileFromJson(json); + Map toJson() => _$LoginProfileToJson(this); + @override String toString() => jsonEncode(this); } @JsonSerializable() class LoginProfileExperts { - - - LoginProfileExperts(); - - factory LoginProfileExperts.fromJson(Map json) => $LoginProfileExpertsFromJson(json); - - Map toJson() => $LoginProfileExpertsToJson(this); - - @override - String toString() { - return jsonEncode(this); - } + LoginProfileExperts(); + factory LoginProfileExperts.fromJson(Map json) => _$LoginProfileExpertsFromJson(json); + Map toJson() => _$LoginProfileExpertsToJson(this); + @override String toString() => jsonEncode(this); } @JsonSerializable() class LoginBindings { - int? bindingTime = 0; - int? refreshTime = 0; - String? tokenJsonStr = ''; - int? expiresIn = 0; - String? url = ''; - bool? expired = false; - int? userId = 0; - int? id = 0; - int? type = 0; - - LoginBindings(); - - factory LoginBindings.fromJson(Map json) => $LoginBindingsFromJson(json); - - Map toJson() => $LoginBindingsToJson(this); - - @override - String toString() { - return jsonEncode(this); - } -} \ No newline at end of file + int? bindingTime; + int? refreshTime; + String? tokenJsonStr; + int? expiresIn; + String? url; + bool? expired; + int? userId; + int? id; + int? type; + + LoginBindings(); + factory LoginBindings.fromJson(Map json) => _$LoginBindingsFromJson(json); + Map toJson() => _$LoginBindingsToJson(this); + @override String toString() => jsonEncode(this); +} diff --git a/lib/api/user/entity/login_entity.g.dart b/lib/api/user/entity/login_entity.g.dart new file mode 100644 index 0000000..ab77e34 --- /dev/null +++ b/lib/api/user/entity/login_entity.g.dart @@ -0,0 +1,182 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'login_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +LoginEntity _$LoginEntityFromJson(Map json) => LoginEntity() + ..loginType = (json['loginType'] as num?)?.toInt() + ..clientId = json['clientId'] as String? + ..effectTime = (json['effectTime'] as num?)?.toInt() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message'] as String? + ..account = json['account'] == null + ? null + : LoginAccount.fromJson(json['account'] as Map) + ..token = json['token'] as String? + ..profile = json['profile'] == null + ? null + : LoginProfile.fromJson(json['profile'] as Map) + ..bindings = (json['bindings'] as List?) + ?.map((e) => LoginBindings.fromJson(e as Map)) + .toList(); + +Map _$LoginEntityToJson(LoginEntity instance) => + { + 'loginType': instance.loginType, + 'clientId': instance.clientId, + 'effectTime': instance.effectTime, + 'code': instance.code, + 'message': instance.message, + 'account': instance.account, + 'token': instance.token, + 'profile': instance.profile, + 'bindings': instance.bindings, + }; + +LoginAccount _$LoginAccountFromJson(Map json) => LoginAccount() + ..id = (json['id'] as num?)?.toInt() + ..userName = json['userName'] as String? + ..type = (json['type'] as num?)?.toInt() + ..status = (json['status'] as num?)?.toInt() + ..whitelistAuthority = (json['whitelistAuthority'] as num?)?.toInt() + ..createTime = (json['createTime'] as num?)?.toInt() + ..salt = json['salt'] as String? + ..tokenVersion = (json['tokenVersion'] as num?)?.toInt() + ..ban = (json['ban'] as num?)?.toInt() + ..baoyueVersion = (json['baoyueVersion'] as num?)?.toInt() + ..donateVersion = (json['donateVersion'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..viptypeVersion = (json['viptypeVersion'] as num?)?.toInt() + ..anonimousUser = json['anonimousUser'] as bool? + ..uninitialized = json['uninitialized'] as bool?; + +Map _$LoginAccountToJson(LoginAccount instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'type': instance.type, + 'status': instance.status, + 'whitelistAuthority': instance.whitelistAuthority, + 'createTime': instance.createTime, + 'salt': instance.salt, + 'tokenVersion': instance.tokenVersion, + 'ban': instance.ban, + 'baoyueVersion': instance.baoyueVersion, + 'donateVersion': instance.donateVersion, + 'vipType': instance.vipType, + 'viptypeVersion': instance.viptypeVersion, + 'anonimousUser': instance.anonimousUser, + 'uninitialized': instance.uninitialized, + }; + +LoginProfile _$LoginProfileFromJson(Map json) => LoginProfile() + ..userType = (json['userType'] as num?)?.toInt() + ..avatarUrl = json['avatarUrl'] as String? + ..vipType = (json['vipType'] as num?)?.toInt() + ..authStatus = (json['authStatus'] as num?)?.toInt() + ..djStatus = (json['djStatus'] as num?)?.toInt() + ..detailDescription = json['detailDescription'] as String? + ..experts = json['experts'] == null + ? null + : LoginProfileExperts.fromJson(json['experts'] as Map) + ..expertTags = json['expertTags'] + ..accountStatus = (json['accountStatus'] as num?)?.toInt() + ..nickname = json['nickname'] as String? + ..birthday = (json['birthday'] as num?)?.toInt() + ..gender = (json['gender'] as num?)?.toInt() + ..province = (json['province'] as num?)?.toInt() + ..city = (json['city'] as num?)?.toInt() + ..avatarImgId = (json['avatarImgId'] as num?)?.toInt() + ..backgroundImgId = (json['backgroundImgId'] as num?)?.toInt() + ..defaultAvatar = json['defaultAvatar'] as bool? + ..mutual = json['mutual'] as bool? + ..remarkName = json['remarkName'] + ..followed = json['followed'] as bool? + ..backgroundUrl = json['backgroundUrl'] as String? + ..backgroundImgIdStr = json['backgroundImgIdStr'] as String? + ..avatarImgIdStr = json['avatarImgIdStr'] as String? + ..description = json['description'] as String? + ..userId = (json['userId'] as num?)?.toInt() + ..signature = json['signature'] as String? + ..authority = (json['authority'] as num?)?.toInt() + ..avatarimgIdStr = json['avatarimgIdStr'] as String? + ..followeds = (json['followeds'] as num?)?.toInt() + ..follows = (json['follows'] as num?)?.toInt() + ..eventCount = (json['eventCount'] as num?)?.toInt() + ..avatarDetail = json['avatarDetail'] + ..playlistCount = (json['playlistCount'] as num?)?.toInt() + ..playlistBeSubscribedCount = + (json['playlistBeSubscribedCount'] as num?)?.toInt(); + +Map _$LoginProfileToJson(LoginProfile instance) => + { + 'userType': instance.userType, + 'avatarUrl': instance.avatarUrl, + 'vipType': instance.vipType, + 'authStatus': instance.authStatus, + 'djStatus': instance.djStatus, + 'detailDescription': instance.detailDescription, + 'experts': instance.experts, + 'expertTags': instance.expertTags, + 'accountStatus': instance.accountStatus, + 'nickname': instance.nickname, + 'birthday': instance.birthday, + 'gender': instance.gender, + 'province': instance.province, + 'city': instance.city, + 'avatarImgId': instance.avatarImgId, + 'backgroundImgId': instance.backgroundImgId, + 'defaultAvatar': instance.defaultAvatar, + 'mutual': instance.mutual, + 'remarkName': instance.remarkName, + 'followed': instance.followed, + 'backgroundUrl': instance.backgroundUrl, + 'backgroundImgIdStr': instance.backgroundImgIdStr, + 'avatarImgIdStr': instance.avatarImgIdStr, + 'description': instance.description, + 'userId': instance.userId, + 'signature': instance.signature, + 'authority': instance.authority, + 'avatarimgIdStr': instance.avatarimgIdStr, + 'followeds': instance.followeds, + 'follows': instance.follows, + 'eventCount': instance.eventCount, + 'avatarDetail': instance.avatarDetail, + 'playlistCount': instance.playlistCount, + 'playlistBeSubscribedCount': instance.playlistBeSubscribedCount, + }; + +LoginProfileExperts _$LoginProfileExpertsFromJson(Map json) => + LoginProfileExperts(); + +Map _$LoginProfileExpertsToJson( + LoginProfileExperts instance) => + {}; + +LoginBindings _$LoginBindingsFromJson(Map json) => + LoginBindings() + ..bindingTime = (json['bindingTime'] as num?)?.toInt() + ..refreshTime = (json['refreshTime'] as num?)?.toInt() + ..tokenJsonStr = json['tokenJsonStr'] as String? + ..expiresIn = (json['expiresIn'] as num?)?.toInt() + ..url = json['url'] as String? + ..expired = json['expired'] as bool? + ..userId = (json['userId'] as num?)?.toInt() + ..id = (json['id'] as num?)?.toInt() + ..type = (json['type'] as num?)?.toInt(); + +Map _$LoginBindingsToJson(LoginBindings instance) => + { + 'bindingTime': instance.bindingTime, + 'refreshTime': instance.refreshTime, + 'tokenJsonStr': instance.tokenJsonStr, + 'expiresIn': instance.expiresIn, + 'url': instance.url, + 'expired': instance.expired, + 'userId': instance.userId, + 'id': instance.id, + 'type': instance.type, + }; diff --git a/lib/api/user/entity/qr_check_entity.dart b/lib/api/user/entity/qr_check_entity.dart index 6d22e77..728484c 100644 --- a/lib/api/user/entity/qr_check_entity.dart +++ b/lib/api/user/entity/qr_check_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/qr_check_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/qr_check_entity.g.dart'; +part 'qr_check_entity.g.dart'; @JsonSerializable() class QrCheckEntity { @@ -10,9 +10,9 @@ class QrCheckEntity { QrCheckEntity(); - factory QrCheckEntity.fromJson(Map json) => $QrCheckEntityFromJson(json); + factory QrCheckEntity.fromJson(Map json) => _$QrCheckEntityFromJson(json); - Map toJson() => $QrCheckEntityToJson(this); + Map toJson() => _$QrCheckEntityToJson(this); @override String toString() { diff --git a/lib/api/user/entity/qr_check_entity.g.dart b/lib/api/user/entity/qr_check_entity.g.dart new file mode 100644 index 0000000..a43c48c --- /dev/null +++ b/lib/api/user/entity/qr_check_entity.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'qr_check_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +QrCheckEntity _$QrCheckEntityFromJson(Map json) => + QrCheckEntity() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message'] as String?; + +Map _$QrCheckEntityToJson(QrCheckEntity instance) => + { + 'code': instance.code, + 'message': instance.message, + }; diff --git a/lib/api/user/entity/qr_check_result_entity.dart b/lib/api/user/entity/qr_check_result_entity.dart new file mode 100644 index 0000000..e9c529c --- /dev/null +++ b/lib/api/user/entity/qr_check_result_entity.dart @@ -0,0 +1,18 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:bujuan_music_api/generated/json/base/json_field.dart'; +import 'dart:convert'; + +part 'qr_check_result_entity.g.dart'; + +@JsonSerializable() +class QrCheckResultEntity { + int? code; + String? message; + String? cookie; + + QrCheckResultEntity(); + + factory QrCheckResultEntity.fromJson(Map json) => _$QrCheckResultEntityFromJson(json); + Map toJson() => _$QrCheckResultEntityToJson(this); + @override String toString() => jsonEncode(this); +} diff --git a/lib/api/user/entity/qr_check_result_entity.g.dart b/lib/api/user/entity/qr_check_result_entity.g.dart new file mode 100644 index 0000000..a43fb40 --- /dev/null +++ b/lib/api/user/entity/qr_check_result_entity.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'qr_check_result_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +QrCheckResultEntity _$QrCheckResultEntityFromJson(Map json) => + QrCheckResultEntity() + ..code = (json['code'] as num?)?.toInt() + ..message = json['message'] as String? + ..cookie = json['cookie'] as String?; + +Map _$QrCheckResultEntityToJson( + QrCheckResultEntity instance) => + { + 'code': instance.code, + 'message': instance.message, + 'cookie': instance.cookie, + }; diff --git a/lib/api/user/entity/qrcode_key_entity.dart b/lib/api/user/entity/qrcode_key_entity.dart index d0096e6..320c29b 100644 --- a/lib/api/user/entity/qrcode_key_entity.dart +++ b/lib/api/user/entity/qrcode_key_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/qrcode_key_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/qrcode_key_entity.g.dart'; +part 'qrcode_key_entity.g.dart'; @JsonSerializable() class QrcodeKeyEntity { @@ -10,9 +10,9 @@ class QrcodeKeyEntity { QrcodeKeyEntity(); - factory QrcodeKeyEntity.fromJson(Map json) => $QrcodeKeyEntityFromJson(json); + factory QrcodeKeyEntity.fromJson(Map json) => _$QrcodeKeyEntityFromJson(json); - Map toJson() => $QrcodeKeyEntityToJson(this); + Map toJson() => _$QrcodeKeyEntityToJson(this); @override String toString() { diff --git a/lib/api/user/entity/qrcode_key_entity.g.dart b/lib/api/user/entity/qrcode_key_entity.g.dart new file mode 100644 index 0000000..f54a43f --- /dev/null +++ b/lib/api/user/entity/qrcode_key_entity.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'qrcode_key_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +QrcodeKeyEntity _$QrcodeKeyEntityFromJson(Map json) => + QrcodeKeyEntity() + ..code = (json['code'] as num?)?.toInt() + ..unikey = json['unikey'] as String?; + +Map _$QrcodeKeyEntityToJson(QrcodeKeyEntity instance) => + { + 'code': instance.code, + 'unikey': instance.unikey, + }; diff --git a/lib/api/user/entity/string_entity.dart b/lib/api/user/entity/string_entity.dart index 9e476c8..eefa0c8 100644 --- a/lib/api/user/entity/string_entity.dart +++ b/lib/api/user/entity/string_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/string_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/string_entity.g.dart'; +part 'string_entity.g.dart'; @JsonSerializable() class StringEntity { @@ -11,9 +11,9 @@ class StringEntity { StringEntity(); - factory StringEntity.fromJson(Map json) => $StringEntityFromJson(json); + factory StringEntity.fromJson(Map json) => _$StringEntityFromJson(json); - Map toJson() => $StringEntityToJson(this); + Map toJson() => _$StringEntityToJson(this); @override String toString() { diff --git a/lib/api/user/entity/string_entity.g.dart b/lib/api/user/entity/string_entity.g.dart new file mode 100644 index 0000000..dfff6f0 --- /dev/null +++ b/lib/api/user/entity/string_entity.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'string_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +StringEntity _$StringEntityFromJson(Map json) => StringEntity() + ..code = (json['code'] as num?)?.toInt() + ..data = json['data'] as String? + ..message = json['message'] as String?; + +Map _$StringEntityToJson(StringEntity instance) => + { + 'code': instance.code, + 'data': instance.data, + 'message': instance.message, + }; diff --git a/lib/api/user/entity/user_info_entity.dart b/lib/api/user/entity/user_info_entity.dart index 71236af..c543d7c 100644 --- a/lib/api/user/entity/user_info_entity.dart +++ b/lib/api/user/entity/user_info_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/user_info_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/user_info_entity.g.dart'; +part 'user_info_entity.g.dart'; @JsonSerializable() class UserInfoEntity { @@ -10,9 +10,9 @@ class UserInfoEntity { UserInfoEntity(); - factory UserInfoEntity.fromJson(Map json) => $UserInfoEntityFromJson(json); + factory UserInfoEntity.fromJson(Map json) => _$UserInfoEntityFromJson(json); - Map toJson() => $UserInfoEntityToJson(this); + Map toJson() => _$UserInfoEntityToJson(this); @override String toString() { @@ -38,9 +38,9 @@ class UserInfoAccount { UserInfoAccount(); - factory UserInfoAccount.fromJson(Map json) => $UserInfoAccountFromJson(json); + factory UserInfoAccount.fromJson(Map json) => _$UserInfoAccountFromJson(json); - Map toJson() => $UserInfoAccountToJson(this); + Map toJson() => _$UserInfoAccountToJson(this); @override String toString() { @@ -90,9 +90,9 @@ class UserInfoProfile { UserInfoProfile(); - factory UserInfoProfile.fromJson(Map json) => $UserInfoProfileFromJson(json); + factory UserInfoProfile.fromJson(Map json) => _$UserInfoProfileFromJson(json); - Map toJson() => $UserInfoProfileToJson(this); + Map toJson() => _$UserInfoProfileToJson(this); @override String toString() { diff --git a/lib/api/user/entity/user_info_entity.g.dart b/lib/api/user/entity/user_info_entity.g.dart new file mode 100644 index 0000000..cc40887 --- /dev/null +++ b/lib/api/user/entity/user_info_entity.g.dart @@ -0,0 +1,136 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_info_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserInfoEntity _$UserInfoEntityFromJson(Map json) => + UserInfoEntity() + ..account = json['account'] == null + ? null + : UserInfoAccount.fromJson(json['account'] as Map) + ..profile = json['profile'] == null + ? null + : UserInfoProfile.fromJson(json['profile'] as Map); + +Map _$UserInfoEntityToJson(UserInfoEntity instance) => + { + 'account': instance.account, + 'profile': instance.profile, + }; + +UserInfoAccount _$UserInfoAccountFromJson(Map json) => + UserInfoAccount() + ..id = (json['id'] as num?)?.toInt() + ..userName = json['userName'] as String? + ..type = (json['type'] as num?)?.toInt() + ..status = (json['status'] as num?)?.toInt() + ..whitelistAuthority = (json['whitelistAuthority'] as num?)?.toInt() + ..createTime = (json['createTime'] as num?)?.toInt() + ..tokenVersion = (json['tokenVersion'] as num?)?.toInt() + ..ban = (json['ban'] as num?)?.toInt() + ..baoyueVersion = (json['baoyueVersion'] as num?)?.toInt() + ..donateVersion = (json['donateVersion'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..anonimousUser = json['anonimousUser'] as bool? + ..paidFee = json['paidFee'] as bool?; + +Map _$UserInfoAccountToJson(UserInfoAccount instance) => + { + 'id': instance.id, + 'userName': instance.userName, + 'type': instance.type, + 'status': instance.status, + 'whitelistAuthority': instance.whitelistAuthority, + 'createTime': instance.createTime, + 'tokenVersion': instance.tokenVersion, + 'ban': instance.ban, + 'baoyueVersion': instance.baoyueVersion, + 'donateVersion': instance.donateVersion, + 'vipType': instance.vipType, + 'anonimousUser': instance.anonimousUser, + 'paidFee': instance.paidFee, + }; + +UserInfoProfile _$UserInfoProfileFromJson(Map json) => + UserInfoProfile() + ..userId = (json['userId'] as num?)?.toInt() + ..userType = (json['userType'] as num?)?.toInt() + ..nickname = json['nickname'] as String? + ..avatarImgId = (json['avatarImgId'] as num?)?.toInt() + ..avatarUrl = json['avatarUrl'] as String? + ..backgroundImgId = (json['backgroundImgId'] as num?)?.toInt() + ..backgroundUrl = json['backgroundUrl'] as String? + ..signature = json['signature'] as String? + ..createTime = (json['createTime'] as num?)?.toInt() + ..userName = json['userName'] as String? + ..accountType = (json['accountType'] as num?)?.toInt() + ..shortUserName = json['shortUserName'] as String? + ..birthday = (json['birthday'] as num?)?.toInt() + ..authority = (json['authority'] as num?)?.toInt() + ..gender = (json['gender'] as num?)?.toInt() + ..accountStatus = (json['accountStatus'] as num?)?.toInt() + ..province = (json['province'] as num?)?.toInt() + ..city = (json['city'] as num?)?.toInt() + ..authStatus = (json['authStatus'] as num?)?.toInt() + ..description = json['description'] as String? + ..detailDescription = json['detailDescription'] as String? + ..defaultAvatar = json['defaultAvatar'] as bool? + ..expertTags = json['expertTags'] + ..experts = json['experts'] + ..djStatus = (json['djStatus'] as num?)?.toInt() + ..locationStatus = (json['locationStatus'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..mutual = json['mutual'] as bool? + ..authenticated = json['authenticated'] as bool? + ..lastLoginTime = (json['lastLoginTime'] as num?)?.toInt() + ..lastLoginIP = json['lastLoginIP'] as String? + ..remarkName = json['remarkName'] as String? + ..viptypeVersion = (json['viptypeVersion'] as num?)?.toInt() + ..authenticationTypes = (json['authenticationTypes'] as num?)?.toInt() + ..avatarDetail = json['avatarDetail'] + ..anchor = json['anchor'] as bool?; + +Map _$UserInfoProfileToJson(UserInfoProfile instance) => + { + 'userId': instance.userId, + 'userType': instance.userType, + 'nickname': instance.nickname, + 'avatarImgId': instance.avatarImgId, + 'avatarUrl': instance.avatarUrl, + 'backgroundImgId': instance.backgroundImgId, + 'backgroundUrl': instance.backgroundUrl, + 'signature': instance.signature, + 'createTime': instance.createTime, + 'userName': instance.userName, + 'accountType': instance.accountType, + 'shortUserName': instance.shortUserName, + 'birthday': instance.birthday, + 'authority': instance.authority, + 'gender': instance.gender, + 'accountStatus': instance.accountStatus, + 'province': instance.province, + 'city': instance.city, + 'authStatus': instance.authStatus, + 'description': instance.description, + 'detailDescription': instance.detailDescription, + 'defaultAvatar': instance.defaultAvatar, + 'expertTags': instance.expertTags, + 'experts': instance.experts, + 'djStatus': instance.djStatus, + 'locationStatus': instance.locationStatus, + 'vipType': instance.vipType, + 'followed': instance.followed, + 'mutual': instance.mutual, + 'authenticated': instance.authenticated, + 'lastLoginTime': instance.lastLoginTime, + 'lastLoginIP': instance.lastLoginIP, + 'remarkName': instance.remarkName, + 'viptypeVersion': instance.viptypeVersion, + 'authenticationTypes': instance.authenticationTypes, + 'avatarDetail': instance.avatarDetail, + 'anchor': instance.anchor, + }; diff --git a/lib/api/user/entity/user_playlist_entity.dart b/lib/api/user/entity/user_playlist_entity.dart index 7fca78e..3f831b8 100644 --- a/lib/api/user/entity/user_playlist_entity.dart +++ b/lib/api/user/entity/user_playlist_entity.dart @@ -1,7 +1,7 @@ +import 'package:json_annotation/json_annotation.dart'; import 'package:bujuan_music_api/generated/json/base/json_field.dart'; -import 'package:bujuan_music_api/generated/json/user_playlist_entity.g.dart'; import 'dart:convert'; -export 'package:bujuan_music_api/generated/json/user_playlist_entity.g.dart'; +part 'user_playlist_entity.g.dart'; @JsonSerializable() class UserPlaylistEntity { @@ -11,9 +11,9 @@ class UserPlaylistEntity { UserPlaylistEntity(); - factory UserPlaylistEntity.fromJson(Map json) => $UserPlaylistEntityFromJson(json); + factory UserPlaylistEntity.fromJson(Map json) => _$UserPlaylistEntityFromJson(json); - Map toJson() => $UserPlaylistEntityToJson(this); + Map toJson() => _$UserPlaylistEntityToJson(this); @override String toString() { @@ -68,9 +68,9 @@ class UserPlaylistPlaylist { UserPlaylistPlaylist(); - factory UserPlaylistPlaylist.fromJson(Map json) => $UserPlaylistPlaylistFromJson(json); + factory UserPlaylistPlaylist.fromJson(Map json) => _$UserPlaylistPlaylistFromJson(json); - Map toJson() => $UserPlaylistPlaylistToJson(this); + Map toJson() => _$UserPlaylistPlaylistToJson(this); @override String toString() { @@ -114,9 +114,9 @@ class UserPlaylistPlaylistCreator { UserPlaylistPlaylistCreator(); - factory UserPlaylistPlaylistCreator.fromJson(Map json) => $UserPlaylistPlaylistCreatorFromJson(json); + factory UserPlaylistPlaylistCreator.fromJson(Map json) => _$UserPlaylistPlaylistCreatorFromJson(json); - Map toJson() => $UserPlaylistPlaylistCreatorToJson(this); + Map toJson() => _$UserPlaylistPlaylistCreatorToJson(this); @override String toString() { diff --git a/lib/api/user/entity/user_playlist_entity.g.dart b/lib/api/user/entity/user_playlist_entity.g.dart new file mode 100644 index 0000000..60c665d --- /dev/null +++ b/lib/api/user/entity/user_playlist_entity.g.dart @@ -0,0 +1,188 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_playlist_entity.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserPlaylistEntity _$UserPlaylistEntityFromJson(Map json) => + UserPlaylistEntity() + ..more = json['more'] as bool? + ..playlist = (json['playlist'] as List?) + ?.map((e) => UserPlaylistPlaylist.fromJson(e as Map)) + .toList() + ..code = (json['code'] as num?)?.toInt(); + +Map _$UserPlaylistEntityToJson(UserPlaylistEntity instance) => + { + 'more': instance.more, + 'playlist': instance.playlist, + 'code': instance.code, + }; + +UserPlaylistPlaylist _$UserPlaylistPlaylistFromJson( + Map json) => + UserPlaylistPlaylist() + ..subscribers = json['subscribers'] as List? + ..subscribed = json['subscribed'] as bool? + ..creator = json['creator'] == null + ? null + : UserPlaylistPlaylistCreator.fromJson( + json['creator'] as Map) + ..artists = json['artists'] + ..tracks = json['tracks'] + ..top = json['top'] as bool? + ..updateFrequency = json['updateFrequency'] + ..backgroundCoverId = (json['backgroundCoverId'] as num?)?.toInt() + ..backgroundCoverUrl = json['backgroundCoverUrl'] as String? + ..titleImage = json['titleImage'] as String? + ..titleImageUrl = json['titleImageUrl'] as String? + ..englishTitle = json['englishTitle'] as String? + ..opRecommend = json['opRecommend'] as bool? + ..subscribedCount = (json['subscribedCount'] as num?)?.toInt() + ..cloudTrackCount = (json['cloudTrackCount'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..totalDuration = (json['totalDuration'] as num?)?.toInt() + ..coverImgId = (json['coverImgId'] as num?)?.toInt() + ..privacy = (json['privacy'] as num?)?.toInt() + ..trackUpdateTime = (json['trackUpdateTime'] as num?)?.toInt() + ..trackCount = (json['trackCount'] as num?)?.toInt() + ..updateTime = (json['updateTime'] as num?)?.toInt() + ..commentThreadId = json['commentThreadId'] as String? + ..coverImgUrl = json['coverImgUrl'] as String? + ..specialType = (json['specialType'] as num?)?.toInt() + ..anonimous = json['anonimous'] as bool? + ..createTime = (json['createTime'] as num?)?.toInt() + ..highQuality = json['highQuality'] as bool? + ..newImported = json['newImported'] as bool? + ..trackNumberUpdateTime = (json['trackNumberUpdateTime'] as num?)?.toInt() + ..playCount = (json['playCount'] as num?)?.toInt() + ..adType = (json['adType'] as num?)?.toInt() + ..description = json['description'] as String? + ..tags = + (json['tags'] as List?)?.map((e) => e as String).toList() + ..ordered = json['ordered'] as bool? + ..status = (json['status'] as num?)?.toInt() + ..name = json['name'] as String? + ..id = (json['id'] as num?)?.toInt() + ..coverimgidStr = json['coverimgidStr'] as String? + ..copied = json['copied'] as bool? + ..containsTracks = json['containsTracks'] as bool?; + +Map _$UserPlaylistPlaylistToJson( + UserPlaylistPlaylist instance) => + { + 'subscribers': instance.subscribers, + 'subscribed': instance.subscribed, + 'creator': instance.creator, + 'artists': instance.artists, + 'tracks': instance.tracks, + 'top': instance.top, + 'updateFrequency': instance.updateFrequency, + 'backgroundCoverId': instance.backgroundCoverId, + 'backgroundCoverUrl': instance.backgroundCoverUrl, + 'titleImage': instance.titleImage, + 'titleImageUrl': instance.titleImageUrl, + 'englishTitle': instance.englishTitle, + 'opRecommend': instance.opRecommend, + 'subscribedCount': instance.subscribedCount, + 'cloudTrackCount': instance.cloudTrackCount, + 'userId': instance.userId, + 'totalDuration': instance.totalDuration, + 'coverImgId': instance.coverImgId, + 'privacy': instance.privacy, + 'trackUpdateTime': instance.trackUpdateTime, + 'trackCount': instance.trackCount, + 'updateTime': instance.updateTime, + 'commentThreadId': instance.commentThreadId, + 'coverImgUrl': instance.coverImgUrl, + 'specialType': instance.specialType, + 'anonimous': instance.anonimous, + 'createTime': instance.createTime, + 'highQuality': instance.highQuality, + 'newImported': instance.newImported, + 'trackNumberUpdateTime': instance.trackNumberUpdateTime, + 'playCount': instance.playCount, + 'adType': instance.adType, + 'description': instance.description, + 'tags': instance.tags, + 'ordered': instance.ordered, + 'status': instance.status, + 'name': instance.name, + 'id': instance.id, + 'coverimgidStr': instance.coverimgidStr, + 'copied': instance.copied, + 'containsTracks': instance.containsTracks, + }; + +UserPlaylistPlaylistCreator _$UserPlaylistPlaylistCreatorFromJson( + Map json) => + UserPlaylistPlaylistCreator() + ..defaultAvatar = json['defaultAvatar'] as bool? + ..province = (json['province'] as num?)?.toInt() + ..authStatus = (json['authStatus'] as num?)?.toInt() + ..followed = json['followed'] as bool? + ..avatarUrl = json['avatarUrl'] as String? + ..accountStatus = (json['accountStatus'] as num?)?.toInt() + ..gender = (json['gender'] as num?)?.toInt() + ..city = (json['city'] as num?)?.toInt() + ..birthday = (json['birthday'] as num?)?.toInt() + ..userId = (json['userId'] as num?)?.toInt() + ..userType = (json['userType'] as num?)?.toInt() + ..nickname = json['nickname'] as String? + ..signature = json['signature'] as String? + ..description = json['description'] as String? + ..detailDescription = json['detailDescription'] as String? + ..avatarImgId = (json['avatarImgId'] as num?)?.toInt() + ..backgroundImgId = (json['backgroundImgId'] as num?)?.toInt() + ..backgroundUrl = json['backgroundUrl'] as String? + ..authority = (json['authority'] as num?)?.toInt() + ..mutual = json['mutual'] as bool? + ..expertTags = (json['expertTags'] as List?) + ?.map((e) => e as String) + .toList() + ..djStatus = (json['djStatus'] as num?)?.toInt() + ..vipType = (json['vipType'] as num?)?.toInt() + ..remarkName = json['remarkName'] as String? + ..authenticationTypes = (json['authenticationTypes'] as num?)?.toInt() + ..avatarDetail = json['avatarDetail'] as String? + ..backgroundImgIdStr = json['backgroundImgIdStr'] as String? + ..anchor = json['anchor'] as bool? + ..avatarImgIdStr = json['avatarImgIdStr'] as String? + ..avatarimgidStr = json['avatarimgidStr'] as String?; + +Map _$UserPlaylistPlaylistCreatorToJson( + UserPlaylistPlaylistCreator instance) => + { + 'defaultAvatar': instance.defaultAvatar, + 'province': instance.province, + 'authStatus': instance.authStatus, + 'followed': instance.followed, + 'avatarUrl': instance.avatarUrl, + 'accountStatus': instance.accountStatus, + 'gender': instance.gender, + 'city': instance.city, + 'birthday': instance.birthday, + 'userId': instance.userId, + 'userType': instance.userType, + 'nickname': instance.nickname, + 'signature': instance.signature, + 'description': instance.description, + 'detailDescription': instance.detailDescription, + 'avatarImgId': instance.avatarImgId, + 'backgroundImgId': instance.backgroundImgId, + 'backgroundUrl': instance.backgroundUrl, + 'authority': instance.authority, + 'mutual': instance.mutual, + 'expertTags': instance.expertTags, + 'djStatus': instance.djStatus, + 'vipType': instance.vipType, + 'remarkName': instance.remarkName, + 'authenticationTypes': instance.authenticationTypes, + 'avatarDetail': instance.avatarDetail, + 'backgroundImgIdStr': instance.backgroundImgIdStr, + 'anchor': instance.anchor, + 'avatarImgIdStr': instance.avatarImgIdStr, + 'avatarimgidStr': instance.avatarimgidStr, + }; diff --git a/lib/api/user/user_api.dart b/lib/api/user/user_api.dart index 99cbf18..93ce651 100644 --- a/lib/api/user/user_api.dart +++ b/lib/api/user/user_api.dart @@ -1,25 +1,19 @@ +import 'dart:convert'; import 'package:bujuan_music_api/api/user/entity/bool_entity.dart'; import 'package:bujuan_music_api/api/user/entity/like_list_entity.dart'; import 'package:bujuan_music_api/api/user/entity/login_entity.dart'; import 'package:bujuan_music_api/api/user/entity/qrcode_key_entity.dart'; +import 'package:bujuan_music_api/api/user/entity/qr_check_entity.dart'; +import 'package:bujuan_music_api/api/user/entity/qr_check_result_entity.dart'; // 新增 import 'package:bujuan_music_api/api/user/entity/string_entity.dart'; import 'package:bujuan_music_api/api/user/entity/user_info_entity.dart'; import 'package:bujuan_music_api/api/user/entity/user_playlist_entity.dart'; - import '../../common/music_api.dart'; import '../../common/music_interceptors.dart'; import '../api.dart'; mixin UserApi { /// 登录手机号接口 - /// - /// [phone] 手机号(必填) - /// [password] 密码(可选,提供验证码时无效) - /// [captcha] 验证码(可选,若提供此参数,则 [password] 失效) - /// [countryCode] 国家代码(可选,默认为 '86') - /// [clientType] 客户端类型(可选,默认为 'android') - /// [rememberLogin] 是否记住登录状态(可选,默认为 true) - /// [https] 是否使用 HTTPS 请求(可选,默认为 true) Future loginCellPhone({ required String phone, String? password, @@ -31,22 +25,18 @@ mixin UserApi { }) { final data = { 'phone': phone, - if (captcha == null) 'password': password ?? '', // 只有未提供验证码时才包含密码 - if (captcha != null) 'captcha': captcha, // 提供验证码时忽略密码 + if (captcha == null) 'password': password ?? '', + if (captcha != null) 'captcha': captcha, 'countrycode': countryCode, 'clientType': clientType, 'rememberLogin': rememberLogin, 'https': https, }; - return BujuanMusicManager() .post(url: Api.loginCellPhone, options: createOption(), data: data); } /// 发送验证码 - /// - /// [phone] 手机号(必填) - /// [ctcode] 国家代码(可选,默认为 '86') Future sendSmsCode({ required String phone, String ctcode = '86', @@ -57,43 +47,29 @@ mixin UserApi { } /// 验证验证码 - /// - /// [phone] 手机号(必填) - /// [captcha] 手机号(必填) - /// [ctcode] 国家代码(可选,默认为 '86') Future verifySmsCode({ required String phone, required String captcha, String ctcode = '86', }) async { - final data = { - 'cellphone': phone, - 'captcha': captcha, - 'ctcode': ctcode, - }; + final data = {'cellphone': phone, 'captcha': captcha, 'ctcode': ctcode}; return await BujuanMusicManager() .post(url: Api.verifySmsCode, options: createOption(), data: data); } /// 二维码key - /// - /// [type] 类型(可选,默认为 3) Future qrCodeKey({int type = 1}) async { final data = {'type': type, 'timerstamp': '${DateTime.now()}'}; return await BujuanMusicManager().post( url: Api.qrCodeKey, options: createOption(encryptType: EncryptType.weApi), data: data); } - /// 二维码 - /// - /// [key] 二维码key(必填) + /// 二维码URL生成 String qrCode({required String key}) { return '$defaultUrl/login?codekey=$key'; } - /// 检测二维码 - /// - /// [type] 类型(可选,默认为 3) + /// 检测二维码(原有,返回StringEntity) Future checkQrCode({ required String key, int type = 1, @@ -103,32 +79,60 @@ mixin UserApi { url: Api.checkQrCode, options: createOption(encryptType: EncryptType.weApi), data: data); } - ///用户信息(需登录) + /// 完整二维码登录(获取状态和cookie) + Future qrCodeLogin({ + required String key, + int type = 1, + }) async { + final data = {'key': key, 'type': type, 'timerstamp': '${DateTime.now()}'}; + try { + final response = await BujuanMusicManager().dio.post( + Api.checkQrCode, + data: data, + options: createOption(encryptType: EncryptType.weApi), + ); + + if (response.statusCode != 200) return null; + + Map responseData; + if (response.data is Map) { + responseData = response.data as Map; + } else { + responseData = jsonDecode(response.data as String); + } + + final result = QrCheckResultEntity.fromJson(responseData); + + // 提取 cookie + if (response.headers['set-cookie'] != null) { + result.cookie = response.headers['set-cookie']!.join('; '); + } + return result; + } catch (e) { + print('QR code login error: $e'); + return null; + } + } + + /// 用户信息 Future userInfo() async { return await BujuanMusicManager().post( url: Api.userInfo, options: createOption(encryptType: EncryptType.weApi), data: {}); } /// 用户歌单 - /// - /// [uid] 用户id(必填) - /// [limit] 30 - /// [offset] 0 - Future userPlaylist( - {required String uid, int limit = 30, int offset = 0, bool includeVideo = true}) async { - final data = { - 'uid': uid, - 'limit': limit, - 'offset': offset, - 'includeVideo': includeVideo, - }; + Future userPlaylist({ + required String uid, + int limit = 30, + int offset = 0, + bool includeVideo = true, + }) async { + final data = {'uid': uid, 'limit': limit, 'offset': offset, 'includeVideo': includeVideo}; return await BujuanMusicManager() .post(url: Api.userPlaylist, options: createOption(), data: data); } - /// 用户喜欢的歌曲列表 - /// - /// [uid] 用户id(必填) + /// 用户喜欢列表 Future userLikeList({required String uid}) async { final data = {'uid': uid}; return await BujuanMusicManager() @@ -141,8 +145,9 @@ mixin UserApi { .post(url: Api.logout, options: createOption(), data: {}); } + /// 主页功能(保留) Future homepageDragonBall() async { return await BujuanMusicManager() .post(url: '/api/homepage/dragon/ball/static', options: createOption(), data: {}); } -} +} \ No newline at end of file diff --git a/lib/bujuan_music_api.dart b/lib/bujuan_music_api.dart index b0bb582..6529fb5 100644 --- a/lib/bujuan_music_api.dart +++ b/lib/bujuan_music_api.dart @@ -1,3 +1,14 @@ library bujuan_music_api; export 'common/music_api.dart'; +export 'api/api.dart'; +export 'api/user/entity/bool_entity.dart'; +export 'api/user/entity/like_list_entity.dart'; +export 'api/user/entity/login_entity.dart'; +export 'api/user/entity/qrcode_key_entity.dart'; +export 'api/user/entity/qr_check_entity.dart'; +export 'api/user/entity/qr_check_result_entity.dart'; +export 'api/user/entity/string_entity.dart'; +export 'api/user/entity/user_info_entity.dart'; +export 'api/user/entity/user_playlist_entity.dart'; +// 可根据需要添加其他模块的导出,如 album, playlist 等 \ No newline at end of file diff --git a/lib/common/music_api.dart b/lib/common/music_api.dart index 6737c7f..242cd55 100644 --- a/lib/common/music_api.dart +++ b/lib/common/music_api.dart @@ -1,5 +1,4 @@ import 'dart:convert'; - import 'package:bujuan_music_api/api/album/album_api.dart'; import 'package:bujuan_music_api/api/mv/mv_api.dart'; import 'package:bujuan_music_api/api/playlist/playlist_api.dart'; @@ -16,15 +15,14 @@ import 'cookie.dart'; import '../api/user/user_api.dart'; import 'music_interceptors.dart'; -class BujuanMusicManager with UserApi, RecommendApi, TopApi, AlbumApi, PlaylistApi,SongApi ,MvApi{ +class BujuanMusicManager with UserApi, RecommendApi, TopApi, AlbumApi, PlaylistApi, SongApi, MvApi { static final BujuanMusicManager _instance = BujuanMusicManager._internal(); - factory BujuanMusicManager() => _instance; late Dio _dio; - static late CookieJar cookieJar; bool _debug = false; + String? _manualCookie; // 恢复内存变量 BujuanMusicManager._internal(); @@ -39,22 +37,42 @@ class BujuanMusicManager with UserApi, RecommendApi, TopApi, AlbumApi, PlaylistA _initDio() { BaseOptions options = BaseOptions( baseUrl: defaultUrl, - // baseUrl: 'https://music163.dalao.cool', receiveTimeout: const Duration(seconds: 10), connectTimeout: const Duration(seconds: 10), sendTimeout: const Duration(seconds: 5)); _dio = Dio(options); _dio.interceptors.add(CookieManager(cookieJar)); _dio.interceptors.add(MusicApiInterceptors()); - dio.interceptors.add(PrettyDioLogger( - requestHeader: true, - requestBody: true, - responseBody: true, - responseHeader: false, - error: true, - compact: true, - maxWidth: 200, - enabled: _debug)); + // 恢复处理手动 cookie 的拦截器 + _dio.interceptors.add(InterceptorsWrapper( + onRequest: (options, handler) { + if (_manualCookie != null && _manualCookie!.isNotEmpty) { + options.headers['Cookie'] = _manualCookie; + } + return handler.next(options); + }, + )); + if (_debug) { + _dio.interceptors.add(PrettyDioLogger( + requestHeader: true, + requestBody: true, + responseBody: true, + responseHeader: false, + error: true, + compact: true, + maxWidth: 200, + enabled: _debug)); + } + } + + /// 设置手动 cookie(内存,同步) + void setCookie(String cookie) { + _manualCookie = cookie; + } + + /// 清除手动 cookie + void clearCookie() { + _manualCookie = null; } Future post({required String url, Options? options, Object? data}) async { @@ -66,5 +84,4 @@ class BujuanMusicManager with UserApi, RecommendApi, TopApi, AlbumApi, PlaylistA } Dio get dio => _dio; -} - +} \ No newline at end of file diff --git a/lib/generated/json/album_info_entity.g.dart b/lib/generated/json/album_info_entity.g.dart deleted file mode 100644 index d0cebf3..0000000 --- a/lib/generated/json/album_info_entity.g.dart +++ /dev/null @@ -1,1677 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/album/entity/album_info_entity.dart'; - -AlbumInfoEntity $AlbumInfoEntityFromJson(Map json) { - final AlbumInfoEntity albumInfoEntity = AlbumInfoEntity(); - final bool? resourceState = jsonConvert.convert(json['resourceState']); - if (resourceState != null) { - albumInfoEntity.resourceState = resourceState; - } - final List? songs = (json['songs'] as List?)?.map( - (e) => jsonConvert.convert(e) as AlbumInfoSongs).toList(); - if (songs != null) { - albumInfoEntity.songs = songs; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - albumInfoEntity.code = code; - } - final AlbumInfoAlbum? album = jsonConvert.convert(json['album']); - if (album != null) { - albumInfoEntity.album = album; - } - return albumInfoEntity; -} - -Map $AlbumInfoEntityToJson(AlbumInfoEntity entity) { - final Map data = {}; - data['resourceState'] = entity.resourceState; - data['songs'] = entity.songs?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - data['album'] = entity.album?.toJson(); - return data; -} - -extension AlbumInfoEntityExtension on AlbumInfoEntity { - AlbumInfoEntity copyWith({ - bool? resourceState, - List? songs, - int? code, - AlbumInfoAlbum? album, - }) { - return AlbumInfoEntity() - ..resourceState = resourceState ?? this.resourceState - ..songs = songs ?? this.songs - ..code = code ?? this.code - ..album = album ?? this.album; - } -} - -AlbumInfoSongs $AlbumInfoSongsFromJson(Map json) { - final AlbumInfoSongs albumInfoSongs = AlbumInfoSongs(); - final List? rtUrls = (json['rtUrls'] as List?)?.map( - (e) => e).toList(); - if (rtUrls != null) { - albumInfoSongs.rtUrls = rtUrls; - } - final List? ar = (json['ar'] as List?)?.map( - (e) => jsonConvert.convert(e) as AlbumInfoSongsAr).toList(); - if (ar != null) { - albumInfoSongs.ar = ar; - } - final AlbumInfoSongsAl? al = jsonConvert.convert(json['al']); - if (al != null) { - albumInfoSongs.al = al; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - albumInfoSongs.st = st; - } - final dynamic noCopyrightRcmd = json['noCopyrightRcmd']; - if (noCopyrightRcmd != null) { - albumInfoSongs.noCopyrightRcmd = noCopyrightRcmd; - } - final dynamic songJumpInfo = json['songJumpInfo']; - if (songJumpInfo != null) { - albumInfoSongs.songJumpInfo = songJumpInfo; - } - final int? djId = jsonConvert.convert(json['djId']); - if (djId != null) { - albumInfoSongs.djId = djId; - } - final int? no = jsonConvert.convert(json['no']); - if (no != null) { - albumInfoSongs.no = no; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - albumInfoSongs.fee = fee; - } - final int? mv = jsonConvert.convert(json['mv']); - if (mv != null) { - albumInfoSongs.mv = mv; - } - final int? t = jsonConvert.convert(json['t']); - if (t != null) { - albumInfoSongs.t = t; - } - final int? v = jsonConvert.convert(json['v']); - if (v != null) { - albumInfoSongs.v = v; - } - final String? cd = jsonConvert.convert(json['cd']); - if (cd != null) { - albumInfoSongs.cd = cd; - } - final int? rtype = jsonConvert.convert(json['rtype']); - if (rtype != null) { - albumInfoSongs.rtype = rtype; - } - final dynamic rurl = json['rurl']; - if (rurl != null) { - albumInfoSongs.rurl = rurl; - } - final int? pst = jsonConvert.convert(json['pst']); - if (pst != null) { - albumInfoSongs.pst = pst; - } - final List? alia = (json['alia'] as List?)?.map( - (e) => e).toList(); - if (alia != null) { - albumInfoSongs.alia = alia; - } - final double? pop = jsonConvert.convert(json['pop']); - if (pop != null) { - albumInfoSongs.pop = pop; - } - final String? rt = jsonConvert.convert(json['rt']); - if (rt != null) { - albumInfoSongs.rt = rt; - } - final int? mst = jsonConvert.convert(json['mst']); - if (mst != null) { - albumInfoSongs.mst = mst; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - albumInfoSongs.cp = cp; - } - final dynamic crbt = json['crbt']; - if (crbt != null) { - albumInfoSongs.crbt = crbt; - } - final String? cf = jsonConvert.convert(json['cf']); - if (cf != null) { - albumInfoSongs.cf = cf; - } - final int? dt = jsonConvert.convert(json['dt']); - if (dt != null) { - albumInfoSongs.dt = dt; - } - final AlbumInfoSongsH? h = jsonConvert.convert(json['h']); - if (h != null) { - albumInfoSongs.h = h; - } - final AlbumInfoSongsSq? sq = jsonConvert.convert(json['sq']); - if (sq != null) { - albumInfoSongs.sq = sq; - } - final dynamic hr = json['hr']; - if (hr != null) { - albumInfoSongs.hr = hr; - } - final AlbumInfoSongsL? l = jsonConvert.convert(json['l']); - if (l != null) { - albumInfoSongs.l = l; - } - final dynamic rtUrl = json['rtUrl']; - if (rtUrl != null) { - albumInfoSongs.rtUrl = rtUrl; - } - final int? ftype = jsonConvert.convert(json['ftype']); - if (ftype != null) { - albumInfoSongs.ftype = ftype; - } - final dynamic a = json['a']; - if (a != null) { - albumInfoSongs.a = a; - } - final AlbumInfoSongsM? m = jsonConvert.convert(json['m']); - if (m != null) { - albumInfoSongs.m = m; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoSongs.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoSongs.id = id; - } - final AlbumInfoSongsPrivilege? privilege = jsonConvert.convert( - json['privilege']); - if (privilege != null) { - albumInfoSongs.privilege = privilege; - } - return albumInfoSongs; -} - -Map $AlbumInfoSongsToJson(AlbumInfoSongs entity) { - final Map data = {}; - data['rtUrls'] = entity.rtUrls; - data['ar'] = entity.ar?.map((v) => v.toJson()).toList(); - data['al'] = entity.al?.toJson(); - data['st'] = entity.st; - data['noCopyrightRcmd'] = entity.noCopyrightRcmd; - data['songJumpInfo'] = entity.songJumpInfo; - data['djId'] = entity.djId; - data['no'] = entity.no; - data['fee'] = entity.fee; - data['mv'] = entity.mv; - data['t'] = entity.t; - data['v'] = entity.v; - data['cd'] = entity.cd; - data['rtype'] = entity.rtype; - data['rurl'] = entity.rurl; - data['pst'] = entity.pst; - data['alia'] = entity.alia; - data['pop'] = entity.pop; - data['rt'] = entity.rt; - data['mst'] = entity.mst; - data['cp'] = entity.cp; - data['crbt'] = entity.crbt; - data['cf'] = entity.cf; - data['dt'] = entity.dt; - data['h'] = entity.h?.toJson(); - data['sq'] = entity.sq?.toJson(); - data['hr'] = entity.hr; - data['l'] = entity.l?.toJson(); - data['rtUrl'] = entity.rtUrl; - data['ftype'] = entity.ftype; - data['a'] = entity.a; - data['m'] = entity.m?.toJson(); - data['name'] = entity.name; - data['id'] = entity.id; - data['privilege'] = entity.privilege?.toJson(); - return data; -} - -extension AlbumInfoSongsExtension on AlbumInfoSongs { - AlbumInfoSongs copyWith({ - List? rtUrls, - List? ar, - AlbumInfoSongsAl? al, - int? st, - dynamic noCopyrightRcmd, - dynamic songJumpInfo, - int? djId, - int? no, - int? fee, - int? mv, - int? t, - int? v, - String? cd, - int? rtype, - dynamic rurl, - int? pst, - List? alia, - double? pop, - String? rt, - int? mst, - int? cp, - dynamic crbt, - String? cf, - int? dt, - AlbumInfoSongsH? h, - AlbumInfoSongsSq? sq, - dynamic hr, - AlbumInfoSongsL? l, - dynamic rtUrl, - int? ftype, - dynamic a, - AlbumInfoSongsM? m, - String? name, - int? id, - AlbumInfoSongsPrivilege? privilege, - }) { - return AlbumInfoSongs() - ..rtUrls = rtUrls ?? this.rtUrls - ..ar = ar ?? this.ar - ..al = al ?? this.al - ..st = st ?? this.st - ..noCopyrightRcmd = noCopyrightRcmd ?? this.noCopyrightRcmd - ..songJumpInfo = songJumpInfo ?? this.songJumpInfo - ..djId = djId ?? this.djId - ..no = no ?? this.no - ..fee = fee ?? this.fee - ..mv = mv ?? this.mv - ..t = t ?? this.t - ..v = v ?? this.v - ..cd = cd ?? this.cd - ..rtype = rtype ?? this.rtype - ..rurl = rurl ?? this.rurl - ..pst = pst ?? this.pst - ..alia = alia ?? this.alia - ..pop = pop ?? this.pop - ..rt = rt ?? this.rt - ..mst = mst ?? this.mst - ..cp = cp ?? this.cp - ..crbt = crbt ?? this.crbt - ..cf = cf ?? this.cf - ..dt = dt ?? this.dt - ..h = h ?? this.h - ..sq = sq ?? this.sq - ..hr = hr ?? this.hr - ..l = l ?? this.l - ..rtUrl = rtUrl ?? this.rtUrl - ..ftype = ftype ?? this.ftype - ..a = a ?? this.a - ..m = m ?? this.m - ..name = name ?? this.name - ..id = id ?? this.id - ..privilege = privilege ?? this.privilege; - } -} - -AlbumInfoSongsAr $AlbumInfoSongsArFromJson(Map json) { - final AlbumInfoSongsAr albumInfoSongsAr = AlbumInfoSongsAr(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoSongsAr.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoSongsAr.name = name; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (tns != null) { - albumInfoSongsAr.tns = tns; - } - return albumInfoSongsAr; -} - -Map $AlbumInfoSongsArToJson(AlbumInfoSongsAr entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['tns'] = entity.tns; - return data; -} - -extension AlbumInfoSongsArExtension on AlbumInfoSongsAr { - AlbumInfoSongsAr copyWith({ - int? id, - String? name, - List? tns, - }) { - return AlbumInfoSongsAr() - ..id = id ?? this.id - ..name = name ?? this.name - ..tns = tns ?? this.tns; - } -} - -AlbumInfoSongsAl $AlbumInfoSongsAlFromJson(Map json) { - final AlbumInfoSongsAl albumInfoSongsAl = AlbumInfoSongsAl(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoSongsAl.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoSongsAl.name = name; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - albumInfoSongsAl.picUrl = picUrl; - } - final String? picStr = jsonConvert.convert(json['pic_str']); - if (picStr != null) { - albumInfoSongsAl.picStr = picStr; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - albumInfoSongsAl.pic = pic; - } - return albumInfoSongsAl; -} - -Map $AlbumInfoSongsAlToJson(AlbumInfoSongsAl entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['picUrl'] = entity.picUrl; - data['pic_str'] = entity.picStr; - data['pic'] = entity.pic; - return data; -} - -extension AlbumInfoSongsAlExtension on AlbumInfoSongsAl { - AlbumInfoSongsAl copyWith({ - int? id, - String? name, - String? picUrl, - String? picStr, - int? pic, - }) { - return AlbumInfoSongsAl() - ..id = id ?? this.id - ..name = name ?? this.name - ..picUrl = picUrl ?? this.picUrl - ..picStr = picStr ?? this.picStr - ..pic = pic ?? this.pic; - } -} - -AlbumInfoSongsH $AlbumInfoSongsHFromJson(Map json) { - final AlbumInfoSongsH albumInfoSongsH = AlbumInfoSongsH(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - albumInfoSongsH.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - albumInfoSongsH.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - albumInfoSongsH.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - albumInfoSongsH.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - albumInfoSongsH.sr = sr; - } - return albumInfoSongsH; -} - -Map $AlbumInfoSongsHToJson(AlbumInfoSongsH entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension AlbumInfoSongsHExtension on AlbumInfoSongsH { - AlbumInfoSongsH copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return AlbumInfoSongsH() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -AlbumInfoSongsSq $AlbumInfoSongsSqFromJson(Map json) { - final AlbumInfoSongsSq albumInfoSongsSq = AlbumInfoSongsSq(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - albumInfoSongsSq.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - albumInfoSongsSq.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - albumInfoSongsSq.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - albumInfoSongsSq.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - albumInfoSongsSq.sr = sr; - } - return albumInfoSongsSq; -} - -Map $AlbumInfoSongsSqToJson(AlbumInfoSongsSq entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension AlbumInfoSongsSqExtension on AlbumInfoSongsSq { - AlbumInfoSongsSq copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return AlbumInfoSongsSq() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -AlbumInfoSongsL $AlbumInfoSongsLFromJson(Map json) { - final AlbumInfoSongsL albumInfoSongsL = AlbumInfoSongsL(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - albumInfoSongsL.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - albumInfoSongsL.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - albumInfoSongsL.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - albumInfoSongsL.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - albumInfoSongsL.sr = sr; - } - return albumInfoSongsL; -} - -Map $AlbumInfoSongsLToJson(AlbumInfoSongsL entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension AlbumInfoSongsLExtension on AlbumInfoSongsL { - AlbumInfoSongsL copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return AlbumInfoSongsL() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -AlbumInfoSongsM $AlbumInfoSongsMFromJson(Map json) { - final AlbumInfoSongsM albumInfoSongsM = AlbumInfoSongsM(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - albumInfoSongsM.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - albumInfoSongsM.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - albumInfoSongsM.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - albumInfoSongsM.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - albumInfoSongsM.sr = sr; - } - return albumInfoSongsM; -} - -Map $AlbumInfoSongsMToJson(AlbumInfoSongsM entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension AlbumInfoSongsMExtension on AlbumInfoSongsM { - AlbumInfoSongsM copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return AlbumInfoSongsM() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -AlbumInfoSongsPrivilege $AlbumInfoSongsPrivilegeFromJson(Map json) { - final AlbumInfoSongsPrivilege albumInfoSongsPrivilege = AlbumInfoSongsPrivilege(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoSongsPrivilege.id = id; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - albumInfoSongsPrivilege.fee = fee; - } - final int? payed = jsonConvert.convert(json['payed']); - if (payed != null) { - albumInfoSongsPrivilege.payed = payed; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - albumInfoSongsPrivilege.st = st; - } - final int? pl = jsonConvert.convert(json['pl']); - if (pl != null) { - albumInfoSongsPrivilege.pl = pl; - } - final int? dl = jsonConvert.convert(json['dl']); - if (dl != null) { - albumInfoSongsPrivilege.dl = dl; - } - final int? sp = jsonConvert.convert(json['sp']); - if (sp != null) { - albumInfoSongsPrivilege.sp = sp; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - albumInfoSongsPrivilege.cp = cp; - } - final int? subp = jsonConvert.convert(json['subp']); - if (subp != null) { - albumInfoSongsPrivilege.subp = subp; - } - final bool? cs = jsonConvert.convert(json['cs']); - if (cs != null) { - albumInfoSongsPrivilege.cs = cs; - } - final int? maxbr = jsonConvert.convert(json['maxbr']); - if (maxbr != null) { - albumInfoSongsPrivilege.maxbr = maxbr; - } - final int? fl = jsonConvert.convert(json['fl']); - if (fl != null) { - albumInfoSongsPrivilege.fl = fl; - } - final bool? toast = jsonConvert.convert(json['toast']); - if (toast != null) { - albumInfoSongsPrivilege.toast = toast; - } - final int? flag = jsonConvert.convert(json['flag']); - if (flag != null) { - albumInfoSongsPrivilege.flag = flag; - } - final bool? preSell = jsonConvert.convert(json['preSell']); - if (preSell != null) { - albumInfoSongsPrivilege.preSell = preSell; - } - final int? playMaxbr = jsonConvert.convert(json['playMaxbr']); - if (playMaxbr != null) { - albumInfoSongsPrivilege.playMaxbr = playMaxbr; - } - final int? downloadMaxbr = jsonConvert.convert(json['downloadMaxbr']); - if (downloadMaxbr != null) { - albumInfoSongsPrivilege.downloadMaxbr = downloadMaxbr; - } - final String? maxBrLevel = jsonConvert.convert(json['maxBrLevel']); - if (maxBrLevel != null) { - albumInfoSongsPrivilege.maxBrLevel = maxBrLevel; - } - final String? playMaxBrLevel = jsonConvert.convert(json['playMaxBrLevel']); - if (playMaxBrLevel != null) { - albumInfoSongsPrivilege.playMaxBrLevel = playMaxBrLevel; - } - final String? downloadMaxBrLevel = jsonConvert.convert(json['downloadMaxBrLevel']); - if (downloadMaxBrLevel != null) { - albumInfoSongsPrivilege.downloadMaxBrLevel = downloadMaxBrLevel; - } - final String? plLevel = jsonConvert.convert(json['plLevel']); - if (plLevel != null) { - albumInfoSongsPrivilege.plLevel = plLevel; - } - final String? dlLevel = jsonConvert.convert(json['dlLevel']); - if (dlLevel != null) { - albumInfoSongsPrivilege.dlLevel = dlLevel; - } - final String? flLevel = jsonConvert.convert(json['flLevel']); - if (flLevel != null) { - albumInfoSongsPrivilege.flLevel = flLevel; - } - final dynamic rscl = json['rscl']; - if (rscl != null) { - albumInfoSongsPrivilege.rscl = rscl; - } - final AlbumInfoSongsPrivilegeFreeTrialPrivilege? freeTrialPrivilege = jsonConvert.convert< - AlbumInfoSongsPrivilegeFreeTrialPrivilege>(json['freeTrialPrivilege']); - if (freeTrialPrivilege != null) { - albumInfoSongsPrivilege.freeTrialPrivilege = freeTrialPrivilege; - } - final int? rightSource = jsonConvert.convert(json['rightSource']); - if (rightSource != null) { - albumInfoSongsPrivilege.rightSource = rightSource; - } - final List< - AlbumInfoSongsPrivilegeChargeInfoList>? chargeInfoList = (json['chargeInfoList'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as AlbumInfoSongsPrivilegeChargeInfoList).toList(); - if (chargeInfoList != null) { - albumInfoSongsPrivilege.chargeInfoList = chargeInfoList; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - albumInfoSongsPrivilege.code = code; - } - final dynamic message = json['message']; - if (message != null) { - albumInfoSongsPrivilege.message = message; - } - return albumInfoSongsPrivilege; -} - -Map $AlbumInfoSongsPrivilegeToJson(AlbumInfoSongsPrivilege entity) { - final Map data = {}; - data['id'] = entity.id; - data['fee'] = entity.fee; - data['payed'] = entity.payed; - data['st'] = entity.st; - data['pl'] = entity.pl; - data['dl'] = entity.dl; - data['sp'] = entity.sp; - data['cp'] = entity.cp; - data['subp'] = entity.subp; - data['cs'] = entity.cs; - data['maxbr'] = entity.maxbr; - data['fl'] = entity.fl; - data['toast'] = entity.toast; - data['flag'] = entity.flag; - data['preSell'] = entity.preSell; - data['playMaxbr'] = entity.playMaxbr; - data['downloadMaxbr'] = entity.downloadMaxbr; - data['maxBrLevel'] = entity.maxBrLevel; - data['playMaxBrLevel'] = entity.playMaxBrLevel; - data['downloadMaxBrLevel'] = entity.downloadMaxBrLevel; - data['plLevel'] = entity.plLevel; - data['dlLevel'] = entity.dlLevel; - data['flLevel'] = entity.flLevel; - data['rscl'] = entity.rscl; - data['freeTrialPrivilege'] = entity.freeTrialPrivilege?.toJson(); - data['rightSource'] = entity.rightSource; - data['chargeInfoList'] = entity.chargeInfoList?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - data['message'] = entity.message; - return data; -} - -extension AlbumInfoSongsPrivilegeExtension on AlbumInfoSongsPrivilege { - AlbumInfoSongsPrivilege copyWith({ - int? id, - int? fee, - int? payed, - int? st, - int? pl, - int? dl, - int? sp, - int? cp, - int? subp, - bool? cs, - int? maxbr, - int? fl, - bool? toast, - int? flag, - bool? preSell, - int? playMaxbr, - int? downloadMaxbr, - String? maxBrLevel, - String? playMaxBrLevel, - String? downloadMaxBrLevel, - String? plLevel, - String? dlLevel, - String? flLevel, - dynamic rscl, - AlbumInfoSongsPrivilegeFreeTrialPrivilege? freeTrialPrivilege, - int? rightSource, - List? chargeInfoList, - int? code, - dynamic message, - }) { - return AlbumInfoSongsPrivilege() - ..id = id ?? this.id - ..fee = fee ?? this.fee - ..payed = payed ?? this.payed - ..st = st ?? this.st - ..pl = pl ?? this.pl - ..dl = dl ?? this.dl - ..sp = sp ?? this.sp - ..cp = cp ?? this.cp - ..subp = subp ?? this.subp - ..cs = cs ?? this.cs - ..maxbr = maxbr ?? this.maxbr - ..fl = fl ?? this.fl - ..toast = toast ?? this.toast - ..flag = flag ?? this.flag - ..preSell = preSell ?? this.preSell - ..playMaxbr = playMaxbr ?? this.playMaxbr - ..downloadMaxbr = downloadMaxbr ?? this.downloadMaxbr - ..maxBrLevel = maxBrLevel ?? this.maxBrLevel - ..playMaxBrLevel = playMaxBrLevel ?? this.playMaxBrLevel - ..downloadMaxBrLevel = downloadMaxBrLevel ?? this.downloadMaxBrLevel - ..plLevel = plLevel ?? this.plLevel - ..dlLevel = dlLevel ?? this.dlLevel - ..flLevel = flLevel ?? this.flLevel - ..rscl = rscl ?? this.rscl - ..freeTrialPrivilege = freeTrialPrivilege ?? this.freeTrialPrivilege - ..rightSource = rightSource ?? this.rightSource - ..chargeInfoList = chargeInfoList ?? this.chargeInfoList - ..code = code ?? this.code - ..message = message ?? this.message; - } -} - -AlbumInfoSongsPrivilegeFreeTrialPrivilege $AlbumInfoSongsPrivilegeFreeTrialPrivilegeFromJson( - Map json) { - final AlbumInfoSongsPrivilegeFreeTrialPrivilege albumInfoSongsPrivilegeFreeTrialPrivilege = AlbumInfoSongsPrivilegeFreeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - albumInfoSongsPrivilegeFreeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - albumInfoSongsPrivilegeFreeTrialPrivilege.userConsumable = userConsumable; - } - final dynamic listenType = json['listenType']; - if (listenType != null) { - albumInfoSongsPrivilegeFreeTrialPrivilege.listenType = listenType; - } - final dynamic cannotListenReason = json['cannotListenReason']; - if (cannotListenReason != null) { - albumInfoSongsPrivilegeFreeTrialPrivilege.cannotListenReason = cannotListenReason; - } - final dynamic playReason = json['playReason']; - if (playReason != null) { - albumInfoSongsPrivilegeFreeTrialPrivilege.playReason = playReason; - } - final dynamic freeLimitTagType = json['freeLimitTagType']; - if (freeLimitTagType != null) { - albumInfoSongsPrivilegeFreeTrialPrivilege.freeLimitTagType = freeLimitTagType; - } - return albumInfoSongsPrivilegeFreeTrialPrivilege; -} - -Map $AlbumInfoSongsPrivilegeFreeTrialPrivilegeToJson( - AlbumInfoSongsPrivilegeFreeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - data['listenType'] = entity.listenType; - data['cannotListenReason'] = entity.cannotListenReason; - data['playReason'] = entity.playReason; - data['freeLimitTagType'] = entity.freeLimitTagType; - return data; -} - -extension AlbumInfoSongsPrivilegeFreeTrialPrivilegeExtension on AlbumInfoSongsPrivilegeFreeTrialPrivilege { - AlbumInfoSongsPrivilegeFreeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - dynamic listenType, - dynamic cannotListenReason, - dynamic playReason, - dynamic freeLimitTagType, - }) { - return AlbumInfoSongsPrivilegeFreeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable - ..listenType = listenType ?? this.listenType - ..cannotListenReason = cannotListenReason ?? this.cannotListenReason - ..playReason = playReason ?? this.playReason - ..freeLimitTagType = freeLimitTagType ?? this.freeLimitTagType; - } -} - -AlbumInfoSongsPrivilegeChargeInfoList $AlbumInfoSongsPrivilegeChargeInfoListFromJson( - Map json) { - final AlbumInfoSongsPrivilegeChargeInfoList albumInfoSongsPrivilegeChargeInfoList = AlbumInfoSongsPrivilegeChargeInfoList(); - final int? rate = jsonConvert.convert(json['rate']); - if (rate != null) { - albumInfoSongsPrivilegeChargeInfoList.rate = rate; - } - final dynamic chargeUrl = json['chargeUrl']; - if (chargeUrl != null) { - albumInfoSongsPrivilegeChargeInfoList.chargeUrl = chargeUrl; - } - final dynamic chargeMessage = json['chargeMessage']; - if (chargeMessage != null) { - albumInfoSongsPrivilegeChargeInfoList.chargeMessage = chargeMessage; - } - final int? chargeType = jsonConvert.convert(json['chargeType']); - if (chargeType != null) { - albumInfoSongsPrivilegeChargeInfoList.chargeType = chargeType; - } - return albumInfoSongsPrivilegeChargeInfoList; -} - -Map $AlbumInfoSongsPrivilegeChargeInfoListToJson( - AlbumInfoSongsPrivilegeChargeInfoList entity) { - final Map data = {}; - data['rate'] = entity.rate; - data['chargeUrl'] = entity.chargeUrl; - data['chargeMessage'] = entity.chargeMessage; - data['chargeType'] = entity.chargeType; - return data; -} - -extension AlbumInfoSongsPrivilegeChargeInfoListExtension on AlbumInfoSongsPrivilegeChargeInfoList { - AlbumInfoSongsPrivilegeChargeInfoList copyWith({ - int? rate, - dynamic chargeUrl, - dynamic chargeMessage, - int? chargeType, - }) { - return AlbumInfoSongsPrivilegeChargeInfoList() - ..rate = rate ?? this.rate - ..chargeUrl = chargeUrl ?? this.chargeUrl - ..chargeMessage = chargeMessage ?? this.chargeMessage - ..chargeType = chargeType ?? this.chargeType; - } -} - -AlbumInfoAlbum $AlbumInfoAlbumFromJson(Map json) { - final AlbumInfoAlbum albumInfoAlbum = AlbumInfoAlbum(); - final List? songs = (json['songs'] as List?)?.map( - (e) => e).toList(); - if (songs != null) { - albumInfoAlbum.songs = songs; - } - final bool? paid = jsonConvert.convert(json['paid']); - if (paid != null) { - albumInfoAlbum.paid = paid; - } - final bool? onSale = jsonConvert.convert(json['onSale']); - if (onSale != null) { - albumInfoAlbum.onSale = onSale; - } - final int? mark = jsonConvert.convert(json['mark']); - if (mark != null) { - albumInfoAlbum.mark = mark; - } - final dynamic awardTags = json['awardTags']; - if (awardTags != null) { - albumInfoAlbum.awardTags = awardTags; - } - final dynamic displayTags = json['displayTags']; - if (displayTags != null) { - albumInfoAlbum.displayTags = displayTags; - } - final List? artists = (json['artists'] as List?)?.map( - (e) => jsonConvert.convert(e) as AlbumInfoAlbumArtists).toList(); - if (artists != null) { - albumInfoAlbum.artists = artists; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - albumInfoAlbum.picId = picId; - } - final AlbumInfoAlbumArtist? artist = jsonConvert.convert(json['artist']); - if (artist != null) { - albumInfoAlbum.artist = artist; - } - final int? copyrightId = jsonConvert.convert(json['copyrightId']); - if (copyrightId != null) { - albumInfoAlbum.copyrightId = copyrightId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - albumInfoAlbum.briefDesc = briefDesc; - } - final int? publishTime = jsonConvert.convert(json['publishTime']); - if (publishTime != null) { - albumInfoAlbum.publishTime = publishTime; - } - final String? company = jsonConvert.convert(json['company']); - if (company != null) { - albumInfoAlbum.company = company; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - albumInfoAlbum.picUrl = picUrl; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - albumInfoAlbum.commentThreadId = commentThreadId; - } - final String? blurPicUrl = jsonConvert.convert(json['blurPicUrl']); - if (blurPicUrl != null) { - albumInfoAlbum.blurPicUrl = blurPicUrl; - } - final int? companyId = jsonConvert.convert(json['companyId']); - if (companyId != null) { - albumInfoAlbum.companyId = companyId; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - albumInfoAlbum.pic = pic; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - albumInfoAlbum.status = status; - } - final String? subType = jsonConvert.convert(json['subType']); - if (subType != null) { - albumInfoAlbum.subType = subType; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - albumInfoAlbum.alias = alias; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - albumInfoAlbum.description = description; - } - final String? tags = jsonConvert.convert(json['tags']); - if (tags != null) { - albumInfoAlbum.tags = tags; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoAlbum.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoAlbum.id = id; - } - final String? type = jsonConvert.convert(json['type']); - if (type != null) { - albumInfoAlbum.type = type; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - albumInfoAlbum.size = size; - } - final String? picidStr = jsonConvert.convert(json['picId_str']); - if (picidStr != null) { - albumInfoAlbum.picidStr = picidStr; - } - final AlbumInfoAlbumInfo? info = jsonConvert.convert(json['info']); - if (info != null) { - albumInfoAlbum.info = info; - } - return albumInfoAlbum; -} - -Map $AlbumInfoAlbumToJson(AlbumInfoAlbum entity) { - final Map data = {}; - data['songs'] = entity.songs; - data['paid'] = entity.paid; - data['onSale'] = entity.onSale; - data['mark'] = entity.mark; - data['awardTags'] = entity.awardTags; - data['displayTags'] = entity.displayTags; - data['artists'] = entity.artists?.map((v) => v.toJson()).toList(); - data['picId'] = entity.picId; - data['artist'] = entity.artist?.toJson(); - data['copyrightId'] = entity.copyrightId; - data['briefDesc'] = entity.briefDesc; - data['publishTime'] = entity.publishTime; - data['company'] = entity.company; - data['picUrl'] = entity.picUrl; - data['commentThreadId'] = entity.commentThreadId; - data['blurPicUrl'] = entity.blurPicUrl; - data['companyId'] = entity.companyId; - data['pic'] = entity.pic; - data['status'] = entity.status; - data['subType'] = entity.subType; - data['alias'] = entity.alias; - data['description'] = entity.description; - data['tags'] = entity.tags; - data['name'] = entity.name; - data['id'] = entity.id; - data['type'] = entity.type; - data['size'] = entity.size; - data['picId_str'] = entity.picidStr; - data['info'] = entity.info?.toJson(); - return data; -} - -extension AlbumInfoAlbumExtension on AlbumInfoAlbum { - AlbumInfoAlbum copyWith({ - List? songs, - bool? paid, - bool? onSale, - int? mark, - dynamic awardTags, - dynamic displayTags, - List? artists, - int? picId, - AlbumInfoAlbumArtist? artist, - int? copyrightId, - String? briefDesc, - int? publishTime, - String? company, - String? picUrl, - String? commentThreadId, - String? blurPicUrl, - int? companyId, - int? pic, - int? status, - String? subType, - List? alias, - String? description, - String? tags, - String? name, - int? id, - String? type, - int? size, - String? picidStr, - AlbumInfoAlbumInfo? info, - }) { - return AlbumInfoAlbum() - ..songs = songs ?? this.songs - ..paid = paid ?? this.paid - ..onSale = onSale ?? this.onSale - ..mark = mark ?? this.mark - ..awardTags = awardTags ?? this.awardTags - ..displayTags = displayTags ?? this.displayTags - ..artists = artists ?? this.artists - ..picId = picId ?? this.picId - ..artist = artist ?? this.artist - ..copyrightId = copyrightId ?? this.copyrightId - ..briefDesc = briefDesc ?? this.briefDesc - ..publishTime = publishTime ?? this.publishTime - ..company = company ?? this.company - ..picUrl = picUrl ?? this.picUrl - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..blurPicUrl = blurPicUrl ?? this.blurPicUrl - ..companyId = companyId ?? this.companyId - ..pic = pic ?? this.pic - ..status = status ?? this.status - ..subType = subType ?? this.subType - ..alias = alias ?? this.alias - ..description = description ?? this.description - ..tags = tags ?? this.tags - ..name = name ?? this.name - ..id = id ?? this.id - ..type = type ?? this.type - ..size = size ?? this.size - ..picidStr = picidStr ?? this.picidStr - ..info = info ?? this.info; - } -} - -AlbumInfoAlbumArtists $AlbumInfoAlbumArtistsFromJson(Map json) { - final AlbumInfoAlbumArtists albumInfoAlbumArtists = AlbumInfoAlbumArtists(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - albumInfoAlbumArtists.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - albumInfoAlbumArtists.topicPerson = topicPerson; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - albumInfoAlbumArtists.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - albumInfoAlbumArtists.briefDesc = briefDesc; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - albumInfoAlbumArtists.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - albumInfoAlbumArtists.albumSize = albumSize; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - albumInfoAlbumArtists.picUrl = picUrl; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - albumInfoAlbumArtists.img1v1Url = img1v1Url; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - albumInfoAlbumArtists.followed = followed; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - albumInfoAlbumArtists.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - albumInfoAlbumArtists.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoAlbumArtists.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoAlbumArtists.id = id; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - albumInfoAlbumArtists.img1v1idStr = img1v1idStr; - } - return albumInfoAlbumArtists; -} - -Map $AlbumInfoAlbumArtistsToJson(AlbumInfoAlbumArtists entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['picUrl'] = entity.picUrl; - data['img1v1Url'] = entity.img1v1Url; - data['followed'] = entity.followed; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension AlbumInfoAlbumArtistsExtension on AlbumInfoAlbumArtists { - AlbumInfoAlbumArtists copyWith({ - int? img1v1Id, - int? topicPerson, - int? picId, - String? briefDesc, - int? musicSize, - int? albumSize, - String? picUrl, - String? img1v1Url, - bool? followed, - String? trans, - List? alias, - String? name, - int? id, - String? img1v1idStr, - }) { - return AlbumInfoAlbumArtists() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..picUrl = picUrl ?? this.picUrl - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..followed = followed ?? this.followed - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} - -AlbumInfoAlbumArtist $AlbumInfoAlbumArtistFromJson(Map json) { - final AlbumInfoAlbumArtist albumInfoAlbumArtist = AlbumInfoAlbumArtist(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - albumInfoAlbumArtist.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - albumInfoAlbumArtist.topicPerson = topicPerson; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - albumInfoAlbumArtist.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - albumInfoAlbumArtist.briefDesc = briefDesc; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - albumInfoAlbumArtist.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - albumInfoAlbumArtist.albumSize = albumSize; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - albumInfoAlbumArtist.picUrl = picUrl; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - albumInfoAlbumArtist.img1v1Url = img1v1Url; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - albumInfoAlbumArtist.followed = followed; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - albumInfoAlbumArtist.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - albumInfoAlbumArtist.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoAlbumArtist.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoAlbumArtist.id = id; - } - final String? picidStr = jsonConvert.convert(json['picId_str']); - if (picidStr != null) { - albumInfoAlbumArtist.picidStr = picidStr; - } - final List? transNames = (json['transNames'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (transNames != null) { - albumInfoAlbumArtist.transNames = transNames; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - albumInfoAlbumArtist.img1v1idStr = img1v1idStr; - } - return albumInfoAlbumArtist; -} - -Map $AlbumInfoAlbumArtistToJson(AlbumInfoAlbumArtist entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['picUrl'] = entity.picUrl; - data['img1v1Url'] = entity.img1v1Url; - data['followed'] = entity.followed; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['picId_str'] = entity.picidStr; - data['transNames'] = entity.transNames; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension AlbumInfoAlbumArtistExtension on AlbumInfoAlbumArtist { - AlbumInfoAlbumArtist copyWith({ - int? img1v1Id, - int? topicPerson, - int? picId, - String? briefDesc, - int? musicSize, - int? albumSize, - String? picUrl, - String? img1v1Url, - bool? followed, - String? trans, - List? alias, - String? name, - int? id, - String? picidStr, - List? transNames, - String? img1v1idStr, - }) { - return AlbumInfoAlbumArtist() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..picUrl = picUrl ?? this.picUrl - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..followed = followed ?? this.followed - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..picidStr = picidStr ?? this.picidStr - ..transNames = transNames ?? this.transNames - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} - -AlbumInfoAlbumInfo $AlbumInfoAlbumInfoFromJson(Map json) { - final AlbumInfoAlbumInfo albumInfoAlbumInfo = AlbumInfoAlbumInfo(); - final AlbumInfoAlbumInfoCommentThread? commentThread = jsonConvert.convert< - AlbumInfoAlbumInfoCommentThread>(json['commentThread']); - if (commentThread != null) { - albumInfoAlbumInfo.commentThread = commentThread; - } - final dynamic latestLikedUsers = json['latestLikedUsers']; - if (latestLikedUsers != null) { - albumInfoAlbumInfo.latestLikedUsers = latestLikedUsers; - } - final bool? liked = jsonConvert.convert(json['liked']); - if (liked != null) { - albumInfoAlbumInfo.liked = liked; - } - final dynamic comments = json['comments']; - if (comments != null) { - albumInfoAlbumInfo.comments = comments; - } - final int? resourceType = jsonConvert.convert(json['resourceType']); - if (resourceType != null) { - albumInfoAlbumInfo.resourceType = resourceType; - } - final int? resourceId = jsonConvert.convert(json['resourceId']); - if (resourceId != null) { - albumInfoAlbumInfo.resourceId = resourceId; - } - final int? commentCount = jsonConvert.convert(json['commentCount']); - if (commentCount != null) { - albumInfoAlbumInfo.commentCount = commentCount; - } - final int? likedCount = jsonConvert.convert(json['likedCount']); - if (likedCount != null) { - albumInfoAlbumInfo.likedCount = likedCount; - } - final int? shareCount = jsonConvert.convert(json['shareCount']); - if (shareCount != null) { - albumInfoAlbumInfo.shareCount = shareCount; - } - final String? threadId = jsonConvert.convert(json['threadId']); - if (threadId != null) { - albumInfoAlbumInfo.threadId = threadId; - } - return albumInfoAlbumInfo; -} - -Map $AlbumInfoAlbumInfoToJson(AlbumInfoAlbumInfo entity) { - final Map data = {}; - data['commentThread'] = entity.commentThread?.toJson(); - data['latestLikedUsers'] = entity.latestLikedUsers; - data['liked'] = entity.liked; - data['comments'] = entity.comments; - data['resourceType'] = entity.resourceType; - data['resourceId'] = entity.resourceId; - data['commentCount'] = entity.commentCount; - data['likedCount'] = entity.likedCount; - data['shareCount'] = entity.shareCount; - data['threadId'] = entity.threadId; - return data; -} - -extension AlbumInfoAlbumInfoExtension on AlbumInfoAlbumInfo { - AlbumInfoAlbumInfo copyWith({ - AlbumInfoAlbumInfoCommentThread? commentThread, - dynamic latestLikedUsers, - bool? liked, - dynamic comments, - int? resourceType, - int? resourceId, - int? commentCount, - int? likedCount, - int? shareCount, - String? threadId, - }) { - return AlbumInfoAlbumInfo() - ..commentThread = commentThread ?? this.commentThread - ..latestLikedUsers = latestLikedUsers ?? this.latestLikedUsers - ..liked = liked ?? this.liked - ..comments = comments ?? this.comments - ..resourceType = resourceType ?? this.resourceType - ..resourceId = resourceId ?? this.resourceId - ..commentCount = commentCount ?? this.commentCount - ..likedCount = likedCount ?? this.likedCount - ..shareCount = shareCount ?? this.shareCount - ..threadId = threadId ?? this.threadId; - } -} - -AlbumInfoAlbumInfoCommentThread $AlbumInfoAlbumInfoCommentThreadFromJson( - Map json) { - final AlbumInfoAlbumInfoCommentThread albumInfoAlbumInfoCommentThread = AlbumInfoAlbumInfoCommentThread(); - final String? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoAlbumInfoCommentThread.id = id; - } - final AlbumInfoAlbumInfoCommentThreadResourceInfo? resourceInfo = jsonConvert.convert< - AlbumInfoAlbumInfoCommentThreadResourceInfo>(json['resourceInfo']); - if (resourceInfo != null) { - albumInfoAlbumInfoCommentThread.resourceInfo = resourceInfo; - } - final int? resourceType = jsonConvert.convert(json['resourceType']); - if (resourceType != null) { - albumInfoAlbumInfoCommentThread.resourceType = resourceType; - } - final int? commentCount = jsonConvert.convert(json['commentCount']); - if (commentCount != null) { - albumInfoAlbumInfoCommentThread.commentCount = commentCount; - } - final int? likedCount = jsonConvert.convert(json['likedCount']); - if (likedCount != null) { - albumInfoAlbumInfoCommentThread.likedCount = likedCount; - } - final int? shareCount = jsonConvert.convert(json['shareCount']); - if (shareCount != null) { - albumInfoAlbumInfoCommentThread.shareCount = shareCount; - } - final int? hotCount = jsonConvert.convert(json['hotCount']); - if (hotCount != null) { - albumInfoAlbumInfoCommentThread.hotCount = hotCount; - } - final dynamic latestLikedUsers = json['latestLikedUsers']; - if (latestLikedUsers != null) { - albumInfoAlbumInfoCommentThread.latestLikedUsers = latestLikedUsers; - } - final int? resourceId = jsonConvert.convert(json['resourceId']); - if (resourceId != null) { - albumInfoAlbumInfoCommentThread.resourceId = resourceId; - } - final int? resourceOwnerId = jsonConvert.convert(json['resourceOwnerId']); - if (resourceOwnerId != null) { - albumInfoAlbumInfoCommentThread.resourceOwnerId = resourceOwnerId; - } - final String? resourceTitle = jsonConvert.convert(json['resourceTitle']); - if (resourceTitle != null) { - albumInfoAlbumInfoCommentThread.resourceTitle = resourceTitle; - } - return albumInfoAlbumInfoCommentThread; -} - -Map $AlbumInfoAlbumInfoCommentThreadToJson( - AlbumInfoAlbumInfoCommentThread entity) { - final Map data = {}; - data['id'] = entity.id; - data['resourceInfo'] = entity.resourceInfo?.toJson(); - data['resourceType'] = entity.resourceType; - data['commentCount'] = entity.commentCount; - data['likedCount'] = entity.likedCount; - data['shareCount'] = entity.shareCount; - data['hotCount'] = entity.hotCount; - data['latestLikedUsers'] = entity.latestLikedUsers; - data['resourceId'] = entity.resourceId; - data['resourceOwnerId'] = entity.resourceOwnerId; - data['resourceTitle'] = entity.resourceTitle; - return data; -} - -extension AlbumInfoAlbumInfoCommentThreadExtension on AlbumInfoAlbumInfoCommentThread { - AlbumInfoAlbumInfoCommentThread copyWith({ - String? id, - AlbumInfoAlbumInfoCommentThreadResourceInfo? resourceInfo, - int? resourceType, - int? commentCount, - int? likedCount, - int? shareCount, - int? hotCount, - dynamic latestLikedUsers, - int? resourceId, - int? resourceOwnerId, - String? resourceTitle, - }) { - return AlbumInfoAlbumInfoCommentThread() - ..id = id ?? this.id - ..resourceInfo = resourceInfo ?? this.resourceInfo - ..resourceType = resourceType ?? this.resourceType - ..commentCount = commentCount ?? this.commentCount - ..likedCount = likedCount ?? this.likedCount - ..shareCount = shareCount ?? this.shareCount - ..hotCount = hotCount ?? this.hotCount - ..latestLikedUsers = latestLikedUsers ?? this.latestLikedUsers - ..resourceId = resourceId ?? this.resourceId - ..resourceOwnerId = resourceOwnerId ?? this.resourceOwnerId - ..resourceTitle = resourceTitle ?? this.resourceTitle; - } -} - -AlbumInfoAlbumInfoCommentThreadResourceInfo $AlbumInfoAlbumInfoCommentThreadResourceInfoFromJson( - Map json) { - final AlbumInfoAlbumInfoCommentThreadResourceInfo albumInfoAlbumInfoCommentThreadResourceInfo = AlbumInfoAlbumInfoCommentThreadResourceInfo(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.id = id; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.userId = userId; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.name = name; - } - final String? imgUrl = jsonConvert.convert(json['imgUrl']); - if (imgUrl != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.imgUrl = imgUrl; - } - final dynamic creator = json['creator']; - if (creator != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.creator = creator; - } - final dynamic encodedId = json['encodedId']; - if (encodedId != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.encodedId = encodedId; - } - final dynamic subTitle = json['subTitle']; - if (subTitle != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.subTitle = subTitle; - } - final dynamic webUrl = json['webUrl']; - if (webUrl != null) { - albumInfoAlbumInfoCommentThreadResourceInfo.webUrl = webUrl; - } - return albumInfoAlbumInfoCommentThreadResourceInfo; -} - -Map $AlbumInfoAlbumInfoCommentThreadResourceInfoToJson( - AlbumInfoAlbumInfoCommentThreadResourceInfo entity) { - final Map data = {}; - data['id'] = entity.id; - data['userId'] = entity.userId; - data['name'] = entity.name; - data['imgUrl'] = entity.imgUrl; - data['creator'] = entity.creator; - data['encodedId'] = entity.encodedId; - data['subTitle'] = entity.subTitle; - data['webUrl'] = entity.webUrl; - return data; -} - -extension AlbumInfoAlbumInfoCommentThreadResourceInfoExtension on AlbumInfoAlbumInfoCommentThreadResourceInfo { - AlbumInfoAlbumInfoCommentThreadResourceInfo copyWith({ - int? id, - int? userId, - String? name, - String? imgUrl, - dynamic creator, - dynamic encodedId, - dynamic subTitle, - dynamic webUrl, - }) { - return AlbumInfoAlbumInfoCommentThreadResourceInfo() - ..id = id ?? this.id - ..userId = userId ?? this.userId - ..name = name ?? this.name - ..imgUrl = imgUrl ?? this.imgUrl - ..creator = creator ?? this.creator - ..encodedId = encodedId ?? this.encodedId - ..subTitle = subTitle ?? this.subTitle - ..webUrl = webUrl ?? this.webUrl; - } -} \ No newline at end of file diff --git a/lib/generated/json/base/json_field.dart b/lib/generated/json/base/json_field.dart index 8c967d4..d9cdb17 100644 --- a/lib/generated/json/base/json_field.dart +++ b/lib/generated/json/base/json_field.dart @@ -6,10 +6,12 @@ import 'package:meta/meta_meta.dart'; +/* @Target({TargetKind.classType}) class JsonSerializable { const JsonSerializable(); } +*/ @Target({TargetKind.field}) class JSONField { @@ -18,15 +20,15 @@ class JSONField { //Whether to participate in toJson final bool? serialize; - + //Whether to participate in fromMap final bool? deserialize; - + //Whether to participate in copyWith final bool? copyWith; - + //Enumeration or not final bool? isEnum; - + const JSONField({this.name, this.serialize, this.deserialize, this.isEnum, this.copyWith}); -} +} \ No newline at end of file diff --git a/lib/generated/json/bool_entity.g.dart b/lib/generated/json/bool_entity.g.dart deleted file mode 100644 index 0e5f352..0000000 --- a/lib/generated/json/bool_entity.g.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/bool_entity.dart'; - -BoolEntity $BoolEntityFromJson(Map json) { - final BoolEntity boolEntity = BoolEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - boolEntity.code = code; - } - final bool? data = jsonConvert.convert(json['data']); - if (data != null) { - boolEntity.data = data; - } - final String? message = jsonConvert.convert(json['message']); - if (message != null) { - boolEntity.message = message; - } - return boolEntity; -} - -Map $BoolEntityToJson(BoolEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['data'] = entity.data; - data['message'] = entity.message; - return data; -} - -extension BoolEntityExtension on BoolEntity { - BoolEntity copyWith({ - int? code, - bool? data, - String? message, - }) { - return BoolEntity() - ..code = code ?? this.code - ..data = data ?? this.data - ..message = message ?? this.message; - } -} \ No newline at end of file diff --git a/lib/generated/json/catalogue_entity.g.dart b/lib/generated/json/catalogue_entity.g.dart deleted file mode 100644 index e54f5f8..0000000 --- a/lib/generated/json/catalogue_entity.g.dart +++ /dev/null @@ -1,210 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/playlist/entity/catalogue_entity.dart'; - -CatalogueEntity $CatalogueEntityFromJson(Map json) { - final CatalogueEntity catalogueEntity = CatalogueEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - catalogueEntity.code = code; - } - final CatalogueAll? all = jsonConvert.convert(json['all']); - if (all != null) { - catalogueEntity.all = all; - } - final List? sub = (json['sub'] as List?)?.map( - (e) => jsonConvert.convert(e) as CatalogueSub).toList(); - if (sub != null) { - catalogueEntity.sub = sub; - } - final Map? categories = - (json['categories'] as Map?)?.map( - (k, e) => MapEntry(k, e)); - if (categories != null) { - catalogueEntity.categories = categories; - } - return catalogueEntity; -} - -Map $CatalogueEntityToJson(CatalogueEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['all'] = entity.all?.toJson(); - data['sub'] = entity.sub?.map((v) => v.toJson()).toList(); - data['categories'] = entity.categories; - return data; -} - -extension CatalogueEntityExtension on CatalogueEntity { - CatalogueEntity copyWith({ - int? code, - CatalogueAll? all, - List? sub, - Map? categories, - }) { - return CatalogueEntity() - ..code = code ?? this.code - ..all = all ?? this.all - ..sub = sub ?? this.sub - ..categories = categories ?? this.categories; - } -} - -CatalogueAll $CatalogueAllFromJson(Map json) { - final CatalogueAll catalogueAll = CatalogueAll(); - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - catalogueAll.name = name; - } - final int? resourceCount = jsonConvert.convert(json['resourceCount']); - if (resourceCount != null) { - catalogueAll.resourceCount = resourceCount; - } - final int? imgId = jsonConvert.convert(json['imgId']); - if (imgId != null) { - catalogueAll.imgId = imgId; - } - final dynamic imgUrl = json['imgUrl']; - if (imgUrl != null) { - catalogueAll.imgUrl = imgUrl; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - catalogueAll.type = type; - } - final int? category = jsonConvert.convert(json['category']); - if (category != null) { - catalogueAll.category = category; - } - final int? resourceType = jsonConvert.convert(json['resourceType']); - if (resourceType != null) { - catalogueAll.resourceType = resourceType; - } - final bool? hot = jsonConvert.convert(json['hot']); - if (hot != null) { - catalogueAll.hot = hot; - } - final bool? activity = jsonConvert.convert(json['activity']); - if (activity != null) { - catalogueAll.activity = activity; - } - return catalogueAll; -} - -Map $CatalogueAllToJson(CatalogueAll entity) { - final Map data = {}; - data['name'] = entity.name; - data['resourceCount'] = entity.resourceCount; - data['imgId'] = entity.imgId; - data['imgUrl'] = entity.imgUrl; - data['type'] = entity.type; - data['category'] = entity.category; - data['resourceType'] = entity.resourceType; - data['hot'] = entity.hot; - data['activity'] = entity.activity; - return data; -} - -extension CatalogueAllExtension on CatalogueAll { - CatalogueAll copyWith({ - String? name, - int? resourceCount, - int? imgId, - dynamic imgUrl, - int? type, - int? category, - int? resourceType, - bool? hot, - bool? activity, - }) { - return CatalogueAll() - ..name = name ?? this.name - ..resourceCount = resourceCount ?? this.resourceCount - ..imgId = imgId ?? this.imgId - ..imgUrl = imgUrl ?? this.imgUrl - ..type = type ?? this.type - ..category = category ?? this.category - ..resourceType = resourceType ?? this.resourceType - ..hot = hot ?? this.hot - ..activity = activity ?? this.activity; - } -} - -CatalogueSub $CatalogueSubFromJson(Map json) { - final CatalogueSub catalogueSub = CatalogueSub(); - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - catalogueSub.name = name; - } - final int? resourceCount = jsonConvert.convert(json['resourceCount']); - if (resourceCount != null) { - catalogueSub.resourceCount = resourceCount; - } - final int? imgId = jsonConvert.convert(json['imgId']); - if (imgId != null) { - catalogueSub.imgId = imgId; - } - final dynamic imgUrl = json['imgUrl']; - if (imgUrl != null) { - catalogueSub.imgUrl = imgUrl; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - catalogueSub.type = type; - } - final int? category = jsonConvert.convert(json['category']); - if (category != null) { - catalogueSub.category = category; - } - final int? resourceType = jsonConvert.convert(json['resourceType']); - if (resourceType != null) { - catalogueSub.resourceType = resourceType; - } - final bool? hot = jsonConvert.convert(json['hot']); - if (hot != null) { - catalogueSub.hot = hot; - } - final bool? activity = jsonConvert.convert(json['activity']); - if (activity != null) { - catalogueSub.activity = activity; - } - return catalogueSub; -} - -Map $CatalogueSubToJson(CatalogueSub entity) { - final Map data = {}; - data['name'] = entity.name; - data['resourceCount'] = entity.resourceCount; - data['imgId'] = entity.imgId; - data['imgUrl'] = entity.imgUrl; - data['type'] = entity.type; - data['category'] = entity.category; - data['resourceType'] = entity.resourceType; - data['hot'] = entity.hot; - data['activity'] = entity.activity; - return data; -} - -extension CatalogueSubExtension on CatalogueSub { - CatalogueSub copyWith({ - String? name, - int? resourceCount, - int? imgId, - dynamic imgUrl, - int? type, - int? category, - int? resourceType, - bool? hot, - bool? activity, - }) { - return CatalogueSub() - ..name = name ?? this.name - ..resourceCount = resourceCount ?? this.resourceCount - ..imgId = imgId ?? this.imgId - ..imgUrl = imgUrl ?? this.imgUrl - ..type = type ?? this.type - ..category = category ?? this.category - ..resourceType = resourceType ?? this.resourceType - ..hot = hot ?? this.hot - ..activity = activity ?? this.activity; - } -} \ No newline at end of file diff --git a/lib/generated/json/create_playlist_entity.g.dart b/lib/generated/json/create_playlist_entity.g.dart deleted file mode 100644 index 8e0f6ef..0000000 --- a/lib/generated/json/create_playlist_entity.g.dart +++ /dev/null @@ -1,368 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/playlist/entity/create_playlist_entity.dart'; - -CreatePlaylistEntity $CreatePlaylistEntityFromJson(Map json) { - final CreatePlaylistEntity createPlaylistEntity = CreatePlaylistEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - createPlaylistEntity.code = code; - } - final CreatePlaylistPlaylist? playlist = jsonConvert.convert( - json['playlist']); - if (playlist != null) { - createPlaylistEntity.playlist = playlist; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - createPlaylistEntity.id = id; - } - return createPlaylistEntity; -} - -Map $CreatePlaylistEntityToJson(CreatePlaylistEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['playlist'] = entity.playlist?.toJson(); - data['id'] = entity.id; - return data; -} - -extension CreatePlaylistEntityExtension on CreatePlaylistEntity { - CreatePlaylistEntity copyWith({ - int? code, - CreatePlaylistPlaylist? playlist, - int? id, - }) { - return CreatePlaylistEntity() - ..code = code ?? this.code - ..playlist = playlist ?? this.playlist - ..id = id ?? this.id; - } -} - -CreatePlaylistPlaylist $CreatePlaylistPlaylistFromJson(Map json) { - final CreatePlaylistPlaylist createPlaylistPlaylist = CreatePlaylistPlaylist(); - final List? subscribers = (json['subscribers'] as List?)?.map( - (e) => e).toList(); - if (subscribers != null) { - createPlaylistPlaylist.subscribers = subscribers; - } - final dynamic subscribed = json['subscribed']; - if (subscribed != null) { - createPlaylistPlaylist.subscribed = subscribed; - } - final dynamic creator = json['creator']; - if (creator != null) { - createPlaylistPlaylist.creator = creator; - } - final dynamic artists = json['artists']; - if (artists != null) { - createPlaylistPlaylist.artists = artists; - } - final dynamic tracks = json['tracks']; - if (tracks != null) { - createPlaylistPlaylist.tracks = tracks; - } - final bool? top = jsonConvert.convert(json['top']); - if (top != null) { - createPlaylistPlaylist.top = top; - } - final dynamic updateFrequency = json['updateFrequency']; - if (updateFrequency != null) { - createPlaylistPlaylist.updateFrequency = updateFrequency; - } - final int? backgroundCoverId = jsonConvert.convert(json['backgroundCoverId']); - if (backgroundCoverId != null) { - createPlaylistPlaylist.backgroundCoverId = backgroundCoverId; - } - final dynamic backgroundCoverUrl = json['backgroundCoverUrl']; - if (backgroundCoverUrl != null) { - createPlaylistPlaylist.backgroundCoverUrl = backgroundCoverUrl; - } - final int? titleImage = jsonConvert.convert(json['titleImage']); - if (titleImage != null) { - createPlaylistPlaylist.titleImage = titleImage; - } - final dynamic titleImageUrl = json['titleImageUrl']; - if (titleImageUrl != null) { - createPlaylistPlaylist.titleImageUrl = titleImageUrl; - } - final dynamic englishTitle = json['englishTitle']; - if (englishTitle != null) { - createPlaylistPlaylist.englishTitle = englishTitle; - } - final bool? opRecommend = jsonConvert.convert(json['opRecommend']); - if (opRecommend != null) { - createPlaylistPlaylist.opRecommend = opRecommend; - } - final dynamic recommendInfo = json['recommendInfo']; - if (recommendInfo != null) { - createPlaylistPlaylist.recommendInfo = recommendInfo; - } - final int? subscribedCount = jsonConvert.convert(json['subscribedCount']); - if (subscribedCount != null) { - createPlaylistPlaylist.subscribedCount = subscribedCount; - } - final int? cloudTrackCount = jsonConvert.convert(json['cloudTrackCount']); - if (cloudTrackCount != null) { - createPlaylistPlaylist.cloudTrackCount = cloudTrackCount; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - createPlaylistPlaylist.userId = userId; - } - final int? totalDuration = jsonConvert.convert(json['totalDuration']); - if (totalDuration != null) { - createPlaylistPlaylist.totalDuration = totalDuration; - } - final int? coverImgId = jsonConvert.convert(json['coverImgId']); - if (coverImgId != null) { - createPlaylistPlaylist.coverImgId = coverImgId; - } - final int? privacy = jsonConvert.convert(json['privacy']); - if (privacy != null) { - createPlaylistPlaylist.privacy = privacy; - } - final int? trackUpdateTime = jsonConvert.convert(json['trackUpdateTime']); - if (trackUpdateTime != null) { - createPlaylistPlaylist.trackUpdateTime = trackUpdateTime; - } - final int? trackCount = jsonConvert.convert(json['trackCount']); - if (trackCount != null) { - createPlaylistPlaylist.trackCount = trackCount; - } - final int? updateTime = jsonConvert.convert(json['updateTime']); - if (updateTime != null) { - createPlaylistPlaylist.updateTime = updateTime; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - createPlaylistPlaylist.commentThreadId = commentThreadId; - } - final String? coverImgUrl = jsonConvert.convert(json['coverImgUrl']); - if (coverImgUrl != null) { - createPlaylistPlaylist.coverImgUrl = coverImgUrl; - } - final int? specialType = jsonConvert.convert(json['specialType']); - if (specialType != null) { - createPlaylistPlaylist.specialType = specialType; - } - final bool? anonimous = jsonConvert.convert(json['anonimous']); - if (anonimous != null) { - createPlaylistPlaylist.anonimous = anonimous; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - createPlaylistPlaylist.createTime = createTime; - } - final bool? highQuality = jsonConvert.convert(json['highQuality']); - if (highQuality != null) { - createPlaylistPlaylist.highQuality = highQuality; - } - final bool? newImported = jsonConvert.convert(json['newImported']); - if (newImported != null) { - createPlaylistPlaylist.newImported = newImported; - } - final int? trackNumberUpdateTime = jsonConvert.convert(json['trackNumberUpdateTime']); - if (trackNumberUpdateTime != null) { - createPlaylistPlaylist.trackNumberUpdateTime = trackNumberUpdateTime; - } - final int? playCount = jsonConvert.convert(json['playCount']); - if (playCount != null) { - createPlaylistPlaylist.playCount = playCount; - } - final int? adType = jsonConvert.convert(json['adType']); - if (adType != null) { - createPlaylistPlaylist.adType = adType; - } - final dynamic description = json['description']; - if (description != null) { - createPlaylistPlaylist.description = description; - } - final List? tags = (json['tags'] as List?)?.map( - (e) => e).toList(); - if (tags != null) { - createPlaylistPlaylist.tags = tags; - } - final bool? ordered = jsonConvert.convert(json['ordered']); - if (ordered != null) { - createPlaylistPlaylist.ordered = ordered; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - createPlaylistPlaylist.status = status; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - createPlaylistPlaylist.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - createPlaylistPlaylist.id = id; - } - final String? coverimgidStr = jsonConvert.convert(json['coverImgId_str']); - if (coverimgidStr != null) { - createPlaylistPlaylist.coverimgidStr = coverimgidStr; - } - final dynamic sharedUsers = json['sharedUsers']; - if (sharedUsers != null) { - createPlaylistPlaylist.sharedUsers = sharedUsers; - } - final dynamic shareStatus = json['shareStatus']; - if (shareStatus != null) { - createPlaylistPlaylist.shareStatus = shareStatus; - } - final bool? copied = jsonConvert.convert(json['copied']); - if (copied != null) { - createPlaylistPlaylist.copied = copied; - } - final bool? containsTracks = jsonConvert.convert(json['containsTracks']); - if (containsTracks != null) { - createPlaylistPlaylist.containsTracks = containsTracks; - } - return createPlaylistPlaylist; -} - -Map $CreatePlaylistPlaylistToJson(CreatePlaylistPlaylist entity) { - final Map data = {}; - data['subscribers'] = entity.subscribers; - data['subscribed'] = entity.subscribed; - data['creator'] = entity.creator; - data['artists'] = entity.artists; - data['tracks'] = entity.tracks; - data['top'] = entity.top; - data['updateFrequency'] = entity.updateFrequency; - data['backgroundCoverId'] = entity.backgroundCoverId; - data['backgroundCoverUrl'] = entity.backgroundCoverUrl; - data['titleImage'] = entity.titleImage; - data['titleImageUrl'] = entity.titleImageUrl; - data['englishTitle'] = entity.englishTitle; - data['opRecommend'] = entity.opRecommend; - data['recommendInfo'] = entity.recommendInfo; - data['subscribedCount'] = entity.subscribedCount; - data['cloudTrackCount'] = entity.cloudTrackCount; - data['userId'] = entity.userId; - data['totalDuration'] = entity.totalDuration; - data['coverImgId'] = entity.coverImgId; - data['privacy'] = entity.privacy; - data['trackUpdateTime'] = entity.trackUpdateTime; - data['trackCount'] = entity.trackCount; - data['updateTime'] = entity.updateTime; - data['commentThreadId'] = entity.commentThreadId; - data['coverImgUrl'] = entity.coverImgUrl; - data['specialType'] = entity.specialType; - data['anonimous'] = entity.anonimous; - data['createTime'] = entity.createTime; - data['highQuality'] = entity.highQuality; - data['newImported'] = entity.newImported; - data['trackNumberUpdateTime'] = entity.trackNumberUpdateTime; - data['playCount'] = entity.playCount; - data['adType'] = entity.adType; - data['description'] = entity.description; - data['tags'] = entity.tags; - data['ordered'] = entity.ordered; - data['status'] = entity.status; - data['name'] = entity.name; - data['id'] = entity.id; - data['coverImgId_str'] = entity.coverimgidStr; - data['sharedUsers'] = entity.sharedUsers; - data['shareStatus'] = entity.shareStatus; - data['copied'] = entity.copied; - data['containsTracks'] = entity.containsTracks; - return data; -} - -extension CreatePlaylistPlaylistExtension on CreatePlaylistPlaylist { - CreatePlaylistPlaylist copyWith({ - List? subscribers, - dynamic subscribed, - dynamic creator, - dynamic artists, - dynamic tracks, - bool? top, - dynamic updateFrequency, - int? backgroundCoverId, - dynamic backgroundCoverUrl, - int? titleImage, - dynamic titleImageUrl, - dynamic englishTitle, - bool? opRecommend, - dynamic recommendInfo, - int? subscribedCount, - int? cloudTrackCount, - int? userId, - int? totalDuration, - int? coverImgId, - int? privacy, - int? trackUpdateTime, - int? trackCount, - int? updateTime, - String? commentThreadId, - String? coverImgUrl, - int? specialType, - bool? anonimous, - int? createTime, - bool? highQuality, - bool? newImported, - int? trackNumberUpdateTime, - int? playCount, - int? adType, - dynamic description, - List? tags, - bool? ordered, - int? status, - String? name, - int? id, - String? coverimgidStr, - dynamic sharedUsers, - dynamic shareStatus, - bool? copied, - bool? containsTracks, - }) { - return CreatePlaylistPlaylist() - ..subscribers = subscribers ?? this.subscribers - ..subscribed = subscribed ?? this.subscribed - ..creator = creator ?? this.creator - ..artists = artists ?? this.artists - ..tracks = tracks ?? this.tracks - ..top = top ?? this.top - ..updateFrequency = updateFrequency ?? this.updateFrequency - ..backgroundCoverId = backgroundCoverId ?? this.backgroundCoverId - ..backgroundCoverUrl = backgroundCoverUrl ?? this.backgroundCoverUrl - ..titleImage = titleImage ?? this.titleImage - ..titleImageUrl = titleImageUrl ?? this.titleImageUrl - ..englishTitle = englishTitle ?? this.englishTitle - ..opRecommend = opRecommend ?? this.opRecommend - ..recommendInfo = recommendInfo ?? this.recommendInfo - ..subscribedCount = subscribedCount ?? this.subscribedCount - ..cloudTrackCount = cloudTrackCount ?? this.cloudTrackCount - ..userId = userId ?? this.userId - ..totalDuration = totalDuration ?? this.totalDuration - ..coverImgId = coverImgId ?? this.coverImgId - ..privacy = privacy ?? this.privacy - ..trackUpdateTime = trackUpdateTime ?? this.trackUpdateTime - ..trackCount = trackCount ?? this.trackCount - ..updateTime = updateTime ?? this.updateTime - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..coverImgUrl = coverImgUrl ?? this.coverImgUrl - ..specialType = specialType ?? this.specialType - ..anonimous = anonimous ?? this.anonimous - ..createTime = createTime ?? this.createTime - ..highQuality = highQuality ?? this.highQuality - ..newImported = newImported ?? this.newImported - ..trackNumberUpdateTime = trackNumberUpdateTime ?? this.trackNumberUpdateTime - ..playCount = playCount ?? this.playCount - ..adType = adType ?? this.adType - ..description = description ?? this.description - ..tags = tags ?? this.tags - ..ordered = ordered ?? this.ordered - ..status = status ?? this.status - ..name = name ?? this.name - ..id = id ?? this.id - ..coverimgidStr = coverimgidStr ?? this.coverimgidStr - ..sharedUsers = sharedUsers ?? this.sharedUsers - ..shareStatus = shareStatus ?? this.shareStatus - ..copied = copied ?? this.copied - ..containsTracks = containsTracks ?? this.containsTracks; - } -} \ No newline at end of file diff --git a/lib/generated/json/high_quality_tags_entity.g.dart b/lib/generated/json/high_quality_tags_entity.g.dart deleted file mode 100644 index 7806089..0000000 --- a/lib/generated/json/high_quality_tags_entity.g.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/playlist/entity/high_quality_tags_entity.dart'; - -HighQualityTagsEntity $HighQualityTagsEntityFromJson(Map json) { - final HighQualityTagsEntity highQualityTagsEntity = HighQualityTagsEntity(); - final List? tags = (json['tags'] as List?)?.map( - (e) => jsonConvert.convert(e) as HighQualityTagsTags).toList(); - if (tags != null) { - highQualityTagsEntity.tags = tags; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - highQualityTagsEntity.code = code; - } - return highQualityTagsEntity; -} - -Map $HighQualityTagsEntityToJson(HighQualityTagsEntity entity) { - final Map data = {}; - data['tags'] = entity.tags?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - return data; -} - -extension HighQualityTagsEntityExtension on HighQualityTagsEntity { - HighQualityTagsEntity copyWith({ - List? tags, - int? code, - }) { - return HighQualityTagsEntity() - ..tags = tags ?? this.tags - ..code = code ?? this.code; - } -} - -HighQualityTagsTags $HighQualityTagsTagsFromJson(Map json) { - final HighQualityTagsTags highQualityTagsTags = HighQualityTagsTags(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - highQualityTagsTags.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - highQualityTagsTags.name = name; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - highQualityTagsTags.type = type; - } - final int? category = jsonConvert.convert(json['category']); - if (category != null) { - highQualityTagsTags.category = category; - } - final bool? hot = jsonConvert.convert(json['hot']); - if (hot != null) { - highQualityTagsTags.hot = hot; - } - return highQualityTagsTags; -} - -Map $HighQualityTagsTagsToJson(HighQualityTagsTags entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['type'] = entity.type; - data['category'] = entity.category; - data['hot'] = entity.hot; - return data; -} - -extension HighQualityTagsTagsExtension on HighQualityTagsTags { - HighQualityTagsTags copyWith({ - int? id, - String? name, - int? type, - int? category, - bool? hot, - }) { - return HighQualityTagsTags() - ..id = id ?? this.id - ..name = name ?? this.name - ..type = type ?? this.type - ..category = category ?? this.category - ..hot = hot ?? this.hot; - } -} \ No newline at end of file diff --git a/lib/generated/json/like_list_entity.g.dart b/lib/generated/json/like_list_entity.g.dart deleted file mode 100644 index 7441f96..0000000 --- a/lib/generated/json/like_list_entity.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/like_list_entity.dart'; - -LikeListEntity $LikeListEntityFromJson(Map json) { - final LikeListEntity likeListEntity = LikeListEntity(); - final List? ids = (json['ids'] as List?)?.map( - (e) => jsonConvert.convert(e) as int).toList(); - if (ids != null) { - likeListEntity.ids = ids; - } - final int? checkPoint = jsonConvert.convert(json['checkPoint']); - if (checkPoint != null) { - likeListEntity.checkPoint = checkPoint; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - likeListEntity.code = code; - } - return likeListEntity; -} - -Map $LikeListEntityToJson(LikeListEntity entity) { - final Map data = {}; - data['ids'] = entity.ids; - data['checkPoint'] = entity.checkPoint; - data['code'] = entity.code; - return data; -} - -extension LikeListEntityExtension on LikeListEntity { - LikeListEntity copyWith({ - List? ids, - int? checkPoint, - int? code, - }) { - return LikeListEntity() - ..ids = ids ?? this.ids - ..checkPoint = checkPoint ?? this.checkPoint - ..code = code ?? this.code; - } -} \ No newline at end of file diff --git a/lib/generated/json/login_entity.g.dart b/lib/generated/json/login_entity.g.dart deleted file mode 100644 index 636185c..0000000 --- a/lib/generated/json/login_entity.g.dart +++ /dev/null @@ -1,547 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/login_entity.dart'; - -LoginEntity $LoginEntityFromJson(Map json) { - final LoginEntity loginEntity = LoginEntity(); - final int? loginType = jsonConvert.convert(json['loginType']); - if (loginType != null) { - loginEntity.loginType = loginType; - } - final String? clientId = jsonConvert.convert(json['clientId']); - if (clientId != null) { - loginEntity.clientId = clientId; - } - final int? effectTime = jsonConvert.convert(json['effectTime']); - if (effectTime != null) { - loginEntity.effectTime = effectTime; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - loginEntity.code = code; - } - final LoginAccount? account = jsonConvert.convert(json['account']); - if (account != null) { - loginEntity.account = account; - } - final String? token = jsonConvert.convert(json['token']); - if (token != null) { - loginEntity.token = token; - } - final LoginProfile? profile = jsonConvert.convert(json['profile']); - if (profile != null) { - loginEntity.profile = profile; - } - final List? bindings = (json['bindings'] as List?)?.map( - (e) => jsonConvert.convert(e) as LoginBindings).toList(); - if (bindings != null) { - loginEntity.bindings = bindings; - } - return loginEntity; -} - -Map $LoginEntityToJson(LoginEntity entity) { - final Map data = {}; - data['loginType'] = entity.loginType; - data['clientId'] = entity.clientId; - data['effectTime'] = entity.effectTime; - data['code'] = entity.code; - data['account'] = entity.account?.toJson(); - data['token'] = entity.token; - data['profile'] = entity.profile?.toJson(); - data['bindings'] = entity.bindings?.map((v) => v.toJson()).toList(); - return data; -} - -extension LoginEntityExtension on LoginEntity { - LoginEntity copyWith({ - int? loginType, - String? clientId, - int? effectTime, - int? code, - LoginAccount? account, - String? token, - LoginProfile? profile, - List? bindings, - }) { - return LoginEntity() - ..loginType = loginType ?? this.loginType - ..clientId = clientId ?? this.clientId - ..effectTime = effectTime ?? this.effectTime - ..code = code ?? this.code - ..account = account ?? this.account - ..token = token ?? this.token - ..profile = profile ?? this.profile - ..bindings = bindings ?? this.bindings; - } -} - -LoginAccount $LoginAccountFromJson(Map json) { - final LoginAccount loginAccount = LoginAccount(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - loginAccount.id = id; - } - final String? userName = jsonConvert.convert(json['userName']); - if (userName != null) { - loginAccount.userName = userName; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - loginAccount.type = type; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - loginAccount.status = status; - } - final int? whitelistAuthority = jsonConvert.convert(json['whitelistAuthority']); - if (whitelistAuthority != null) { - loginAccount.whitelistAuthority = whitelistAuthority; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - loginAccount.createTime = createTime; - } - final String? salt = jsonConvert.convert(json['salt']); - if (salt != null) { - loginAccount.salt = salt; - } - final int? tokenVersion = jsonConvert.convert(json['tokenVersion']); - if (tokenVersion != null) { - loginAccount.tokenVersion = tokenVersion; - } - final int? ban = jsonConvert.convert(json['ban']); - if (ban != null) { - loginAccount.ban = ban; - } - final int? baoyueVersion = jsonConvert.convert(json['baoyueVersion']); - if (baoyueVersion != null) { - loginAccount.baoyueVersion = baoyueVersion; - } - final int? donateVersion = jsonConvert.convert(json['donateVersion']); - if (donateVersion != null) { - loginAccount.donateVersion = donateVersion; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - loginAccount.vipType = vipType; - } - final int? viptypeVersion = jsonConvert.convert(json['viptypeVersion']); - if (viptypeVersion != null) { - loginAccount.viptypeVersion = viptypeVersion; - } - final bool? anonimousUser = jsonConvert.convert(json['anonimousUser']); - if (anonimousUser != null) { - loginAccount.anonimousUser = anonimousUser; - } - final bool? uninitialized = jsonConvert.convert(json['uninitialized']); - if (uninitialized != null) { - loginAccount.uninitialized = uninitialized; - } - return loginAccount; -} - -Map $LoginAccountToJson(LoginAccount entity) { - final Map data = {}; - data['id'] = entity.id; - data['userName'] = entity.userName; - data['type'] = entity.type; - data['status'] = entity.status; - data['whitelistAuthority'] = entity.whitelistAuthority; - data['createTime'] = entity.createTime; - data['salt'] = entity.salt; - data['tokenVersion'] = entity.tokenVersion; - data['ban'] = entity.ban; - data['baoyueVersion'] = entity.baoyueVersion; - data['donateVersion'] = entity.donateVersion; - data['vipType'] = entity.vipType; - data['viptypeVersion'] = entity.viptypeVersion; - data['anonimousUser'] = entity.anonimousUser; - data['uninitialized'] = entity.uninitialized; - return data; -} - -extension LoginAccountExtension on LoginAccount { - LoginAccount copyWith({ - int? id, - String? userName, - int? type, - int? status, - int? whitelistAuthority, - int? createTime, - String? salt, - int? tokenVersion, - int? ban, - int? baoyueVersion, - int? donateVersion, - int? vipType, - int? viptypeVersion, - bool? anonimousUser, - bool? uninitialized, - }) { - return LoginAccount() - ..id = id ?? this.id - ..userName = userName ?? this.userName - ..type = type ?? this.type - ..status = status ?? this.status - ..whitelistAuthority = whitelistAuthority ?? this.whitelistAuthority - ..createTime = createTime ?? this.createTime - ..salt = salt ?? this.salt - ..tokenVersion = tokenVersion ?? this.tokenVersion - ..ban = ban ?? this.ban - ..baoyueVersion = baoyueVersion ?? this.baoyueVersion - ..donateVersion = donateVersion ?? this.donateVersion - ..vipType = vipType ?? this.vipType - ..viptypeVersion = viptypeVersion ?? this.viptypeVersion - ..anonimousUser = anonimousUser ?? this.anonimousUser - ..uninitialized = uninitialized ?? this.uninitialized; - } -} - -LoginProfile $LoginProfileFromJson(Map json) { - final LoginProfile loginProfile = LoginProfile(); - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - loginProfile.userType = userType; - } - final String? avatarUrl = jsonConvert.convert(json['avatarUrl']); - if (avatarUrl != null) { - loginProfile.avatarUrl = avatarUrl; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - loginProfile.vipType = vipType; - } - final int? authStatus = jsonConvert.convert(json['authStatus']); - if (authStatus != null) { - loginProfile.authStatus = authStatus; - } - final int? djStatus = jsonConvert.convert(json['djStatus']); - if (djStatus != null) { - loginProfile.djStatus = djStatus; - } - final String? detailDescription = jsonConvert.convert(json['detailDescription']); - if (detailDescription != null) { - loginProfile.detailDescription = detailDescription; - } - final LoginProfileExperts? experts = jsonConvert.convert(json['experts']); - if (experts != null) { - loginProfile.experts = experts; - } - final dynamic expertTags = json['expertTags']; - if (expertTags != null) { - loginProfile.expertTags = expertTags; - } - final int? accountStatus = jsonConvert.convert(json['accountStatus']); - if (accountStatus != null) { - loginProfile.accountStatus = accountStatus; - } - final String? nickname = jsonConvert.convert(json['nickname']); - if (nickname != null) { - loginProfile.nickname = nickname; - } - final int? birthday = jsonConvert.convert(json['birthday']); - if (birthday != null) { - loginProfile.birthday = birthday; - } - final int? gender = jsonConvert.convert(json['gender']); - if (gender != null) { - loginProfile.gender = gender; - } - final int? province = jsonConvert.convert(json['province']); - if (province != null) { - loginProfile.province = province; - } - final int? city = jsonConvert.convert(json['city']); - if (city != null) { - loginProfile.city = city; - } - final int? avatarImgId = jsonConvert.convert(json['avatarImgId']); - if (avatarImgId != null) { - loginProfile.avatarImgId = avatarImgId; - } - final int? backgroundImgId = jsonConvert.convert(json['backgroundImgId']); - if (backgroundImgId != null) { - loginProfile.backgroundImgId = backgroundImgId; - } - final bool? defaultAvatar = jsonConvert.convert(json['defaultAvatar']); - if (defaultAvatar != null) { - loginProfile.defaultAvatar = defaultAvatar; - } - final bool? mutual = jsonConvert.convert(json['mutual']); - if (mutual != null) { - loginProfile.mutual = mutual; - } - final dynamic remarkName = json['remarkName']; - if (remarkName != null) { - loginProfile.remarkName = remarkName; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - loginProfile.followed = followed; - } - final String? backgroundUrl = jsonConvert.convert(json['backgroundUrl']); - if (backgroundUrl != null) { - loginProfile.backgroundUrl = backgroundUrl; - } - final String? backgroundImgIdStr = jsonConvert.convert(json['backgroundImgIdStr']); - if (backgroundImgIdStr != null) { - loginProfile.backgroundImgIdStr = backgroundImgIdStr; - } - final String? avatarImgIdStr = jsonConvert.convert(json['avatarImgIdStr']); - if (avatarImgIdStr != null) { - loginProfile.avatarImgIdStr = avatarImgIdStr; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - loginProfile.description = description; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - loginProfile.userId = userId; - } - final String? signature = jsonConvert.convert(json['signature']); - if (signature != null) { - loginProfile.signature = signature; - } - final int? authority = jsonConvert.convert(json['authority']); - if (authority != null) { - loginProfile.authority = authority; - } - final String? avatarimgidStr = jsonConvert.convert(json['avatarImgId_str']); - if (avatarimgidStr != null) { - loginProfile.avatarimgidStr = avatarimgidStr; - } - final int? followeds = jsonConvert.convert(json['followeds']); - if (followeds != null) { - loginProfile.followeds = followeds; - } - final int? follows = jsonConvert.convert(json['follows']); - if (follows != null) { - loginProfile.follows = follows; - } - final int? eventCount = jsonConvert.convert(json['eventCount']); - if (eventCount != null) { - loginProfile.eventCount = eventCount; - } - final dynamic avatarDetail = json['avatarDetail']; - if (avatarDetail != null) { - loginProfile.avatarDetail = avatarDetail; - } - final int? playlistCount = jsonConvert.convert(json['playlistCount']); - if (playlistCount != null) { - loginProfile.playlistCount = playlistCount; - } - final int? playlistBeSubscribedCount = jsonConvert.convert( - json['playlistBeSubscribedCount']); - if (playlistBeSubscribedCount != null) { - loginProfile.playlistBeSubscribedCount = playlistBeSubscribedCount; - } - return loginProfile; -} - -Map $LoginProfileToJson(LoginProfile entity) { - final Map data = {}; - data['userType'] = entity.userType; - data['avatarUrl'] = entity.avatarUrl; - data['vipType'] = entity.vipType; - data['authStatus'] = entity.authStatus; - data['djStatus'] = entity.djStatus; - data['detailDescription'] = entity.detailDescription; - data['experts'] = entity.experts?.toJson(); - data['expertTags'] = entity.expertTags; - data['accountStatus'] = entity.accountStatus; - data['nickname'] = entity.nickname; - data['birthday'] = entity.birthday; - data['gender'] = entity.gender; - data['province'] = entity.province; - data['city'] = entity.city; - data['avatarImgId'] = entity.avatarImgId; - data['backgroundImgId'] = entity.backgroundImgId; - data['defaultAvatar'] = entity.defaultAvatar; - data['mutual'] = entity.mutual; - data['remarkName'] = entity.remarkName; - data['followed'] = entity.followed; - data['backgroundUrl'] = entity.backgroundUrl; - data['backgroundImgIdStr'] = entity.backgroundImgIdStr; - data['avatarImgIdStr'] = entity.avatarImgIdStr; - data['description'] = entity.description; - data['userId'] = entity.userId; - data['signature'] = entity.signature; - data['authority'] = entity.authority; - data['avatarImgId_str'] = entity.avatarimgidStr; - data['followeds'] = entity.followeds; - data['follows'] = entity.follows; - data['eventCount'] = entity.eventCount; - data['avatarDetail'] = entity.avatarDetail; - data['playlistCount'] = entity.playlistCount; - data['playlistBeSubscribedCount'] = entity.playlistBeSubscribedCount; - return data; -} - -extension LoginProfileExtension on LoginProfile { - LoginProfile copyWith({ - int? userType, - String? avatarUrl, - int? vipType, - int? authStatus, - int? djStatus, - String? detailDescription, - LoginProfileExperts? experts, - dynamic expertTags, - int? accountStatus, - String? nickname, - int? birthday, - int? gender, - int? province, - int? city, - int? avatarImgId, - int? backgroundImgId, - bool? defaultAvatar, - bool? mutual, - dynamic remarkName, - bool? followed, - String? backgroundUrl, - String? backgroundImgIdStr, - String? avatarImgIdStr, - String? description, - int? userId, - String? signature, - int? authority, - String? avatarimgidStr, - int? followeds, - int? follows, - int? eventCount, - dynamic avatarDetail, - int? playlistCount, - int? playlistBeSubscribedCount, - }) { - return LoginProfile() - ..userType = userType ?? this.userType - ..avatarUrl = avatarUrl ?? this.avatarUrl - ..vipType = vipType ?? this.vipType - ..authStatus = authStatus ?? this.authStatus - ..djStatus = djStatus ?? this.djStatus - ..detailDescription = detailDescription ?? this.detailDescription - ..experts = experts ?? this.experts - ..expertTags = expertTags ?? this.expertTags - ..accountStatus = accountStatus ?? this.accountStatus - ..nickname = nickname ?? this.nickname - ..birthday = birthday ?? this.birthday - ..gender = gender ?? this.gender - ..province = province ?? this.province - ..city = city ?? this.city - ..avatarImgId = avatarImgId ?? this.avatarImgId - ..backgroundImgId = backgroundImgId ?? this.backgroundImgId - ..defaultAvatar = defaultAvatar ?? this.defaultAvatar - ..mutual = mutual ?? this.mutual - ..remarkName = remarkName ?? this.remarkName - ..followed = followed ?? this.followed - ..backgroundUrl = backgroundUrl ?? this.backgroundUrl - ..backgroundImgIdStr = backgroundImgIdStr ?? this.backgroundImgIdStr - ..avatarImgIdStr = avatarImgIdStr ?? this.avatarImgIdStr - ..description = description ?? this.description - ..userId = userId ?? this.userId - ..signature = signature ?? this.signature - ..authority = authority ?? this.authority - ..avatarimgidStr = avatarimgidStr ?? this.avatarimgidStr - ..followeds = followeds ?? this.followeds - ..follows = follows ?? this.follows - ..eventCount = eventCount ?? this.eventCount - ..avatarDetail = avatarDetail ?? this.avatarDetail - ..playlistCount = playlistCount ?? this.playlistCount - ..playlistBeSubscribedCount = playlistBeSubscribedCount ?? this.playlistBeSubscribedCount; - } -} - -LoginProfileExperts $LoginProfileExpertsFromJson(Map json) { - final LoginProfileExperts loginProfileExperts = LoginProfileExperts(); - return loginProfileExperts; -} - -Map $LoginProfileExpertsToJson(LoginProfileExperts entity) { - final Map data = {}; - return data; -} - -extension LoginProfileExpertsExtension on LoginProfileExperts { -} - -LoginBindings $LoginBindingsFromJson(Map json) { - final LoginBindings loginBindings = LoginBindings(); - final int? bindingTime = jsonConvert.convert(json['bindingTime']); - if (bindingTime != null) { - loginBindings.bindingTime = bindingTime; - } - final int? refreshTime = jsonConvert.convert(json['refreshTime']); - if (refreshTime != null) { - loginBindings.refreshTime = refreshTime; - } - final String? tokenJsonStr = jsonConvert.convert(json['tokenJsonStr']); - if (tokenJsonStr != null) { - loginBindings.tokenJsonStr = tokenJsonStr; - } - final int? expiresIn = jsonConvert.convert(json['expiresIn']); - if (expiresIn != null) { - loginBindings.expiresIn = expiresIn; - } - final String? url = jsonConvert.convert(json['url']); - if (url != null) { - loginBindings.url = url; - } - final bool? expired = jsonConvert.convert(json['expired']); - if (expired != null) { - loginBindings.expired = expired; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - loginBindings.userId = userId; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - loginBindings.id = id; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - loginBindings.type = type; - } - return loginBindings; -} - -Map $LoginBindingsToJson(LoginBindings entity) { - final Map data = {}; - data['bindingTime'] = entity.bindingTime; - data['refreshTime'] = entity.refreshTime; - data['tokenJsonStr'] = entity.tokenJsonStr; - data['expiresIn'] = entity.expiresIn; - data['url'] = entity.url; - data['expired'] = entity.expired; - data['userId'] = entity.userId; - data['id'] = entity.id; - data['type'] = entity.type; - return data; -} - -extension LoginBindingsExtension on LoginBindings { - LoginBindings copyWith({ - int? bindingTime, - int? refreshTime, - String? tokenJsonStr, - int? expiresIn, - String? url, - bool? expired, - int? userId, - int? id, - int? type, - }) { - return LoginBindings() - ..bindingTime = bindingTime ?? this.bindingTime - ..refreshTime = refreshTime ?? this.refreshTime - ..tokenJsonStr = tokenJsonStr ?? this.tokenJsonStr - ..expiresIn = expiresIn ?? this.expiresIn - ..url = url ?? this.url - ..expired = expired ?? this.expired - ..userId = userId ?? this.userId - ..id = id ?? this.id - ..type = type ?? this.type; - } -} \ No newline at end of file diff --git a/lib/generated/json/mv_url_entity.g.dart b/lib/generated/json/mv_url_entity.g.dart deleted file mode 100644 index a3340e7..0000000 --- a/lib/generated/json/mv_url_entity.g.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/mv/entity/mv_url_entity.dart'; - -MvUrlEntity $MvUrlEntityFromJson(Map json) { - final MvUrlEntity mvUrlEntity = MvUrlEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - mvUrlEntity.code = code; - } - final MvUrlData? data = jsonConvert.convert(json['data']); - if (data != null) { - mvUrlEntity.data = data; - } - return mvUrlEntity; -} - -Map $MvUrlEntityToJson(MvUrlEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['data'] = entity.data?.toJson(); - return data; -} - -extension MvUrlEntityExtension on MvUrlEntity { - MvUrlEntity copyWith({ - int? code, - MvUrlData? data, - }) { - return MvUrlEntity() - ..code = code ?? this.code - ..data = data ?? this.data; - } -} - -MvUrlData $MvUrlDataFromJson(Map json) { - final MvUrlData mvUrlData = MvUrlData(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - mvUrlData.id = id; - } - final String? url = jsonConvert.convert(json['url']); - if (url != null) { - mvUrlData.url = url; - } - final int? r = jsonConvert.convert(json['r']); - if (r != null) { - mvUrlData.r = r; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - mvUrlData.size = size; - } - final String? md5 = jsonConvert.convert(json['md5']); - if (md5 != null) { - mvUrlData.md5 = md5; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - mvUrlData.code = code; - } - final int? expi = jsonConvert.convert(json['expi']); - if (expi != null) { - mvUrlData.expi = expi; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - mvUrlData.fee = fee; - } - final int? mvFee = jsonConvert.convert(json['mvFee']); - if (mvFee != null) { - mvUrlData.mvFee = mvFee; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - mvUrlData.st = st; - } - final String? msg = jsonConvert.convert(json['msg']); - if (msg != null) { - mvUrlData.msg = msg; - } - return mvUrlData; -} - -Map $MvUrlDataToJson(MvUrlData entity) { - final Map data = {}; - data['id'] = entity.id; - data['url'] = entity.url; - data['r'] = entity.r; - data['size'] = entity.size; - data['md5'] = entity.md5; - data['code'] = entity.code; - data['expi'] = entity.expi; - data['fee'] = entity.fee; - data['mvFee'] = entity.mvFee; - data['st'] = entity.st; - data['msg'] = entity.msg; - return data; -} - -extension MvUrlDataExtension on MvUrlData { - MvUrlData copyWith({ - int? id, - String? url, - int? r, - int? size, - String? md5, - int? code, - int? expi, - int? fee, - int? mvFee, - int? st, - String? msg, - }) { - return MvUrlData() - ..id = id ?? this.id - ..url = url ?? this.url - ..r = r ?? this.r - ..size = size ?? this.size - ..md5 = md5 ?? this.md5 - ..code = code ?? this.code - ..expi = expi ?? this.expi - ..fee = fee ?? this.fee - ..mvFee = mvFee ?? this.mvFee - ..st = st ?? this.st - ..msg = msg ?? this.msg; - } -} \ No newline at end of file diff --git a/lib/generated/json/new_album_entity.g.dart b/lib/generated/json/new_album_entity.g.dart deleted file mode 100644 index ad649b5..0000000 --- a/lib/generated/json/new_album_entity.g.dart +++ /dev/null @@ -1,504 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/album/entity/new_album_entity.dart'; - -NewAlbumEntity $NewAlbumEntityFromJson(Map json) { - final NewAlbumEntity newAlbumEntity = NewAlbumEntity(); - final int? total = jsonConvert.convert(json['total']); - if (total != null) { - newAlbumEntity.total = total; - } - final List? albums = (json['albums'] as List?)?.map( - (e) => jsonConvert.convert(e) as NewAlbumAlbums).toList(); - if (albums != null) { - newAlbumEntity.albums = albums; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - newAlbumEntity.code = code; - } - return newAlbumEntity; -} - -Map $NewAlbumEntityToJson(NewAlbumEntity entity) { - final Map data = {}; - data['total'] = entity.total; - data['albums'] = entity.albums?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - return data; -} - -extension NewAlbumEntityExtension on NewAlbumEntity { - NewAlbumEntity copyWith({ - int? total, - List? albums, - int? code, - }) { - return NewAlbumEntity() - ..total = total ?? this.total - ..albums = albums ?? this.albums - ..code = code ?? this.code; - } -} - -NewAlbumAlbums $NewAlbumAlbumsFromJson(Map json) { - final NewAlbumAlbums newAlbumAlbums = NewAlbumAlbums(); - final List? songs = (json['songs'] as List?)?.map( - (e) => e).toList(); - if (songs != null) { - newAlbumAlbums.songs = songs; - } - final bool? paid = jsonConvert.convert(json['paid']); - if (paid != null) { - newAlbumAlbums.paid = paid; - } - final bool? onSale = jsonConvert.convert(json['onSale']); - if (onSale != null) { - newAlbumAlbums.onSale = onSale; - } - final int? mark = jsonConvert.convert(json['mark']); - if (mark != null) { - newAlbumAlbums.mark = mark; - } - final dynamic awardTags = json['awardTags']; - if (awardTags != null) { - newAlbumAlbums.awardTags = awardTags; - } - final dynamic displayTags = json['displayTags']; - if (displayTags != null) { - newAlbumAlbums.displayTags = displayTags; - } - final List? artists = (json['artists'] as List?)?.map( - (e) => jsonConvert.convert(e) as NewAlbumAlbumsArtists).toList(); - if (artists != null) { - newAlbumAlbums.artists = artists; - } - final int? copyrightId = jsonConvert.convert(json['copyrightId']); - if (copyrightId != null) { - newAlbumAlbums.copyrightId = copyrightId; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newAlbumAlbums.picId = picId; - } - final NewAlbumAlbumsArtist? artist = jsonConvert.convert(json['artist']); - if (artist != null) { - newAlbumAlbums.artist = artist; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newAlbumAlbums.briefDesc = briefDesc; - } - final int? publishTime = jsonConvert.convert(json['publishTime']); - if (publishTime != null) { - newAlbumAlbums.publishTime = publishTime; - } - final String? company = jsonConvert.convert(json['company']); - if (company != null) { - newAlbumAlbums.company = company; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newAlbumAlbums.picUrl = picUrl; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - newAlbumAlbums.commentThreadId = commentThreadId; - } - final String? blurPicUrl = jsonConvert.convert(json['blurPicUrl']); - if (blurPicUrl != null) { - newAlbumAlbums.blurPicUrl = blurPicUrl; - } - final int? companyId = jsonConvert.convert(json['companyId']); - if (companyId != null) { - newAlbumAlbums.companyId = companyId; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - newAlbumAlbums.pic = pic; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newAlbumAlbums.alias = alias; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - newAlbumAlbums.status = status; - } - final String? subType = jsonConvert.convert(json['subType']); - if (subType != null) { - newAlbumAlbums.subType = subType; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - newAlbumAlbums.description = description; - } - final String? tags = jsonConvert.convert(json['tags']); - if (tags != null) { - newAlbumAlbums.tags = tags; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newAlbumAlbums.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newAlbumAlbums.id = id; - } - final String? type = jsonConvert.convert(json['type']); - if (type != null) { - newAlbumAlbums.type = type; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - newAlbumAlbums.size = size; - } - final String? picidStr = jsonConvert.convert(json['picId_str']); - if (picidStr != null) { - newAlbumAlbums.picidStr = picidStr; - } - return newAlbumAlbums; -} - -Map $NewAlbumAlbumsToJson(NewAlbumAlbums entity) { - final Map data = {}; - data['songs'] = entity.songs; - data['paid'] = entity.paid; - data['onSale'] = entity.onSale; - data['mark'] = entity.mark; - data['awardTags'] = entity.awardTags; - data['displayTags'] = entity.displayTags; - data['artists'] = entity.artists?.map((v) => v.toJson()).toList(); - data['copyrightId'] = entity.copyrightId; - data['picId'] = entity.picId; - data['artist'] = entity.artist?.toJson(); - data['briefDesc'] = entity.briefDesc; - data['publishTime'] = entity.publishTime; - data['company'] = entity.company; - data['picUrl'] = entity.picUrl; - data['commentThreadId'] = entity.commentThreadId; - data['blurPicUrl'] = entity.blurPicUrl; - data['companyId'] = entity.companyId; - data['pic'] = entity.pic; - data['alias'] = entity.alias; - data['status'] = entity.status; - data['subType'] = entity.subType; - data['description'] = entity.description; - data['tags'] = entity.tags; - data['name'] = entity.name; - data['id'] = entity.id; - data['type'] = entity.type; - data['size'] = entity.size; - data['picId_str'] = entity.picidStr; - return data; -} - -extension NewAlbumAlbumsExtension on NewAlbumAlbums { - NewAlbumAlbums copyWith({ - List? songs, - bool? paid, - bool? onSale, - int? mark, - dynamic awardTags, - dynamic displayTags, - List? artists, - int? copyrightId, - int? picId, - NewAlbumAlbumsArtist? artist, - String? briefDesc, - int? publishTime, - String? company, - String? picUrl, - String? commentThreadId, - String? blurPicUrl, - int? companyId, - int? pic, - List? alias, - int? status, - String? subType, - String? description, - String? tags, - String? name, - int? id, - String? type, - int? size, - String? picidStr, - }) { - return NewAlbumAlbums() - ..songs = songs ?? this.songs - ..paid = paid ?? this.paid - ..onSale = onSale ?? this.onSale - ..mark = mark ?? this.mark - ..awardTags = awardTags ?? this.awardTags - ..displayTags = displayTags ?? this.displayTags - ..artists = artists ?? this.artists - ..copyrightId = copyrightId ?? this.copyrightId - ..picId = picId ?? this.picId - ..artist = artist ?? this.artist - ..briefDesc = briefDesc ?? this.briefDesc - ..publishTime = publishTime ?? this.publishTime - ..company = company ?? this.company - ..picUrl = picUrl ?? this.picUrl - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..blurPicUrl = blurPicUrl ?? this.blurPicUrl - ..companyId = companyId ?? this.companyId - ..pic = pic ?? this.pic - ..alias = alias ?? this.alias - ..status = status ?? this.status - ..subType = subType ?? this.subType - ..description = description ?? this.description - ..tags = tags ?? this.tags - ..name = name ?? this.name - ..id = id ?? this.id - ..type = type ?? this.type - ..size = size ?? this.size - ..picidStr = picidStr ?? this.picidStr; - } -} - -NewAlbumAlbumsArtists $NewAlbumAlbumsArtistsFromJson(Map json) { - final NewAlbumAlbumsArtists newAlbumAlbumsArtists = NewAlbumAlbumsArtists(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - newAlbumAlbumsArtists.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - newAlbumAlbumsArtists.topicPerson = topicPerson; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newAlbumAlbumsArtists.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newAlbumAlbumsArtists.briefDesc = briefDesc; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - newAlbumAlbumsArtists.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - newAlbumAlbumsArtists.albumSize = albumSize; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newAlbumAlbumsArtists.picUrl = picUrl; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - newAlbumAlbumsArtists.img1v1Url = img1v1Url; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - newAlbumAlbumsArtists.followed = followed; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - newAlbumAlbumsArtists.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newAlbumAlbumsArtists.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newAlbumAlbumsArtists.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newAlbumAlbumsArtists.id = id; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - newAlbumAlbumsArtists.img1v1idStr = img1v1idStr; - } - return newAlbumAlbumsArtists; -} - -Map $NewAlbumAlbumsArtistsToJson(NewAlbumAlbumsArtists entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['picUrl'] = entity.picUrl; - data['img1v1Url'] = entity.img1v1Url; - data['followed'] = entity.followed; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension NewAlbumAlbumsArtistsExtension on NewAlbumAlbumsArtists { - NewAlbumAlbumsArtists copyWith({ - int? img1v1Id, - int? topicPerson, - int? picId, - String? briefDesc, - int? musicSize, - int? albumSize, - String? picUrl, - String? img1v1Url, - bool? followed, - String? trans, - List? alias, - String? name, - int? id, - String? img1v1idStr, - }) { - return NewAlbumAlbumsArtists() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..picUrl = picUrl ?? this.picUrl - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..followed = followed ?? this.followed - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} - -NewAlbumAlbumsArtist $NewAlbumAlbumsArtistFromJson(Map json) { - final NewAlbumAlbumsArtist newAlbumAlbumsArtist = NewAlbumAlbumsArtist(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - newAlbumAlbumsArtist.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - newAlbumAlbumsArtist.topicPerson = topicPerson; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newAlbumAlbumsArtist.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newAlbumAlbumsArtist.briefDesc = briefDesc; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - newAlbumAlbumsArtist.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - newAlbumAlbumsArtist.albumSize = albumSize; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newAlbumAlbumsArtist.picUrl = picUrl; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - newAlbumAlbumsArtist.img1v1Url = img1v1Url; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - newAlbumAlbumsArtist.followed = followed; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - newAlbumAlbumsArtist.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newAlbumAlbumsArtist.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newAlbumAlbumsArtist.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newAlbumAlbumsArtist.id = id; - } - final String? picidStr = jsonConvert.convert(json['picId_str']); - if (picidStr != null) { - newAlbumAlbumsArtist.picidStr = picidStr; - } - final List? transNames = (json['transNames'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (transNames != null) { - newAlbumAlbumsArtist.transNames = transNames; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - newAlbumAlbumsArtist.img1v1idStr = img1v1idStr; - } - return newAlbumAlbumsArtist; -} - -Map $NewAlbumAlbumsArtistToJson(NewAlbumAlbumsArtist entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['picUrl'] = entity.picUrl; - data['img1v1Url'] = entity.img1v1Url; - data['followed'] = entity.followed; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['picId_str'] = entity.picidStr; - data['transNames'] = entity.transNames; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension NewAlbumAlbumsArtistExtension on NewAlbumAlbumsArtist { - NewAlbumAlbumsArtist copyWith({ - int? img1v1Id, - int? topicPerson, - int? picId, - String? briefDesc, - int? musicSize, - int? albumSize, - String? picUrl, - String? img1v1Url, - bool? followed, - String? trans, - List? alias, - String? name, - int? id, - String? picidStr, - List? transNames, - String? img1v1idStr, - }) { - return NewAlbumAlbumsArtist() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..picUrl = picUrl ?? this.picUrl - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..followed = followed ?? this.followed - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..picidStr = picidStr ?? this.picidStr - ..transNames = transNames ?? this.transNames - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} \ No newline at end of file diff --git a/lib/generated/json/new_song_entity.g.dart b/lib/generated/json/new_song_entity.g.dart deleted file mode 100644 index 7171c81..0000000 --- a/lib/generated/json/new_song_entity.g.dart +++ /dev/null @@ -1,1448 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/song/entity/new_song_entity.dart'; - -NewSongEntity $NewSongEntityFromJson(Map json) { - final NewSongEntity newSongEntity = NewSongEntity(); - final List? data = (json['data'] as List?)?.map( - (e) => jsonConvert.convert(e) as NewSongData).toList(); - if (data != null) { - newSongEntity.data = data; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - newSongEntity.code = code; - } - return newSongEntity; -} - -Map $NewSongEntityToJson(NewSongEntity entity) { - final Map data = {}; - data['data'] = entity.data?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - return data; -} - -extension NewSongEntityExtension on NewSongEntity { - NewSongEntity copyWith({ - List? data, - int? code, - }) { - return NewSongEntity() - ..data = data ?? this.data - ..code = code ?? this.code; - } -} - -NewSongData $NewSongDataFromJson(Map json) { - final NewSongData newSongData = NewSongData(); - final bool? starred = jsonConvert.convert(json['starred']); - if (starred != null) { - newSongData.starred = starred; - } - final int? popularity = jsonConvert.convert(json['popularity']); - if (popularity != null) { - newSongData.popularity = popularity; - } - final int? starredNum = jsonConvert.convert(json['starredNum']); - if (starredNum != null) { - newSongData.starredNum = starredNum; - } - final int? playedNum = jsonConvert.convert(json['playedNum']); - if (playedNum != null) { - newSongData.playedNum = playedNum; - } - final int? dayPlays = jsonConvert.convert(json['dayPlays']); - if (dayPlays != null) { - newSongData.dayPlays = dayPlays; - } - final int? hearTime = jsonConvert.convert(json['hearTime']); - if (hearTime != null) { - newSongData.hearTime = hearTime; - } - final String? mp3Url = jsonConvert.convert(json['mp3Url']); - if (mp3Url != null) { - newSongData.mp3Url = mp3Url; - } - final NewSongDataPrivilege? privilege = jsonConvert.convert( - json['privilege']); - if (privilege != null) { - newSongData.privilege = privilege; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - newSongData.st = st; - } - final bool? exclusive = jsonConvert.convert(json['exclusive']); - if (exclusive != null) { - newSongData.exclusive = exclusive; - } - final List? artists = (json['artists'] as List?)?.map( - (e) => jsonConvert.convert(e) as NewSongDataArtists).toList(); - if (artists != null) { - newSongData.artists = artists; - } - final int? score = jsonConvert.convert(json['score']); - if (score != null) { - newSongData.score = score; - } - final NewSongDataHMusic? hMusic = jsonConvert.convert(json['hMusic']); - if (hMusic != null) { - newSongData.hMusic = hMusic; - } - final NewSongDataMMusic? mMusic = jsonConvert.convert(json['mMusic']); - if (mMusic != null) { - newSongData.mMusic = mMusic; - } - final NewSongDataLMusic? lMusic = jsonConvert.convert(json['lMusic']); - if (lMusic != null) { - newSongData.lMusic = lMusic; - } - final NewSongDataAlbum? album = jsonConvert.convert(json['album']); - if (album != null) { - newSongData.album = album; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - newSongData.commentThreadId = commentThreadId; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - newSongData.fee = fee; - } - final int? mvid = jsonConvert.convert(json['mvid']); - if (mvid != null) { - newSongData.mvid = mvid; - } - final String? copyFrom = jsonConvert.convert(json['copyFrom']); - if (copyFrom != null) { - newSongData.copyFrom = copyFrom; - } - final String? ringtone = jsonConvert.convert(json['ringtone']); - if (ringtone != null) { - newSongData.ringtone = ringtone; - } - final String? disc = jsonConvert.convert(json['disc']); - if (disc != null) { - newSongData.disc = disc; - } - final int? no = jsonConvert.convert(json['no']); - if (no != null) { - newSongData.no = no; - } - final int? rtype = jsonConvert.convert(json['rtype']); - if (rtype != null) { - newSongData.rtype = rtype; - } - final int? copyrightId = jsonConvert.convert(json['copyrightId']); - if (copyrightId != null) { - newSongData.copyrightId = copyrightId; - } - final NewSongDataBMusic? bMusic = jsonConvert.convert(json['bMusic']); - if (bMusic != null) { - newSongData.bMusic = bMusic; - } - final String? rtUrl = jsonConvert.convert(json['rtUrl']); - if (rtUrl != null) { - newSongData.rtUrl = rtUrl; - } - final int? ftype = jsonConvert.convert(json['ftype']); - if (ftype != null) { - newSongData.ftype = ftype; - } - final int? position = jsonConvert.convert(json['position']); - if (position != null) { - newSongData.position = position; - } - final int? duration = jsonConvert.convert(json['duration']); - if (duration != null) { - newSongData.duration = duration; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - newSongData.status = status; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newSongData.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongData.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongData.id = id; - } - return newSongData; -} - -Map $NewSongDataToJson(NewSongData entity) { - final Map data = {}; - data['starred'] = entity.starred; - data['popularity'] = entity.popularity; - data['starredNum'] = entity.starredNum; - data['playedNum'] = entity.playedNum; - data['dayPlays'] = entity.dayPlays; - data['hearTime'] = entity.hearTime; - data['mp3Url'] = entity.mp3Url; - data['privilege'] = entity.privilege?.toJson(); - data['st'] = entity.st; - data['exclusive'] = entity.exclusive; - data['artists'] = entity.artists?.map((v) => v.toJson()).toList(); - data['score'] = entity.score; - data['hMusic'] = entity.hMusic?.toJson(); - data['mMusic'] = entity.mMusic?.toJson(); - data['lMusic'] = entity.lMusic?.toJson(); - data['album'] = entity.album?.toJson(); - data['commentThreadId'] = entity.commentThreadId; - data['fee'] = entity.fee; - data['mvid'] = entity.mvid; - data['copyFrom'] = entity.copyFrom; - data['ringtone'] = entity.ringtone; - data['disc'] = entity.disc; - data['no'] = entity.no; - data['rtype'] = entity.rtype; - data['copyrightId'] = entity.copyrightId; - data['bMusic'] = entity.bMusic?.toJson(); - data['rtUrl'] = entity.rtUrl; - data['ftype'] = entity.ftype; - data['position'] = entity.position; - data['duration'] = entity.duration; - data['status'] = entity.status; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - return data; -} - -extension NewSongDataExtension on NewSongData { - NewSongData copyWith({ - bool? starred, - int? popularity, - int? starredNum, - int? playedNum, - int? dayPlays, - int? hearTime, - String? mp3Url, - NewSongDataPrivilege? privilege, - int? st, - bool? exclusive, - List? artists, - int? score, - NewSongDataHMusic? hMusic, - NewSongDataMMusic? mMusic, - NewSongDataLMusic? lMusic, - NewSongDataAlbum? album, - String? commentThreadId, - int? fee, - int? mvid, - String? copyFrom, - String? ringtone, - String? disc, - int? no, - int? rtype, - int? copyrightId, - NewSongDataBMusic? bMusic, - String? rtUrl, - int? ftype, - int? position, - int? duration, - int? status, - List? alias, - String? name, - int? id, - }) { - return NewSongData() - ..starred = starred ?? this.starred - ..popularity = popularity ?? this.popularity - ..starredNum = starredNum ?? this.starredNum - ..playedNum = playedNum ?? this.playedNum - ..dayPlays = dayPlays ?? this.dayPlays - ..hearTime = hearTime ?? this.hearTime - ..mp3Url = mp3Url ?? this.mp3Url - ..privilege = privilege ?? this.privilege - ..st = st ?? this.st - ..exclusive = exclusive ?? this.exclusive - ..artists = artists ?? this.artists - ..score = score ?? this.score - ..hMusic = hMusic ?? this.hMusic - ..mMusic = mMusic ?? this.mMusic - ..lMusic = lMusic ?? this.lMusic - ..album = album ?? this.album - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..fee = fee ?? this.fee - ..mvid = mvid ?? this.mvid - ..copyFrom = copyFrom ?? this.copyFrom - ..ringtone = ringtone ?? this.ringtone - ..disc = disc ?? this.disc - ..no = no ?? this.no - ..rtype = rtype ?? this.rtype - ..copyrightId = copyrightId ?? this.copyrightId - ..bMusic = bMusic ?? this.bMusic - ..rtUrl = rtUrl ?? this.rtUrl - ..ftype = ftype ?? this.ftype - ..position = position ?? this.position - ..duration = duration ?? this.duration - ..status = status ?? this.status - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id; - } -} - -NewSongDataPrivilege $NewSongDataPrivilegeFromJson(Map json) { - final NewSongDataPrivilege newSongDataPrivilege = NewSongDataPrivilege(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataPrivilege.id = id; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - newSongDataPrivilege.fee = fee; - } - final int? payed = jsonConvert.convert(json['payed']); - if (payed != null) { - newSongDataPrivilege.payed = payed; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - newSongDataPrivilege.st = st; - } - final int? pl = jsonConvert.convert(json['pl']); - if (pl != null) { - newSongDataPrivilege.pl = pl; - } - final int? dl = jsonConvert.convert(json['dl']); - if (dl != null) { - newSongDataPrivilege.dl = dl; - } - final int? sp = jsonConvert.convert(json['sp']); - if (sp != null) { - newSongDataPrivilege.sp = sp; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - newSongDataPrivilege.cp = cp; - } - final int? subp = jsonConvert.convert(json['subp']); - if (subp != null) { - newSongDataPrivilege.subp = subp; - } - final bool? cs = jsonConvert.convert(json['cs']); - if (cs != null) { - newSongDataPrivilege.cs = cs; - } - final int? maxbr = jsonConvert.convert(json['maxbr']); - if (maxbr != null) { - newSongDataPrivilege.maxbr = maxbr; - } - final int? fl = jsonConvert.convert(json['fl']); - if (fl != null) { - newSongDataPrivilege.fl = fl; - } - final bool? toast = jsonConvert.convert(json['toast']); - if (toast != null) { - newSongDataPrivilege.toast = toast; - } - final int? flag = jsonConvert.convert(json['flag']); - if (flag != null) { - newSongDataPrivilege.flag = flag; - } - final bool? preSell = jsonConvert.convert(json['preSell']); - if (preSell != null) { - newSongDataPrivilege.preSell = preSell; - } - final int? playMaxbr = jsonConvert.convert(json['playMaxbr']); - if (playMaxbr != null) { - newSongDataPrivilege.playMaxbr = playMaxbr; - } - final int? downloadMaxbr = jsonConvert.convert(json['downloadMaxbr']); - if (downloadMaxbr != null) { - newSongDataPrivilege.downloadMaxbr = downloadMaxbr; - } - final String? maxBrLevel = jsonConvert.convert(json['maxBrLevel']); - if (maxBrLevel != null) { - newSongDataPrivilege.maxBrLevel = maxBrLevel; - } - final String? playMaxBrLevel = jsonConvert.convert(json['playMaxBrLevel']); - if (playMaxBrLevel != null) { - newSongDataPrivilege.playMaxBrLevel = playMaxBrLevel; - } - final String? downloadMaxBrLevel = jsonConvert.convert(json['downloadMaxBrLevel']); - if (downloadMaxBrLevel != null) { - newSongDataPrivilege.downloadMaxBrLevel = downloadMaxBrLevel; - } - final String? plLevel = jsonConvert.convert(json['plLevel']); - if (plLevel != null) { - newSongDataPrivilege.plLevel = plLevel; - } - final String? dlLevel = jsonConvert.convert(json['dlLevel']); - if (dlLevel != null) { - newSongDataPrivilege.dlLevel = dlLevel; - } - final String? flLevel = jsonConvert.convert(json['flLevel']); - if (flLevel != null) { - newSongDataPrivilege.flLevel = flLevel; - } - final NewSongDataPrivilegeFreeTrialPrivilege? freeTrialPrivilege = jsonConvert.convert< - NewSongDataPrivilegeFreeTrialPrivilege>(json['freeTrialPrivilege']); - if (freeTrialPrivilege != null) { - newSongDataPrivilege.freeTrialPrivilege = freeTrialPrivilege; - } - final int? rightSource = jsonConvert.convert(json['rightSource']); - if (rightSource != null) { - newSongDataPrivilege.rightSource = rightSource; - } - final List? chargeInfoList = (json['chargeInfoList'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as NewSongDataPrivilegeChargeInfoList).toList(); - if (chargeInfoList != null) { - newSongDataPrivilege.chargeInfoList = chargeInfoList; - } - return newSongDataPrivilege; -} - -Map $NewSongDataPrivilegeToJson(NewSongDataPrivilege entity) { - final Map data = {}; - data['id'] = entity.id; - data['fee'] = entity.fee; - data['payed'] = entity.payed; - data['st'] = entity.st; - data['pl'] = entity.pl; - data['dl'] = entity.dl; - data['sp'] = entity.sp; - data['cp'] = entity.cp; - data['subp'] = entity.subp; - data['cs'] = entity.cs; - data['maxbr'] = entity.maxbr; - data['fl'] = entity.fl; - data['toast'] = entity.toast; - data['flag'] = entity.flag; - data['preSell'] = entity.preSell; - data['playMaxbr'] = entity.playMaxbr; - data['downloadMaxbr'] = entity.downloadMaxbr; - data['maxBrLevel'] = entity.maxBrLevel; - data['playMaxBrLevel'] = entity.playMaxBrLevel; - data['downloadMaxBrLevel'] = entity.downloadMaxBrLevel; - data['plLevel'] = entity.plLevel; - data['dlLevel'] = entity.dlLevel; - data['flLevel'] = entity.flLevel; - data['freeTrialPrivilege'] = entity.freeTrialPrivilege?.toJson(); - data['rightSource'] = entity.rightSource; - data['chargeInfoList'] = entity.chargeInfoList?.map((v) => v.toJson()).toList(); - return data; -} - -extension NewSongDataPrivilegeExtension on NewSongDataPrivilege { - NewSongDataPrivilege copyWith({ - int? id, - int? fee, - int? payed, - int? st, - int? pl, - int? dl, - int? sp, - int? cp, - int? subp, - bool? cs, - int? maxbr, - int? fl, - bool? toast, - int? flag, - bool? preSell, - int? playMaxbr, - int? downloadMaxbr, - String? maxBrLevel, - String? playMaxBrLevel, - String? downloadMaxBrLevel, - String? plLevel, - String? dlLevel, - String? flLevel, - NewSongDataPrivilegeFreeTrialPrivilege? freeTrialPrivilege, - int? rightSource, - List? chargeInfoList, - }) { - return NewSongDataPrivilege() - ..id = id ?? this.id - ..fee = fee ?? this.fee - ..payed = payed ?? this.payed - ..st = st ?? this.st - ..pl = pl ?? this.pl - ..dl = dl ?? this.dl - ..sp = sp ?? this.sp - ..cp = cp ?? this.cp - ..subp = subp ?? this.subp - ..cs = cs ?? this.cs - ..maxbr = maxbr ?? this.maxbr - ..fl = fl ?? this.fl - ..toast = toast ?? this.toast - ..flag = flag ?? this.flag - ..preSell = preSell ?? this.preSell - ..playMaxbr = playMaxbr ?? this.playMaxbr - ..downloadMaxbr = downloadMaxbr ?? this.downloadMaxbr - ..maxBrLevel = maxBrLevel ?? this.maxBrLevel - ..playMaxBrLevel = playMaxBrLevel ?? this.playMaxBrLevel - ..downloadMaxBrLevel = downloadMaxBrLevel ?? this.downloadMaxBrLevel - ..plLevel = plLevel ?? this.plLevel - ..dlLevel = dlLevel ?? this.dlLevel - ..flLevel = flLevel ?? this.flLevel - ..freeTrialPrivilege = freeTrialPrivilege ?? this.freeTrialPrivilege - ..rightSource = rightSource ?? this.rightSource - ..chargeInfoList = chargeInfoList ?? this.chargeInfoList; - } -} - -NewSongDataPrivilegeFreeTrialPrivilege $NewSongDataPrivilegeFreeTrialPrivilegeFromJson( - Map json) { - final NewSongDataPrivilegeFreeTrialPrivilege newSongDataPrivilegeFreeTrialPrivilege = NewSongDataPrivilegeFreeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - newSongDataPrivilegeFreeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - newSongDataPrivilegeFreeTrialPrivilege.userConsumable = userConsumable; - } - final int? listenType = jsonConvert.convert(json['listenType']); - if (listenType != null) { - newSongDataPrivilegeFreeTrialPrivilege.listenType = listenType; - } - final int? cannotListenReason = jsonConvert.convert(json['cannotListenReason']); - if (cannotListenReason != null) { - newSongDataPrivilegeFreeTrialPrivilege.cannotListenReason = cannotListenReason; - } - return newSongDataPrivilegeFreeTrialPrivilege; -} - -Map $NewSongDataPrivilegeFreeTrialPrivilegeToJson( - NewSongDataPrivilegeFreeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - data['listenType'] = entity.listenType; - data['cannotListenReason'] = entity.cannotListenReason; - return data; -} - -extension NewSongDataPrivilegeFreeTrialPrivilegeExtension on NewSongDataPrivilegeFreeTrialPrivilege { - NewSongDataPrivilegeFreeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - int? listenType, - int? cannotListenReason, - }) { - return NewSongDataPrivilegeFreeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable - ..listenType = listenType ?? this.listenType - ..cannotListenReason = cannotListenReason ?? this.cannotListenReason; - } -} - -NewSongDataPrivilegeChargeInfoList $NewSongDataPrivilegeChargeInfoListFromJson( - Map json) { - final NewSongDataPrivilegeChargeInfoList newSongDataPrivilegeChargeInfoList = NewSongDataPrivilegeChargeInfoList(); - final int? rate = jsonConvert.convert(json['rate']); - if (rate != null) { - newSongDataPrivilegeChargeInfoList.rate = rate; - } - final String? chargeUrl = jsonConvert.convert(json['chargeUrl']); - if (chargeUrl != null) { - newSongDataPrivilegeChargeInfoList.chargeUrl = chargeUrl; - } - final String? chargeMessage = jsonConvert.convert(json['chargeMessage']); - if (chargeMessage != null) { - newSongDataPrivilegeChargeInfoList.chargeMessage = chargeMessage; - } - final int? chargeType = jsonConvert.convert(json['chargeType']); - if (chargeType != null) { - newSongDataPrivilegeChargeInfoList.chargeType = chargeType; - } - return newSongDataPrivilegeChargeInfoList; -} - -Map $NewSongDataPrivilegeChargeInfoListToJson( - NewSongDataPrivilegeChargeInfoList entity) { - final Map data = {}; - data['rate'] = entity.rate; - data['chargeUrl'] = entity.chargeUrl; - data['chargeMessage'] = entity.chargeMessage; - data['chargeType'] = entity.chargeType; - return data; -} - -extension NewSongDataPrivilegeChargeInfoListExtension on NewSongDataPrivilegeChargeInfoList { - NewSongDataPrivilegeChargeInfoList copyWith({ - int? rate, - String? chargeUrl, - String? chargeMessage, - int? chargeType, - }) { - return NewSongDataPrivilegeChargeInfoList() - ..rate = rate ?? this.rate - ..chargeUrl = chargeUrl ?? this.chargeUrl - ..chargeMessage = chargeMessage ?? this.chargeMessage - ..chargeType = chargeType ?? this.chargeType; - } -} - -NewSongDataArtists $NewSongDataArtistsFromJson(Map json) { - final NewSongDataArtists newSongDataArtists = NewSongDataArtists(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - newSongDataArtists.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - newSongDataArtists.topicPerson = topicPerson; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - newSongDataArtists.followed = followed; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newSongDataArtists.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newSongDataArtists.briefDesc = briefDesc; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newSongDataArtists.picUrl = picUrl; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - newSongDataArtists.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - newSongDataArtists.albumSize = albumSize; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - newSongDataArtists.img1v1Url = img1v1Url; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - newSongDataArtists.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newSongDataArtists.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataArtists.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataArtists.id = id; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - newSongDataArtists.img1v1idStr = img1v1idStr; - } - return newSongDataArtists; -} - -Map $NewSongDataArtistsToJson(NewSongDataArtists entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['followed'] = entity.followed; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['picUrl'] = entity.picUrl; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['img1v1Url'] = entity.img1v1Url; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension NewSongDataArtistsExtension on NewSongDataArtists { - NewSongDataArtists copyWith({ - int? img1v1Id, - int? topicPerson, - bool? followed, - int? picId, - String? briefDesc, - String? picUrl, - int? musicSize, - int? albumSize, - String? img1v1Url, - String? trans, - List? alias, - String? name, - int? id, - String? img1v1idStr, - }) { - return NewSongDataArtists() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..followed = followed ?? this.followed - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..picUrl = picUrl ?? this.picUrl - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} - -NewSongDataHMusic $NewSongDataHMusicFromJson(Map json) { - final NewSongDataHMusic newSongDataHMusic = NewSongDataHMusic(); - final int? volumeDelta = jsonConvert.convert(json['volumeDelta']); - if (volumeDelta != null) { - newSongDataHMusic.volumeDelta = volumeDelta; - } - final int? playTime = jsonConvert.convert(json['playTime']); - if (playTime != null) { - newSongDataHMusic.playTime = playTime; - } - final int? dfsId = jsonConvert.convert(json['dfsId']); - if (dfsId != null) { - newSongDataHMusic.dfsId = dfsId; - } - final int? bitrate = jsonConvert.convert(json['bitrate']); - if (bitrate != null) { - newSongDataHMusic.bitrate = bitrate; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - newSongDataHMusic.sr = sr; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataHMusic.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataHMusic.id = id; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - newSongDataHMusic.size = size; - } - final String? extension = jsonConvert.convert(json['extension']); - if (extension != null) { - newSongDataHMusic.extension = extension; - } - return newSongDataHMusic; -} - -Map $NewSongDataHMusicToJson(NewSongDataHMusic entity) { - final Map data = {}; - data['volumeDelta'] = entity.volumeDelta; - data['playTime'] = entity.playTime; - data['dfsId'] = entity.dfsId; - data['bitrate'] = entity.bitrate; - data['sr'] = entity.sr; - data['name'] = entity.name; - data['id'] = entity.id; - data['size'] = entity.size; - data['extension'] = entity.extension; - return data; -} - -extension NewSongDataHMusicExtension on NewSongDataHMusic { - NewSongDataHMusic copyWith({ - int? volumeDelta, - int? playTime, - int? dfsId, - int? bitrate, - int? sr, - String? name, - int? id, - int? size, - String? extension, - }) { - return NewSongDataHMusic() - ..volumeDelta = volumeDelta ?? this.volumeDelta - ..playTime = playTime ?? this.playTime - ..dfsId = dfsId ?? this.dfsId - ..bitrate = bitrate ?? this.bitrate - ..sr = sr ?? this.sr - ..name = name ?? this.name - ..id = id ?? this.id - ..size = size ?? this.size - ..extension = extension ?? this.extension; - } -} - -NewSongDataMMusic $NewSongDataMMusicFromJson(Map json) { - final NewSongDataMMusic newSongDataMMusic = NewSongDataMMusic(); - final int? volumeDelta = jsonConvert.convert(json['volumeDelta']); - if (volumeDelta != null) { - newSongDataMMusic.volumeDelta = volumeDelta; - } - final int? playTime = jsonConvert.convert(json['playTime']); - if (playTime != null) { - newSongDataMMusic.playTime = playTime; - } - final int? dfsId = jsonConvert.convert(json['dfsId']); - if (dfsId != null) { - newSongDataMMusic.dfsId = dfsId; - } - final int? bitrate = jsonConvert.convert(json['bitrate']); - if (bitrate != null) { - newSongDataMMusic.bitrate = bitrate; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - newSongDataMMusic.sr = sr; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataMMusic.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataMMusic.id = id; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - newSongDataMMusic.size = size; - } - final String? extension = jsonConvert.convert(json['extension']); - if (extension != null) { - newSongDataMMusic.extension = extension; - } - return newSongDataMMusic; -} - -Map $NewSongDataMMusicToJson(NewSongDataMMusic entity) { - final Map data = {}; - data['volumeDelta'] = entity.volumeDelta; - data['playTime'] = entity.playTime; - data['dfsId'] = entity.dfsId; - data['bitrate'] = entity.bitrate; - data['sr'] = entity.sr; - data['name'] = entity.name; - data['id'] = entity.id; - data['size'] = entity.size; - data['extension'] = entity.extension; - return data; -} - -extension NewSongDataMMusicExtension on NewSongDataMMusic { - NewSongDataMMusic copyWith({ - int? volumeDelta, - int? playTime, - int? dfsId, - int? bitrate, - int? sr, - String? name, - int? id, - int? size, - String? extension, - }) { - return NewSongDataMMusic() - ..volumeDelta = volumeDelta ?? this.volumeDelta - ..playTime = playTime ?? this.playTime - ..dfsId = dfsId ?? this.dfsId - ..bitrate = bitrate ?? this.bitrate - ..sr = sr ?? this.sr - ..name = name ?? this.name - ..id = id ?? this.id - ..size = size ?? this.size - ..extension = extension ?? this.extension; - } -} - -NewSongDataLMusic $NewSongDataLMusicFromJson(Map json) { - final NewSongDataLMusic newSongDataLMusic = NewSongDataLMusic(); - final int? volumeDelta = jsonConvert.convert(json['volumeDelta']); - if (volumeDelta != null) { - newSongDataLMusic.volumeDelta = volumeDelta; - } - final int? playTime = jsonConvert.convert(json['playTime']); - if (playTime != null) { - newSongDataLMusic.playTime = playTime; - } - final int? dfsId = jsonConvert.convert(json['dfsId']); - if (dfsId != null) { - newSongDataLMusic.dfsId = dfsId; - } - final int? bitrate = jsonConvert.convert(json['bitrate']); - if (bitrate != null) { - newSongDataLMusic.bitrate = bitrate; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - newSongDataLMusic.sr = sr; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataLMusic.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataLMusic.id = id; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - newSongDataLMusic.size = size; - } - final String? extension = jsonConvert.convert(json['extension']); - if (extension != null) { - newSongDataLMusic.extension = extension; - } - return newSongDataLMusic; -} - -Map $NewSongDataLMusicToJson(NewSongDataLMusic entity) { - final Map data = {}; - data['volumeDelta'] = entity.volumeDelta; - data['playTime'] = entity.playTime; - data['dfsId'] = entity.dfsId; - data['bitrate'] = entity.bitrate; - data['sr'] = entity.sr; - data['name'] = entity.name; - data['id'] = entity.id; - data['size'] = entity.size; - data['extension'] = entity.extension; - return data; -} - -extension NewSongDataLMusicExtension on NewSongDataLMusic { - NewSongDataLMusic copyWith({ - int? volumeDelta, - int? playTime, - int? dfsId, - int? bitrate, - int? sr, - String? name, - int? id, - int? size, - String? extension, - }) { - return NewSongDataLMusic() - ..volumeDelta = volumeDelta ?? this.volumeDelta - ..playTime = playTime ?? this.playTime - ..dfsId = dfsId ?? this.dfsId - ..bitrate = bitrate ?? this.bitrate - ..sr = sr ?? this.sr - ..name = name ?? this.name - ..id = id ?? this.id - ..size = size ?? this.size - ..extension = extension ?? this.extension; - } -} - -NewSongDataAlbum $NewSongDataAlbumFromJson(Map json) { - final NewSongDataAlbum newSongDataAlbum = NewSongDataAlbum(); - final bool? paid = jsonConvert.convert(json['paid']); - if (paid != null) { - newSongDataAlbum.paid = paid; - } - final bool? onSale = jsonConvert.convert(json['onSale']); - if (onSale != null) { - newSongDataAlbum.onSale = onSale; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newSongDataAlbum.picId = picId; - } - final List? artists = (json['artists'] as List?) - ?.map( - (e) => jsonConvert.convert(e) as NewSongDataAlbumArtists) - .toList(); - if (artists != null) { - newSongDataAlbum.artists = artists; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newSongDataAlbum.briefDesc = briefDesc; - } - final int? publishTime = jsonConvert.convert(json['publishTime']); - if (publishTime != null) { - newSongDataAlbum.publishTime = publishTime; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newSongDataAlbum.picUrl = picUrl; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - newSongDataAlbum.commentThreadId = commentThreadId; - } - final NewSongDataAlbumArtist? artist = jsonConvert.convert( - json['artist']); - if (artist != null) { - newSongDataAlbum.artist = artist; - } - final int? copyrightId = jsonConvert.convert(json['copyrightId']); - if (copyrightId != null) { - newSongDataAlbum.copyrightId = copyrightId; - } - final String? company = jsonConvert.convert(json['company']); - if (company != null) { - newSongDataAlbum.company = company; - } - final String? subType = jsonConvert.convert(json['subType']); - if (subType != null) { - newSongDataAlbum.subType = subType; - } - final String? blurPicUrl = jsonConvert.convert(json['blurPicUrl']); - if (blurPicUrl != null) { - newSongDataAlbum.blurPicUrl = blurPicUrl; - } - final int? companyId = jsonConvert.convert(json['companyId']); - if (companyId != null) { - newSongDataAlbum.companyId = companyId; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - newSongDataAlbum.pic = pic; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - newSongDataAlbum.status = status; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - newSongDataAlbum.description = description; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newSongDataAlbum.alias = alias; - } - final String? tags = jsonConvert.convert(json['tags']); - if (tags != null) { - newSongDataAlbum.tags = tags; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataAlbum.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataAlbum.id = id; - } - final String? type = jsonConvert.convert(json['type']); - if (type != null) { - newSongDataAlbum.type = type; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - newSongDataAlbum.size = size; - } - final String? picidStr = jsonConvert.convert(json['picId_str']); - if (picidStr != null) { - newSongDataAlbum.picidStr = picidStr; - } - return newSongDataAlbum; -} - -Map $NewSongDataAlbumToJson(NewSongDataAlbum entity) { - final Map data = {}; - data['paid'] = entity.paid; - data['onSale'] = entity.onSale; - data['picId'] = entity.picId; - data['artists'] = entity.artists?.map((v) => v.toJson()).toList(); - data['briefDesc'] = entity.briefDesc; - data['publishTime'] = entity.publishTime; - data['picUrl'] = entity.picUrl; - data['commentThreadId'] = entity.commentThreadId; - data['artist'] = entity.artist?.toJson(); - data['copyrightId'] = entity.copyrightId; - data['company'] = entity.company; - data['subType'] = entity.subType; - data['blurPicUrl'] = entity.blurPicUrl; - data['companyId'] = entity.companyId; - data['pic'] = entity.pic; - data['status'] = entity.status; - data['description'] = entity.description; - data['alias'] = entity.alias; - data['tags'] = entity.tags; - data['name'] = entity.name; - data['id'] = entity.id; - data['type'] = entity.type; - data['size'] = entity.size; - data['picId_str'] = entity.picidStr; - return data; -} - -extension NewSongDataAlbumExtension on NewSongDataAlbum { - NewSongDataAlbum copyWith({ - bool? paid, - bool? onSale, - int? picId, - List? artists, - String? briefDesc, - int? publishTime, - String? picUrl, - String? commentThreadId, - NewSongDataAlbumArtist? artist, - int? copyrightId, - String? company, - String? subType, - String? blurPicUrl, - int? companyId, - int? pic, - int? status, - String? description, - List? alias, - String? tags, - String? name, - int? id, - String? type, - int? size, - String? picidStr, - }) { - return NewSongDataAlbum() - ..paid = paid ?? this.paid - ..onSale = onSale ?? this.onSale - ..picId = picId ?? this.picId - ..artists = artists ?? this.artists - ..briefDesc = briefDesc ?? this.briefDesc - ..publishTime = publishTime ?? this.publishTime - ..picUrl = picUrl ?? this.picUrl - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..artist = artist ?? this.artist - ..copyrightId = copyrightId ?? this.copyrightId - ..company = company ?? this.company - ..subType = subType ?? this.subType - ..blurPicUrl = blurPicUrl ?? this.blurPicUrl - ..companyId = companyId ?? this.companyId - ..pic = pic ?? this.pic - ..status = status ?? this.status - ..description = description ?? this.description - ..alias = alias ?? this.alias - ..tags = tags ?? this.tags - ..name = name ?? this.name - ..id = id ?? this.id - ..type = type ?? this.type - ..size = size ?? this.size - ..picidStr = picidStr ?? this.picidStr; - } -} - -NewSongDataAlbumArtists $NewSongDataAlbumArtistsFromJson(Map json) { - final NewSongDataAlbumArtists newSongDataAlbumArtists = NewSongDataAlbumArtists(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - newSongDataAlbumArtists.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - newSongDataAlbumArtists.topicPerson = topicPerson; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - newSongDataAlbumArtists.followed = followed; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newSongDataAlbumArtists.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newSongDataAlbumArtists.briefDesc = briefDesc; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newSongDataAlbumArtists.picUrl = picUrl; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - newSongDataAlbumArtists.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - newSongDataAlbumArtists.albumSize = albumSize; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - newSongDataAlbumArtists.img1v1Url = img1v1Url; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - newSongDataAlbumArtists.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newSongDataAlbumArtists.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataAlbumArtists.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataAlbumArtists.id = id; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - newSongDataAlbumArtists.img1v1idStr = img1v1idStr; - } - return newSongDataAlbumArtists; -} - -Map $NewSongDataAlbumArtistsToJson(NewSongDataAlbumArtists entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['followed'] = entity.followed; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['picUrl'] = entity.picUrl; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['img1v1Url'] = entity.img1v1Url; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension NewSongDataAlbumArtistsExtension on NewSongDataAlbumArtists { - NewSongDataAlbumArtists copyWith({ - int? img1v1Id, - int? topicPerson, - bool? followed, - int? picId, - String? briefDesc, - String? picUrl, - int? musicSize, - int? albumSize, - String? img1v1Url, - String? trans, - List? alias, - String? name, - int? id, - String? img1v1idStr, - }) { - return NewSongDataAlbumArtists() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..followed = followed ?? this.followed - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..picUrl = picUrl ?? this.picUrl - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} - -NewSongDataAlbumArtist $NewSongDataAlbumArtistFromJson(Map json) { - final NewSongDataAlbumArtist newSongDataAlbumArtist = NewSongDataAlbumArtist(); - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - newSongDataAlbumArtist.img1v1Id = img1v1Id; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - newSongDataAlbumArtist.topicPerson = topicPerson; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - newSongDataAlbumArtist.followed = followed; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - newSongDataAlbumArtist.picId = picId; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - newSongDataAlbumArtist.briefDesc = briefDesc; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - newSongDataAlbumArtist.picUrl = picUrl; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - newSongDataAlbumArtist.musicSize = musicSize; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - newSongDataAlbumArtist.albumSize = albumSize; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - newSongDataAlbumArtist.img1v1Url = img1v1Url; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - newSongDataAlbumArtist.trans = trans; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - newSongDataAlbumArtist.alias = alias; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataAlbumArtist.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataAlbumArtist.id = id; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - newSongDataAlbumArtist.img1v1idStr = img1v1idStr; - } - return newSongDataAlbumArtist; -} - -Map $NewSongDataAlbumArtistToJson(NewSongDataAlbumArtist entity) { - final Map data = {}; - data['img1v1Id'] = entity.img1v1Id; - data['topicPerson'] = entity.topicPerson; - data['followed'] = entity.followed; - data['picId'] = entity.picId; - data['briefDesc'] = entity.briefDesc; - data['picUrl'] = entity.picUrl; - data['musicSize'] = entity.musicSize; - data['albumSize'] = entity.albumSize; - data['img1v1Url'] = entity.img1v1Url; - data['trans'] = entity.trans; - data['alias'] = entity.alias; - data['name'] = entity.name; - data['id'] = entity.id; - data['img1v1Id_str'] = entity.img1v1idStr; - return data; -} - -extension NewSongDataAlbumArtistExtension on NewSongDataAlbumArtist { - NewSongDataAlbumArtist copyWith({ - int? img1v1Id, - int? topicPerson, - bool? followed, - int? picId, - String? briefDesc, - String? picUrl, - int? musicSize, - int? albumSize, - String? img1v1Url, - String? trans, - List? alias, - String? name, - int? id, - String? img1v1idStr, - }) { - return NewSongDataAlbumArtist() - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..topicPerson = topicPerson ?? this.topicPerson - ..followed = followed ?? this.followed - ..picId = picId ?? this.picId - ..briefDesc = briefDesc ?? this.briefDesc - ..picUrl = picUrl ?? this.picUrl - ..musicSize = musicSize ?? this.musicSize - ..albumSize = albumSize ?? this.albumSize - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..trans = trans ?? this.trans - ..alias = alias ?? this.alias - ..name = name ?? this.name - ..id = id ?? this.id - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr; - } -} - -NewSongDataBMusic $NewSongDataBMusicFromJson(Map json) { - final NewSongDataBMusic newSongDataBMusic = NewSongDataBMusic(); - final int? volumeDelta = jsonConvert.convert(json['volumeDelta']); - if (volumeDelta != null) { - newSongDataBMusic.volumeDelta = volumeDelta; - } - final int? playTime = jsonConvert.convert(json['playTime']); - if (playTime != null) { - newSongDataBMusic.playTime = playTime; - } - final int? dfsId = jsonConvert.convert(json['dfsId']); - if (dfsId != null) { - newSongDataBMusic.dfsId = dfsId; - } - final int? bitrate = jsonConvert.convert(json['bitrate']); - if (bitrate != null) { - newSongDataBMusic.bitrate = bitrate; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - newSongDataBMusic.sr = sr; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - newSongDataBMusic.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - newSongDataBMusic.id = id; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - newSongDataBMusic.size = size; - } - final String? extension = jsonConvert.convert(json['extension']); - if (extension != null) { - newSongDataBMusic.extension = extension; - } - return newSongDataBMusic; -} - -Map $NewSongDataBMusicToJson(NewSongDataBMusic entity) { - final Map data = {}; - data['volumeDelta'] = entity.volumeDelta; - data['playTime'] = entity.playTime; - data['dfsId'] = entity.dfsId; - data['bitrate'] = entity.bitrate; - data['sr'] = entity.sr; - data['name'] = entity.name; - data['id'] = entity.id; - data['size'] = entity.size; - data['extension'] = entity.extension; - return data; -} - -extension NewSongDataBMusicExtension on NewSongDataBMusic { - NewSongDataBMusic copyWith({ - int? volumeDelta, - int? playTime, - int? dfsId, - int? bitrate, - int? sr, - String? name, - int? id, - int? size, - String? extension, - }) { - return NewSongDataBMusic() - ..volumeDelta = volumeDelta ?? this.volumeDelta - ..playTime = playTime ?? this.playTime - ..dfsId = dfsId ?? this.dfsId - ..bitrate = bitrate ?? this.bitrate - ..sr = sr ?? this.sr - ..name = name ?? this.name - ..id = id ?? this.id - ..size = size ?? this.size - ..extension = extension ?? this.extension; - } -} \ No newline at end of file diff --git a/lib/generated/json/playlist_detail_entity.g.dart b/lib/generated/json/playlist_detail_entity.g.dart deleted file mode 100644 index 4506a83..0000000 --- a/lib/generated/json/playlist_detail_entity.g.dart +++ /dev/null @@ -1,2248 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/playlist/entity/playlist_detail_entity.dart'; - -PlaylistDetailEntity $PlaylistDetailEntityFromJson(Map json) { - final PlaylistDetailEntity playlistDetailEntity = PlaylistDetailEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - playlistDetailEntity.code = code; - } - final dynamic relatedVideos = json['relatedVideos']; - if (relatedVideos != null) { - playlistDetailEntity.relatedVideos = relatedVideos; - } - final PlaylistDetailPlaylist? playlist = jsonConvert.convert( - json['playlist']); - if (playlist != null) { - playlistDetailEntity.playlist = playlist; - } - final dynamic urls = json['urls']; - if (urls != null) { - playlistDetailEntity.urls = urls; - } - final List? privileges = (json['privileges'] as List?) - ?.map( - (e) => jsonConvert.convert(e) as PlaylistDetailPrivileges) - .toList(); - if (privileges != null) { - playlistDetailEntity.privileges = privileges; - } - final dynamic sharedPrivilege = json['sharedPrivilege']; - if (sharedPrivilege != null) { - playlistDetailEntity.sharedPrivilege = sharedPrivilege; - } - final dynamic resEntrance = json['resEntrance']; - if (resEntrance != null) { - playlistDetailEntity.resEntrance = resEntrance; - } - final dynamic fromUsers = json['fromUsers']; - if (fromUsers != null) { - playlistDetailEntity.fromUsers = fromUsers; - } - final int? fromUserCount = jsonConvert.convert(json['fromUserCount']); - if (fromUserCount != null) { - playlistDetailEntity.fromUserCount = fromUserCount; - } - final dynamic songFromUsers = json['songFromUsers']; - if (songFromUsers != null) { - playlistDetailEntity.songFromUsers = songFromUsers; - } - return playlistDetailEntity; -} - -Map $PlaylistDetailEntityToJson(PlaylistDetailEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['relatedVideos'] = entity.relatedVideos; - data['playlist'] = entity.playlist?.toJson(); - data['urls'] = entity.urls; - data['privileges'] = entity.privileges?.map((v) => v.toJson()).toList(); - data['sharedPrivilege'] = entity.sharedPrivilege; - data['resEntrance'] = entity.resEntrance; - data['fromUsers'] = entity.fromUsers; - data['fromUserCount'] = entity.fromUserCount; - data['songFromUsers'] = entity.songFromUsers; - return data; -} - -extension PlaylistDetailEntityExtension on PlaylistDetailEntity { - PlaylistDetailEntity copyWith({ - int? code, - dynamic relatedVideos, - PlaylistDetailPlaylist? playlist, - dynamic urls, - List? privileges, - dynamic sharedPrivilege, - dynamic resEntrance, - dynamic fromUsers, - int? fromUserCount, - dynamic songFromUsers, - }) { - return PlaylistDetailEntity() - ..code = code ?? this.code - ..relatedVideos = relatedVideos ?? this.relatedVideos - ..playlist = playlist ?? this.playlist - ..urls = urls ?? this.urls - ..privileges = privileges ?? this.privileges - ..sharedPrivilege = sharedPrivilege ?? this.sharedPrivilege - ..resEntrance = resEntrance ?? this.resEntrance - ..fromUsers = fromUsers ?? this.fromUsers - ..fromUserCount = fromUserCount ?? this.fromUserCount - ..songFromUsers = songFromUsers ?? this.songFromUsers; - } -} - -PlaylistDetailPlaylist $PlaylistDetailPlaylistFromJson(Map json) { - final PlaylistDetailPlaylist playlistDetailPlaylist = PlaylistDetailPlaylist(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - playlistDetailPlaylist.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - playlistDetailPlaylist.name = name; - } - final int? coverImgId = jsonConvert.convert(json['coverImgId']); - if (coverImgId != null) { - playlistDetailPlaylist.coverImgId = coverImgId; - } - final String? coverImgUrl = jsonConvert.convert(json['coverImgUrl']); - if (coverImgUrl != null) { - playlistDetailPlaylist.coverImgUrl = coverImgUrl; - } - final String? coverimgidStr = jsonConvert.convert(json['coverImgId_str']); - if (coverimgidStr != null) { - playlistDetailPlaylist.coverimgidStr = coverimgidStr; - } - final int? adType = jsonConvert.convert(json['adType']); - if (adType != null) { - playlistDetailPlaylist.adType = adType; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - playlistDetailPlaylist.userId = userId; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - playlistDetailPlaylist.createTime = createTime; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - playlistDetailPlaylist.status = status; - } - final bool? opRecommend = jsonConvert.convert(json['opRecommend']); - if (opRecommend != null) { - playlistDetailPlaylist.opRecommend = opRecommend; - } - final bool? highQuality = jsonConvert.convert(json['highQuality']); - if (highQuality != null) { - playlistDetailPlaylist.highQuality = highQuality; - } - final bool? newImported = jsonConvert.convert(json['newImported']); - if (newImported != null) { - playlistDetailPlaylist.newImported = newImported; - } - final int? updateTime = jsonConvert.convert(json['updateTime']); - if (updateTime != null) { - playlistDetailPlaylist.updateTime = updateTime; - } - final int? trackCount = jsonConvert.convert(json['trackCount']); - if (trackCount != null) { - playlistDetailPlaylist.trackCount = trackCount; - } - final int? specialType = jsonConvert.convert(json['specialType']); - if (specialType != null) { - playlistDetailPlaylist.specialType = specialType; - } - final int? privacy = jsonConvert.convert(json['privacy']); - if (privacy != null) { - playlistDetailPlaylist.privacy = privacy; - } - final int? trackUpdateTime = jsonConvert.convert(json['trackUpdateTime']); - if (trackUpdateTime != null) { - playlistDetailPlaylist.trackUpdateTime = trackUpdateTime; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - playlistDetailPlaylist.commentThreadId = commentThreadId; - } - final int? playCount = jsonConvert.convert(json['playCount']); - if (playCount != null) { - playlistDetailPlaylist.playCount = playCount; - } - final int? trackNumberUpdateTime = jsonConvert.convert(json['trackNumberUpdateTime']); - if (trackNumberUpdateTime != null) { - playlistDetailPlaylist.trackNumberUpdateTime = trackNumberUpdateTime; - } - final int? subscribedCount = jsonConvert.convert(json['subscribedCount']); - if (subscribedCount != null) { - playlistDetailPlaylist.subscribedCount = subscribedCount; - } - final int? cloudTrackCount = jsonConvert.convert(json['cloudTrackCount']); - if (cloudTrackCount != null) { - playlistDetailPlaylist.cloudTrackCount = cloudTrackCount; - } - final bool? ordered = jsonConvert.convert(json['ordered']); - if (ordered != null) { - playlistDetailPlaylist.ordered = ordered; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - playlistDetailPlaylist.description = description; - } - final List? tags = (json['tags'] as List?)?.map( - (e) => e).toList(); - if (tags != null) { - playlistDetailPlaylist.tags = tags; - } - final String? updateFrequency = jsonConvert.convert(json['updateFrequency']); - if (updateFrequency != null) { - playlistDetailPlaylist.updateFrequency = updateFrequency; - } - final int? backgroundCoverId = jsonConvert.convert(json['backgroundCoverId']); - if (backgroundCoverId != null) { - playlistDetailPlaylist.backgroundCoverId = backgroundCoverId; - } - final String? backgroundCoverUrl = jsonConvert.convert(json['backgroundCoverUrl']); - if (backgroundCoverUrl != null) { - playlistDetailPlaylist.backgroundCoverUrl = backgroundCoverUrl; - } - final int? titleImage = jsonConvert.convert(json['titleImage']); - if (titleImage != null) { - playlistDetailPlaylist.titleImage = titleImage; - } - final String? titleImageUrl = jsonConvert.convert(json['titleImageUrl']); - if (titleImageUrl != null) { - playlistDetailPlaylist.titleImageUrl = titleImageUrl; - } - final String? detailPageTitle = jsonConvert.convert(json['detailPageTitle']); - if (detailPageTitle != null) { - playlistDetailPlaylist.detailPageTitle = detailPageTitle; - } - final String? englishTitle = jsonConvert.convert(json['englishTitle']); - if (englishTitle != null) { - playlistDetailPlaylist.englishTitle = englishTitle; - } - final String? officialPlaylistType = jsonConvert.convert(json['officialPlaylistType']); - if (officialPlaylistType != null) { - playlistDetailPlaylist.officialPlaylistType = officialPlaylistType; - } - final bool? copied = jsonConvert.convert(json['copied']); - if (copied != null) { - playlistDetailPlaylist.copied = copied; - } - final String? relateResType = jsonConvert.convert(json['relateResType']); - if (relateResType != null) { - playlistDetailPlaylist.relateResType = relateResType; - } - final int? coverStatus = jsonConvert.convert(json['coverStatus']); - if (coverStatus != null) { - playlistDetailPlaylist.coverStatus = coverStatus; - } - final List? subscribers = (json['subscribers'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as PlaylistDetailPlaylistSubscribers).toList(); - if (subscribers != null) { - playlistDetailPlaylist.subscribers = subscribers; - } - final bool? subscribed = jsonConvert.convert(json['subscribed']); - if (subscribed != null) { - playlistDetailPlaylist.subscribed = subscribed; - } - final PlaylistDetailPlaylistCreator? creator = jsonConvert.convert( - json['creator']); - if (creator != null) { - playlistDetailPlaylist.creator = creator; - } - final List? tracks = (json['tracks'] as List?) - ?.map( - (e) => - jsonConvert.convert(e) as PlaylistDetailPlaylistTracks) - .toList(); - if (tracks != null) { - playlistDetailPlaylist.tracks = tracks; - } - final dynamic videoIds = json['videoIds']; - if (videoIds != null) { - playlistDetailPlaylist.videoIds = videoIds; - } - final dynamic videos = json['videos']; - if (videos != null) { - playlistDetailPlaylist.videos = videos; - } - final List? trackIds = (json['trackIds'] as List?) - ?.map( - (e) => - jsonConvert.convert(e) as PlaylistDetailPlaylistTrackIds) - .toList(); - if (trackIds != null) { - playlistDetailPlaylist.trackIds = trackIds; - } - final dynamic bannedTrackIds = json['bannedTrackIds']; - if (bannedTrackIds != null) { - playlistDetailPlaylist.bannedTrackIds = bannedTrackIds; - } - final dynamic mvResourceInfos = json['mvResourceInfos']; - if (mvResourceInfos != null) { - playlistDetailPlaylist.mvResourceInfos = mvResourceInfos; - } - final int? shareCount = jsonConvert.convert(json['shareCount']); - if (shareCount != null) { - playlistDetailPlaylist.shareCount = shareCount; - } - final int? commentCount = jsonConvert.convert(json['commentCount']); - if (commentCount != null) { - playlistDetailPlaylist.commentCount = commentCount; - } - final dynamic remixVideo = json['remixVideo']; - if (remixVideo != null) { - playlistDetailPlaylist.remixVideo = remixVideo; - } - final dynamic newDetailPageRemixVideo = json['newDetailPageRemixVideo']; - if (newDetailPageRemixVideo != null) { - playlistDetailPlaylist.newDetailPageRemixVideo = newDetailPageRemixVideo; - } - final dynamic sharedUsers = json['sharedUsers']; - if (sharedUsers != null) { - playlistDetailPlaylist.sharedUsers = sharedUsers; - } - final dynamic historySharedUsers = json['historySharedUsers']; - if (historySharedUsers != null) { - playlistDetailPlaylist.historySharedUsers = historySharedUsers; - } - final String? gradeStatus = jsonConvert.convert(json['gradeStatus']); - if (gradeStatus != null) { - playlistDetailPlaylist.gradeStatus = gradeStatus; - } - final dynamic score = json['score']; - if (score != null) { - playlistDetailPlaylist.score = score; - } - final dynamic algTags = json['algTags']; - if (algTags != null) { - playlistDetailPlaylist.algTags = algTags; - } - final List? distributeTags = (json['distributeTags'] as List?)?.map( - (e) => e).toList(); - if (distributeTags != null) { - playlistDetailPlaylist.distributeTags = distributeTags; - } - final int? trialMode = jsonConvert.convert(json['trialMode']); - if (trialMode != null) { - playlistDetailPlaylist.trialMode = trialMode; - } - final dynamic displayTags = json['displayTags']; - if (displayTags != null) { - playlistDetailPlaylist.displayTags = displayTags; - } - final bool? displayUserInfoAsTagOnly = jsonConvert.convert( - json['displayUserInfoAsTagOnly']); - if (displayUserInfoAsTagOnly != null) { - playlistDetailPlaylist.displayUserInfoAsTagOnly = displayUserInfoAsTagOnly; - } - final String? playlistType = jsonConvert.convert(json['playlistType']); - if (playlistType != null) { - playlistDetailPlaylist.playlistType = playlistType; - } - final PlaylistDetailPlaylistBizExtInfo? bizExtInfo = jsonConvert.convert< - PlaylistDetailPlaylistBizExtInfo>(json['bizExtInfo']); - if (bizExtInfo != null) { - playlistDetailPlaylist.bizExtInfo = bizExtInfo; - } - return playlistDetailPlaylist; -} - -Map $PlaylistDetailPlaylistToJson(PlaylistDetailPlaylist entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['coverImgId'] = entity.coverImgId; - data['coverImgUrl'] = entity.coverImgUrl; - data['coverImgId_str'] = entity.coverimgidStr; - data['adType'] = entity.adType; - data['userId'] = entity.userId; - data['createTime'] = entity.createTime; - data['status'] = entity.status; - data['opRecommend'] = entity.opRecommend; - data['highQuality'] = entity.highQuality; - data['newImported'] = entity.newImported; - data['updateTime'] = entity.updateTime; - data['trackCount'] = entity.trackCount; - data['specialType'] = entity.specialType; - data['privacy'] = entity.privacy; - data['trackUpdateTime'] = entity.trackUpdateTime; - data['commentThreadId'] = entity.commentThreadId; - data['playCount'] = entity.playCount; - data['trackNumberUpdateTime'] = entity.trackNumberUpdateTime; - data['subscribedCount'] = entity.subscribedCount; - data['cloudTrackCount'] = entity.cloudTrackCount; - data['ordered'] = entity.ordered; - data['description'] = entity.description; - data['tags'] = entity.tags; - data['updateFrequency'] = entity.updateFrequency; - data['backgroundCoverId'] = entity.backgroundCoverId; - data['backgroundCoverUrl'] = entity.backgroundCoverUrl; - data['titleImage'] = entity.titleImage; - data['titleImageUrl'] = entity.titleImageUrl; - data['detailPageTitle'] = entity.detailPageTitle; - data['englishTitle'] = entity.englishTitle; - data['officialPlaylistType'] = entity.officialPlaylistType; - data['copied'] = entity.copied; - data['relateResType'] = entity.relateResType; - data['coverStatus'] = entity.coverStatus; - data['subscribers'] = entity.subscribers?.map((v) => v.toJson()).toList(); - data['subscribed'] = entity.subscribed; - data['creator'] = entity.creator?.toJson(); - data['tracks'] = entity.tracks?.map((v) => v.toJson()).toList(); - data['videoIds'] = entity.videoIds; - data['videos'] = entity.videos; - data['trackIds'] = entity.trackIds?.map((v) => v.toJson()).toList(); - data['bannedTrackIds'] = entity.bannedTrackIds; - data['mvResourceInfos'] = entity.mvResourceInfos; - data['shareCount'] = entity.shareCount; - data['commentCount'] = entity.commentCount; - data['remixVideo'] = entity.remixVideo; - data['newDetailPageRemixVideo'] = entity.newDetailPageRemixVideo; - data['sharedUsers'] = entity.sharedUsers; - data['historySharedUsers'] = entity.historySharedUsers; - data['gradeStatus'] = entity.gradeStatus; - data['score'] = entity.score; - data['algTags'] = entity.algTags; - data['distributeTags'] = entity.distributeTags; - data['trialMode'] = entity.trialMode; - data['displayTags'] = entity.displayTags; - data['displayUserInfoAsTagOnly'] = entity.displayUserInfoAsTagOnly; - data['playlistType'] = entity.playlistType; - data['bizExtInfo'] = entity.bizExtInfo?.toJson(); - return data; -} - -extension PlaylistDetailPlaylistExtension on PlaylistDetailPlaylist { - PlaylistDetailPlaylist copyWith({ - int? id, - String? name, - int? coverImgId, - String? coverImgUrl, - String? coverimgidStr, - int? adType, - int? userId, - int? createTime, - int? status, - bool? opRecommend, - bool? highQuality, - bool? newImported, - int? updateTime, - int? trackCount, - int? specialType, - int? privacy, - int? trackUpdateTime, - String? commentThreadId, - int? playCount, - int? trackNumberUpdateTime, - int? subscribedCount, - int? cloudTrackCount, - bool? ordered, - String? description, - List? tags, - String? updateFrequency, - int? backgroundCoverId, - String? backgroundCoverUrl, - int? titleImage, - String? titleImageUrl, - String? detailPageTitle, - String? englishTitle, - String? officialPlaylistType, - bool? copied, - String? relateResType, - int? coverStatus, - List? subscribers, - bool? subscribed, - PlaylistDetailPlaylistCreator? creator, - List? tracks, - dynamic videoIds, - dynamic videos, - List? trackIds, - dynamic bannedTrackIds, - dynamic mvResourceInfos, - int? shareCount, - int? commentCount, - dynamic remixVideo, - dynamic newDetailPageRemixVideo, - dynamic sharedUsers, - dynamic historySharedUsers, - String? gradeStatus, - dynamic score, - dynamic algTags, - List? distributeTags, - int? trialMode, - dynamic displayTags, - bool? displayUserInfoAsTagOnly, - String? playlistType, - PlaylistDetailPlaylistBizExtInfo? bizExtInfo, - }) { - return PlaylistDetailPlaylist() - ..id = id ?? this.id - ..name = name ?? this.name - ..coverImgId = coverImgId ?? this.coverImgId - ..coverImgUrl = coverImgUrl ?? this.coverImgUrl - ..coverimgidStr = coverimgidStr ?? this.coverimgidStr - ..adType = adType ?? this.adType - ..userId = userId ?? this.userId - ..createTime = createTime ?? this.createTime - ..status = status ?? this.status - ..opRecommend = opRecommend ?? this.opRecommend - ..highQuality = highQuality ?? this.highQuality - ..newImported = newImported ?? this.newImported - ..updateTime = updateTime ?? this.updateTime - ..trackCount = trackCount ?? this.trackCount - ..specialType = specialType ?? this.specialType - ..privacy = privacy ?? this.privacy - ..trackUpdateTime = trackUpdateTime ?? this.trackUpdateTime - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..playCount = playCount ?? this.playCount - ..trackNumberUpdateTime = trackNumberUpdateTime ?? this.trackNumberUpdateTime - ..subscribedCount = subscribedCount ?? this.subscribedCount - ..cloudTrackCount = cloudTrackCount ?? this.cloudTrackCount - ..ordered = ordered ?? this.ordered - ..description = description ?? this.description - ..tags = tags ?? this.tags - ..updateFrequency = updateFrequency ?? this.updateFrequency - ..backgroundCoverId = backgroundCoverId ?? this.backgroundCoverId - ..backgroundCoverUrl = backgroundCoverUrl ?? this.backgroundCoverUrl - ..titleImage = titleImage ?? this.titleImage - ..titleImageUrl = titleImageUrl ?? this.titleImageUrl - ..detailPageTitle = detailPageTitle ?? this.detailPageTitle - ..englishTitle = englishTitle ?? this.englishTitle - ..officialPlaylistType = officialPlaylistType ?? this.officialPlaylistType - ..copied = copied ?? this.copied - ..relateResType = relateResType ?? this.relateResType - ..coverStatus = coverStatus ?? this.coverStatus - ..subscribers = subscribers ?? this.subscribers - ..subscribed = subscribed ?? this.subscribed - ..creator = creator ?? this.creator - ..tracks = tracks ?? this.tracks - ..videoIds = videoIds ?? this.videoIds - ..videos = videos ?? this.videos - ..trackIds = trackIds ?? this.trackIds - ..bannedTrackIds = bannedTrackIds ?? this.bannedTrackIds - ..mvResourceInfos = mvResourceInfos ?? this.mvResourceInfos - ..shareCount = shareCount ?? this.shareCount - ..commentCount = commentCount ?? this.commentCount - ..remixVideo = remixVideo ?? this.remixVideo - ..newDetailPageRemixVideo = newDetailPageRemixVideo ?? this.newDetailPageRemixVideo - ..sharedUsers = sharedUsers ?? this.sharedUsers - ..historySharedUsers = historySharedUsers ?? this.historySharedUsers - ..gradeStatus = gradeStatus ?? this.gradeStatus - ..score = score ?? this.score - ..algTags = algTags ?? this.algTags - ..distributeTags = distributeTags ?? this.distributeTags - ..trialMode = trialMode ?? this.trialMode - ..displayTags = displayTags ?? this.displayTags - ..displayUserInfoAsTagOnly = displayUserInfoAsTagOnly ?? this.displayUserInfoAsTagOnly - ..playlistType = playlistType ?? this.playlistType - ..bizExtInfo = bizExtInfo ?? this.bizExtInfo; - } -} - -PlaylistDetailPlaylistSubscribers $PlaylistDetailPlaylistSubscribersFromJson( - Map json) { - final PlaylistDetailPlaylistSubscribers playlistDetailPlaylistSubscribers = PlaylistDetailPlaylistSubscribers(); - final bool? defaultAvatar = jsonConvert.convert(json['defaultAvatar']); - if (defaultAvatar != null) { - playlistDetailPlaylistSubscribers.defaultAvatar = defaultAvatar; - } - final int? province = jsonConvert.convert(json['province']); - if (province != null) { - playlistDetailPlaylistSubscribers.province = province; - } - final int? authStatus = jsonConvert.convert(json['authStatus']); - if (authStatus != null) { - playlistDetailPlaylistSubscribers.authStatus = authStatus; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - playlistDetailPlaylistSubscribers.followed = followed; - } - final String? avatarUrl = jsonConvert.convert(json['avatarUrl']); - if (avatarUrl != null) { - playlistDetailPlaylistSubscribers.avatarUrl = avatarUrl; - } - final int? accountStatus = jsonConvert.convert(json['accountStatus']); - if (accountStatus != null) { - playlistDetailPlaylistSubscribers.accountStatus = accountStatus; - } - final int? gender = jsonConvert.convert(json['gender']); - if (gender != null) { - playlistDetailPlaylistSubscribers.gender = gender; - } - final int? city = jsonConvert.convert(json['city']); - if (city != null) { - playlistDetailPlaylistSubscribers.city = city; - } - final int? birthday = jsonConvert.convert(json['birthday']); - if (birthday != null) { - playlistDetailPlaylistSubscribers.birthday = birthday; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - playlistDetailPlaylistSubscribers.userId = userId; - } - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - playlistDetailPlaylistSubscribers.userType = userType; - } - final String? nickname = jsonConvert.convert(json['nickname']); - if (nickname != null) { - playlistDetailPlaylistSubscribers.nickname = nickname; - } - final String? signature = jsonConvert.convert(json['signature']); - if (signature != null) { - playlistDetailPlaylistSubscribers.signature = signature; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - playlistDetailPlaylistSubscribers.description = description; - } - final String? detailDescription = jsonConvert.convert(json['detailDescription']); - if (detailDescription != null) { - playlistDetailPlaylistSubscribers.detailDescription = detailDescription; - } - final int? avatarImgId = jsonConvert.convert(json['avatarImgId']); - if (avatarImgId != null) { - playlistDetailPlaylistSubscribers.avatarImgId = avatarImgId; - } - final int? backgroundImgId = jsonConvert.convert(json['backgroundImgId']); - if (backgroundImgId != null) { - playlistDetailPlaylistSubscribers.backgroundImgId = backgroundImgId; - } - final String? backgroundUrl = jsonConvert.convert(json['backgroundUrl']); - if (backgroundUrl != null) { - playlistDetailPlaylistSubscribers.backgroundUrl = backgroundUrl; - } - final int? authority = jsonConvert.convert(json['authority']); - if (authority != null) { - playlistDetailPlaylistSubscribers.authority = authority; - } - final bool? mutual = jsonConvert.convert(json['mutual']); - if (mutual != null) { - playlistDetailPlaylistSubscribers.mutual = mutual; - } - final dynamic expertTags = json['expertTags']; - if (expertTags != null) { - playlistDetailPlaylistSubscribers.expertTags = expertTags; - } - final dynamic experts = json['experts']; - if (experts != null) { - playlistDetailPlaylistSubscribers.experts = experts; - } - final int? djStatus = jsonConvert.convert(json['djStatus']); - if (djStatus != null) { - playlistDetailPlaylistSubscribers.djStatus = djStatus; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - playlistDetailPlaylistSubscribers.vipType = vipType; - } - final dynamic remarkName = json['remarkName']; - if (remarkName != null) { - playlistDetailPlaylistSubscribers.remarkName = remarkName; - } - final int? authenticationTypes = jsonConvert.convert(json['authenticationTypes']); - if (authenticationTypes != null) { - playlistDetailPlaylistSubscribers.authenticationTypes = authenticationTypes; - } - final dynamic avatarDetail = json['avatarDetail']; - if (avatarDetail != null) { - playlistDetailPlaylistSubscribers.avatarDetail = avatarDetail; - } - final String? avatarImgIdStr = jsonConvert.convert(json['avatarImgIdStr']); - if (avatarImgIdStr != null) { - playlistDetailPlaylistSubscribers.avatarImgIdStr = avatarImgIdStr; - } - final String? backgroundImgIdStr = jsonConvert.convert(json['backgroundImgIdStr']); - if (backgroundImgIdStr != null) { - playlistDetailPlaylistSubscribers.backgroundImgIdStr = backgroundImgIdStr; - } - final bool? anchor = jsonConvert.convert(json['anchor']); - if (anchor != null) { - playlistDetailPlaylistSubscribers.anchor = anchor; - } - final String? avatarimgidStr = jsonConvert.convert(json['avatarImgId_str']); - if (avatarimgidStr != null) { - playlistDetailPlaylistSubscribers.avatarimgidStr = avatarimgidStr; - } - return playlistDetailPlaylistSubscribers; -} - -Map $PlaylistDetailPlaylistSubscribersToJson( - PlaylistDetailPlaylistSubscribers entity) { - final Map data = {}; - data['defaultAvatar'] = entity.defaultAvatar; - data['province'] = entity.province; - data['authStatus'] = entity.authStatus; - data['followed'] = entity.followed; - data['avatarUrl'] = entity.avatarUrl; - data['accountStatus'] = entity.accountStatus; - data['gender'] = entity.gender; - data['city'] = entity.city; - data['birthday'] = entity.birthday; - data['userId'] = entity.userId; - data['userType'] = entity.userType; - data['nickname'] = entity.nickname; - data['signature'] = entity.signature; - data['description'] = entity.description; - data['detailDescription'] = entity.detailDescription; - data['avatarImgId'] = entity.avatarImgId; - data['backgroundImgId'] = entity.backgroundImgId; - data['backgroundUrl'] = entity.backgroundUrl; - data['authority'] = entity.authority; - data['mutual'] = entity.mutual; - data['expertTags'] = entity.expertTags; - data['experts'] = entity.experts; - data['djStatus'] = entity.djStatus; - data['vipType'] = entity.vipType; - data['remarkName'] = entity.remarkName; - data['authenticationTypes'] = entity.authenticationTypes; - data['avatarDetail'] = entity.avatarDetail; - data['avatarImgIdStr'] = entity.avatarImgIdStr; - data['backgroundImgIdStr'] = entity.backgroundImgIdStr; - data['anchor'] = entity.anchor; - data['avatarImgId_str'] = entity.avatarimgidStr; - return data; -} - -extension PlaylistDetailPlaylistSubscribersExtension on PlaylistDetailPlaylistSubscribers { - PlaylistDetailPlaylistSubscribers copyWith({ - bool? defaultAvatar, - int? province, - int? authStatus, - bool? followed, - String? avatarUrl, - int? accountStatus, - int? gender, - int? city, - int? birthday, - int? userId, - int? userType, - String? nickname, - String? signature, - String? description, - String? detailDescription, - int? avatarImgId, - int? backgroundImgId, - String? backgroundUrl, - int? authority, - bool? mutual, - dynamic expertTags, - dynamic experts, - int? djStatus, - int? vipType, - dynamic remarkName, - int? authenticationTypes, - dynamic avatarDetail, - String? avatarImgIdStr, - String? backgroundImgIdStr, - bool? anchor, - String? avatarimgidStr, - }) { - return PlaylistDetailPlaylistSubscribers() - ..defaultAvatar = defaultAvatar ?? this.defaultAvatar - ..province = province ?? this.province - ..authStatus = authStatus ?? this.authStatus - ..followed = followed ?? this.followed - ..avatarUrl = avatarUrl ?? this.avatarUrl - ..accountStatus = accountStatus ?? this.accountStatus - ..gender = gender ?? this.gender - ..city = city ?? this.city - ..birthday = birthday ?? this.birthday - ..userId = userId ?? this.userId - ..userType = userType ?? this.userType - ..nickname = nickname ?? this.nickname - ..signature = signature ?? this.signature - ..description = description ?? this.description - ..detailDescription = detailDescription ?? this.detailDescription - ..avatarImgId = avatarImgId ?? this.avatarImgId - ..backgroundImgId = backgroundImgId ?? this.backgroundImgId - ..backgroundUrl = backgroundUrl ?? this.backgroundUrl - ..authority = authority ?? this.authority - ..mutual = mutual ?? this.mutual - ..expertTags = expertTags ?? this.expertTags - ..experts = experts ?? this.experts - ..djStatus = djStatus ?? this.djStatus - ..vipType = vipType ?? this.vipType - ..remarkName = remarkName ?? this.remarkName - ..authenticationTypes = authenticationTypes ?? this.authenticationTypes - ..avatarDetail = avatarDetail ?? this.avatarDetail - ..avatarImgIdStr = avatarImgIdStr ?? this.avatarImgIdStr - ..backgroundImgIdStr = backgroundImgIdStr ?? this.backgroundImgIdStr - ..anchor = anchor ?? this.anchor - ..avatarimgidStr = avatarimgidStr ?? this.avatarimgidStr; - } -} - -PlaylistDetailPlaylistCreator $PlaylistDetailPlaylistCreatorFromJson(Map json) { - final PlaylistDetailPlaylistCreator playlistDetailPlaylistCreator = PlaylistDetailPlaylistCreator(); - final bool? defaultAvatar = jsonConvert.convert(json['defaultAvatar']); - if (defaultAvatar != null) { - playlistDetailPlaylistCreator.defaultAvatar = defaultAvatar; - } - final int? province = jsonConvert.convert(json['province']); - if (province != null) { - playlistDetailPlaylistCreator.province = province; - } - final int? authStatus = jsonConvert.convert(json['authStatus']); - if (authStatus != null) { - playlistDetailPlaylistCreator.authStatus = authStatus; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - playlistDetailPlaylistCreator.followed = followed; - } - final String? avatarUrl = jsonConvert.convert(json['avatarUrl']); - if (avatarUrl != null) { - playlistDetailPlaylistCreator.avatarUrl = avatarUrl; - } - final int? accountStatus = jsonConvert.convert(json['accountStatus']); - if (accountStatus != null) { - playlistDetailPlaylistCreator.accountStatus = accountStatus; - } - final int? gender = jsonConvert.convert(json['gender']); - if (gender != null) { - playlistDetailPlaylistCreator.gender = gender; - } - final int? city = jsonConvert.convert(json['city']); - if (city != null) { - playlistDetailPlaylistCreator.city = city; - } - final int? birthday = jsonConvert.convert(json['birthday']); - if (birthday != null) { - playlistDetailPlaylistCreator.birthday = birthday; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - playlistDetailPlaylistCreator.userId = userId; - } - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - playlistDetailPlaylistCreator.userType = userType; - } - final String? nickname = jsonConvert.convert(json['nickname']); - if (nickname != null) { - playlistDetailPlaylistCreator.nickname = nickname; - } - final String? signature = jsonConvert.convert(json['signature']); - if (signature != null) { - playlistDetailPlaylistCreator.signature = signature; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - playlistDetailPlaylistCreator.description = description; - } - final String? detailDescription = jsonConvert.convert(json['detailDescription']); - if (detailDescription != null) { - playlistDetailPlaylistCreator.detailDescription = detailDescription; - } - final int? avatarImgId = jsonConvert.convert(json['avatarImgId']); - if (avatarImgId != null) { - playlistDetailPlaylistCreator.avatarImgId = avatarImgId; - } - final int? backgroundImgId = jsonConvert.convert(json['backgroundImgId']); - if (backgroundImgId != null) { - playlistDetailPlaylistCreator.backgroundImgId = backgroundImgId; - } - final String? backgroundUrl = jsonConvert.convert(json['backgroundUrl']); - if (backgroundUrl != null) { - playlistDetailPlaylistCreator.backgroundUrl = backgroundUrl; - } - final int? authority = jsonConvert.convert(json['authority']); - if (authority != null) { - playlistDetailPlaylistCreator.authority = authority; - } - final bool? mutual = jsonConvert.convert(json['mutual']); - if (mutual != null) { - playlistDetailPlaylistCreator.mutual = mutual; - } - final dynamic expertTags = json['expertTags']; - if (expertTags != null) { - playlistDetailPlaylistCreator.expertTags = expertTags; - } - final dynamic experts = json['experts']; - if (experts != null) { - playlistDetailPlaylistCreator.experts = experts; - } - final int? djStatus = jsonConvert.convert(json['djStatus']); - if (djStatus != null) { - playlistDetailPlaylistCreator.djStatus = djStatus; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - playlistDetailPlaylistCreator.vipType = vipType; - } - final dynamic remarkName = json['remarkName']; - if (remarkName != null) { - playlistDetailPlaylistCreator.remarkName = remarkName; - } - final int? authenticationTypes = jsonConvert.convert(json['authenticationTypes']); - if (authenticationTypes != null) { - playlistDetailPlaylistCreator.authenticationTypes = authenticationTypes; - } - final PlaylistDetailPlaylistCreatorAvatarDetail? avatarDetail = jsonConvert.convert< - PlaylistDetailPlaylistCreatorAvatarDetail>(json['avatarDetail']); - if (avatarDetail != null) { - playlistDetailPlaylistCreator.avatarDetail = avatarDetail; - } - final String? avatarImgIdStr = jsonConvert.convert(json['avatarImgIdStr']); - if (avatarImgIdStr != null) { - playlistDetailPlaylistCreator.avatarImgIdStr = avatarImgIdStr; - } - final String? backgroundImgIdStr = jsonConvert.convert(json['backgroundImgIdStr']); - if (backgroundImgIdStr != null) { - playlistDetailPlaylistCreator.backgroundImgIdStr = backgroundImgIdStr; - } - final bool? anchor = jsonConvert.convert(json['anchor']); - if (anchor != null) { - playlistDetailPlaylistCreator.anchor = anchor; - } - final String? avatarimgidStr = jsonConvert.convert(json['avatarImgId_str']); - if (avatarimgidStr != null) { - playlistDetailPlaylistCreator.avatarimgidStr = avatarimgidStr; - } - return playlistDetailPlaylistCreator; -} - -Map $PlaylistDetailPlaylistCreatorToJson(PlaylistDetailPlaylistCreator entity) { - final Map data = {}; - data['defaultAvatar'] = entity.defaultAvatar; - data['province'] = entity.province; - data['authStatus'] = entity.authStatus; - data['followed'] = entity.followed; - data['avatarUrl'] = entity.avatarUrl; - data['accountStatus'] = entity.accountStatus; - data['gender'] = entity.gender; - data['city'] = entity.city; - data['birthday'] = entity.birthday; - data['userId'] = entity.userId; - data['userType'] = entity.userType; - data['nickname'] = entity.nickname; - data['signature'] = entity.signature; - data['description'] = entity.description; - data['detailDescription'] = entity.detailDescription; - data['avatarImgId'] = entity.avatarImgId; - data['backgroundImgId'] = entity.backgroundImgId; - data['backgroundUrl'] = entity.backgroundUrl; - data['authority'] = entity.authority; - data['mutual'] = entity.mutual; - data['expertTags'] = entity.expertTags; - data['experts'] = entity.experts; - data['djStatus'] = entity.djStatus; - data['vipType'] = entity.vipType; - data['remarkName'] = entity.remarkName; - data['authenticationTypes'] = entity.authenticationTypes; - data['avatarDetail'] = entity.avatarDetail?.toJson(); - data['avatarImgIdStr'] = entity.avatarImgIdStr; - data['backgroundImgIdStr'] = entity.backgroundImgIdStr; - data['anchor'] = entity.anchor; - data['avatarImgId_str'] = entity.avatarimgidStr; - return data; -} - -extension PlaylistDetailPlaylistCreatorExtension on PlaylistDetailPlaylistCreator { - PlaylistDetailPlaylistCreator copyWith({ - bool? defaultAvatar, - int? province, - int? authStatus, - bool? followed, - String? avatarUrl, - int? accountStatus, - int? gender, - int? city, - int? birthday, - int? userId, - int? userType, - String? nickname, - String? signature, - String? description, - String? detailDescription, - int? avatarImgId, - int? backgroundImgId, - String? backgroundUrl, - int? authority, - bool? mutual, - dynamic expertTags, - dynamic experts, - int? djStatus, - int? vipType, - dynamic remarkName, - int? authenticationTypes, - PlaylistDetailPlaylistCreatorAvatarDetail? avatarDetail, - String? avatarImgIdStr, - String? backgroundImgIdStr, - bool? anchor, - String? avatarimgidStr, - }) { - return PlaylistDetailPlaylistCreator() - ..defaultAvatar = defaultAvatar ?? this.defaultAvatar - ..province = province ?? this.province - ..authStatus = authStatus ?? this.authStatus - ..followed = followed ?? this.followed - ..avatarUrl = avatarUrl ?? this.avatarUrl - ..accountStatus = accountStatus ?? this.accountStatus - ..gender = gender ?? this.gender - ..city = city ?? this.city - ..birthday = birthday ?? this.birthday - ..userId = userId ?? this.userId - ..userType = userType ?? this.userType - ..nickname = nickname ?? this.nickname - ..signature = signature ?? this.signature - ..description = description ?? this.description - ..detailDescription = detailDescription ?? this.detailDescription - ..avatarImgId = avatarImgId ?? this.avatarImgId - ..backgroundImgId = backgroundImgId ?? this.backgroundImgId - ..backgroundUrl = backgroundUrl ?? this.backgroundUrl - ..authority = authority ?? this.authority - ..mutual = mutual ?? this.mutual - ..expertTags = expertTags ?? this.expertTags - ..experts = experts ?? this.experts - ..djStatus = djStatus ?? this.djStatus - ..vipType = vipType ?? this.vipType - ..remarkName = remarkName ?? this.remarkName - ..authenticationTypes = authenticationTypes ?? this.authenticationTypes - ..avatarDetail = avatarDetail ?? this.avatarDetail - ..avatarImgIdStr = avatarImgIdStr ?? this.avatarImgIdStr - ..backgroundImgIdStr = backgroundImgIdStr ?? this.backgroundImgIdStr - ..anchor = anchor ?? this.anchor - ..avatarimgidStr = avatarimgidStr ?? this.avatarimgidStr; - } -} - -PlaylistDetailPlaylistCreatorAvatarDetail $PlaylistDetailPlaylistCreatorAvatarDetailFromJson( - Map json) { - final PlaylistDetailPlaylistCreatorAvatarDetail playlistDetailPlaylistCreatorAvatarDetail = PlaylistDetailPlaylistCreatorAvatarDetail(); - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - playlistDetailPlaylistCreatorAvatarDetail.userType = userType; - } - final int? identityLevel = jsonConvert.convert(json['identityLevel']); - if (identityLevel != null) { - playlistDetailPlaylistCreatorAvatarDetail.identityLevel = identityLevel; - } - final String? identityIconUrl = jsonConvert.convert(json['identityIconUrl']); - if (identityIconUrl != null) { - playlistDetailPlaylistCreatorAvatarDetail.identityIconUrl = identityIconUrl; - } - return playlistDetailPlaylistCreatorAvatarDetail; -} - -Map $PlaylistDetailPlaylistCreatorAvatarDetailToJson( - PlaylistDetailPlaylistCreatorAvatarDetail entity) { - final Map data = {}; - data['userType'] = entity.userType; - data['identityLevel'] = entity.identityLevel; - data['identityIconUrl'] = entity.identityIconUrl; - return data; -} - -extension PlaylistDetailPlaylistCreatorAvatarDetailExtension on PlaylistDetailPlaylistCreatorAvatarDetail { - PlaylistDetailPlaylistCreatorAvatarDetail copyWith({ - int? userType, - int? identityLevel, - String? identityIconUrl, - }) { - return PlaylistDetailPlaylistCreatorAvatarDetail() - ..userType = userType ?? this.userType - ..identityLevel = identityLevel ?? this.identityLevel - ..identityIconUrl = identityIconUrl ?? this.identityIconUrl; - } -} - -PlaylistDetailPlaylistTracks $PlaylistDetailPlaylistTracksFromJson(Map json) { - final PlaylistDetailPlaylistTracks playlistDetailPlaylistTracks = PlaylistDetailPlaylistTracks(); - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - playlistDetailPlaylistTracks.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - playlistDetailPlaylistTracks.id = id; - } - final int? pst = jsonConvert.convert(json['pst']); - if (pst != null) { - playlistDetailPlaylistTracks.pst = pst; - } - final int? t = jsonConvert.convert(json['t']); - if (t != null) { - playlistDetailPlaylistTracks.t = t; - } - final List? ar = (json['ar'] as List?) - ?.map( - (e) => - jsonConvert.convert(e) as PlaylistDetailPlaylistTracksAr) - .toList(); - if (ar != null) { - playlistDetailPlaylistTracks.ar = ar; - } - final List? alia = (json['alia'] as List?)?.map( - (e) => e).toList(); - if (alia != null) { - playlistDetailPlaylistTracks.alia = alia; - } - final double? pop = jsonConvert.convert(json['pop']); - if (pop != null) { - playlistDetailPlaylistTracks.pop = pop; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - playlistDetailPlaylistTracks.st = st; - } - final String? rt = jsonConvert.convert(json['rt']); - if (rt != null) { - playlistDetailPlaylistTracks.rt = rt; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - playlistDetailPlaylistTracks.fee = fee; - } - final int? v = jsonConvert.convert(json['v']); - if (v != null) { - playlistDetailPlaylistTracks.v = v; - } - final dynamic crbt = json['crbt']; - if (crbt != null) { - playlistDetailPlaylistTracks.crbt = crbt; - } - final String? cf = jsonConvert.convert(json['cf']); - if (cf != null) { - playlistDetailPlaylistTracks.cf = cf; - } - final PlaylistDetailPlaylistTracksAl? al = jsonConvert.convert( - json['al']); - if (al != null) { - playlistDetailPlaylistTracks.al = al; - } - final int? dt = jsonConvert.convert(json['dt']); - if (dt != null) { - playlistDetailPlaylistTracks.dt = dt; - } - final PlaylistDetailPlaylistTracksH? h = jsonConvert.convert( - json['h']); - if (h != null) { - playlistDetailPlaylistTracks.h = h; - } - final PlaylistDetailPlaylistTracksM? m = jsonConvert.convert( - json['m']); - if (m != null) { - playlistDetailPlaylistTracks.m = m; - } - final PlaylistDetailPlaylistTracksL? l = jsonConvert.convert( - json['l']); - if (l != null) { - playlistDetailPlaylistTracks.l = l; - } - final PlaylistDetailPlaylistTracksSq? sq = jsonConvert.convert( - json['sq']); - if (sq != null) { - playlistDetailPlaylistTracks.sq = sq; - } - final PlaylistDetailPlaylistTracksHr? hr = jsonConvert.convert( - json['hr']); - if (hr != null) { - playlistDetailPlaylistTracks.hr = hr; - } - final dynamic a = json['a']; - if (a != null) { - playlistDetailPlaylistTracks.a = a; - } - final String? cd = jsonConvert.convert(json['cd']); - if (cd != null) { - playlistDetailPlaylistTracks.cd = cd; - } - final int? no = jsonConvert.convert(json['no']); - if (no != null) { - playlistDetailPlaylistTracks.no = no; - } - final dynamic rtUrl = json['rtUrl']; - if (rtUrl != null) { - playlistDetailPlaylistTracks.rtUrl = rtUrl; - } - final int? ftype = jsonConvert.convert(json['ftype']); - if (ftype != null) { - playlistDetailPlaylistTracks.ftype = ftype; - } - final List? rtUrls = (json['rtUrls'] as List?)?.map( - (e) => e).toList(); - if (rtUrls != null) { - playlistDetailPlaylistTracks.rtUrls = rtUrls; - } - final int? djId = jsonConvert.convert(json['djId']); - if (djId != null) { - playlistDetailPlaylistTracks.djId = djId; - } - final int? copyright = jsonConvert.convert(json['copyright']); - if (copyright != null) { - playlistDetailPlaylistTracks.copyright = copyright; - } - final int? sId = jsonConvert.convert(json['s_id']); - if (sId != null) { - playlistDetailPlaylistTracks.sId = sId; - } - final int? mark = jsonConvert.convert(json['mark']); - if (mark != null) { - playlistDetailPlaylistTracks.mark = mark; - } - final int? originCoverType = jsonConvert.convert(json['originCoverType']); - if (originCoverType != null) { - playlistDetailPlaylistTracks.originCoverType = originCoverType; - } - final dynamic originSongSimpleData = json['originSongSimpleData']; - if (originSongSimpleData != null) { - playlistDetailPlaylistTracks.originSongSimpleData = originSongSimpleData; - } - final dynamic tagPicList = json['tagPicList']; - if (tagPicList != null) { - playlistDetailPlaylistTracks.tagPicList = tagPicList; - } - final bool? resourceState = jsonConvert.convert(json['resourceState']); - if (resourceState != null) { - playlistDetailPlaylistTracks.resourceState = resourceState; - } - final int? version = jsonConvert.convert(json['version']); - if (version != null) { - playlistDetailPlaylistTracks.version = version; - } - final dynamic songJumpInfo = json['songJumpInfo']; - if (songJumpInfo != null) { - playlistDetailPlaylistTracks.songJumpInfo = songJumpInfo; - } - final dynamic entertainmentTags = json['entertainmentTags']; - if (entertainmentTags != null) { - playlistDetailPlaylistTracks.entertainmentTags = entertainmentTags; - } - final dynamic awardTags = json['awardTags']; - if (awardTags != null) { - playlistDetailPlaylistTracks.awardTags = awardTags; - } - final int? single = jsonConvert.convert(json['single']); - if (single != null) { - playlistDetailPlaylistTracks.single = single; - } - final dynamic noCopyrightRcmd = json['noCopyrightRcmd']; - if (noCopyrightRcmd != null) { - playlistDetailPlaylistTracks.noCopyrightRcmd = noCopyrightRcmd; - } - final String? alg = jsonConvert.convert(json['alg']); - if (alg != null) { - playlistDetailPlaylistTracks.alg = alg; - } - final dynamic displayReason = json['displayReason']; - if (displayReason != null) { - playlistDetailPlaylistTracks.displayReason = displayReason; - } - final int? rtype = jsonConvert.convert(json['rtype']); - if (rtype != null) { - playlistDetailPlaylistTracks.rtype = rtype; - } - final dynamic rurl = json['rurl']; - if (rurl != null) { - playlistDetailPlaylistTracks.rurl = rurl; - } - final int? mst = jsonConvert.convert(json['mst']); - if (mst != null) { - playlistDetailPlaylistTracks.mst = mst; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - playlistDetailPlaylistTracks.cp = cp; - } - final int? mv = jsonConvert.convert(json['mv']); - if (mv != null) { - playlistDetailPlaylistTracks.mv = mv; - } - final int? publishTime = jsonConvert.convert(json['publishTime']); - if (publishTime != null) { - playlistDetailPlaylistTracks.publishTime = publishTime; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (tns != null) { - playlistDetailPlaylistTracks.tns = tns; - } - return playlistDetailPlaylistTracks; -} - -Map $PlaylistDetailPlaylistTracksToJson(PlaylistDetailPlaylistTracks entity) { - final Map data = {}; - data['name'] = entity.name; - data['id'] = entity.id; - data['pst'] = entity.pst; - data['t'] = entity.t; - data['ar'] = entity.ar?.map((v) => v.toJson()).toList(); - data['alia'] = entity.alia; - data['pop'] = entity.pop; - data['st'] = entity.st; - data['rt'] = entity.rt; - data['fee'] = entity.fee; - data['v'] = entity.v; - data['crbt'] = entity.crbt; - data['cf'] = entity.cf; - data['al'] = entity.al?.toJson(); - data['dt'] = entity.dt; - data['h'] = entity.h?.toJson(); - data['m'] = entity.m?.toJson(); - data['l'] = entity.l?.toJson(); - data['sq'] = entity.sq?.toJson(); - data['hr'] = entity.hr?.toJson(); - data['a'] = entity.a; - data['cd'] = entity.cd; - data['no'] = entity.no; - data['rtUrl'] = entity.rtUrl; - data['ftype'] = entity.ftype; - data['rtUrls'] = entity.rtUrls; - data['djId'] = entity.djId; - data['copyright'] = entity.copyright; - data['s_id'] = entity.sId; - data['mark'] = entity.mark; - data['originCoverType'] = entity.originCoverType; - data['originSongSimpleData'] = entity.originSongSimpleData; - data['tagPicList'] = entity.tagPicList; - data['resourceState'] = entity.resourceState; - data['version'] = entity.version; - data['songJumpInfo'] = entity.songJumpInfo; - data['entertainmentTags'] = entity.entertainmentTags; - data['awardTags'] = entity.awardTags; - data['single'] = entity.single; - data['noCopyrightRcmd'] = entity.noCopyrightRcmd; - data['alg'] = entity.alg; - data['displayReason'] = entity.displayReason; - data['rtype'] = entity.rtype; - data['rurl'] = entity.rurl; - data['mst'] = entity.mst; - data['cp'] = entity.cp; - data['mv'] = entity.mv; - data['publishTime'] = entity.publishTime; - data['tns'] = entity.tns; - return data; -} - -extension PlaylistDetailPlaylistTracksExtension on PlaylistDetailPlaylistTracks { - PlaylistDetailPlaylistTracks copyWith({ - String? name, - int? id, - int? pst, - int? t, - List? ar, - List? alia, - double? pop, - int? st, - String? rt, - int? fee, - int? v, - dynamic crbt, - String? cf, - PlaylistDetailPlaylistTracksAl? al, - int? dt, - PlaylistDetailPlaylistTracksH? h, - PlaylistDetailPlaylistTracksM? m, - PlaylistDetailPlaylistTracksL? l, - PlaylistDetailPlaylistTracksSq? sq, - PlaylistDetailPlaylistTracksHr? hr, - dynamic a, - String? cd, - int? no, - dynamic rtUrl, - int? ftype, - List? rtUrls, - int? djId, - int? copyright, - int? sId, - int? mark, - int? originCoverType, - dynamic originSongSimpleData, - dynamic tagPicList, - bool? resourceState, - int? version, - dynamic songJumpInfo, - dynamic entertainmentTags, - dynamic awardTags, - int? single, - dynamic noCopyrightRcmd, - String? alg, - dynamic displayReason, - int? rtype, - dynamic rurl, - int? mst, - int? cp, - int? mv, - int? publishTime, - List? tns, - }) { - return PlaylistDetailPlaylistTracks() - ..name = name ?? this.name - ..id = id ?? this.id - ..pst = pst ?? this.pst - ..t = t ?? this.t - ..ar = ar ?? this.ar - ..alia = alia ?? this.alia - ..pop = pop ?? this.pop - ..st = st ?? this.st - ..rt = rt ?? this.rt - ..fee = fee ?? this.fee - ..v = v ?? this.v - ..crbt = crbt ?? this.crbt - ..cf = cf ?? this.cf - ..al = al ?? this.al - ..dt = dt ?? this.dt - ..h = h ?? this.h - ..m = m ?? this.m - ..l = l ?? this.l - ..sq = sq ?? this.sq - ..hr = hr ?? this.hr - ..a = a ?? this.a - ..cd = cd ?? this.cd - ..no = no ?? this.no - ..rtUrl = rtUrl ?? this.rtUrl - ..ftype = ftype ?? this.ftype - ..rtUrls = rtUrls ?? this.rtUrls - ..djId = djId ?? this.djId - ..copyright = copyright ?? this.copyright - ..sId = sId ?? this.sId - ..mark = mark ?? this.mark - ..originCoverType = originCoverType ?? this.originCoverType - ..originSongSimpleData = originSongSimpleData ?? this.originSongSimpleData - ..tagPicList = tagPicList ?? this.tagPicList - ..resourceState = resourceState ?? this.resourceState - ..version = version ?? this.version - ..songJumpInfo = songJumpInfo ?? this.songJumpInfo - ..entertainmentTags = entertainmentTags ?? this.entertainmentTags - ..awardTags = awardTags ?? this.awardTags - ..single = single ?? this.single - ..noCopyrightRcmd = noCopyrightRcmd ?? this.noCopyrightRcmd - ..alg = alg ?? this.alg - ..displayReason = displayReason ?? this.displayReason - ..rtype = rtype ?? this.rtype - ..rurl = rurl ?? this.rurl - ..mst = mst ?? this.mst - ..cp = cp ?? this.cp - ..mv = mv ?? this.mv - ..publishTime = publishTime ?? this.publishTime - ..tns = tns ?? this.tns; - } -} - -PlaylistDetailPlaylistTracksAr $PlaylistDetailPlaylistTracksArFromJson(Map json) { - final PlaylistDetailPlaylistTracksAr playlistDetailPlaylistTracksAr = PlaylistDetailPlaylistTracksAr(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - playlistDetailPlaylistTracksAr.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - playlistDetailPlaylistTracksAr.name = name; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => e).toList(); - if (tns != null) { - playlistDetailPlaylistTracksAr.tns = tns; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - playlistDetailPlaylistTracksAr.alias = alias; - } - return playlistDetailPlaylistTracksAr; -} - -Map $PlaylistDetailPlaylistTracksArToJson(PlaylistDetailPlaylistTracksAr entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['tns'] = entity.tns; - data['alias'] = entity.alias; - return data; -} - -extension PlaylistDetailPlaylistTracksArExtension on PlaylistDetailPlaylistTracksAr { - PlaylistDetailPlaylistTracksAr copyWith({ - int? id, - String? name, - List? tns, - List? alias, - }) { - return PlaylistDetailPlaylistTracksAr() - ..id = id ?? this.id - ..name = name ?? this.name - ..tns = tns ?? this.tns - ..alias = alias ?? this.alias; - } -} - -PlaylistDetailPlaylistTracksAl $PlaylistDetailPlaylistTracksAlFromJson(Map json) { - final PlaylistDetailPlaylistTracksAl playlistDetailPlaylistTracksAl = PlaylistDetailPlaylistTracksAl(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - playlistDetailPlaylistTracksAl.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - playlistDetailPlaylistTracksAl.name = name; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - playlistDetailPlaylistTracksAl.picUrl = picUrl; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => e).toList(); - if (tns != null) { - playlistDetailPlaylistTracksAl.tns = tns; - } - final String? picStr = jsonConvert.convert(json['pic_str']); - if (picStr != null) { - playlistDetailPlaylistTracksAl.picStr = picStr; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - playlistDetailPlaylistTracksAl.pic = pic; - } - return playlistDetailPlaylistTracksAl; -} - -Map $PlaylistDetailPlaylistTracksAlToJson(PlaylistDetailPlaylistTracksAl entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['picUrl'] = entity.picUrl; - data['tns'] = entity.tns; - data['pic_str'] = entity.picStr; - data['pic'] = entity.pic; - return data; -} - -extension PlaylistDetailPlaylistTracksAlExtension on PlaylistDetailPlaylistTracksAl { - PlaylistDetailPlaylistTracksAl copyWith({ - int? id, - String? name, - String? picUrl, - List? tns, - String? picStr, - int? pic, - }) { - return PlaylistDetailPlaylistTracksAl() - ..id = id ?? this.id - ..name = name ?? this.name - ..picUrl = picUrl ?? this.picUrl - ..tns = tns ?? this.tns - ..picStr = picStr ?? this.picStr - ..pic = pic ?? this.pic; - } -} - -PlaylistDetailPlaylistTracksH $PlaylistDetailPlaylistTracksHFromJson(Map json) { - final PlaylistDetailPlaylistTracksH playlistDetailPlaylistTracksH = PlaylistDetailPlaylistTracksH(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - playlistDetailPlaylistTracksH.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - playlistDetailPlaylistTracksH.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - playlistDetailPlaylistTracksH.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - playlistDetailPlaylistTracksH.vd = vd; - } - return playlistDetailPlaylistTracksH; -} - -Map $PlaylistDetailPlaylistTracksHToJson(PlaylistDetailPlaylistTracksH entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - return data; -} - -extension PlaylistDetailPlaylistTracksHExtension on PlaylistDetailPlaylistTracksH { - PlaylistDetailPlaylistTracksH copyWith({ - int? br, - int? fid, - int? size, - double? vd, - }) { - return PlaylistDetailPlaylistTracksH() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd; - } -} - -PlaylistDetailPlaylistTracksM $PlaylistDetailPlaylistTracksMFromJson(Map json) { - final PlaylistDetailPlaylistTracksM playlistDetailPlaylistTracksM = PlaylistDetailPlaylistTracksM(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - playlistDetailPlaylistTracksM.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - playlistDetailPlaylistTracksM.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - playlistDetailPlaylistTracksM.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - playlistDetailPlaylistTracksM.vd = vd; - } - return playlistDetailPlaylistTracksM; -} - -Map $PlaylistDetailPlaylistTracksMToJson(PlaylistDetailPlaylistTracksM entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - return data; -} - -extension PlaylistDetailPlaylistTracksMExtension on PlaylistDetailPlaylistTracksM { - PlaylistDetailPlaylistTracksM copyWith({ - int? br, - int? fid, - int? size, - double? vd, - }) { - return PlaylistDetailPlaylistTracksM() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd; - } -} - -PlaylistDetailPlaylistTracksL $PlaylistDetailPlaylistTracksLFromJson(Map json) { - final PlaylistDetailPlaylistTracksL playlistDetailPlaylistTracksL = PlaylistDetailPlaylistTracksL(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - playlistDetailPlaylistTracksL.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - playlistDetailPlaylistTracksL.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - playlistDetailPlaylistTracksL.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - playlistDetailPlaylistTracksL.vd = vd; - } - return playlistDetailPlaylistTracksL; -} - -Map $PlaylistDetailPlaylistTracksLToJson(PlaylistDetailPlaylistTracksL entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - return data; -} - -extension PlaylistDetailPlaylistTracksLExtension on PlaylistDetailPlaylistTracksL { - PlaylistDetailPlaylistTracksL copyWith({ - int? br, - int? fid, - int? size, - double? vd, - }) { - return PlaylistDetailPlaylistTracksL() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd; - } -} - -PlaylistDetailPlaylistTracksSq $PlaylistDetailPlaylistTracksSqFromJson(Map json) { - final PlaylistDetailPlaylistTracksSq playlistDetailPlaylistTracksSq = PlaylistDetailPlaylistTracksSq(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - playlistDetailPlaylistTracksSq.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - playlistDetailPlaylistTracksSq.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - playlistDetailPlaylistTracksSq.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - playlistDetailPlaylistTracksSq.vd = vd; - } - return playlistDetailPlaylistTracksSq; -} - -Map $PlaylistDetailPlaylistTracksSqToJson(PlaylistDetailPlaylistTracksSq entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - return data; -} - -extension PlaylistDetailPlaylistTracksSqExtension on PlaylistDetailPlaylistTracksSq { - PlaylistDetailPlaylistTracksSq copyWith({ - int? br, - int? fid, - int? size, - double? vd, - }) { - return PlaylistDetailPlaylistTracksSq() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd; - } -} - -PlaylistDetailPlaylistTracksHr $PlaylistDetailPlaylistTracksHrFromJson(Map json) { - final PlaylistDetailPlaylistTracksHr playlistDetailPlaylistTracksHr = PlaylistDetailPlaylistTracksHr(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - playlistDetailPlaylistTracksHr.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - playlistDetailPlaylistTracksHr.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - playlistDetailPlaylistTracksHr.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - playlistDetailPlaylistTracksHr.vd = vd; - } - return playlistDetailPlaylistTracksHr; -} - -Map $PlaylistDetailPlaylistTracksHrToJson(PlaylistDetailPlaylistTracksHr entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - return data; -} - -extension PlaylistDetailPlaylistTracksHrExtension on PlaylistDetailPlaylistTracksHr { - PlaylistDetailPlaylistTracksHr copyWith({ - int? br, - int? fid, - int? size, - double? vd, - }) { - return PlaylistDetailPlaylistTracksHr() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd; - } -} - -PlaylistDetailPlaylistTrackIds $PlaylistDetailPlaylistTrackIdsFromJson(Map json) { - final PlaylistDetailPlaylistTrackIds playlistDetailPlaylistTrackIds = PlaylistDetailPlaylistTrackIds(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - playlistDetailPlaylistTrackIds.id = id; - } - final int? v = jsonConvert.convert(json['v']); - if (v != null) { - playlistDetailPlaylistTrackIds.v = v; - } - final int? t = jsonConvert.convert(json['t']); - if (t != null) { - playlistDetailPlaylistTrackIds.t = t; - } - final int? at = jsonConvert.convert(json['at']); - if (at != null) { - playlistDetailPlaylistTrackIds.at = at; - } - final String? alg = jsonConvert.convert(json['alg']); - if (alg != null) { - playlistDetailPlaylistTrackIds.alg = alg; - } - final int? uid = jsonConvert.convert(json['uid']); - if (uid != null) { - playlistDetailPlaylistTrackIds.uid = uid; - } - final String? rcmdReason = jsonConvert.convert(json['rcmdReason']); - if (rcmdReason != null) { - playlistDetailPlaylistTrackIds.rcmdReason = rcmdReason; - } - final String? rcmdReasonTitle = jsonConvert.convert(json['rcmdReasonTitle']); - if (rcmdReasonTitle != null) { - playlistDetailPlaylistTrackIds.rcmdReasonTitle = rcmdReasonTitle; - } - final dynamic sc = json['sc']; - if (sc != null) { - playlistDetailPlaylistTrackIds.sc = sc; - } - final dynamic f = json['f']; - if (f != null) { - playlistDetailPlaylistTrackIds.f = f; - } - final dynamic sr = json['sr']; - if (sr != null) { - playlistDetailPlaylistTrackIds.sr = sr; - } - final dynamic dpr = json['dpr']; - if (dpr != null) { - playlistDetailPlaylistTrackIds.dpr = dpr; - } - return playlistDetailPlaylistTrackIds; -} - -Map $PlaylistDetailPlaylistTrackIdsToJson(PlaylistDetailPlaylistTrackIds entity) { - final Map data = {}; - data['id'] = entity.id; - data['v'] = entity.v; - data['t'] = entity.t; - data['at'] = entity.at; - data['alg'] = entity.alg; - data['uid'] = entity.uid; - data['rcmdReason'] = entity.rcmdReason; - data['rcmdReasonTitle'] = entity.rcmdReasonTitle; - data['sc'] = entity.sc; - data['f'] = entity.f; - data['sr'] = entity.sr; - data['dpr'] = entity.dpr; - return data; -} - -extension PlaylistDetailPlaylistTrackIdsExtension on PlaylistDetailPlaylistTrackIds { - PlaylistDetailPlaylistTrackIds copyWith({ - int? id, - int? v, - int? t, - int? at, - String? alg, - int? uid, - String? rcmdReason, - String? rcmdReasonTitle, - dynamic sc, - dynamic f, - dynamic sr, - dynamic dpr, - }) { - return PlaylistDetailPlaylistTrackIds() - ..id = id ?? this.id - ..v = v ?? this.v - ..t = t ?? this.t - ..at = at ?? this.at - ..alg = alg ?? this.alg - ..uid = uid ?? this.uid - ..rcmdReason = rcmdReason ?? this.rcmdReason - ..rcmdReasonTitle = rcmdReasonTitle ?? this.rcmdReasonTitle - ..sc = sc ?? this.sc - ..f = f ?? this.f - ..sr = sr ?? this.sr - ..dpr = dpr ?? this.dpr; - } -} - -PlaylistDetailPlaylistBizExtInfo $PlaylistDetailPlaylistBizExtInfoFromJson( - Map json) { - final PlaylistDetailPlaylistBizExtInfo playlistDetailPlaylistBizExtInfo = PlaylistDetailPlaylistBizExtInfo(); - return playlistDetailPlaylistBizExtInfo; -} - -Map $PlaylistDetailPlaylistBizExtInfoToJson( - PlaylistDetailPlaylistBizExtInfo entity) { - final Map data = {}; - return data; -} - -extension PlaylistDetailPlaylistBizExtInfoExtension on PlaylistDetailPlaylistBizExtInfo { -} - -PlaylistDetailPrivileges $PlaylistDetailPrivilegesFromJson(Map json) { - final PlaylistDetailPrivileges playlistDetailPrivileges = PlaylistDetailPrivileges(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - playlistDetailPrivileges.id = id; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - playlistDetailPrivileges.fee = fee; - } - final int? payed = jsonConvert.convert(json['payed']); - if (payed != null) { - playlistDetailPrivileges.payed = payed; - } - final int? realPayed = jsonConvert.convert(json['realPayed']); - if (realPayed != null) { - playlistDetailPrivileges.realPayed = realPayed; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - playlistDetailPrivileges.st = st; - } - final int? pl = jsonConvert.convert(json['pl']); - if (pl != null) { - playlistDetailPrivileges.pl = pl; - } - final int? dl = jsonConvert.convert(json['dl']); - if (dl != null) { - playlistDetailPrivileges.dl = dl; - } - final int? sp = jsonConvert.convert(json['sp']); - if (sp != null) { - playlistDetailPrivileges.sp = sp; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - playlistDetailPrivileges.cp = cp; - } - final int? subp = jsonConvert.convert(json['subp']); - if (subp != null) { - playlistDetailPrivileges.subp = subp; - } - final bool? cs = jsonConvert.convert(json['cs']); - if (cs != null) { - playlistDetailPrivileges.cs = cs; - } - final int? maxbr = jsonConvert.convert(json['maxbr']); - if (maxbr != null) { - playlistDetailPrivileges.maxbr = maxbr; - } - final int? fl = jsonConvert.convert(json['fl']); - if (fl != null) { - playlistDetailPrivileges.fl = fl; - } - final dynamic pc = json['pc']; - if (pc != null) { - playlistDetailPrivileges.pc = pc; - } - final bool? toast = jsonConvert.convert(json['toast']); - if (toast != null) { - playlistDetailPrivileges.toast = toast; - } - final int? flag = jsonConvert.convert(json['flag']); - if (flag != null) { - playlistDetailPrivileges.flag = flag; - } - final bool? paidBigBang = jsonConvert.convert(json['paidBigBang']); - if (paidBigBang != null) { - playlistDetailPrivileges.paidBigBang = paidBigBang; - } - final bool? preSell = jsonConvert.convert(json['preSell']); - if (preSell != null) { - playlistDetailPrivileges.preSell = preSell; - } - final int? playMaxbr = jsonConvert.convert(json['playMaxbr']); - if (playMaxbr != null) { - playlistDetailPrivileges.playMaxbr = playMaxbr; - } - final int? downloadMaxbr = jsonConvert.convert(json['downloadMaxbr']); - if (downloadMaxbr != null) { - playlistDetailPrivileges.downloadMaxbr = downloadMaxbr; - } - final String? maxBrLevel = jsonConvert.convert(json['maxBrLevel']); - if (maxBrLevel != null) { - playlistDetailPrivileges.maxBrLevel = maxBrLevel; - } - final String? playMaxBrLevel = jsonConvert.convert(json['playMaxBrLevel']); - if (playMaxBrLevel != null) { - playlistDetailPrivileges.playMaxBrLevel = playMaxBrLevel; - } - final String? downloadMaxBrLevel = jsonConvert.convert(json['downloadMaxBrLevel']); - if (downloadMaxBrLevel != null) { - playlistDetailPrivileges.downloadMaxBrLevel = downloadMaxBrLevel; - } - final String? plLevel = jsonConvert.convert(json['plLevel']); - if (plLevel != null) { - playlistDetailPrivileges.plLevel = plLevel; - } - final String? dlLevel = jsonConvert.convert(json['dlLevel']); - if (dlLevel != null) { - playlistDetailPrivileges.dlLevel = dlLevel; - } - final String? flLevel = jsonConvert.convert(json['flLevel']); - if (flLevel != null) { - playlistDetailPrivileges.flLevel = flLevel; - } - final dynamic rscl = json['rscl']; - if (rscl != null) { - playlistDetailPrivileges.rscl = rscl; - } - final PlaylistDetailPrivilegesFreeTrialPrivilege? freeTrialPrivilege = jsonConvert.convert< - PlaylistDetailPrivilegesFreeTrialPrivilege>(json['freeTrialPrivilege']); - if (freeTrialPrivilege != null) { - playlistDetailPrivileges.freeTrialPrivilege = freeTrialPrivilege; - } - final int? rightSource = jsonConvert.convert(json['rightSource']); - if (rightSource != null) { - playlistDetailPrivileges.rightSource = rightSource; - } - final List< - PlaylistDetailPrivilegesChargeInfoList>? chargeInfoList = (json['chargeInfoList'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as PlaylistDetailPrivilegesChargeInfoList).toList(); - if (chargeInfoList != null) { - playlistDetailPrivileges.chargeInfoList = chargeInfoList; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - playlistDetailPrivileges.code = code; - } - final dynamic message = json['message']; - if (message != null) { - playlistDetailPrivileges.message = message; - } - final dynamic plLevels = json['plLevels']; - if (plLevels != null) { - playlistDetailPrivileges.plLevels = plLevels; - } - final dynamic dlLevels = json['dlLevels']; - if (dlLevels != null) { - playlistDetailPrivileges.dlLevels = dlLevels; - } - return playlistDetailPrivileges; -} - -Map $PlaylistDetailPrivilegesToJson(PlaylistDetailPrivileges entity) { - final Map data = {}; - data['id'] = entity.id; - data['fee'] = entity.fee; - data['payed'] = entity.payed; - data['realPayed'] = entity.realPayed; - data['st'] = entity.st; - data['pl'] = entity.pl; - data['dl'] = entity.dl; - data['sp'] = entity.sp; - data['cp'] = entity.cp; - data['subp'] = entity.subp; - data['cs'] = entity.cs; - data['maxbr'] = entity.maxbr; - data['fl'] = entity.fl; - data['pc'] = entity.pc; - data['toast'] = entity.toast; - data['flag'] = entity.flag; - data['paidBigBang'] = entity.paidBigBang; - data['preSell'] = entity.preSell; - data['playMaxbr'] = entity.playMaxbr; - data['downloadMaxbr'] = entity.downloadMaxbr; - data['maxBrLevel'] = entity.maxBrLevel; - data['playMaxBrLevel'] = entity.playMaxBrLevel; - data['downloadMaxBrLevel'] = entity.downloadMaxBrLevel; - data['plLevel'] = entity.plLevel; - data['dlLevel'] = entity.dlLevel; - data['flLevel'] = entity.flLevel; - data['rscl'] = entity.rscl; - data['freeTrialPrivilege'] = entity.freeTrialPrivilege?.toJson(); - data['rightSource'] = entity.rightSource; - data['chargeInfoList'] = entity.chargeInfoList?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - data['message'] = entity.message; - data['plLevels'] = entity.plLevels; - data['dlLevels'] = entity.dlLevels; - return data; -} - -extension PlaylistDetailPrivilegesExtension on PlaylistDetailPrivileges { - PlaylistDetailPrivileges copyWith({ - int? id, - int? fee, - int? payed, - int? realPayed, - int? st, - int? pl, - int? dl, - int? sp, - int? cp, - int? subp, - bool? cs, - int? maxbr, - int? fl, - dynamic pc, - bool? toast, - int? flag, - bool? paidBigBang, - bool? preSell, - int? playMaxbr, - int? downloadMaxbr, - String? maxBrLevel, - String? playMaxBrLevel, - String? downloadMaxBrLevel, - String? plLevel, - String? dlLevel, - String? flLevel, - dynamic rscl, - PlaylistDetailPrivilegesFreeTrialPrivilege? freeTrialPrivilege, - int? rightSource, - List? chargeInfoList, - int? code, - dynamic message, - dynamic plLevels, - dynamic dlLevels, - }) { - return PlaylistDetailPrivileges() - ..id = id ?? this.id - ..fee = fee ?? this.fee - ..payed = payed ?? this.payed - ..realPayed = realPayed ?? this.realPayed - ..st = st ?? this.st - ..pl = pl ?? this.pl - ..dl = dl ?? this.dl - ..sp = sp ?? this.sp - ..cp = cp ?? this.cp - ..subp = subp ?? this.subp - ..cs = cs ?? this.cs - ..maxbr = maxbr ?? this.maxbr - ..fl = fl ?? this.fl - ..pc = pc ?? this.pc - ..toast = toast ?? this.toast - ..flag = flag ?? this.flag - ..paidBigBang = paidBigBang ?? this.paidBigBang - ..preSell = preSell ?? this.preSell - ..playMaxbr = playMaxbr ?? this.playMaxbr - ..downloadMaxbr = downloadMaxbr ?? this.downloadMaxbr - ..maxBrLevel = maxBrLevel ?? this.maxBrLevel - ..playMaxBrLevel = playMaxBrLevel ?? this.playMaxBrLevel - ..downloadMaxBrLevel = downloadMaxBrLevel ?? this.downloadMaxBrLevel - ..plLevel = plLevel ?? this.plLevel - ..dlLevel = dlLevel ?? this.dlLevel - ..flLevel = flLevel ?? this.flLevel - ..rscl = rscl ?? this.rscl - ..freeTrialPrivilege = freeTrialPrivilege ?? this.freeTrialPrivilege - ..rightSource = rightSource ?? this.rightSource - ..chargeInfoList = chargeInfoList ?? this.chargeInfoList - ..code = code ?? this.code - ..message = message ?? this.message - ..plLevels = plLevels ?? this.plLevels - ..dlLevels = dlLevels ?? this.dlLevels; - } -} - -PlaylistDetailPrivilegesFreeTrialPrivilege $PlaylistDetailPrivilegesFreeTrialPrivilegeFromJson( - Map json) { - final PlaylistDetailPrivilegesFreeTrialPrivilege playlistDetailPrivilegesFreeTrialPrivilege = PlaylistDetailPrivilegesFreeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - playlistDetailPrivilegesFreeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - playlistDetailPrivilegesFreeTrialPrivilege.userConsumable = userConsumable; - } - final int? listenType = jsonConvert.convert(json['listenType']); - if (listenType != null) { - playlistDetailPrivilegesFreeTrialPrivilege.listenType = listenType; - } - final int? cannotListenReason = jsonConvert.convert(json['cannotListenReason']); - if (cannotListenReason != null) { - playlistDetailPrivilegesFreeTrialPrivilege.cannotListenReason = cannotListenReason; - } - final dynamic playReason = json['playReason']; - if (playReason != null) { - playlistDetailPrivilegesFreeTrialPrivilege.playReason = playReason; - } - final dynamic freeLimitTagType = json['freeLimitTagType']; - if (freeLimitTagType != null) { - playlistDetailPrivilegesFreeTrialPrivilege.freeLimitTagType = freeLimitTagType; - } - return playlistDetailPrivilegesFreeTrialPrivilege; -} - -Map $PlaylistDetailPrivilegesFreeTrialPrivilegeToJson( - PlaylistDetailPrivilegesFreeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - data['listenType'] = entity.listenType; - data['cannotListenReason'] = entity.cannotListenReason; - data['playReason'] = entity.playReason; - data['freeLimitTagType'] = entity.freeLimitTagType; - return data; -} - -extension PlaylistDetailPrivilegesFreeTrialPrivilegeExtension on PlaylistDetailPrivilegesFreeTrialPrivilege { - PlaylistDetailPrivilegesFreeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - int? listenType, - int? cannotListenReason, - dynamic playReason, - dynamic freeLimitTagType, - }) { - return PlaylistDetailPrivilegesFreeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable - ..listenType = listenType ?? this.listenType - ..cannotListenReason = cannotListenReason ?? this.cannotListenReason - ..playReason = playReason ?? this.playReason - ..freeLimitTagType = freeLimitTagType ?? this.freeLimitTagType; - } -} - -PlaylistDetailPrivilegesChargeInfoList $PlaylistDetailPrivilegesChargeInfoListFromJson( - Map json) { - final PlaylistDetailPrivilegesChargeInfoList playlistDetailPrivilegesChargeInfoList = PlaylistDetailPrivilegesChargeInfoList(); - final int? rate = jsonConvert.convert(json['rate']); - if (rate != null) { - playlistDetailPrivilegesChargeInfoList.rate = rate; - } - final dynamic chargeUrl = json['chargeUrl']; - if (chargeUrl != null) { - playlistDetailPrivilegesChargeInfoList.chargeUrl = chargeUrl; - } - final dynamic chargeMessage = json['chargeMessage']; - if (chargeMessage != null) { - playlistDetailPrivilegesChargeInfoList.chargeMessage = chargeMessage; - } - final int? chargeType = jsonConvert.convert(json['chargeType']); - if (chargeType != null) { - playlistDetailPrivilegesChargeInfoList.chargeType = chargeType; - } - return playlistDetailPrivilegesChargeInfoList; -} - -Map $PlaylistDetailPrivilegesChargeInfoListToJson( - PlaylistDetailPrivilegesChargeInfoList entity) { - final Map data = {}; - data['rate'] = entity.rate; - data['chargeUrl'] = entity.chargeUrl; - data['chargeMessage'] = entity.chargeMessage; - data['chargeType'] = entity.chargeType; - return data; -} - -extension PlaylistDetailPrivilegesChargeInfoListExtension on PlaylistDetailPrivilegesChargeInfoList { - PlaylistDetailPrivilegesChargeInfoList copyWith({ - int? rate, - dynamic chargeUrl, - dynamic chargeMessage, - int? chargeType, - }) { - return PlaylistDetailPrivilegesChargeInfoList() - ..rate = rate ?? this.rate - ..chargeUrl = chargeUrl ?? this.chargeUrl - ..chargeMessage = chargeMessage ?? this.chargeMessage - ..chargeType = chargeType ?? this.chargeType; - } -} \ No newline at end of file diff --git a/lib/generated/json/qr_check_entity.g.dart b/lib/generated/json/qr_check_entity.g.dart deleted file mode 100644 index 06a4ba4..0000000 --- a/lib/generated/json/qr_check_entity.g.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/qr_check_entity.dart'; - -QrCheckEntity $QrCheckEntityFromJson(Map json) { - final QrCheckEntity qrCheckEntity = QrCheckEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - qrCheckEntity.code = code; - } - final String? message = jsonConvert.convert(json['message']); - if (message != null) { - qrCheckEntity.message = message; - } - return qrCheckEntity; -} - -Map $QrCheckEntityToJson(QrCheckEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['message'] = entity.message; - return data; -} - -extension QrCheckEntityExtension on QrCheckEntity { - QrCheckEntity copyWith({ - int? code, - String? message, - }) { - return QrCheckEntity() - ..code = code ?? this.code - ..message = message ?? this.message; - } -} \ No newline at end of file diff --git a/lib/generated/json/qrcode_key_entity.g.dart b/lib/generated/json/qrcode_key_entity.g.dart deleted file mode 100644 index 7857b94..0000000 --- a/lib/generated/json/qrcode_key_entity.g.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/qrcode_key_entity.dart'; - -QrcodeKeyEntity $QrcodeKeyEntityFromJson(Map json) { - final QrcodeKeyEntity qrcodeKeyEntity = QrcodeKeyEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - qrcodeKeyEntity.code = code; - } - final String? unikey = jsonConvert.convert(json['unikey']); - if (unikey != null) { - qrcodeKeyEntity.unikey = unikey; - } - return qrcodeKeyEntity; -} - -Map $QrcodeKeyEntityToJson(QrcodeKeyEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['unikey'] = entity.unikey; - return data; -} - -extension QrcodeKeyEntityExtension on QrcodeKeyEntity { - QrcodeKeyEntity copyWith({ - int? code, - String? unikey, - }) { - return QrcodeKeyEntity() - ..code = code ?? this.code - ..unikey = unikey ?? this.unikey; - } -} \ No newline at end of file diff --git a/lib/generated/json/recommend_resource_entity.g.dart b/lib/generated/json/recommend_resource_entity.g.dart deleted file mode 100644 index d661f1e..0000000 --- a/lib/generated/json/recommend_resource_entity.g.dart +++ /dev/null @@ -1,347 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/recommend/entity/recommend_resource_entity.dart'; - -RecommendResourceEntity $RecommendResourceEntityFromJson(Map json) { - final RecommendResourceEntity recommendResourceEntity = RecommendResourceEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - recommendResourceEntity.code = code; - } - final bool? featureFirst = jsonConvert.convert(json['featureFirst']); - if (featureFirst != null) { - recommendResourceEntity.featureFirst = featureFirst; - } - final bool? haveRcmdSongs = jsonConvert.convert(json['haveRcmdSongs']); - if (haveRcmdSongs != null) { - recommendResourceEntity.haveRcmdSongs = haveRcmdSongs; - } - final List? recommend = (json['recommend'] as List?) - ?.map( - (e) => jsonConvert.convert(e) as RecommendResourceRecommend) - .toList(); - if (recommend != null) { - recommendResourceEntity.recommend = recommend; - } - return recommendResourceEntity; -} - -Map $RecommendResourceEntityToJson(RecommendResourceEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['featureFirst'] = entity.featureFirst; - data['haveRcmdSongs'] = entity.haveRcmdSongs; - data['recommend'] = entity.recommend.map((v) => v.toJson()).toList(); - return data; -} - -extension RecommendResourceEntityExtension on RecommendResourceEntity { - RecommendResourceEntity copyWith({ - int? code, - bool? featureFirst, - bool? haveRcmdSongs, - List? recommend, - }) { - return RecommendResourceEntity() - ..code = code ?? this.code - ..featureFirst = featureFirst ?? this.featureFirst - ..haveRcmdSongs = haveRcmdSongs ?? this.haveRcmdSongs - ..recommend = recommend ?? this.recommend; - } -} - -RecommendResourceRecommend $RecommendResourceRecommendFromJson(Map json) { - final RecommendResourceRecommend recommendResourceRecommend = RecommendResourceRecommend(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - recommendResourceRecommend.id = id; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - recommendResourceRecommend.type = type; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - recommendResourceRecommend.name = name; - } - final String? copywriter = jsonConvert.convert(json['copywriter']); - if (copywriter != null) { - recommendResourceRecommend.copywriter = copywriter; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - recommendResourceRecommend.picUrl = picUrl; - } - final int? playcount = jsonConvert.convert(json['playcount']); - if (playcount != null) { - recommendResourceRecommend.playcount = playcount; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - recommendResourceRecommend.createTime = createTime; - } - final RecommendResourceRecommendCreator? creator = jsonConvert.convert< - RecommendResourceRecommendCreator>(json['creator']); - if (creator != null) { - recommendResourceRecommend.creator = creator; - } - final int? trackCount = jsonConvert.convert(json['trackCount']); - if (trackCount != null) { - recommendResourceRecommend.trackCount = trackCount; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - recommendResourceRecommend.userId = userId; - } - final String? alg = jsonConvert.convert(json['alg']); - if (alg != null) { - recommendResourceRecommend.alg = alg; - } - return recommendResourceRecommend; -} - -Map $RecommendResourceRecommendToJson(RecommendResourceRecommend entity) { - final Map data = {}; - data['id'] = entity.id; - data['type'] = entity.type; - data['name'] = entity.name; - data['copywriter'] = entity.copywriter; - data['picUrl'] = entity.picUrl; - data['playcount'] = entity.playcount; - data['createTime'] = entity.createTime; - data['creator'] = entity.creator?.toJson(); - data['trackCount'] = entity.trackCount; - data['userId'] = entity.userId; - data['alg'] = entity.alg; - return data; -} - -extension RecommendResourceRecommendExtension on RecommendResourceRecommend { - RecommendResourceRecommend copyWith({ - int? id, - int? type, - String? name, - String? copywriter, - String? picUrl, - int? playcount, - int? createTime, - RecommendResourceRecommendCreator? creator, - int? trackCount, - int? userId, - String? alg, - }) { - return RecommendResourceRecommend() - ..id = id ?? this.id - ..type = type ?? this.type - ..name = name ?? this.name - ..copywriter = copywriter ?? this.copywriter - ..picUrl = picUrl ?? this.picUrl - ..playcount = playcount ?? this.playcount - ..createTime = createTime ?? this.createTime - ..creator = creator ?? this.creator - ..trackCount = trackCount ?? this.trackCount - ..userId = userId ?? this.userId - ..alg = alg ?? this.alg; - } -} - -RecommendResourceRecommendCreator $RecommendResourceRecommendCreatorFromJson( - Map json) { - final RecommendResourceRecommendCreator recommendResourceRecommendCreator = RecommendResourceRecommendCreator(); - final int? accountStatus = jsonConvert.convert(json['accountStatus']); - if (accountStatus != null) { - recommendResourceRecommendCreator.accountStatus = accountStatus; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - recommendResourceRecommendCreator.vipType = vipType; - } - final int? province = jsonConvert.convert(json['province']); - if (province != null) { - recommendResourceRecommendCreator.province = province; - } - final String? avatarUrl = jsonConvert.convert(json['avatarUrl']); - if (avatarUrl != null) { - recommendResourceRecommendCreator.avatarUrl = avatarUrl; - } - final int? authStatus = jsonConvert.convert(json['authStatus']); - if (authStatus != null) { - recommendResourceRecommendCreator.authStatus = authStatus; - } - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - recommendResourceRecommendCreator.userType = userType; - } - final String? nickname = jsonConvert.convert(json['nickname']); - if (nickname != null) { - recommendResourceRecommendCreator.nickname = nickname; - } - final int? gender = jsonConvert.convert(json['gender']); - if (gender != null) { - recommendResourceRecommendCreator.gender = gender; - } - final int? birthday = jsonConvert.convert(json['birthday']); - if (birthday != null) { - recommendResourceRecommendCreator.birthday = birthday; - } - final int? city = jsonConvert.convert(json['city']); - if (city != null) { - recommendResourceRecommendCreator.city = city; - } - final String? backgroundUrl = jsonConvert.convert(json['backgroundUrl']); - if (backgroundUrl != null) { - recommendResourceRecommendCreator.backgroundUrl = backgroundUrl; - } - final int? avatarImgId = jsonConvert.convert(json['avatarImgId']); - if (avatarImgId != null) { - recommendResourceRecommendCreator.avatarImgId = avatarImgId; - } - final int? backgroundImgId = jsonConvert.convert(json['backgroundImgId']); - if (backgroundImgId != null) { - recommendResourceRecommendCreator.backgroundImgId = backgroundImgId; - } - final String? detailDescription = jsonConvert.convert(json['detailDescription']); - if (detailDescription != null) { - recommendResourceRecommendCreator.detailDescription = detailDescription; - } - final bool? defaultAvatar = jsonConvert.convert(json['defaultAvatar']); - if (defaultAvatar != null) { - recommendResourceRecommendCreator.defaultAvatar = defaultAvatar; - } - final List? expertTags = (json['expertTags'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (expertTags != null) { - recommendResourceRecommendCreator.expertTags = expertTags; - } - final int? djStatus = jsonConvert.convert(json['djStatus']); - if (djStatus != null) { - recommendResourceRecommendCreator.djStatus = djStatus; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - recommendResourceRecommendCreator.followed = followed; - } - final bool? mutual = jsonConvert.convert(json['mutual']); - if (mutual != null) { - recommendResourceRecommendCreator.mutual = mutual; - } - final String? remarkName = jsonConvert.convert(json['remarkName']); - if (remarkName != null) { - recommendResourceRecommendCreator.remarkName = remarkName; - } - final String? avatarImgIdStr = jsonConvert.convert(json['avatarImgIdStr']); - if (avatarImgIdStr != null) { - recommendResourceRecommendCreator.avatarImgIdStr = avatarImgIdStr; - } - final String? backgroundImgIdStr = jsonConvert.convert(json['backgroundImgIdStr']); - if (backgroundImgIdStr != null) { - recommendResourceRecommendCreator.backgroundImgIdStr = backgroundImgIdStr; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - recommendResourceRecommendCreator.description = description; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - recommendResourceRecommendCreator.userId = userId; - } - final String? signature = jsonConvert.convert(json['signature']); - if (signature != null) { - recommendResourceRecommendCreator.signature = signature; - } - final int? authority = jsonConvert.convert(json['authority']); - if (authority != null) { - recommendResourceRecommendCreator.authority = authority; - } - return recommendResourceRecommendCreator; -} - -Map $RecommendResourceRecommendCreatorToJson( - RecommendResourceRecommendCreator entity) { - final Map data = {}; - data['accountStatus'] = entity.accountStatus; - data['vipType'] = entity.vipType; - data['province'] = entity.province; - data['avatarUrl'] = entity.avatarUrl; - data['authStatus'] = entity.authStatus; - data['userType'] = entity.userType; - data['nickname'] = entity.nickname; - data['gender'] = entity.gender; - data['birthday'] = entity.birthday; - data['city'] = entity.city; - data['backgroundUrl'] = entity.backgroundUrl; - data['avatarImgId'] = entity.avatarImgId; - data['backgroundImgId'] = entity.backgroundImgId; - data['detailDescription'] = entity.detailDescription; - data['defaultAvatar'] = entity.defaultAvatar; - data['expertTags'] = entity.expertTags; - data['djStatus'] = entity.djStatus; - data['followed'] = entity.followed; - data['mutual'] = entity.mutual; - data['remarkName'] = entity.remarkName; - data['avatarImgIdStr'] = entity.avatarImgIdStr; - data['backgroundImgIdStr'] = entity.backgroundImgIdStr; - data['description'] = entity.description; - data['userId'] = entity.userId; - data['signature'] = entity.signature; - data['authority'] = entity.authority; - return data; -} - -extension RecommendResourceRecommendCreatorExtension on RecommendResourceRecommendCreator { - RecommendResourceRecommendCreator copyWith({ - int? accountStatus, - int? vipType, - int? province, - String? avatarUrl, - int? authStatus, - int? userType, - String? nickname, - int? gender, - int? birthday, - int? city, - String? backgroundUrl, - int? avatarImgId, - int? backgroundImgId, - String? detailDescription, - bool? defaultAvatar, - List? expertTags, - int? djStatus, - bool? followed, - bool? mutual, - String? remarkName, - String? avatarImgIdStr, - String? backgroundImgIdStr, - String? description, - int? userId, - String? signature, - int? authority, - }) { - return RecommendResourceRecommendCreator() - ..accountStatus = accountStatus ?? this.accountStatus - ..vipType = vipType ?? this.vipType - ..province = province ?? this.province - ..avatarUrl = avatarUrl ?? this.avatarUrl - ..authStatus = authStatus ?? this.authStatus - ..userType = userType ?? this.userType - ..nickname = nickname ?? this.nickname - ..gender = gender ?? this.gender - ..birthday = birthday ?? this.birthday - ..city = city ?? this.city - ..backgroundUrl = backgroundUrl ?? this.backgroundUrl - ..avatarImgId = avatarImgId ?? this.avatarImgId - ..backgroundImgId = backgroundImgId ?? this.backgroundImgId - ..detailDescription = detailDescription ?? this.detailDescription - ..defaultAvatar = defaultAvatar ?? this.defaultAvatar - ..expertTags = expertTags ?? this.expertTags - ..djStatus = djStatus ?? this.djStatus - ..followed = followed ?? this.followed - ..mutual = mutual ?? this.mutual - ..remarkName = remarkName ?? this.remarkName - ..avatarImgIdStr = avatarImgIdStr ?? this.avatarImgIdStr - ..backgroundImgIdStr = backgroundImgIdStr ?? this.backgroundImgIdStr - ..description = description ?? this.description - ..userId = userId ?? this.userId - ..signature = signature ?? this.signature - ..authority = authority ?? this.authority; - } -} \ No newline at end of file diff --git a/lib/generated/json/recommend_song_entity.g.dart b/lib/generated/json/recommend_song_entity.g.dart deleted file mode 100644 index b39c36f..0000000 --- a/lib/generated/json/recommend_song_entity.g.dart +++ /dev/null @@ -1,1246 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/recommend/entity/recommend_song_entity.dart'; - -RecommendSongEntity $RecommendSongEntityFromJson(Map json) { - final RecommendSongEntity recommendSongEntity = RecommendSongEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - recommendSongEntity.code = code; - } - final RecommendSongData? data = jsonConvert.convert(json['data']); - if (data != null) { - recommendSongEntity.data = data; - } - return recommendSongEntity; -} - -Map $RecommendSongEntityToJson(RecommendSongEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['data'] = entity.data?.toJson(); - return data; -} - -extension RecommendSongEntityExtension on RecommendSongEntity { - RecommendSongEntity copyWith({ - int? code, - RecommendSongData? data, - }) { - return RecommendSongEntity() - ..code = code ?? this.code - ..data = data ?? this.data; - } -} - -RecommendSongData $RecommendSongDataFromJson(Map json) { - final RecommendSongData recommendSongData = RecommendSongData(); - final List? dailySongs = (json['dailySongs'] as List?) - ?.map( - (e) => jsonConvert.convert(e) as RecommendSongDataDailySongs) - .toList(); - if (dailySongs != null) { - recommendSongData.dailySongs = dailySongs; - } - final List? orderSongs = (json['orderSongs'] as List?)?.map( - (e) => e).toList(); - if (orderSongs != null) { - recommendSongData.orderSongs = orderSongs; - } - final List< - RecommendSongDataRecommendReasons>? recommendReasons = (json['recommendReasons'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as RecommendSongDataRecommendReasons).toList(); - if (recommendReasons != null) { - recommendSongData.recommendReasons = recommendReasons; - } - final dynamic mvResourceInfos = json['mvResourceInfos']; - if (mvResourceInfos != null) { - recommendSongData.mvResourceInfos = mvResourceInfos; - } - final bool? demote = jsonConvert.convert(json['demote']); - if (demote != null) { - recommendSongData.demote = demote; - } - return recommendSongData; -} - -Map $RecommendSongDataToJson(RecommendSongData entity) { - final Map data = {}; - data['dailySongs'] = entity.dailySongs?.map((v) => v.toJson()).toList(); - data['orderSongs'] = entity.orderSongs; - data['recommendReasons'] = entity.recommendReasons?.map((v) => v.toJson()).toList(); - data['mvResourceInfos'] = entity.mvResourceInfos; - data['demote'] = entity.demote; - return data; -} - -extension RecommendSongDataExtension on RecommendSongData { - RecommendSongData copyWith({ - List? dailySongs, - List? orderSongs, - List? recommendReasons, - dynamic mvResourceInfos, - bool? demote, - }) { - return RecommendSongData() - ..dailySongs = dailySongs ?? this.dailySongs - ..orderSongs = orderSongs ?? this.orderSongs - ..recommendReasons = recommendReasons ?? this.recommendReasons - ..mvResourceInfos = mvResourceInfos ?? this.mvResourceInfos - ..demote = demote ?? this.demote; - } -} - -RecommendSongDataDailySongs $RecommendSongDataDailySongsFromJson(Map json) { - final RecommendSongDataDailySongs recommendSongDataDailySongs = RecommendSongDataDailySongs(); - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - recommendSongDataDailySongs.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - recommendSongDataDailySongs.id = id; - } - final int? pst = jsonConvert.convert(json['pst']); - if (pst != null) { - recommendSongDataDailySongs.pst = pst; - } - final int? t = jsonConvert.convert(json['t']); - if (t != null) { - recommendSongDataDailySongs.t = t; - } - final List? ar = (json['ar'] as List?) - ?.map( - (e) => - jsonConvert.convert(e) as RecommendSongDataDailySongsAr) - .toList(); - if (ar != null) { - recommendSongDataDailySongs.ar = ar; - } - final List? alia = (json['alia'] as List?)?.map( - (e) => e).toList(); - if (alia != null) { - recommendSongDataDailySongs.alia = alia; - } - final double? pop = jsonConvert.convert(json['pop']); - if (pop != null) { - recommendSongDataDailySongs.pop = pop; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - recommendSongDataDailySongs.st = st; - } - final String? rt = jsonConvert.convert(json['rt']); - if (rt != null) { - recommendSongDataDailySongs.rt = rt; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - recommendSongDataDailySongs.fee = fee; - } - final int? v = jsonConvert.convert(json['v']); - if (v != null) { - recommendSongDataDailySongs.v = v; - } - final dynamic crbt = json['crbt']; - if (crbt != null) { - recommendSongDataDailySongs.crbt = crbt; - } - final String? cf = jsonConvert.convert(json['cf']); - if (cf != null) { - recommendSongDataDailySongs.cf = cf; - } - final RecommendSongDataDailySongsAl? al = jsonConvert.convert( - json['al']); - if (al != null) { - recommendSongDataDailySongs.al = al; - } - final int? dt = jsonConvert.convert(json['dt']); - if (dt != null) { - recommendSongDataDailySongs.dt = dt; - } - final RecommendSongDataDailySongsH? h = jsonConvert.convert( - json['h']); - if (h != null) { - recommendSongDataDailySongs.h = h; - } - final RecommendSongDataDailySongsM? m = jsonConvert.convert( - json['m']); - if (m != null) { - recommendSongDataDailySongs.m = m; - } - final RecommendSongDataDailySongsL? l = jsonConvert.convert( - json['l']); - if (l != null) { - recommendSongDataDailySongs.l = l; - } - final RecommendSongDataDailySongsSq? sq = jsonConvert.convert( - json['sq']); - if (sq != null) { - recommendSongDataDailySongs.sq = sq; - } - final RecommendSongDataDailySongsHr? hr = jsonConvert.convert( - json['hr']); - if (hr != null) { - recommendSongDataDailySongs.hr = hr; - } - final dynamic a = json['a']; - if (a != null) { - recommendSongDataDailySongs.a = a; - } - final String? cd = jsonConvert.convert(json['cd']); - if (cd != null) { - recommendSongDataDailySongs.cd = cd; - } - final int? no = jsonConvert.convert(json['no']); - if (no != null) { - recommendSongDataDailySongs.no = no; - } - final dynamic rtUrl = json['rtUrl']; - if (rtUrl != null) { - recommendSongDataDailySongs.rtUrl = rtUrl; - } - final int? ftype = jsonConvert.convert(json['ftype']); - if (ftype != null) { - recommendSongDataDailySongs.ftype = ftype; - } - final List? rtUrls = (json['rtUrls'] as List?)?.map( - (e) => e).toList(); - if (rtUrls != null) { - recommendSongDataDailySongs.rtUrls = rtUrls; - } - final int? djId = jsonConvert.convert(json['djId']); - if (djId != null) { - recommendSongDataDailySongs.djId = djId; - } - final int? copyright = jsonConvert.convert(json['copyright']); - if (copyright != null) { - recommendSongDataDailySongs.copyright = copyright; - } - final int? sId = jsonConvert.convert(json['s_id']); - if (sId != null) { - recommendSongDataDailySongs.sId = sId; - } - final int? mark = jsonConvert.convert(json['mark']); - if (mark != null) { - recommendSongDataDailySongs.mark = mark; - } - final int? originCoverType = jsonConvert.convert(json['originCoverType']); - if (originCoverType != null) { - recommendSongDataDailySongs.originCoverType = originCoverType; - } - final dynamic originSongSimpleData = json['originSongSimpleData']; - if (originSongSimpleData != null) { - recommendSongDataDailySongs.originSongSimpleData = originSongSimpleData; - } - final dynamic tagPicList = json['tagPicList']; - if (tagPicList != null) { - recommendSongDataDailySongs.tagPicList = tagPicList; - } - final bool? resourceState = jsonConvert.convert(json['resourceState']); - if (resourceState != null) { - recommendSongDataDailySongs.resourceState = resourceState; - } - final int? version = jsonConvert.convert(json['version']); - if (version != null) { - recommendSongDataDailySongs.version = version; - } - final dynamic songJumpInfo = json['songJumpInfo']; - if (songJumpInfo != null) { - recommendSongDataDailySongs.songJumpInfo = songJumpInfo; - } - final dynamic entertainmentTags = json['entertainmentTags']; - if (entertainmentTags != null) { - recommendSongDataDailySongs.entertainmentTags = entertainmentTags; - } - final int? single = jsonConvert.convert(json['single']); - if (single != null) { - recommendSongDataDailySongs.single = single; - } - final dynamic noCopyrightRcmd = json['noCopyrightRcmd']; - if (noCopyrightRcmd != null) { - recommendSongDataDailySongs.noCopyrightRcmd = noCopyrightRcmd; - } - final int? rtype = jsonConvert.convert(json['rtype']); - if (rtype != null) { - recommendSongDataDailySongs.rtype = rtype; - } - final dynamic rurl = json['rurl']; - if (rurl != null) { - recommendSongDataDailySongs.rurl = rurl; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - recommendSongDataDailySongs.cp = cp; - } - final int? mv = jsonConvert.convert(json['mv']); - if (mv != null) { - recommendSongDataDailySongs.mv = mv; - } - final int? mst = jsonConvert.convert(json['mst']); - if (mst != null) { - recommendSongDataDailySongs.mst = mst; - } - final int? publishTime = jsonConvert.convert(json['publishTime']); - if (publishTime != null) { - recommendSongDataDailySongs.publishTime = publishTime; - } - final String? reason = jsonConvert.convert(json['reason']); - if (reason != null) { - recommendSongDataDailySongs.reason = reason; - } - final String? recommendReason = jsonConvert.convert(json['recommendReason']); - if (recommendReason != null) { - recommendSongDataDailySongs.recommendReason = recommendReason; - } - final RecommendSongDataDailySongsPrivilege? privilege = jsonConvert.convert< - RecommendSongDataDailySongsPrivilege>(json['privilege']); - if (privilege != null) { - recommendSongDataDailySongs.privilege = privilege; - } - final String? alg = jsonConvert.convert(json['alg']); - if (alg != null) { - recommendSongDataDailySongs.alg = alg; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (tns != null) { - recommendSongDataDailySongs.tns = tns; - } - return recommendSongDataDailySongs; -} - -Map $RecommendSongDataDailySongsToJson(RecommendSongDataDailySongs entity) { - final Map data = {}; - data['name'] = entity.name; - data['id'] = entity.id; - data['pst'] = entity.pst; - data['t'] = entity.t; - data['ar'] = entity.ar?.map((v) => v.toJson()).toList(); - data['alia'] = entity.alia; - data['pop'] = entity.pop; - data['st'] = entity.st; - data['rt'] = entity.rt; - data['fee'] = entity.fee; - data['v'] = entity.v; - data['crbt'] = entity.crbt; - data['cf'] = entity.cf; - data['al'] = entity.al?.toJson(); - data['dt'] = entity.dt; - data['h'] = entity.h?.toJson(); - data['m'] = entity.m?.toJson(); - data['l'] = entity.l?.toJson(); - data['sq'] = entity.sq?.toJson(); - data['hr'] = entity.hr?.toJson(); - data['a'] = entity.a; - data['cd'] = entity.cd; - data['no'] = entity.no; - data['rtUrl'] = entity.rtUrl; - data['ftype'] = entity.ftype; - data['rtUrls'] = entity.rtUrls; - data['djId'] = entity.djId; - data['copyright'] = entity.copyright; - data['s_id'] = entity.sId; - data['mark'] = entity.mark; - data['originCoverType'] = entity.originCoverType; - data['originSongSimpleData'] = entity.originSongSimpleData; - data['tagPicList'] = entity.tagPicList; - data['resourceState'] = entity.resourceState; - data['version'] = entity.version; - data['songJumpInfo'] = entity.songJumpInfo; - data['entertainmentTags'] = entity.entertainmentTags; - data['single'] = entity.single; - data['noCopyrightRcmd'] = entity.noCopyrightRcmd; - data['rtype'] = entity.rtype; - data['rurl'] = entity.rurl; - data['cp'] = entity.cp; - data['mv'] = entity.mv; - data['mst'] = entity.mst; - data['publishTime'] = entity.publishTime; - data['reason'] = entity.reason; - data['recommendReason'] = entity.recommendReason; - data['privilege'] = entity.privilege?.toJson(); - data['alg'] = entity.alg; - data['tns'] = entity.tns; - return data; -} - -extension RecommendSongDataDailySongsExtension on RecommendSongDataDailySongs { - RecommendSongDataDailySongs copyWith({ - String? name, - int? id, - int? pst, - int? t, - List? ar, - List? alia, - double? pop, - int? st, - String? rt, - int? fee, - int? v, - dynamic crbt, - String? cf, - RecommendSongDataDailySongsAl? al, - int? dt, - RecommendSongDataDailySongsH? h, - RecommendSongDataDailySongsM? m, - RecommendSongDataDailySongsL? l, - RecommendSongDataDailySongsSq? sq, - RecommendSongDataDailySongsHr? hr, - dynamic a, - String? cd, - int? no, - dynamic rtUrl, - int? ftype, - List? rtUrls, - int? djId, - int? copyright, - int? sId, - int? mark, - int? originCoverType, - dynamic originSongSimpleData, - dynamic tagPicList, - bool? resourceState, - int? version, - dynamic songJumpInfo, - dynamic entertainmentTags, - int? single, - dynamic noCopyrightRcmd, - int? rtype, - dynamic rurl, - int? cp, - int? mv, - int? mst, - int? publishTime, - String? reason, - String? recommendReason, - RecommendSongDataDailySongsPrivilege? privilege, - String? alg, - List? tns, - }) { - return RecommendSongDataDailySongs() - ..name = name ?? this.name - ..id = id ?? this.id - ..pst = pst ?? this.pst - ..t = t ?? this.t - ..ar = ar ?? this.ar - ..alia = alia ?? this.alia - ..pop = pop ?? this.pop - ..st = st ?? this.st - ..rt = rt ?? this.rt - ..fee = fee ?? this.fee - ..v = v ?? this.v - ..crbt = crbt ?? this.crbt - ..cf = cf ?? this.cf - ..al = al ?? this.al - ..dt = dt ?? this.dt - ..h = h ?? this.h - ..m = m ?? this.m - ..l = l ?? this.l - ..sq = sq ?? this.sq - ..hr = hr ?? this.hr - ..a = a ?? this.a - ..cd = cd ?? this.cd - ..no = no ?? this.no - ..rtUrl = rtUrl ?? this.rtUrl - ..ftype = ftype ?? this.ftype - ..rtUrls = rtUrls ?? this.rtUrls - ..djId = djId ?? this.djId - ..copyright = copyright ?? this.copyright - ..sId = sId ?? this.sId - ..mark = mark ?? this.mark - ..originCoverType = originCoverType ?? this.originCoverType - ..originSongSimpleData = originSongSimpleData ?? this.originSongSimpleData - ..tagPicList = tagPicList ?? this.tagPicList - ..resourceState = resourceState ?? this.resourceState - ..version = version ?? this.version - ..songJumpInfo = songJumpInfo ?? this.songJumpInfo - ..entertainmentTags = entertainmentTags ?? this.entertainmentTags - ..single = single ?? this.single - ..noCopyrightRcmd = noCopyrightRcmd ?? this.noCopyrightRcmd - ..rtype = rtype ?? this.rtype - ..rurl = rurl ?? this.rurl - ..cp = cp ?? this.cp - ..mv = mv ?? this.mv - ..mst = mst ?? this.mst - ..publishTime = publishTime ?? this.publishTime - ..reason = reason ?? this.reason - ..recommendReason = recommendReason ?? this.recommendReason - ..privilege = privilege ?? this.privilege - ..alg = alg ?? this.alg - ..tns = tns ?? this.tns; - } -} - -RecommendSongDataDailySongsAr $RecommendSongDataDailySongsArFromJson(Map json) { - final RecommendSongDataDailySongsAr recommendSongDataDailySongsAr = RecommendSongDataDailySongsAr(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - recommendSongDataDailySongsAr.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - recommendSongDataDailySongsAr.name = name; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => e).toList(); - if (tns != null) { - recommendSongDataDailySongsAr.tns = tns; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - recommendSongDataDailySongsAr.alias = alias; - } - return recommendSongDataDailySongsAr; -} - -Map $RecommendSongDataDailySongsArToJson(RecommendSongDataDailySongsAr entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['tns'] = entity.tns; - data['alias'] = entity.alias; - return data; -} - -extension RecommendSongDataDailySongsArExtension on RecommendSongDataDailySongsAr { - RecommendSongDataDailySongsAr copyWith({ - int? id, - String? name, - List? tns, - List? alias, - }) { - return RecommendSongDataDailySongsAr() - ..id = id ?? this.id - ..name = name ?? this.name - ..tns = tns ?? this.tns - ..alias = alias ?? this.alias; - } -} - -RecommendSongDataDailySongsAl $RecommendSongDataDailySongsAlFromJson(Map json) { - final RecommendSongDataDailySongsAl recommendSongDataDailySongsAl = RecommendSongDataDailySongsAl(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - recommendSongDataDailySongsAl.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - recommendSongDataDailySongsAl.name = name; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - recommendSongDataDailySongsAl.picUrl = picUrl; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => e).toList(); - if (tns != null) { - recommendSongDataDailySongsAl.tns = tns; - } - final String? picStr = jsonConvert.convert(json['pic_str']); - if (picStr != null) { - recommendSongDataDailySongsAl.picStr = picStr; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - recommendSongDataDailySongsAl.pic = pic; - } - return recommendSongDataDailySongsAl; -} - -Map $RecommendSongDataDailySongsAlToJson(RecommendSongDataDailySongsAl entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['picUrl'] = entity.picUrl; - data['tns'] = entity.tns; - data['pic_str'] = entity.picStr; - data['pic'] = entity.pic; - return data; -} - -extension RecommendSongDataDailySongsAlExtension on RecommendSongDataDailySongsAl { - RecommendSongDataDailySongsAl copyWith({ - int? id, - String? name, - String? picUrl, - List? tns, - String? picStr, - int? pic, - }) { - return RecommendSongDataDailySongsAl() - ..id = id ?? this.id - ..name = name ?? this.name - ..picUrl = picUrl ?? this.picUrl - ..tns = tns ?? this.tns - ..picStr = picStr ?? this.picStr - ..pic = pic ?? this.pic; - } -} - -RecommendSongDataDailySongsH $RecommendSongDataDailySongsHFromJson(Map json) { - final RecommendSongDataDailySongsH recommendSongDataDailySongsH = RecommendSongDataDailySongsH(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - recommendSongDataDailySongsH.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - recommendSongDataDailySongsH.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - recommendSongDataDailySongsH.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - recommendSongDataDailySongsH.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - recommendSongDataDailySongsH.sr = sr; - } - return recommendSongDataDailySongsH; -} - -Map $RecommendSongDataDailySongsHToJson(RecommendSongDataDailySongsH entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension RecommendSongDataDailySongsHExtension on RecommendSongDataDailySongsH { - RecommendSongDataDailySongsH copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return RecommendSongDataDailySongsH() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -RecommendSongDataDailySongsM $RecommendSongDataDailySongsMFromJson(Map json) { - final RecommendSongDataDailySongsM recommendSongDataDailySongsM = RecommendSongDataDailySongsM(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - recommendSongDataDailySongsM.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - recommendSongDataDailySongsM.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - recommendSongDataDailySongsM.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - recommendSongDataDailySongsM.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - recommendSongDataDailySongsM.sr = sr; - } - return recommendSongDataDailySongsM; -} - -Map $RecommendSongDataDailySongsMToJson(RecommendSongDataDailySongsM entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension RecommendSongDataDailySongsMExtension on RecommendSongDataDailySongsM { - RecommendSongDataDailySongsM copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return RecommendSongDataDailySongsM() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -RecommendSongDataDailySongsL $RecommendSongDataDailySongsLFromJson(Map json) { - final RecommendSongDataDailySongsL recommendSongDataDailySongsL = RecommendSongDataDailySongsL(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - recommendSongDataDailySongsL.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - recommendSongDataDailySongsL.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - recommendSongDataDailySongsL.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - recommendSongDataDailySongsL.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - recommendSongDataDailySongsL.sr = sr; - } - return recommendSongDataDailySongsL; -} - -Map $RecommendSongDataDailySongsLToJson(RecommendSongDataDailySongsL entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension RecommendSongDataDailySongsLExtension on RecommendSongDataDailySongsL { - RecommendSongDataDailySongsL copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return RecommendSongDataDailySongsL() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -RecommendSongDataDailySongsSq $RecommendSongDataDailySongsSqFromJson(Map json) { - final RecommendSongDataDailySongsSq recommendSongDataDailySongsSq = RecommendSongDataDailySongsSq(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - recommendSongDataDailySongsSq.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - recommendSongDataDailySongsSq.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - recommendSongDataDailySongsSq.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - recommendSongDataDailySongsSq.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - recommendSongDataDailySongsSq.sr = sr; - } - return recommendSongDataDailySongsSq; -} - -Map $RecommendSongDataDailySongsSqToJson(RecommendSongDataDailySongsSq entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension RecommendSongDataDailySongsSqExtension on RecommendSongDataDailySongsSq { - RecommendSongDataDailySongsSq copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return RecommendSongDataDailySongsSq() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -RecommendSongDataDailySongsHr $RecommendSongDataDailySongsHrFromJson(Map json) { - final RecommendSongDataDailySongsHr recommendSongDataDailySongsHr = RecommendSongDataDailySongsHr(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - recommendSongDataDailySongsHr.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - recommendSongDataDailySongsHr.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - recommendSongDataDailySongsHr.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - recommendSongDataDailySongsHr.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - recommendSongDataDailySongsHr.sr = sr; - } - return recommendSongDataDailySongsHr; -} - -Map $RecommendSongDataDailySongsHrToJson(RecommendSongDataDailySongsHr entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension RecommendSongDataDailySongsHrExtension on RecommendSongDataDailySongsHr { - RecommendSongDataDailySongsHr copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return RecommendSongDataDailySongsHr() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -RecommendSongDataDailySongsPrivilege $RecommendSongDataDailySongsPrivilegeFromJson( - Map json) { - final RecommendSongDataDailySongsPrivilege recommendSongDataDailySongsPrivilege = RecommendSongDataDailySongsPrivilege(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - recommendSongDataDailySongsPrivilege.id = id; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - recommendSongDataDailySongsPrivilege.fee = fee; - } - final int? payed = jsonConvert.convert(json['payed']); - if (payed != null) { - recommendSongDataDailySongsPrivilege.payed = payed; - } - final int? realPayed = jsonConvert.convert(json['realPayed']); - if (realPayed != null) { - recommendSongDataDailySongsPrivilege.realPayed = realPayed; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - recommendSongDataDailySongsPrivilege.st = st; - } - final int? pl = jsonConvert.convert(json['pl']); - if (pl != null) { - recommendSongDataDailySongsPrivilege.pl = pl; - } - final int? dl = jsonConvert.convert(json['dl']); - if (dl != null) { - recommendSongDataDailySongsPrivilege.dl = dl; - } - final int? sp = jsonConvert.convert(json['sp']); - if (sp != null) { - recommendSongDataDailySongsPrivilege.sp = sp; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - recommendSongDataDailySongsPrivilege.cp = cp; - } - final int? subp = jsonConvert.convert(json['subp']); - if (subp != null) { - recommendSongDataDailySongsPrivilege.subp = subp; - } - final bool? cs = jsonConvert.convert(json['cs']); - if (cs != null) { - recommendSongDataDailySongsPrivilege.cs = cs; - } - final int? maxbr = jsonConvert.convert(json['maxbr']); - if (maxbr != null) { - recommendSongDataDailySongsPrivilege.maxbr = maxbr; - } - final int? fl = jsonConvert.convert(json['fl']); - if (fl != null) { - recommendSongDataDailySongsPrivilege.fl = fl; - } - final dynamic pc = json['pc']; - if (pc != null) { - recommendSongDataDailySongsPrivilege.pc = pc; - } - final bool? toast = jsonConvert.convert(json['toast']); - if (toast != null) { - recommendSongDataDailySongsPrivilege.toast = toast; - } - final int? flag = jsonConvert.convert(json['flag']); - if (flag != null) { - recommendSongDataDailySongsPrivilege.flag = flag; - } - final bool? paidBigBang = jsonConvert.convert(json['paidBigBang']); - if (paidBigBang != null) { - recommendSongDataDailySongsPrivilege.paidBigBang = paidBigBang; - } - final bool? preSell = jsonConvert.convert(json['preSell']); - if (preSell != null) { - recommendSongDataDailySongsPrivilege.preSell = preSell; - } - final int? playMaxbr = jsonConvert.convert(json['playMaxbr']); - if (playMaxbr != null) { - recommendSongDataDailySongsPrivilege.playMaxbr = playMaxbr; - } - final int? downloadMaxbr = jsonConvert.convert(json['downloadMaxbr']); - if (downloadMaxbr != null) { - recommendSongDataDailySongsPrivilege.downloadMaxbr = downloadMaxbr; - } - final String? maxBrLevel = jsonConvert.convert(json['maxBrLevel']); - if (maxBrLevel != null) { - recommendSongDataDailySongsPrivilege.maxBrLevel = maxBrLevel; - } - final String? playMaxBrLevel = jsonConvert.convert(json['playMaxBrLevel']); - if (playMaxBrLevel != null) { - recommendSongDataDailySongsPrivilege.playMaxBrLevel = playMaxBrLevel; - } - final String? downloadMaxBrLevel = jsonConvert.convert(json['downloadMaxBrLevel']); - if (downloadMaxBrLevel != null) { - recommendSongDataDailySongsPrivilege.downloadMaxBrLevel = downloadMaxBrLevel; - } - final String? plLevel = jsonConvert.convert(json['plLevel']); - if (plLevel != null) { - recommendSongDataDailySongsPrivilege.plLevel = plLevel; - } - final String? dlLevel = jsonConvert.convert(json['dlLevel']); - if (dlLevel != null) { - recommendSongDataDailySongsPrivilege.dlLevel = dlLevel; - } - final String? flLevel = jsonConvert.convert(json['flLevel']); - if (flLevel != null) { - recommendSongDataDailySongsPrivilege.flLevel = flLevel; - } - final dynamic rscl = json['rscl']; - if (rscl != null) { - recommendSongDataDailySongsPrivilege.rscl = rscl; - } - final RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege? freeTrialPrivilege = jsonConvert - .convert(json['freeTrialPrivilege']); - if (freeTrialPrivilege != null) { - recommendSongDataDailySongsPrivilege.freeTrialPrivilege = freeTrialPrivilege; - } - final int? rightSource = jsonConvert.convert(json['rightSource']); - if (rightSource != null) { - recommendSongDataDailySongsPrivilege.rightSource = rightSource; - } - final List< - RecommendSongDataDailySongsPrivilegeChargeInfoList>? chargeInfoList = (json['chargeInfoList'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as RecommendSongDataDailySongsPrivilegeChargeInfoList).toList(); - if (chargeInfoList != null) { - recommendSongDataDailySongsPrivilege.chargeInfoList = chargeInfoList; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - recommendSongDataDailySongsPrivilege.code = code; - } - final dynamic message = json['message']; - if (message != null) { - recommendSongDataDailySongsPrivilege.message = message; - } - return recommendSongDataDailySongsPrivilege; -} - -Map $RecommendSongDataDailySongsPrivilegeToJson( - RecommendSongDataDailySongsPrivilege entity) { - final Map data = {}; - data['id'] = entity.id; - data['fee'] = entity.fee; - data['payed'] = entity.payed; - data['realPayed'] = entity.realPayed; - data['st'] = entity.st; - data['pl'] = entity.pl; - data['dl'] = entity.dl; - data['sp'] = entity.sp; - data['cp'] = entity.cp; - data['subp'] = entity.subp; - data['cs'] = entity.cs; - data['maxbr'] = entity.maxbr; - data['fl'] = entity.fl; - data['pc'] = entity.pc; - data['toast'] = entity.toast; - data['flag'] = entity.flag; - data['paidBigBang'] = entity.paidBigBang; - data['preSell'] = entity.preSell; - data['playMaxbr'] = entity.playMaxbr; - data['downloadMaxbr'] = entity.downloadMaxbr; - data['maxBrLevel'] = entity.maxBrLevel; - data['playMaxBrLevel'] = entity.playMaxBrLevel; - data['downloadMaxBrLevel'] = entity.downloadMaxBrLevel; - data['plLevel'] = entity.plLevel; - data['dlLevel'] = entity.dlLevel; - data['flLevel'] = entity.flLevel; - data['rscl'] = entity.rscl; - data['freeTrialPrivilege'] = entity.freeTrialPrivilege?.toJson(); - data['rightSource'] = entity.rightSource; - data['chargeInfoList'] = entity.chargeInfoList?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - data['message'] = entity.message; - return data; -} - -extension RecommendSongDataDailySongsPrivilegeExtension on RecommendSongDataDailySongsPrivilege { - RecommendSongDataDailySongsPrivilege copyWith({ - int? id, - int? fee, - int? payed, - int? realPayed, - int? st, - int? pl, - int? dl, - int? sp, - int? cp, - int? subp, - bool? cs, - int? maxbr, - int? fl, - dynamic pc, - bool? toast, - int? flag, - bool? paidBigBang, - bool? preSell, - int? playMaxbr, - int? downloadMaxbr, - String? maxBrLevel, - String? playMaxBrLevel, - String? downloadMaxBrLevel, - String? plLevel, - String? dlLevel, - String? flLevel, - dynamic rscl, - RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege? freeTrialPrivilege, - int? rightSource, - List? chargeInfoList, - int? code, - dynamic message, - }) { - return RecommendSongDataDailySongsPrivilege() - ..id = id ?? this.id - ..fee = fee ?? this.fee - ..payed = payed ?? this.payed - ..realPayed = realPayed ?? this.realPayed - ..st = st ?? this.st - ..pl = pl ?? this.pl - ..dl = dl ?? this.dl - ..sp = sp ?? this.sp - ..cp = cp ?? this.cp - ..subp = subp ?? this.subp - ..cs = cs ?? this.cs - ..maxbr = maxbr ?? this.maxbr - ..fl = fl ?? this.fl - ..pc = pc ?? this.pc - ..toast = toast ?? this.toast - ..flag = flag ?? this.flag - ..paidBigBang = paidBigBang ?? this.paidBigBang - ..preSell = preSell ?? this.preSell - ..playMaxbr = playMaxbr ?? this.playMaxbr - ..downloadMaxbr = downloadMaxbr ?? this.downloadMaxbr - ..maxBrLevel = maxBrLevel ?? this.maxBrLevel - ..playMaxBrLevel = playMaxBrLevel ?? this.playMaxBrLevel - ..downloadMaxBrLevel = downloadMaxBrLevel ?? this.downloadMaxBrLevel - ..plLevel = plLevel ?? this.plLevel - ..dlLevel = dlLevel ?? this.dlLevel - ..flLevel = flLevel ?? this.flLevel - ..rscl = rscl ?? this.rscl - ..freeTrialPrivilege = freeTrialPrivilege ?? this.freeTrialPrivilege - ..rightSource = rightSource ?? this.rightSource - ..chargeInfoList = chargeInfoList ?? this.chargeInfoList - ..code = code ?? this.code - ..message = message ?? this.message; - } -} - -RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege $RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeFromJson( - Map json) { - final RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege recommendSongDataDailySongsPrivilegeFreeTrialPrivilege = RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - recommendSongDataDailySongsPrivilegeFreeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - recommendSongDataDailySongsPrivilegeFreeTrialPrivilege.userConsumable = userConsumable; - } - final dynamic listenType = json['listenType']; - if (listenType != null) { - recommendSongDataDailySongsPrivilegeFreeTrialPrivilege.listenType = listenType; - } - final dynamic cannotListenReason = json['cannotListenReason']; - if (cannotListenReason != null) { - recommendSongDataDailySongsPrivilegeFreeTrialPrivilege.cannotListenReason = cannotListenReason; - } - final dynamic playReason = json['playReason']; - if (playReason != null) { - recommendSongDataDailySongsPrivilegeFreeTrialPrivilege.playReason = playReason; - } - final dynamic freeLimitTagType = json['freeLimitTagType']; - if (freeLimitTagType != null) { - recommendSongDataDailySongsPrivilegeFreeTrialPrivilege.freeLimitTagType = freeLimitTagType; - } - return recommendSongDataDailySongsPrivilegeFreeTrialPrivilege; -} - -Map $RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeToJson( - RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - data['listenType'] = entity.listenType; - data['cannotListenReason'] = entity.cannotListenReason; - data['playReason'] = entity.playReason; - data['freeLimitTagType'] = entity.freeLimitTagType; - return data; -} - -extension RecommendSongDataDailySongsPrivilegeFreeTrialPrivilegeExtension on RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege { - RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - dynamic listenType, - dynamic cannotListenReason, - dynamic playReason, - dynamic freeLimitTagType, - }) { - return RecommendSongDataDailySongsPrivilegeFreeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable - ..listenType = listenType ?? this.listenType - ..cannotListenReason = cannotListenReason ?? this.cannotListenReason - ..playReason = playReason ?? this.playReason - ..freeLimitTagType = freeLimitTagType ?? this.freeLimitTagType; - } -} - -RecommendSongDataDailySongsPrivilegeChargeInfoList $RecommendSongDataDailySongsPrivilegeChargeInfoListFromJson( - Map json) { - final RecommendSongDataDailySongsPrivilegeChargeInfoList recommendSongDataDailySongsPrivilegeChargeInfoList = RecommendSongDataDailySongsPrivilegeChargeInfoList(); - final int? rate = jsonConvert.convert(json['rate']); - if (rate != null) { - recommendSongDataDailySongsPrivilegeChargeInfoList.rate = rate; - } - final dynamic chargeUrl = json['chargeUrl']; - if (chargeUrl != null) { - recommendSongDataDailySongsPrivilegeChargeInfoList.chargeUrl = chargeUrl; - } - final dynamic chargeMessage = json['chargeMessage']; - if (chargeMessage != null) { - recommendSongDataDailySongsPrivilegeChargeInfoList.chargeMessage = chargeMessage; - } - final int? chargeType = jsonConvert.convert(json['chargeType']); - if (chargeType != null) { - recommendSongDataDailySongsPrivilegeChargeInfoList.chargeType = chargeType; - } - return recommendSongDataDailySongsPrivilegeChargeInfoList; -} - -Map $RecommendSongDataDailySongsPrivilegeChargeInfoListToJson( - RecommendSongDataDailySongsPrivilegeChargeInfoList entity) { - final Map data = {}; - data['rate'] = entity.rate; - data['chargeUrl'] = entity.chargeUrl; - data['chargeMessage'] = entity.chargeMessage; - data['chargeType'] = entity.chargeType; - return data; -} - -extension RecommendSongDataDailySongsPrivilegeChargeInfoListExtension on RecommendSongDataDailySongsPrivilegeChargeInfoList { - RecommendSongDataDailySongsPrivilegeChargeInfoList copyWith({ - int? rate, - dynamic chargeUrl, - dynamic chargeMessage, - int? chargeType, - }) { - return RecommendSongDataDailySongsPrivilegeChargeInfoList() - ..rate = rate ?? this.rate - ..chargeUrl = chargeUrl ?? this.chargeUrl - ..chargeMessage = chargeMessage ?? this.chargeMessage - ..chargeType = chargeType ?? this.chargeType; - } -} - -RecommendSongDataRecommendReasons $RecommendSongDataRecommendReasonsFromJson( - Map json) { - final RecommendSongDataRecommendReasons recommendSongDataRecommendReasons = RecommendSongDataRecommendReasons(); - final int? songId = jsonConvert.convert(json['songId']); - if (songId != null) { - recommendSongDataRecommendReasons.songId = songId; - } - final String? reason = jsonConvert.convert(json['reason']); - if (reason != null) { - recommendSongDataRecommendReasons.reason = reason; - } - final String? reasonId = jsonConvert.convert(json['reasonId']); - if (reasonId != null) { - recommendSongDataRecommendReasons.reasonId = reasonId; - } - final dynamic targetUrl = json['targetUrl']; - if (targetUrl != null) { - recommendSongDataRecommendReasons.targetUrl = targetUrl; - } - return recommendSongDataRecommendReasons; -} - -Map $RecommendSongDataRecommendReasonsToJson( - RecommendSongDataRecommendReasons entity) { - final Map data = {}; - data['songId'] = entity.songId; - data['reason'] = entity.reason; - data['reasonId'] = entity.reasonId; - data['targetUrl'] = entity.targetUrl; - return data; -} - -extension RecommendSongDataRecommendReasonsExtension on RecommendSongDataRecommendReasons { - RecommendSongDataRecommendReasons copyWith({ - int? songId, - String? reason, - String? reasonId, - dynamic targetUrl, - }) { - return RecommendSongDataRecommendReasons() - ..songId = songId ?? this.songId - ..reason = reason ?? this.reason - ..reasonId = reasonId ?? this.reasonId - ..targetUrl = targetUrl ?? this.targetUrl; - } -} \ No newline at end of file diff --git a/lib/generated/json/song_detail_entity.g.dart b/lib/generated/json/song_detail_entity.g.dart deleted file mode 100644 index 3f154df..0000000 --- a/lib/generated/json/song_detail_entity.g.dart +++ /dev/null @@ -1,1032 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/song/entity/song_detail_entity.dart'; - -SongDetailEntity $SongDetailEntityFromJson(Map json) { - final SongDetailEntity songDetailEntity = SongDetailEntity(); - final List? songs = (json['songs'] as List?)?.map( - (e) => jsonConvert.convert(e) as SongDetailSongs).toList(); - if (songs != null) { - songDetailEntity.songs = songs; - } - final List? privileges = (json['privileges'] as List?)?.map( - (e) => jsonConvert.convert(e) as SongDetailPrivileges).toList(); - if (privileges != null) { - songDetailEntity.privileges = privileges; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - songDetailEntity.code = code; - } - return songDetailEntity; -} - -Map $SongDetailEntityToJson(SongDetailEntity entity) { - final Map data = {}; - data['songs'] = entity.songs?.map((v) => v.toJson()).toList(); - data['privileges'] = entity.privileges?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - return data; -} - -extension SongDetailEntityExtension on SongDetailEntity { - SongDetailEntity copyWith({ - List? songs, - List? privileges, - int? code, - }) { - return SongDetailEntity() - ..songs = songs ?? this.songs - ..privileges = privileges ?? this.privileges - ..code = code ?? this.code; - } -} - -SongDetailSongs $SongDetailSongsFromJson(Map json) { - final SongDetailSongs songDetailSongs = SongDetailSongs(); - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - songDetailSongs.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - songDetailSongs.id = id; - } - final int? pst = jsonConvert.convert(json['pst']); - if (pst != null) { - songDetailSongs.pst = pst; - } - final int? t = jsonConvert.convert(json['t']); - if (t != null) { - songDetailSongs.t = t; - } - final List? ar = (json['ar'] as List?)?.map( - (e) => jsonConvert.convert(e) as SongDetailSongsAr).toList(); - if (ar != null) { - songDetailSongs.ar = ar; - } - final List? alia = (json['alia'] as List?)?.map( - (e) => e).toList(); - if (alia != null) { - songDetailSongs.alia = alia; - } - final double? pop = jsonConvert.convert(json['pop']); - if (pop != null) { - songDetailSongs.pop = pop; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - songDetailSongs.st = st; - } - final String? rt = jsonConvert.convert(json['rt']); - if (rt != null) { - songDetailSongs.rt = rt; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - songDetailSongs.fee = fee; - } - final int? v = jsonConvert.convert(json['v']); - if (v != null) { - songDetailSongs.v = v; - } - final dynamic crbt = json['crbt']; - if (crbt != null) { - songDetailSongs.crbt = crbt; - } - final String? cf = jsonConvert.convert(json['cf']); - if (cf != null) { - songDetailSongs.cf = cf; - } - final SongDetailSongsAl? al = jsonConvert.convert(json['al']); - if (al != null) { - songDetailSongs.al = al; - } - final int? dt = jsonConvert.convert(json['dt']); - if (dt != null) { - songDetailSongs.dt = dt; - } - final SongDetailSongsH? h = jsonConvert.convert(json['h']); - if (h != null) { - songDetailSongs.h = h; - } - final SongDetailSongsM? m = jsonConvert.convert(json['m']); - if (m != null) { - songDetailSongs.m = m; - } - final SongDetailSongsL? l = jsonConvert.convert(json['l']); - if (l != null) { - songDetailSongs.l = l; - } - final SongDetailSongsSq? sq = jsonConvert.convert(json['sq']); - if (sq != null) { - songDetailSongs.sq = sq; - } - final dynamic hr = json['hr']; - if (hr != null) { - songDetailSongs.hr = hr; - } - final dynamic a = json['a']; - if (a != null) { - songDetailSongs.a = a; - } - final String? cd = jsonConvert.convert(json['cd']); - if (cd != null) { - songDetailSongs.cd = cd; - } - final int? no = jsonConvert.convert(json['no']); - if (no != null) { - songDetailSongs.no = no; - } - final dynamic rtUrl = json['rtUrl']; - if (rtUrl != null) { - songDetailSongs.rtUrl = rtUrl; - } - final int? ftype = jsonConvert.convert(json['ftype']); - if (ftype != null) { - songDetailSongs.ftype = ftype; - } - final List? rtUrls = (json['rtUrls'] as List?)?.map( - (e) => e).toList(); - if (rtUrls != null) { - songDetailSongs.rtUrls = rtUrls; - } - final int? djId = jsonConvert.convert(json['djId']); - if (djId != null) { - songDetailSongs.djId = djId; - } - final int? copyright = jsonConvert.convert(json['copyright']); - if (copyright != null) { - songDetailSongs.copyright = copyright; - } - final int? sId = jsonConvert.convert(json['s_id']); - if (sId != null) { - songDetailSongs.sId = sId; - } - final int? mark = jsonConvert.convert(json['mark']); - if (mark != null) { - songDetailSongs.mark = mark; - } - final int? originCoverType = jsonConvert.convert(json['originCoverType']); - if (originCoverType != null) { - songDetailSongs.originCoverType = originCoverType; - } - final dynamic originSongSimpleData = json['originSongSimpleData']; - if (originSongSimpleData != null) { - songDetailSongs.originSongSimpleData = originSongSimpleData; - } - final dynamic tagPicList = json['tagPicList']; - if (tagPicList != null) { - songDetailSongs.tagPicList = tagPicList; - } - final bool? resourceState = jsonConvert.convert(json['resourceState']); - if (resourceState != null) { - songDetailSongs.resourceState = resourceState; - } - final int? version = jsonConvert.convert(json['version']); - if (version != null) { - songDetailSongs.version = version; - } - final dynamic songJumpInfo = json['songJumpInfo']; - if (songJumpInfo != null) { - songDetailSongs.songJumpInfo = songJumpInfo; - } - final dynamic entertainmentTags = json['entertainmentTags']; - if (entertainmentTags != null) { - songDetailSongs.entertainmentTags = entertainmentTags; - } - final dynamic awardTags = json['awardTags']; - if (awardTags != null) { - songDetailSongs.awardTags = awardTags; - } - final dynamic displayTags = json['displayTags']; - if (displayTags != null) { - songDetailSongs.displayTags = displayTags; - } - final int? single = jsonConvert.convert(json['single']); - if (single != null) { - songDetailSongs.single = single; - } - final dynamic noCopyrightRcmd = json['noCopyrightRcmd']; - if (noCopyrightRcmd != null) { - songDetailSongs.noCopyrightRcmd = noCopyrightRcmd; - } - final int? mv = jsonConvert.convert(json['mv']); - if (mv != null) { - songDetailSongs.mv = mv; - } - final int? rtype = jsonConvert.convert(json['rtype']); - if (rtype != null) { - songDetailSongs.rtype = rtype; - } - final dynamic rurl = json['rurl']; - if (rurl != null) { - songDetailSongs.rurl = rurl; - } - final int? mst = jsonConvert.convert(json['mst']); - if (mst != null) { - songDetailSongs.mst = mst; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - songDetailSongs.cp = cp; - } - final int? publishTime = jsonConvert.convert(json['publishTime']); - if (publishTime != null) { - songDetailSongs.publishTime = publishTime; - } - return songDetailSongs; -} - -Map $SongDetailSongsToJson(SongDetailSongs entity) { - final Map data = {}; - data['name'] = entity.name; - data['id'] = entity.id; - data['pst'] = entity.pst; - data['t'] = entity.t; - data['ar'] = entity.ar?.map((v) => v.toJson()).toList(); - data['alia'] = entity.alia; - data['pop'] = entity.pop; - data['st'] = entity.st; - data['rt'] = entity.rt; - data['fee'] = entity.fee; - data['v'] = entity.v; - data['crbt'] = entity.crbt; - data['cf'] = entity.cf; - data['al'] = entity.al?.toJson(); - data['dt'] = entity.dt; - data['h'] = entity.h?.toJson(); - data['m'] = entity.m?.toJson(); - data['l'] = entity.l?.toJson(); - data['sq'] = entity.sq?.toJson(); - data['hr'] = entity.hr; - data['a'] = entity.a; - data['cd'] = entity.cd; - data['no'] = entity.no; - data['rtUrl'] = entity.rtUrl; - data['ftype'] = entity.ftype; - data['rtUrls'] = entity.rtUrls; - data['djId'] = entity.djId; - data['copyright'] = entity.copyright; - data['s_id'] = entity.sId; - data['mark'] = entity.mark; - data['originCoverType'] = entity.originCoverType; - data['originSongSimpleData'] = entity.originSongSimpleData; - data['tagPicList'] = entity.tagPicList; - data['resourceState'] = entity.resourceState; - data['version'] = entity.version; - data['songJumpInfo'] = entity.songJumpInfo; - data['entertainmentTags'] = entity.entertainmentTags; - data['awardTags'] = entity.awardTags; - data['displayTags'] = entity.displayTags; - data['single'] = entity.single; - data['noCopyrightRcmd'] = entity.noCopyrightRcmd; - data['mv'] = entity.mv; - data['rtype'] = entity.rtype; - data['rurl'] = entity.rurl; - data['mst'] = entity.mst; - data['cp'] = entity.cp; - data['publishTime'] = entity.publishTime; - return data; -} - -extension SongDetailSongsExtension on SongDetailSongs { - SongDetailSongs copyWith({ - String? name, - int? id, - int? pst, - int? t, - List? ar, - List? alia, - double? pop, - int? st, - String? rt, - int? fee, - int? v, - dynamic crbt, - String? cf, - SongDetailSongsAl? al, - int? dt, - SongDetailSongsH? h, - SongDetailSongsM? m, - SongDetailSongsL? l, - SongDetailSongsSq? sq, - dynamic hr, - dynamic a, - String? cd, - int? no, - dynamic rtUrl, - int? ftype, - List? rtUrls, - int? djId, - int? copyright, - int? sId, - int? mark, - int? originCoverType, - dynamic originSongSimpleData, - dynamic tagPicList, - bool? resourceState, - int? version, - dynamic songJumpInfo, - dynamic entertainmentTags, - dynamic awardTags, - dynamic displayTags, - int? single, - dynamic noCopyrightRcmd, - int? mv, - int? rtype, - dynamic rurl, - int? mst, - int? cp, - int? publishTime, - }) { - return SongDetailSongs() - ..name = name ?? this.name - ..id = id ?? this.id - ..pst = pst ?? this.pst - ..t = t ?? this.t - ..ar = ar ?? this.ar - ..alia = alia ?? this.alia - ..pop = pop ?? this.pop - ..st = st ?? this.st - ..rt = rt ?? this.rt - ..fee = fee ?? this.fee - ..v = v ?? this.v - ..crbt = crbt ?? this.crbt - ..cf = cf ?? this.cf - ..al = al ?? this.al - ..dt = dt ?? this.dt - ..h = h ?? this.h - ..m = m ?? this.m - ..l = l ?? this.l - ..sq = sq ?? this.sq - ..hr = hr ?? this.hr - ..a = a ?? this.a - ..cd = cd ?? this.cd - ..no = no ?? this.no - ..rtUrl = rtUrl ?? this.rtUrl - ..ftype = ftype ?? this.ftype - ..rtUrls = rtUrls ?? this.rtUrls - ..djId = djId ?? this.djId - ..copyright = copyright ?? this.copyright - ..sId = sId ?? this.sId - ..mark = mark ?? this.mark - ..originCoverType = originCoverType ?? this.originCoverType - ..originSongSimpleData = originSongSimpleData ?? this.originSongSimpleData - ..tagPicList = tagPicList ?? this.tagPicList - ..resourceState = resourceState ?? this.resourceState - ..version = version ?? this.version - ..songJumpInfo = songJumpInfo ?? this.songJumpInfo - ..entertainmentTags = entertainmentTags ?? this.entertainmentTags - ..awardTags = awardTags ?? this.awardTags - ..displayTags = displayTags ?? this.displayTags - ..single = single ?? this.single - ..noCopyrightRcmd = noCopyrightRcmd ?? this.noCopyrightRcmd - ..mv = mv ?? this.mv - ..rtype = rtype ?? this.rtype - ..rurl = rurl ?? this.rurl - ..mst = mst ?? this.mst - ..cp = cp ?? this.cp - ..publishTime = publishTime ?? this.publishTime; - } -} - -SongDetailSongsAr $SongDetailSongsArFromJson(Map json) { - final SongDetailSongsAr songDetailSongsAr = SongDetailSongsAr(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - songDetailSongsAr.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - songDetailSongsAr.name = name; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => e).toList(); - if (tns != null) { - songDetailSongsAr.tns = tns; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => e).toList(); - if (alias != null) { - songDetailSongsAr.alias = alias; - } - return songDetailSongsAr; -} - -Map $SongDetailSongsArToJson(SongDetailSongsAr entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['tns'] = entity.tns; - data['alias'] = entity.alias; - return data; -} - -extension SongDetailSongsArExtension on SongDetailSongsAr { - SongDetailSongsAr copyWith({ - int? id, - String? name, - List? tns, - List? alias, - }) { - return SongDetailSongsAr() - ..id = id ?? this.id - ..name = name ?? this.name - ..tns = tns ?? this.tns - ..alias = alias ?? this.alias; - } -} - -SongDetailSongsAl $SongDetailSongsAlFromJson(Map json) { - final SongDetailSongsAl songDetailSongsAl = SongDetailSongsAl(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - songDetailSongsAl.id = id; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - songDetailSongsAl.name = name; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - songDetailSongsAl.picUrl = picUrl; - } - final List? tns = (json['tns'] as List?)?.map( - (e) => e).toList(); - if (tns != null) { - songDetailSongsAl.tns = tns; - } - final int? pic = jsonConvert.convert(json['pic']); - if (pic != null) { - songDetailSongsAl.pic = pic; - } - return songDetailSongsAl; -} - -Map $SongDetailSongsAlToJson(SongDetailSongsAl entity) { - final Map data = {}; - data['id'] = entity.id; - data['name'] = entity.name; - data['picUrl'] = entity.picUrl; - data['tns'] = entity.tns; - data['pic'] = entity.pic; - return data; -} - -extension SongDetailSongsAlExtension on SongDetailSongsAl { - SongDetailSongsAl copyWith({ - int? id, - String? name, - String? picUrl, - List? tns, - int? pic, - }) { - return SongDetailSongsAl() - ..id = id ?? this.id - ..name = name ?? this.name - ..picUrl = picUrl ?? this.picUrl - ..tns = tns ?? this.tns - ..pic = pic ?? this.pic; - } -} - -SongDetailSongsH $SongDetailSongsHFromJson(Map json) { - final SongDetailSongsH songDetailSongsH = SongDetailSongsH(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songDetailSongsH.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songDetailSongsH.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songDetailSongsH.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songDetailSongsH.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songDetailSongsH.sr = sr; - } - return songDetailSongsH; -} - -Map $SongDetailSongsHToJson(SongDetailSongsH entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongDetailSongsHExtension on SongDetailSongsH { - SongDetailSongsH copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongDetailSongsH() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongDetailSongsM $SongDetailSongsMFromJson(Map json) { - final SongDetailSongsM songDetailSongsM = SongDetailSongsM(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songDetailSongsM.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songDetailSongsM.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songDetailSongsM.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songDetailSongsM.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songDetailSongsM.sr = sr; - } - return songDetailSongsM; -} - -Map $SongDetailSongsMToJson(SongDetailSongsM entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongDetailSongsMExtension on SongDetailSongsM { - SongDetailSongsM copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongDetailSongsM() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongDetailSongsL $SongDetailSongsLFromJson(Map json) { - final SongDetailSongsL songDetailSongsL = SongDetailSongsL(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songDetailSongsL.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songDetailSongsL.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songDetailSongsL.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songDetailSongsL.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songDetailSongsL.sr = sr; - } - return songDetailSongsL; -} - -Map $SongDetailSongsLToJson(SongDetailSongsL entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongDetailSongsLExtension on SongDetailSongsL { - SongDetailSongsL copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongDetailSongsL() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongDetailSongsSq $SongDetailSongsSqFromJson(Map json) { - final SongDetailSongsSq songDetailSongsSq = SongDetailSongsSq(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songDetailSongsSq.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songDetailSongsSq.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songDetailSongsSq.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songDetailSongsSq.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songDetailSongsSq.sr = sr; - } - return songDetailSongsSq; -} - -Map $SongDetailSongsSqToJson(SongDetailSongsSq entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongDetailSongsSqExtension on SongDetailSongsSq { - SongDetailSongsSq copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongDetailSongsSq() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongDetailPrivileges $SongDetailPrivilegesFromJson(Map json) { - final SongDetailPrivileges songDetailPrivileges = SongDetailPrivileges(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - songDetailPrivileges.id = id; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - songDetailPrivileges.fee = fee; - } - final int? payed = jsonConvert.convert(json['payed']); - if (payed != null) { - songDetailPrivileges.payed = payed; - } - final int? st = jsonConvert.convert(json['st']); - if (st != null) { - songDetailPrivileges.st = st; - } - final int? pl = jsonConvert.convert(json['pl']); - if (pl != null) { - songDetailPrivileges.pl = pl; - } - final int? dl = jsonConvert.convert(json['dl']); - if (dl != null) { - songDetailPrivileges.dl = dl; - } - final int? sp = jsonConvert.convert(json['sp']); - if (sp != null) { - songDetailPrivileges.sp = sp; - } - final int? cp = jsonConvert.convert(json['cp']); - if (cp != null) { - songDetailPrivileges.cp = cp; - } - final int? subp = jsonConvert.convert(json['subp']); - if (subp != null) { - songDetailPrivileges.subp = subp; - } - final bool? cs = jsonConvert.convert(json['cs']); - if (cs != null) { - songDetailPrivileges.cs = cs; - } - final int? maxbr = jsonConvert.convert(json['maxbr']); - if (maxbr != null) { - songDetailPrivileges.maxbr = maxbr; - } - final int? fl = jsonConvert.convert(json['fl']); - if (fl != null) { - songDetailPrivileges.fl = fl; - } - final bool? toast = jsonConvert.convert(json['toast']); - if (toast != null) { - songDetailPrivileges.toast = toast; - } - final int? flag = jsonConvert.convert(json['flag']); - if (flag != null) { - songDetailPrivileges.flag = flag; - } - final bool? preSell = jsonConvert.convert(json['preSell']); - if (preSell != null) { - songDetailPrivileges.preSell = preSell; - } - final int? playMaxbr = jsonConvert.convert(json['playMaxbr']); - if (playMaxbr != null) { - songDetailPrivileges.playMaxbr = playMaxbr; - } - final int? downloadMaxbr = jsonConvert.convert(json['downloadMaxbr']); - if (downloadMaxbr != null) { - songDetailPrivileges.downloadMaxbr = downloadMaxbr; - } - final String? maxBrLevel = jsonConvert.convert(json['maxBrLevel']); - if (maxBrLevel != null) { - songDetailPrivileges.maxBrLevel = maxBrLevel; - } - final String? playMaxBrLevel = jsonConvert.convert(json['playMaxBrLevel']); - if (playMaxBrLevel != null) { - songDetailPrivileges.playMaxBrLevel = playMaxBrLevel; - } - final String? downloadMaxBrLevel = jsonConvert.convert(json['downloadMaxBrLevel']); - if (downloadMaxBrLevel != null) { - songDetailPrivileges.downloadMaxBrLevel = downloadMaxBrLevel; - } - final String? plLevel = jsonConvert.convert(json['plLevel']); - if (plLevel != null) { - songDetailPrivileges.plLevel = plLevel; - } - final String? dlLevel = jsonConvert.convert(json['dlLevel']); - if (dlLevel != null) { - songDetailPrivileges.dlLevel = dlLevel; - } - final String? flLevel = jsonConvert.convert(json['flLevel']); - if (flLevel != null) { - songDetailPrivileges.flLevel = flLevel; - } - final dynamic rscl = json['rscl']; - if (rscl != null) { - songDetailPrivileges.rscl = rscl; - } - final SongDetailPrivilegesFreeTrialPrivilege? freeTrialPrivilege = jsonConvert.convert< - SongDetailPrivilegesFreeTrialPrivilege>(json['freeTrialPrivilege']); - if (freeTrialPrivilege != null) { - songDetailPrivileges.freeTrialPrivilege = freeTrialPrivilege; - } - final int? rightSource = jsonConvert.convert(json['rightSource']); - if (rightSource != null) { - songDetailPrivileges.rightSource = rightSource; - } - final List? chargeInfoList = (json['chargeInfoList'] as List< - dynamic>?)?.map( - (e) => - jsonConvert.convert( - e) as SongDetailPrivilegesChargeInfoList).toList(); - if (chargeInfoList != null) { - songDetailPrivileges.chargeInfoList = chargeInfoList; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - songDetailPrivileges.code = code; - } - final dynamic message = json['message']; - if (message != null) { - songDetailPrivileges.message = message; - } - return songDetailPrivileges; -} - -Map $SongDetailPrivilegesToJson(SongDetailPrivileges entity) { - final Map data = {}; - data['id'] = entity.id; - data['fee'] = entity.fee; - data['payed'] = entity.payed; - data['st'] = entity.st; - data['pl'] = entity.pl; - data['dl'] = entity.dl; - data['sp'] = entity.sp; - data['cp'] = entity.cp; - data['subp'] = entity.subp; - data['cs'] = entity.cs; - data['maxbr'] = entity.maxbr; - data['fl'] = entity.fl; - data['toast'] = entity.toast; - data['flag'] = entity.flag; - data['preSell'] = entity.preSell; - data['playMaxbr'] = entity.playMaxbr; - data['downloadMaxbr'] = entity.downloadMaxbr; - data['maxBrLevel'] = entity.maxBrLevel; - data['playMaxBrLevel'] = entity.playMaxBrLevel; - data['downloadMaxBrLevel'] = entity.downloadMaxBrLevel; - data['plLevel'] = entity.plLevel; - data['dlLevel'] = entity.dlLevel; - data['flLevel'] = entity.flLevel; - data['rscl'] = entity.rscl; - data['freeTrialPrivilege'] = entity.freeTrialPrivilege?.toJson(); - data['rightSource'] = entity.rightSource; - data['chargeInfoList'] = entity.chargeInfoList?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - data['message'] = entity.message; - return data; -} - -extension SongDetailPrivilegesExtension on SongDetailPrivileges { - SongDetailPrivileges copyWith({ - int? id, - int? fee, - int? payed, - int? st, - int? pl, - int? dl, - int? sp, - int? cp, - int? subp, - bool? cs, - int? maxbr, - int? fl, - bool? toast, - int? flag, - bool? preSell, - int? playMaxbr, - int? downloadMaxbr, - String? maxBrLevel, - String? playMaxBrLevel, - String? downloadMaxBrLevel, - String? plLevel, - String? dlLevel, - String? flLevel, - dynamic rscl, - SongDetailPrivilegesFreeTrialPrivilege? freeTrialPrivilege, - int? rightSource, - List? chargeInfoList, - int? code, - dynamic message, - }) { - return SongDetailPrivileges() - ..id = id ?? this.id - ..fee = fee ?? this.fee - ..payed = payed ?? this.payed - ..st = st ?? this.st - ..pl = pl ?? this.pl - ..dl = dl ?? this.dl - ..sp = sp ?? this.sp - ..cp = cp ?? this.cp - ..subp = subp ?? this.subp - ..cs = cs ?? this.cs - ..maxbr = maxbr ?? this.maxbr - ..fl = fl ?? this.fl - ..toast = toast ?? this.toast - ..flag = flag ?? this.flag - ..preSell = preSell ?? this.preSell - ..playMaxbr = playMaxbr ?? this.playMaxbr - ..downloadMaxbr = downloadMaxbr ?? this.downloadMaxbr - ..maxBrLevel = maxBrLevel ?? this.maxBrLevel - ..playMaxBrLevel = playMaxBrLevel ?? this.playMaxBrLevel - ..downloadMaxBrLevel = downloadMaxBrLevel ?? this.downloadMaxBrLevel - ..plLevel = plLevel ?? this.plLevel - ..dlLevel = dlLevel ?? this.dlLevel - ..flLevel = flLevel ?? this.flLevel - ..rscl = rscl ?? this.rscl - ..freeTrialPrivilege = freeTrialPrivilege ?? this.freeTrialPrivilege - ..rightSource = rightSource ?? this.rightSource - ..chargeInfoList = chargeInfoList ?? this.chargeInfoList - ..code = code ?? this.code - ..message = message ?? this.message; - } -} - -SongDetailPrivilegesFreeTrialPrivilege $SongDetailPrivilegesFreeTrialPrivilegeFromJson( - Map json) { - final SongDetailPrivilegesFreeTrialPrivilege songDetailPrivilegesFreeTrialPrivilege = SongDetailPrivilegesFreeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - songDetailPrivilegesFreeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - songDetailPrivilegesFreeTrialPrivilege.userConsumable = userConsumable; - } - final int? listenType = jsonConvert.convert(json['listenType']); - if (listenType != null) { - songDetailPrivilegesFreeTrialPrivilege.listenType = listenType; - } - final int? cannotListenReason = jsonConvert.convert(json['cannotListenReason']); - if (cannotListenReason != null) { - songDetailPrivilegesFreeTrialPrivilege.cannotListenReason = cannotListenReason; - } - final dynamic playReason = json['playReason']; - if (playReason != null) { - songDetailPrivilegesFreeTrialPrivilege.playReason = playReason; - } - final dynamic freeLimitTagType = json['freeLimitTagType']; - if (freeLimitTagType != null) { - songDetailPrivilegesFreeTrialPrivilege.freeLimitTagType = freeLimitTagType; - } - return songDetailPrivilegesFreeTrialPrivilege; -} - -Map $SongDetailPrivilegesFreeTrialPrivilegeToJson( - SongDetailPrivilegesFreeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - data['listenType'] = entity.listenType; - data['cannotListenReason'] = entity.cannotListenReason; - data['playReason'] = entity.playReason; - data['freeLimitTagType'] = entity.freeLimitTagType; - return data; -} - -extension SongDetailPrivilegesFreeTrialPrivilegeExtension on SongDetailPrivilegesFreeTrialPrivilege { - SongDetailPrivilegesFreeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - int? listenType, - int? cannotListenReason, - dynamic playReason, - dynamic freeLimitTagType, - }) { - return SongDetailPrivilegesFreeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable - ..listenType = listenType ?? this.listenType - ..cannotListenReason = cannotListenReason ?? this.cannotListenReason - ..playReason = playReason ?? this.playReason - ..freeLimitTagType = freeLimitTagType ?? this.freeLimitTagType; - } -} - -SongDetailPrivilegesChargeInfoList $SongDetailPrivilegesChargeInfoListFromJson( - Map json) { - final SongDetailPrivilegesChargeInfoList songDetailPrivilegesChargeInfoList = SongDetailPrivilegesChargeInfoList(); - final int? rate = jsonConvert.convert(json['rate']); - if (rate != null) { - songDetailPrivilegesChargeInfoList.rate = rate; - } - final dynamic chargeUrl = json['chargeUrl']; - if (chargeUrl != null) { - songDetailPrivilegesChargeInfoList.chargeUrl = chargeUrl; - } - final dynamic chargeMessage = json['chargeMessage']; - if (chargeMessage != null) { - songDetailPrivilegesChargeInfoList.chargeMessage = chargeMessage; - } - final int? chargeType = jsonConvert.convert(json['chargeType']); - if (chargeType != null) { - songDetailPrivilegesChargeInfoList.chargeType = chargeType; - } - return songDetailPrivilegesChargeInfoList; -} - -Map $SongDetailPrivilegesChargeInfoListToJson( - SongDetailPrivilegesChargeInfoList entity) { - final Map data = {}; - data['rate'] = entity.rate; - data['chargeUrl'] = entity.chargeUrl; - data['chargeMessage'] = entity.chargeMessage; - data['chargeType'] = entity.chargeType; - return data; -} - -extension SongDetailPrivilegesChargeInfoListExtension on SongDetailPrivilegesChargeInfoList { - SongDetailPrivilegesChargeInfoList copyWith({ - int? rate, - dynamic chargeUrl, - dynamic chargeMessage, - int? chargeType, - }) { - return SongDetailPrivilegesChargeInfoList() - ..rate = rate ?? this.rate - ..chargeUrl = chargeUrl ?? this.chargeUrl - ..chargeMessage = chargeMessage ?? this.chargeMessage - ..chargeType = chargeType ?? this.chargeType; - } -} \ No newline at end of file diff --git a/lib/generated/json/song_like_check_entity.g.dart b/lib/generated/json/song_like_check_entity.g.dart deleted file mode 100644 index 19aab6a..0000000 --- a/lib/generated/json/song_like_check_entity.g.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/song/entity/song_like_check_entity.dart'; - -SongLikeCheckEntity $SongLikeCheckEntityFromJson(Map json) { - final SongLikeCheckEntity songLikeCheckEntity = SongLikeCheckEntity(); - final List? ids = (json['ids'] as List?)?.map( - (e) => jsonConvert.convert(e) as int).toList(); - if (ids != null) { - songLikeCheckEntity.ids = ids; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - songLikeCheckEntity.code = code; - } - return songLikeCheckEntity; -} - -Map $SongLikeCheckEntityToJson(SongLikeCheckEntity entity) { - final Map data = {}; - data['ids'] = entity.ids; - data['code'] = entity.code; - return data; -} - -extension SongLikeCheckEntityExtension on SongLikeCheckEntity { - SongLikeCheckEntity copyWith({ - List? ids, - int? code, - }) { - return SongLikeCheckEntity() - ..ids = ids ?? this.ids - ..code = code ?? this.code; - } -} \ No newline at end of file diff --git a/lib/generated/json/song_quality_detail_entity.g.dart b/lib/generated/json/song_quality_detail_entity.g.dart deleted file mode 100644 index 623aa68..0000000 --- a/lib/generated/json/song_quality_detail_entity.g.dart +++ /dev/null @@ -1,512 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/song/entity/song_quality_detail_entity.dart'; - -SongQualityDetailEntity $SongQualityDetailEntityFromJson(Map json) { - final SongQualityDetailEntity songQualityDetailEntity = SongQualityDetailEntity(); - final SongQualityDetailData? data = jsonConvert.convert(json['data']); - if (data != null) { - songQualityDetailEntity.data = data; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - songQualityDetailEntity.code = code; - } - final String? message = jsonConvert.convert(json['message']); - if (message != null) { - songQualityDetailEntity.message = message; - } - final bool? success = jsonConvert.convert(json['success']); - if (success != null) { - songQualityDetailEntity.success = success; - } - final bool? error = jsonConvert.convert(json['error']); - if (error != null) { - songQualityDetailEntity.error = error; - } - return songQualityDetailEntity; -} - -Map $SongQualityDetailEntityToJson(SongQualityDetailEntity entity) { - final Map data = {}; - data['data'] = entity.data?.toJson(); - data['code'] = entity.code; - data['message'] = entity.message; - data['success'] = entity.success; - data['error'] = entity.error; - return data; -} - -extension SongQualityDetailEntityExtension on SongQualityDetailEntity { - SongQualityDetailEntity copyWith({ - SongQualityDetailData? data, - int? code, - String? message, - bool? success, - bool? error, - }) { - return SongQualityDetailEntity() - ..data = data ?? this.data - ..code = code ?? this.code - ..message = message ?? this.message - ..success = success ?? this.success - ..error = error ?? this.error; - } -} - -SongQualityDetailData $SongQualityDetailDataFromJson(Map json) { - final SongQualityDetailData songQualityDetailData = SongQualityDetailData(); - final int? songId = jsonConvert.convert(json['songId']); - if (songId != null) { - songQualityDetailData.songId = songId; - } - final SongQualityDetailDataH? h = jsonConvert.convert(json['h']); - if (h != null) { - songQualityDetailData.h = h; - } - final SongQualityDetailDataM? m = jsonConvert.convert(json['m']); - if (m != null) { - songQualityDetailData.m = m; - } - final SongQualityDetailDataL? l = jsonConvert.convert(json['l']); - if (l != null) { - songQualityDetailData.l = l; - } - final SongQualityDetailDataSq? sq = jsonConvert.convert(json['sq']); - if (sq != null) { - songQualityDetailData.sq = sq; - } - final dynamic hr = json['hr']; - if (hr != null) { - songQualityDetailData.hr = hr; - } - final dynamic db = json['db']; - if (db != null) { - songQualityDetailData.db = db; - } - final SongQualityDetailDataJm? jm = jsonConvert.convert(json['jm']); - if (jm != null) { - songQualityDetailData.jm = jm; - } - final SongQualityDetailDataJe? je = jsonConvert.convert(json['je']); - if (je != null) { - songQualityDetailData.je = je; - } - final dynamic sk = json['sk']; - if (sk != null) { - songQualityDetailData.sk = sk; - } - final SongQualityDetailDataVi? vi = jsonConvert.convert(json['vi']); - if (vi != null) { - songQualityDetailData.vi = vi; - } - return songQualityDetailData; -} - -Map $SongQualityDetailDataToJson(SongQualityDetailData entity) { - final Map data = {}; - data['songId'] = entity.songId; - data['h'] = entity.h?.toJson(); - data['m'] = entity.m?.toJson(); - data['l'] = entity.l?.toJson(); - data['sq'] = entity.sq?.toJson(); - data['hr'] = entity.hr; - data['db'] = entity.db; - data['jm'] = entity.jm?.toJson(); - data['je'] = entity.je?.toJson(); - data['sk'] = entity.sk; - data['vi'] = entity.vi?.toJson(); - return data; -} - -extension SongQualityDetailDataExtension on SongQualityDetailData { - SongQualityDetailData copyWith({ - int? songId, - SongQualityDetailDataH? h, - SongQualityDetailDataM? m, - SongQualityDetailDataL? l, - SongQualityDetailDataSq? sq, - dynamic hr, - dynamic db, - SongQualityDetailDataJm? jm, - SongQualityDetailDataJe? je, - dynamic sk, - SongQualityDetailDataVi? vi, - }) { - return SongQualityDetailData() - ..songId = songId ?? this.songId - ..h = h ?? this.h - ..m = m ?? this.m - ..l = l ?? this.l - ..sq = sq ?? this.sq - ..hr = hr ?? this.hr - ..db = db ?? this.db - ..jm = jm ?? this.jm - ..je = je ?? this.je - ..sk = sk ?? this.sk - ..vi = vi ?? this.vi; - } -} - -SongQualityDetailDataH $SongQualityDetailDataHFromJson(Map json) { - final SongQualityDetailDataH songQualityDetailDataH = SongQualityDetailDataH(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataH.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataH.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataH.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataH.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataH.sr = sr; - } - return songQualityDetailDataH; -} - -Map $SongQualityDetailDataHToJson(SongQualityDetailDataH entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataHExtension on SongQualityDetailDataH { - SongQualityDetailDataH copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataH() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongQualityDetailDataM $SongQualityDetailDataMFromJson(Map json) { - final SongQualityDetailDataM songQualityDetailDataM = SongQualityDetailDataM(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataM.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataM.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataM.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataM.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataM.sr = sr; - } - return songQualityDetailDataM; -} - -Map $SongQualityDetailDataMToJson(SongQualityDetailDataM entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataMExtension on SongQualityDetailDataM { - SongQualityDetailDataM copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataM() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongQualityDetailDataL $SongQualityDetailDataLFromJson(Map json) { - final SongQualityDetailDataL songQualityDetailDataL = SongQualityDetailDataL(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataL.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataL.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataL.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataL.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataL.sr = sr; - } - return songQualityDetailDataL; -} - -Map $SongQualityDetailDataLToJson(SongQualityDetailDataL entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataLExtension on SongQualityDetailDataL { - SongQualityDetailDataL copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataL() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongQualityDetailDataSq $SongQualityDetailDataSqFromJson(Map json) { - final SongQualityDetailDataSq songQualityDetailDataSq = SongQualityDetailDataSq(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataSq.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataSq.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataSq.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataSq.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataSq.sr = sr; - } - return songQualityDetailDataSq; -} - -Map $SongQualityDetailDataSqToJson(SongQualityDetailDataSq entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataSqExtension on SongQualityDetailDataSq { - SongQualityDetailDataSq copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataSq() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongQualityDetailDataJm $SongQualityDetailDataJmFromJson(Map json) { - final SongQualityDetailDataJm songQualityDetailDataJm = SongQualityDetailDataJm(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataJm.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataJm.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataJm.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataJm.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataJm.sr = sr; - } - return songQualityDetailDataJm; -} - -Map $SongQualityDetailDataJmToJson(SongQualityDetailDataJm entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataJmExtension on SongQualityDetailDataJm { - SongQualityDetailDataJm copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataJm() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongQualityDetailDataJe $SongQualityDetailDataJeFromJson(Map json) { - final SongQualityDetailDataJe songQualityDetailDataJe = SongQualityDetailDataJe(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataJe.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataJe.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataJe.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataJe.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataJe.sr = sr; - } - return songQualityDetailDataJe; -} - -Map $SongQualityDetailDataJeToJson(SongQualityDetailDataJe entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataJeExtension on SongQualityDetailDataJe { - SongQualityDetailDataJe copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataJe() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} - -SongQualityDetailDataVi $SongQualityDetailDataViFromJson(Map json) { - final SongQualityDetailDataVi songQualityDetailDataVi = SongQualityDetailDataVi(); - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songQualityDetailDataVi.br = br; - } - final int? fid = jsonConvert.convert(json['fid']); - if (fid != null) { - songQualityDetailDataVi.fid = fid; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songQualityDetailDataVi.size = size; - } - final double? vd = jsonConvert.convert(json['vd']); - if (vd != null) { - songQualityDetailDataVi.vd = vd; - } - final int? sr = jsonConvert.convert(json['sr']); - if (sr != null) { - songQualityDetailDataVi.sr = sr; - } - return songQualityDetailDataVi; -} - -Map $SongQualityDetailDataViToJson(SongQualityDetailDataVi entity) { - final Map data = {}; - data['br'] = entity.br; - data['fid'] = entity.fid; - data['size'] = entity.size; - data['vd'] = entity.vd; - data['sr'] = entity.sr; - return data; -} - -extension SongQualityDetailDataViExtension on SongQualityDetailDataVi { - SongQualityDetailDataVi copyWith({ - int? br, - int? fid, - int? size, - double? vd, - int? sr, - }) { - return SongQualityDetailDataVi() - ..br = br ?? this.br - ..fid = fid ?? this.fid - ..size = size ?? this.size - ..vd = vd ?? this.vd - ..sr = sr ?? this.sr; - } -} \ No newline at end of file diff --git a/lib/generated/json/song_url_entity.g.dart b/lib/generated/json/song_url_entity.g.dart deleted file mode 100644 index 9b8f960..0000000 --- a/lib/generated/json/song_url_entity.g.dart +++ /dev/null @@ -1,306 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/song/entity/song_url_entity.dart'; - -SongUrlEntity $SongUrlEntityFromJson(Map json) { - final SongUrlEntity songUrlEntity = SongUrlEntity(); - final List? data = (json['data'] as List?)?.map( - (e) => jsonConvert.convert(e) as SongUrlData).toList(); - if (data != null) { - songUrlEntity.data = data; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - songUrlEntity.code = code; - } - return songUrlEntity; -} - -Map $SongUrlEntityToJson(SongUrlEntity entity) { - final Map data = {}; - data['data'] = entity.data?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - return data; -} - -extension SongUrlEntityExtension on SongUrlEntity { - SongUrlEntity copyWith({ - List? data, - int? code, - }) { - return SongUrlEntity() - ..data = data ?? this.data - ..code = code ?? this.code; - } -} - -SongUrlData $SongUrlDataFromJson(Map json) { - final SongUrlData songUrlData = SongUrlData(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - songUrlData.id = id; - } - final String? url = jsonConvert.convert(json['url']); - if (url != null) { - songUrlData.url = url; - } - final int? br = jsonConvert.convert(json['br']); - if (br != null) { - songUrlData.br = br; - } - final int? size = jsonConvert.convert(json['size']); - if (size != null) { - songUrlData.size = size; - } - final String? md5 = jsonConvert.convert(json['md5']); - if (md5 != null) { - songUrlData.md5 = md5; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - songUrlData.code = code; - } - final int? expi = jsonConvert.convert(json['expi']); - if (expi != null) { - songUrlData.expi = expi; - } - final String? type = jsonConvert.convert(json['type']); - if (type != null) { - songUrlData.type = type; - } - final int? gain = jsonConvert.convert(json['gain']); - if (gain != null) { - songUrlData.gain = gain; - } - final int? peak = jsonConvert.convert(json['peak']); - if (peak != null) { - songUrlData.peak = peak; - } - final int? closedGain = jsonConvert.convert(json['closedGain']); - if (closedGain != null) { - songUrlData.closedGain = closedGain; - } - final int? closedPeak = jsonConvert.convert(json['closedPeak']); - if (closedPeak != null) { - songUrlData.closedPeak = closedPeak; - } - final int? fee = jsonConvert.convert(json['fee']); - if (fee != null) { - songUrlData.fee = fee; - } - final dynamic uf = json['uf']; - if (uf != null) { - songUrlData.uf = uf; - } - final int? payed = jsonConvert.convert(json['payed']); - if (payed != null) { - songUrlData.payed = payed; - } - final int? flag = jsonConvert.convert(json['flag']); - if (flag != null) { - songUrlData.flag = flag; - } - final bool? canExtend = jsonConvert.convert(json['canExtend']); - if (canExtend != null) { - songUrlData.canExtend = canExtend; - } - final String? level = jsonConvert.convert(json['level']); - if (level != null) { - songUrlData.level = level; - } - final String? encodeType = jsonConvert.convert(json['encodeType']); - if (encodeType != null) { - songUrlData.encodeType = encodeType; - } - final SongUrlDataFreeTrialPrivilege? freeTrialPrivilege = jsonConvert.convert< - SongUrlDataFreeTrialPrivilege>(json['freeTrialPrivilege']); - if (freeTrialPrivilege != null) { - songUrlData.freeTrialPrivilege = freeTrialPrivilege; - } - final SongUrlDataFreeTimeTrialPrivilege? freeTimeTrialPrivilege = jsonConvert.convert< - SongUrlDataFreeTimeTrialPrivilege>(json['freeTimeTrialPrivilege']); - if (freeTimeTrialPrivilege != null) { - songUrlData.freeTimeTrialPrivilege = freeTimeTrialPrivilege; - } - final int? urlSource = jsonConvert.convert(json['urlSource']); - if (urlSource != null) { - songUrlData.urlSource = urlSource; - } - final int? rightSource = jsonConvert.convert(json['rightSource']); - if (rightSource != null) { - songUrlData.rightSource = rightSource; - } - final int? time = jsonConvert.convert(json['time']); - if (time != null) { - songUrlData.time = time; - } - final String? musicId = jsonConvert.convert(json['musicId']); - if (musicId != null) { - songUrlData.musicId = musicId; - } - return songUrlData; -} - -Map $SongUrlDataToJson(SongUrlData entity) { - final Map data = {}; - data['id'] = entity.id; - data['url'] = entity.url; - data['br'] = entity.br; - data['size'] = entity.size; - data['md5'] = entity.md5; - data['code'] = entity.code; - data['expi'] = entity.expi; - data['type'] = entity.type; - data['gain'] = entity.gain; - data['peak'] = entity.peak; - data['closedGain'] = entity.closedGain; - data['closedPeak'] = entity.closedPeak; - data['fee'] = entity.fee; - data['uf'] = entity.uf; - data['payed'] = entity.payed; - data['flag'] = entity.flag; - data['canExtend'] = entity.canExtend; - data['level'] = entity.level; - data['encodeType'] = entity.encodeType; - data['freeTrialPrivilege'] = entity.freeTrialPrivilege?.toJson(); - data['freeTimeTrialPrivilege'] = entity.freeTimeTrialPrivilege?.toJson(); - data['urlSource'] = entity.urlSource; - data['rightSource'] = entity.rightSource; - data['time'] = entity.time; - data['musicId'] = entity.musicId; - return data; -} - -extension SongUrlDataExtension on SongUrlData { - SongUrlData copyWith({ - int? id, - String? url, - int? br, - int? size, - String? md5, - int? code, - int? expi, - String? type, - int? gain, - int? peak, - int? closedGain, - int? closedPeak, - int? fee, - dynamic uf, - int? payed, - int? flag, - bool? canExtend, - String? level, - String? encodeType, - SongUrlDataFreeTrialPrivilege? freeTrialPrivilege, - SongUrlDataFreeTimeTrialPrivilege? freeTimeTrialPrivilege, - int? urlSource, - int? rightSource, - int? time, - String? musicId, - }) { - return SongUrlData() - ..id = id ?? this.id - ..url = url ?? this.url - ..br = br ?? this.br - ..size = size ?? this.size - ..md5 = md5 ?? this.md5 - ..code = code ?? this.code - ..expi = expi ?? this.expi - ..type = type ?? this.type - ..gain = gain ?? this.gain - ..peak = peak ?? this.peak - ..closedGain = closedGain ?? this.closedGain - ..closedPeak = closedPeak ?? this.closedPeak - ..fee = fee ?? this.fee - ..uf = uf ?? this.uf - ..payed = payed ?? this.payed - ..flag = flag ?? this.flag - ..canExtend = canExtend ?? this.canExtend - ..level = level ?? this.level - ..encodeType = encodeType ?? this.encodeType - ..freeTrialPrivilege = freeTrialPrivilege ?? this.freeTrialPrivilege - ..freeTimeTrialPrivilege = freeTimeTrialPrivilege ?? this.freeTimeTrialPrivilege - ..urlSource = urlSource ?? this.urlSource - ..rightSource = rightSource ?? this.rightSource - ..time = time ?? this.time - ..musicId = musicId ?? this.musicId; - } -} - -SongUrlDataFreeTrialPrivilege $SongUrlDataFreeTrialPrivilegeFromJson(Map json) { - final SongUrlDataFreeTrialPrivilege songUrlDataFreeTrialPrivilege = SongUrlDataFreeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - songUrlDataFreeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - songUrlDataFreeTrialPrivilege.userConsumable = userConsumable; - } - return songUrlDataFreeTrialPrivilege; -} - -Map $SongUrlDataFreeTrialPrivilegeToJson(SongUrlDataFreeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - return data; -} - -extension SongUrlDataFreeTrialPrivilegeExtension on SongUrlDataFreeTrialPrivilege { - SongUrlDataFreeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - }) { - return SongUrlDataFreeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable; - } -} - -SongUrlDataFreeTimeTrialPrivilege $SongUrlDataFreeTimeTrialPrivilegeFromJson( - Map json) { - final SongUrlDataFreeTimeTrialPrivilege songUrlDataFreeTimeTrialPrivilege = SongUrlDataFreeTimeTrialPrivilege(); - final bool? resConsumable = jsonConvert.convert(json['resConsumable']); - if (resConsumable != null) { - songUrlDataFreeTimeTrialPrivilege.resConsumable = resConsumable; - } - final bool? userConsumable = jsonConvert.convert(json['userConsumable']); - if (userConsumable != null) { - songUrlDataFreeTimeTrialPrivilege.userConsumable = userConsumable; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - songUrlDataFreeTimeTrialPrivilege.type = type; - } - final int? remainTime = jsonConvert.convert(json['remainTime']); - if (remainTime != null) { - songUrlDataFreeTimeTrialPrivilege.remainTime = remainTime; - } - return songUrlDataFreeTimeTrialPrivilege; -} - -Map $SongUrlDataFreeTimeTrialPrivilegeToJson( - SongUrlDataFreeTimeTrialPrivilege entity) { - final Map data = {}; - data['resConsumable'] = entity.resConsumable; - data['userConsumable'] = entity.userConsumable; - data['type'] = entity.type; - data['remainTime'] = entity.remainTime; - return data; -} - -extension SongUrlDataFreeTimeTrialPrivilegeExtension on SongUrlDataFreeTimeTrialPrivilege { - SongUrlDataFreeTimeTrialPrivilege copyWith({ - bool? resConsumable, - bool? userConsumable, - int? type, - int? remainTime, - }) { - return SongUrlDataFreeTimeTrialPrivilege() - ..resConsumable = resConsumable ?? this.resConsumable - ..userConsumable = userConsumable ?? this.userConsumable - ..type = type ?? this.type - ..remainTime = remainTime ?? this.remainTime; - } -} \ No newline at end of file diff --git a/lib/generated/json/string_entity.g.dart b/lib/generated/json/string_entity.g.dart deleted file mode 100644 index 221e6e4..0000000 --- a/lib/generated/json/string_entity.g.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/string_entity.dart'; - -StringEntity $StringEntityFromJson(Map json) { - final StringEntity stringEntity = StringEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - stringEntity.code = code; - } - final String? data = jsonConvert.convert(json['data']); - if (data != null) { - stringEntity.data = data; - } - final String? message = jsonConvert.convert(json['message']); - if (message != null) { - stringEntity.message = message; - } - return stringEntity; -} - -Map $StringEntityToJson(StringEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['data'] = entity.data; - data['message'] = entity.message; - return data; -} - -extension StringEntityExtension on StringEntity { - StringEntity copyWith({ - int? code, - String? data, - String? message, - }) { - return StringEntity() - ..code = code ?? this.code - ..data = data ?? this.data - ..message = message ?? this.message; - } -} \ No newline at end of file diff --git a/lib/generated/json/top_artist_entity.g.dart b/lib/generated/json/top_artist_entity.g.dart deleted file mode 100644 index 203efad..0000000 --- a/lib/generated/json/top_artist_entity.g.dart +++ /dev/null @@ -1,199 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/top/entity/top_artist_entity.dart'; - -TopArtistEntity $TopArtistEntityFromJson(Map json) { - final TopArtistEntity topArtistEntity = TopArtistEntity(); - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - topArtistEntity.code = code; - } - final bool? more = jsonConvert.convert(json['more']); - if (more != null) { - topArtistEntity.more = more; - } - final List? artists = (json['artists'] as List?)?.map( - (e) => jsonConvert.convert(e) as TopArtistArtists).toList(); - if (artists != null) { - topArtistEntity.artists = artists; - } - return topArtistEntity; -} - -Map $TopArtistEntityToJson(TopArtistEntity entity) { - final Map data = {}; - data['code'] = entity.code; - data['more'] = entity.more; - data['artists'] = entity.artists.map((v) => v.toJson()).toList(); - return data; -} - -extension TopArtistEntityExtension on TopArtistEntity { - TopArtistEntity copyWith({ - int? code, - bool? more, - List? artists, - }) { - return TopArtistEntity() - ..code = code ?? this.code - ..more = more ?? this.more - ..artists = artists ?? this.artists; - } -} - -TopArtistArtists $TopArtistArtistsFromJson(Map json) { - final TopArtistArtists topArtistArtists = TopArtistArtists(); - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - topArtistArtists.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - topArtistArtists.id = id; - } - final int? picId = jsonConvert.convert(json['picId']); - if (picId != null) { - topArtistArtists.picId = picId; - } - final int? img1v1Id = jsonConvert.convert(json['img1v1Id']); - if (img1v1Id != null) { - topArtistArtists.img1v1Id = img1v1Id; - } - final String? briefDesc = jsonConvert.convert(json['briefDesc']); - if (briefDesc != null) { - topArtistArtists.briefDesc = briefDesc; - } - final String? picUrl = jsonConvert.convert(json['picUrl']); - if (picUrl != null) { - topArtistArtists.picUrl = picUrl; - } - final String? img1v1Url = jsonConvert.convert(json['img1v1Url']); - if (img1v1Url != null) { - topArtistArtists.img1v1Url = img1v1Url; - } - final int? albumSize = jsonConvert.convert(json['albumSize']); - if (albumSize != null) { - topArtistArtists.albumSize = albumSize; - } - final List? alias = (json['alias'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (alias != null) { - topArtistArtists.alias = alias; - } - final String? trans = jsonConvert.convert(json['trans']); - if (trans != null) { - topArtistArtists.trans = trans; - } - final int? musicSize = jsonConvert.convert(json['musicSize']); - if (musicSize != null) { - topArtistArtists.musicSize = musicSize; - } - final int? topicPerson = jsonConvert.convert(json['topicPerson']); - if (topicPerson != null) { - topArtistArtists.topicPerson = topicPerson; - } - final bool? isSubed = jsonConvert.convert(json['isSubed']); - if (isSubed != null) { - topArtistArtists.isSubed = isSubed; - } - final int? accountId = jsonConvert.convert(json['accountId']); - if (accountId != null) { - topArtistArtists.accountId = accountId; - } - final String? picidStr = jsonConvert.convert(json['picId_str']); - if (picidStr != null) { - topArtistArtists.picidStr = picidStr; - } - final String? img1v1idStr = jsonConvert.convert(json['img1v1Id_str']); - if (img1v1idStr != null) { - topArtistArtists.img1v1idStr = img1v1idStr; - } - final dynamic transNames = json['transNames']; - if (transNames != null) { - topArtistArtists.transNames = transNames; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - topArtistArtists.followed = followed; - } - final int? mvSize = jsonConvert.convert(json['mvSize']); - if (mvSize != null) { - topArtistArtists.mvSize = mvSize; - } - final int? fansCount = jsonConvert.convert(json['fansCount']); - if (fansCount != null) { - topArtistArtists.fansCount = fansCount; - } - return topArtistArtists; -} - -Map $TopArtistArtistsToJson(TopArtistArtists entity) { - final Map data = {}; - data['name'] = entity.name; - data['id'] = entity.id; - data['picId'] = entity.picId; - data['img1v1Id'] = entity.img1v1Id; - data['briefDesc'] = entity.briefDesc; - data['picUrl'] = entity.picUrl; - data['img1v1Url'] = entity.img1v1Url; - data['albumSize'] = entity.albumSize; - data['alias'] = entity.alias; - data['trans'] = entity.trans; - data['musicSize'] = entity.musicSize; - data['topicPerson'] = entity.topicPerson; - data['isSubed'] = entity.isSubed; - data['accountId'] = entity.accountId; - data['picId_str'] = entity.picidStr; - data['img1v1Id_str'] = entity.img1v1idStr; - data['transNames'] = entity.transNames; - data['followed'] = entity.followed; - data['mvSize'] = entity.mvSize; - data['fansCount'] = entity.fansCount; - return data; -} - -extension TopArtistArtistsExtension on TopArtistArtists { - TopArtistArtists copyWith({ - String? name, - int? id, - int? picId, - int? img1v1Id, - String? briefDesc, - String? picUrl, - String? img1v1Url, - int? albumSize, - List? alias, - String? trans, - int? musicSize, - int? topicPerson, - bool? isSubed, - int? accountId, - String? picidStr, - String? img1v1idStr, - dynamic transNames, - bool? followed, - int? mvSize, - int? fansCount, - }) { - return TopArtistArtists() - ..name = name ?? this.name - ..id = id ?? this.id - ..picId = picId ?? this.picId - ..img1v1Id = img1v1Id ?? this.img1v1Id - ..briefDesc = briefDesc ?? this.briefDesc - ..picUrl = picUrl ?? this.picUrl - ..img1v1Url = img1v1Url ?? this.img1v1Url - ..albumSize = albumSize ?? this.albumSize - ..alias = alias ?? this.alias - ..trans = trans ?? this.trans - ..musicSize = musicSize ?? this.musicSize - ..topicPerson = topicPerson ?? this.topicPerson - ..isSubed = isSubed ?? this.isSubed - ..accountId = accountId ?? this.accountId - ..picidStr = picidStr ?? this.picidStr - ..img1v1idStr = img1v1idStr ?? this.img1v1idStr - ..transNames = transNames ?? this.transNames - ..followed = followed ?? this.followed - ..mvSize = mvSize ?? this.mvSize - ..fansCount = fansCount ?? this.fansCount; - } -} \ No newline at end of file diff --git a/lib/generated/json/user_info_entity.g.dart b/lib/generated/json/user_info_entity.g.dart deleted file mode 100644 index cedbd53..0000000 --- a/lib/generated/json/user_info_entity.g.dart +++ /dev/null @@ -1,417 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/user_info_entity.dart'; - -UserInfoEntity $UserInfoEntityFromJson(Map json) { - final UserInfoEntity userInfoEntity = UserInfoEntity(); - final UserInfoAccount? account = jsonConvert.convert(json['account']); - if (account != null) { - userInfoEntity.account = account; - } - final UserInfoProfile? profile = jsonConvert.convert(json['profile']); - if (profile != null) { - userInfoEntity.profile = profile; - } - return userInfoEntity; -} - -Map $UserInfoEntityToJson(UserInfoEntity entity) { - final Map data = {}; - data['account'] = entity.account?.toJson(); - data['profile'] = entity.profile?.toJson(); - return data; -} - -extension UserInfoEntityExtension on UserInfoEntity { - UserInfoEntity copyWith({ - UserInfoAccount? account, - UserInfoProfile? profile, - }) { - return UserInfoEntity() - ..account = account ?? this.account - ..profile = profile ?? this.profile; - } -} - -UserInfoAccount $UserInfoAccountFromJson(Map json) { - final UserInfoAccount userInfoAccount = UserInfoAccount(); - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - userInfoAccount.id = id; - } - final String? userName = jsonConvert.convert(json['userName']); - if (userName != null) { - userInfoAccount.userName = userName; - } - final int? type = jsonConvert.convert(json['type']); - if (type != null) { - userInfoAccount.type = type; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - userInfoAccount.status = status; - } - final int? whitelistAuthority = jsonConvert.convert(json['whitelistAuthority']); - if (whitelistAuthority != null) { - userInfoAccount.whitelistAuthority = whitelistAuthority; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - userInfoAccount.createTime = createTime; - } - final int? tokenVersion = jsonConvert.convert(json['tokenVersion']); - if (tokenVersion != null) { - userInfoAccount.tokenVersion = tokenVersion; - } - final int? ban = jsonConvert.convert(json['ban']); - if (ban != null) { - userInfoAccount.ban = ban; - } - final int? baoyueVersion = jsonConvert.convert(json['baoyueVersion']); - if (baoyueVersion != null) { - userInfoAccount.baoyueVersion = baoyueVersion; - } - final int? donateVersion = jsonConvert.convert(json['donateVersion']); - if (donateVersion != null) { - userInfoAccount.donateVersion = donateVersion; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - userInfoAccount.vipType = vipType; - } - final bool? anonimousUser = jsonConvert.convert(json['anonimousUser']); - if (anonimousUser != null) { - userInfoAccount.anonimousUser = anonimousUser; - } - final bool? paidFee = jsonConvert.convert(json['paidFee']); - if (paidFee != null) { - userInfoAccount.paidFee = paidFee; - } - return userInfoAccount; -} - -Map $UserInfoAccountToJson(UserInfoAccount entity) { - final Map data = {}; - data['id'] = entity.id; - data['userName'] = entity.userName; - data['type'] = entity.type; - data['status'] = entity.status; - data['whitelistAuthority'] = entity.whitelistAuthority; - data['createTime'] = entity.createTime; - data['tokenVersion'] = entity.tokenVersion; - data['ban'] = entity.ban; - data['baoyueVersion'] = entity.baoyueVersion; - data['donateVersion'] = entity.donateVersion; - data['vipType'] = entity.vipType; - data['anonimousUser'] = entity.anonimousUser; - data['paidFee'] = entity.paidFee; - return data; -} - -extension UserInfoAccountExtension on UserInfoAccount { - UserInfoAccount copyWith({ - int? id, - String? userName, - int? type, - int? status, - int? whitelistAuthority, - int? createTime, - int? tokenVersion, - int? ban, - int? baoyueVersion, - int? donateVersion, - int? vipType, - bool? anonimousUser, - bool? paidFee, - }) { - return UserInfoAccount() - ..id = id ?? this.id - ..userName = userName ?? this.userName - ..type = type ?? this.type - ..status = status ?? this.status - ..whitelistAuthority = whitelistAuthority ?? this.whitelistAuthority - ..createTime = createTime ?? this.createTime - ..tokenVersion = tokenVersion ?? this.tokenVersion - ..ban = ban ?? this.ban - ..baoyueVersion = baoyueVersion ?? this.baoyueVersion - ..donateVersion = donateVersion ?? this.donateVersion - ..vipType = vipType ?? this.vipType - ..anonimousUser = anonimousUser ?? this.anonimousUser - ..paidFee = paidFee ?? this.paidFee; - } -} - -UserInfoProfile $UserInfoProfileFromJson(Map json) { - final UserInfoProfile userInfoProfile = UserInfoProfile(); - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - userInfoProfile.userId = userId; - } - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - userInfoProfile.userType = userType; - } - final String? nickname = jsonConvert.convert(json['nickname']); - if (nickname != null) { - userInfoProfile.nickname = nickname; - } - final int? avatarImgId = jsonConvert.convert(json['avatarImgId']); - if (avatarImgId != null) { - userInfoProfile.avatarImgId = avatarImgId; - } - final String? avatarUrl = jsonConvert.convert(json['avatarUrl']); - if (avatarUrl != null) { - userInfoProfile.avatarUrl = avatarUrl; - } - final int? backgroundImgId = jsonConvert.convert(json['backgroundImgId']); - if (backgroundImgId != null) { - userInfoProfile.backgroundImgId = backgroundImgId; - } - final String? backgroundUrl = jsonConvert.convert(json['backgroundUrl']); - if (backgroundUrl != null) { - userInfoProfile.backgroundUrl = backgroundUrl; - } - final String? signature = jsonConvert.convert(json['signature']); - if (signature != null) { - userInfoProfile.signature = signature; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - userInfoProfile.createTime = createTime; - } - final String? userName = jsonConvert.convert(json['userName']); - if (userName != null) { - userInfoProfile.userName = userName; - } - final int? accountType = jsonConvert.convert(json['accountType']); - if (accountType != null) { - userInfoProfile.accountType = accountType; - } - final String? shortUserName = jsonConvert.convert(json['shortUserName']); - if (shortUserName != null) { - userInfoProfile.shortUserName = shortUserName; - } - final int? birthday = jsonConvert.convert(json['birthday']); - if (birthday != null) { - userInfoProfile.birthday = birthday; - } - final int? authority = jsonConvert.convert(json['authority']); - if (authority != null) { - userInfoProfile.authority = authority; - } - final int? gender = jsonConvert.convert(json['gender']); - if (gender != null) { - userInfoProfile.gender = gender; - } - final int? accountStatus = jsonConvert.convert(json['accountStatus']); - if (accountStatus != null) { - userInfoProfile.accountStatus = accountStatus; - } - final int? province = jsonConvert.convert(json['province']); - if (province != null) { - userInfoProfile.province = province; - } - final int? city = jsonConvert.convert(json['city']); - if (city != null) { - userInfoProfile.city = city; - } - final int? authStatus = jsonConvert.convert(json['authStatus']); - if (authStatus != null) { - userInfoProfile.authStatus = authStatus; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - userInfoProfile.description = description; - } - final String? detailDescription = jsonConvert.convert(json['detailDescription']); - if (detailDescription != null) { - userInfoProfile.detailDescription = detailDescription; - } - final bool? defaultAvatar = jsonConvert.convert(json['defaultAvatar']); - if (defaultAvatar != null) { - userInfoProfile.defaultAvatar = defaultAvatar; - } - final dynamic expertTags = json['expertTags']; - if (expertTags != null) { - userInfoProfile.expertTags = expertTags; - } - final dynamic experts = json['experts']; - if (experts != null) { - userInfoProfile.experts = experts; - } - final int? djStatus = jsonConvert.convert(json['djStatus']); - if (djStatus != null) { - userInfoProfile.djStatus = djStatus; - } - final int? locationStatus = jsonConvert.convert(json['locationStatus']); - if (locationStatus != null) { - userInfoProfile.locationStatus = locationStatus; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - userInfoProfile.vipType = vipType; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - userInfoProfile.followed = followed; - } - final bool? mutual = jsonConvert.convert(json['mutual']); - if (mutual != null) { - userInfoProfile.mutual = mutual; - } - final bool? authenticated = jsonConvert.convert(json['authenticated']); - if (authenticated != null) { - userInfoProfile.authenticated = authenticated; - } - final int? lastLoginTime = jsonConvert.convert(json['lastLoginTime']); - if (lastLoginTime != null) { - userInfoProfile.lastLoginTime = lastLoginTime; - } - final String? lastLoginIP = jsonConvert.convert(json['lastLoginIP']); - if (lastLoginIP != null) { - userInfoProfile.lastLoginIP = lastLoginIP; - } - final String? remarkName = jsonConvert.convert(json['remarkName']); - if (remarkName != null) { - userInfoProfile.remarkName = remarkName; - } - final int? viptypeVersion = jsonConvert.convert(json['viptypeVersion']); - if (viptypeVersion != null) { - userInfoProfile.viptypeVersion = viptypeVersion; - } - final int? authenticationTypes = jsonConvert.convert(json['authenticationTypes']); - if (authenticationTypes != null) { - userInfoProfile.authenticationTypes = authenticationTypes; - } - final dynamic avatarDetail = json['avatarDetail']; - if (avatarDetail != null) { - userInfoProfile.avatarDetail = avatarDetail; - } - final bool? anchor = jsonConvert.convert(json['anchor']); - if (anchor != null) { - userInfoProfile.anchor = anchor; - } - return userInfoProfile; -} - -Map $UserInfoProfileToJson(UserInfoProfile entity) { - final Map data = {}; - data['userId'] = entity.userId; - data['userType'] = entity.userType; - data['nickname'] = entity.nickname; - data['avatarImgId'] = entity.avatarImgId; - data['avatarUrl'] = entity.avatarUrl; - data['backgroundImgId'] = entity.backgroundImgId; - data['backgroundUrl'] = entity.backgroundUrl; - data['signature'] = entity.signature; - data['createTime'] = entity.createTime; - data['userName'] = entity.userName; - data['accountType'] = entity.accountType; - data['shortUserName'] = entity.shortUserName; - data['birthday'] = entity.birthday; - data['authority'] = entity.authority; - data['gender'] = entity.gender; - data['accountStatus'] = entity.accountStatus; - data['province'] = entity.province; - data['city'] = entity.city; - data['authStatus'] = entity.authStatus; - data['description'] = entity.description; - data['detailDescription'] = entity.detailDescription; - data['defaultAvatar'] = entity.defaultAvatar; - data['expertTags'] = entity.expertTags; - data['experts'] = entity.experts; - data['djStatus'] = entity.djStatus; - data['locationStatus'] = entity.locationStatus; - data['vipType'] = entity.vipType; - data['followed'] = entity.followed; - data['mutual'] = entity.mutual; - data['authenticated'] = entity.authenticated; - data['lastLoginTime'] = entity.lastLoginTime; - data['lastLoginIP'] = entity.lastLoginIP; - data['remarkName'] = entity.remarkName; - data['viptypeVersion'] = entity.viptypeVersion; - data['authenticationTypes'] = entity.authenticationTypes; - data['avatarDetail'] = entity.avatarDetail; - data['anchor'] = entity.anchor; - return data; -} - -extension UserInfoProfileExtension on UserInfoProfile { - UserInfoProfile copyWith({ - int? userId, - int? userType, - String? nickname, - int? avatarImgId, - String? avatarUrl, - int? backgroundImgId, - String? backgroundUrl, - String? signature, - int? createTime, - String? userName, - int? accountType, - String? shortUserName, - int? birthday, - int? authority, - int? gender, - int? accountStatus, - int? province, - int? city, - int? authStatus, - String? description, - String? detailDescription, - bool? defaultAvatar, - dynamic expertTags, - dynamic experts, - int? djStatus, - int? locationStatus, - int? vipType, - bool? followed, - bool? mutual, - bool? authenticated, - int? lastLoginTime, - String? lastLoginIP, - String? remarkName, - int? viptypeVersion, - int? authenticationTypes, - dynamic avatarDetail, - bool? anchor, - }) { - return UserInfoProfile() - ..userId = userId ?? this.userId - ..userType = userType ?? this.userType - ..nickname = nickname ?? this.nickname - ..avatarImgId = avatarImgId ?? this.avatarImgId - ..avatarUrl = avatarUrl ?? this.avatarUrl - ..backgroundImgId = backgroundImgId ?? this.backgroundImgId - ..backgroundUrl = backgroundUrl ?? this.backgroundUrl - ..signature = signature ?? this.signature - ..createTime = createTime ?? this.createTime - ..userName = userName ?? this.userName - ..accountType = accountType ?? this.accountType - ..shortUserName = shortUserName ?? this.shortUserName - ..birthday = birthday ?? this.birthday - ..authority = authority ?? this.authority - ..gender = gender ?? this.gender - ..accountStatus = accountStatus ?? this.accountStatus - ..province = province ?? this.province - ..city = city ?? this.city - ..authStatus = authStatus ?? this.authStatus - ..description = description ?? this.description - ..detailDescription = detailDescription ?? this.detailDescription - ..defaultAvatar = defaultAvatar ?? this.defaultAvatar - ..expertTags = expertTags ?? this.expertTags - ..experts = experts ?? this.experts - ..djStatus = djStatus ?? this.djStatus - ..locationStatus = locationStatus ?? this.locationStatus - ..vipType = vipType ?? this.vipType - ..followed = followed ?? this.followed - ..mutual = mutual ?? this.mutual - ..authenticated = authenticated ?? this.authenticated - ..lastLoginTime = lastLoginTime ?? this.lastLoginTime - ..lastLoginIP = lastLoginIP ?? this.lastLoginIP - ..remarkName = remarkName ?? this.remarkName - ..viptypeVersion = viptypeVersion ?? this.viptypeVersion - ..authenticationTypes = authenticationTypes ?? this.authenticationTypes - ..avatarDetail = avatarDetail ?? this.avatarDetail - ..anchor = anchor ?? this.anchor; - } -} \ No newline at end of file diff --git a/lib/generated/json/user_playlist_entity.g.dart b/lib/generated/json/user_playlist_entity.g.dart deleted file mode 100644 index 20a76a7..0000000 --- a/lib/generated/json/user_playlist_entity.g.dart +++ /dev/null @@ -1,576 +0,0 @@ -import 'package:bujuan_music_api/generated/json/base/json_convert_content.dart'; -import 'package:bujuan_music_api/api/user/entity/user_playlist_entity.dart'; - -UserPlaylistEntity $UserPlaylistEntityFromJson(Map json) { - final UserPlaylistEntity userPlaylistEntity = UserPlaylistEntity(); - final bool? more = jsonConvert.convert(json['more']); - if (more != null) { - userPlaylistEntity.more = more; - } - final List? playlist = (json['playlist'] as List?)?.map( - (e) => jsonConvert.convert(e) as UserPlaylistPlaylist).toList(); - if (playlist != null) { - userPlaylistEntity.playlist = playlist; - } - final int? code = jsonConvert.convert(json['code']); - if (code != null) { - userPlaylistEntity.code = code; - } - return userPlaylistEntity; -} - -Map $UserPlaylistEntityToJson(UserPlaylistEntity entity) { - final Map data = {}; - data['more'] = entity.more; - data['playlist'] = entity.playlist?.map((v) => v.toJson()).toList(); - data['code'] = entity.code; - return data; -} - -extension UserPlaylistEntityExtension on UserPlaylistEntity { - UserPlaylistEntity copyWith({ - bool? more, - List? playlist, - int? code, - }) { - return UserPlaylistEntity() - ..more = more ?? this.more - ..playlist = playlist ?? this.playlist - ..code = code ?? this.code; - } -} - -UserPlaylistPlaylist $UserPlaylistPlaylistFromJson(Map json) { - final UserPlaylistPlaylist userPlaylistPlaylist = UserPlaylistPlaylist(); - final List? subscribers = (json['subscribers'] as List?)?.map( - (e) => e).toList(); - if (subscribers != null) { - userPlaylistPlaylist.subscribers = subscribers; - } - final bool? subscribed = jsonConvert.convert(json['subscribed']); - if (subscribed != null) { - userPlaylistPlaylist.subscribed = subscribed; - } - final UserPlaylistPlaylistCreator? creator = jsonConvert.convert( - json['creator']); - if (creator != null) { - userPlaylistPlaylist.creator = creator; - } - final dynamic artists = json['artists']; - if (artists != null) { - userPlaylistPlaylist.artists = artists; - } - final dynamic tracks = json['tracks']; - if (tracks != null) { - userPlaylistPlaylist.tracks = tracks; - } - final bool? top = jsonConvert.convert(json['top']); - if (top != null) { - userPlaylistPlaylist.top = top; - } - final dynamic updateFrequency = json['updateFrequency']; - if (updateFrequency != null) { - userPlaylistPlaylist.updateFrequency = updateFrequency; - } - final int? backgroundCoverId = jsonConvert.convert(json['backgroundCoverId']); - if (backgroundCoverId != null) { - userPlaylistPlaylist.backgroundCoverId = backgroundCoverId; - } - final String? backgroundCoverUrl = jsonConvert.convert(json['backgroundCoverUrl']); - if (backgroundCoverUrl != null) { - userPlaylistPlaylist.backgroundCoverUrl = backgroundCoverUrl; - } - final String? titleImage = jsonConvert.convert(json['titleImage']); - if (titleImage != null) { - userPlaylistPlaylist.titleImage = titleImage; - } - final String? titleImageUrl = jsonConvert.convert(json['titleImageUrl']); - if (titleImageUrl != null) { - userPlaylistPlaylist.titleImageUrl = titleImageUrl; - } - final String? englishTitle = jsonConvert.convert(json['englishTitle']); - if (englishTitle != null) { - userPlaylistPlaylist.englishTitle = englishTitle; - } - final bool? opRecommend = jsonConvert.convert(json['opRecommend']); - if (opRecommend != null) { - userPlaylistPlaylist.opRecommend = opRecommend; - } - final int? subscribedCount = jsonConvert.convert(json['subscribedCount']); - if (subscribedCount != null) { - userPlaylistPlaylist.subscribedCount = subscribedCount; - } - final int? cloudTrackCount = jsonConvert.convert(json['cloudTrackCount']); - if (cloudTrackCount != null) { - userPlaylistPlaylist.cloudTrackCount = cloudTrackCount; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - userPlaylistPlaylist.userId = userId; - } - final int? totalDuration = jsonConvert.convert(json['totalDuration']); - if (totalDuration != null) { - userPlaylistPlaylist.totalDuration = totalDuration; - } - final int? coverImgId = jsonConvert.convert(json['coverImgId']); - if (coverImgId != null) { - userPlaylistPlaylist.coverImgId = coverImgId; - } - final int? privacy = jsonConvert.convert(json['privacy']); - if (privacy != null) { - userPlaylistPlaylist.privacy = privacy; - } - final int? trackUpdateTime = jsonConvert.convert(json['trackUpdateTime']); - if (trackUpdateTime != null) { - userPlaylistPlaylist.trackUpdateTime = trackUpdateTime; - } - final int? trackCount = jsonConvert.convert(json['trackCount']); - if (trackCount != null) { - userPlaylistPlaylist.trackCount = trackCount; - } - final int? updateTime = jsonConvert.convert(json['updateTime']); - if (updateTime != null) { - userPlaylistPlaylist.updateTime = updateTime; - } - final String? commentThreadId = jsonConvert.convert(json['commentThreadId']); - if (commentThreadId != null) { - userPlaylistPlaylist.commentThreadId = commentThreadId; - } - final String? coverImgUrl = jsonConvert.convert(json['coverImgUrl']); - if (coverImgUrl != null) { - userPlaylistPlaylist.coverImgUrl = coverImgUrl; - } - final int? specialType = jsonConvert.convert(json['specialType']); - if (specialType != null) { - userPlaylistPlaylist.specialType = specialType; - } - final bool? anonimous = jsonConvert.convert(json['anonimous']); - if (anonimous != null) { - userPlaylistPlaylist.anonimous = anonimous; - } - final int? createTime = jsonConvert.convert(json['createTime']); - if (createTime != null) { - userPlaylistPlaylist.createTime = createTime; - } - final bool? highQuality = jsonConvert.convert(json['highQuality']); - if (highQuality != null) { - userPlaylistPlaylist.highQuality = highQuality; - } - final bool? newImported = jsonConvert.convert(json['newImported']); - if (newImported != null) { - userPlaylistPlaylist.newImported = newImported; - } - final int? trackNumberUpdateTime = jsonConvert.convert(json['trackNumberUpdateTime']); - if (trackNumberUpdateTime != null) { - userPlaylistPlaylist.trackNumberUpdateTime = trackNumberUpdateTime; - } - final int? playCount = jsonConvert.convert(json['playCount']); - if (playCount != null) { - userPlaylistPlaylist.playCount = playCount; - } - final int? adType = jsonConvert.convert(json['adType']); - if (adType != null) { - userPlaylistPlaylist.adType = adType; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - userPlaylistPlaylist.description = description; - } - final List? tags = (json['tags'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (tags != null) { - userPlaylistPlaylist.tags = tags; - } - final bool? ordered = jsonConvert.convert(json['ordered']); - if (ordered != null) { - userPlaylistPlaylist.ordered = ordered; - } - final int? status = jsonConvert.convert(json['status']); - if (status != null) { - userPlaylistPlaylist.status = status; - } - final String? name = jsonConvert.convert(json['name']); - if (name != null) { - userPlaylistPlaylist.name = name; - } - final int? id = jsonConvert.convert(json['id']); - if (id != null) { - userPlaylistPlaylist.id = id; - } - final String? coverimgidStr = jsonConvert.convert(json['coverImgId_str']); - if (coverimgidStr != null) { - userPlaylistPlaylist.coverimgidStr = coverimgidStr; - } - final bool? copied = jsonConvert.convert(json['copied']); - if (copied != null) { - userPlaylistPlaylist.copied = copied; - } - final bool? containsTracks = jsonConvert.convert(json['containsTracks']); - if (containsTracks != null) { - userPlaylistPlaylist.containsTracks = containsTracks; - } - return userPlaylistPlaylist; -} - -Map $UserPlaylistPlaylistToJson(UserPlaylistPlaylist entity) { - final Map data = {}; - data['subscribers'] = entity.subscribers; - data['subscribed'] = entity.subscribed; - data['creator'] = entity.creator?.toJson(); - data['artists'] = entity.artists; - data['tracks'] = entity.tracks; - data['top'] = entity.top; - data['updateFrequency'] = entity.updateFrequency; - data['backgroundCoverId'] = entity.backgroundCoverId; - data['backgroundCoverUrl'] = entity.backgroundCoverUrl; - data['titleImage'] = entity.titleImage; - data['titleImageUrl'] = entity.titleImageUrl; - data['englishTitle'] = entity.englishTitle; - data['opRecommend'] = entity.opRecommend; - data['subscribedCount'] = entity.subscribedCount; - data['cloudTrackCount'] = entity.cloudTrackCount; - data['userId'] = entity.userId; - data['totalDuration'] = entity.totalDuration; - data['coverImgId'] = entity.coverImgId; - data['privacy'] = entity.privacy; - data['trackUpdateTime'] = entity.trackUpdateTime; - data['trackCount'] = entity.trackCount; - data['updateTime'] = entity.updateTime; - data['commentThreadId'] = entity.commentThreadId; - data['coverImgUrl'] = entity.coverImgUrl; - data['specialType'] = entity.specialType; - data['anonimous'] = entity.anonimous; - data['createTime'] = entity.createTime; - data['highQuality'] = entity.highQuality; - data['newImported'] = entity.newImported; - data['trackNumberUpdateTime'] = entity.trackNumberUpdateTime; - data['playCount'] = entity.playCount; - data['adType'] = entity.adType; - data['description'] = entity.description; - data['tags'] = entity.tags; - data['ordered'] = entity.ordered; - data['status'] = entity.status; - data['name'] = entity.name; - data['id'] = entity.id; - data['coverImgId_str'] = entity.coverimgidStr; - data['copied'] = entity.copied; - data['containsTracks'] = entity.containsTracks; - return data; -} - -extension UserPlaylistPlaylistExtension on UserPlaylistPlaylist { - UserPlaylistPlaylist copyWith({ - List? subscribers, - bool? subscribed, - UserPlaylistPlaylistCreator? creator, - dynamic artists, - dynamic tracks, - bool? top, - dynamic updateFrequency, - int? backgroundCoverId, - String? backgroundCoverUrl, - String? titleImage, - String? titleImageUrl, - String? englishTitle, - bool? opRecommend, - int? subscribedCount, - int? cloudTrackCount, - int? userId, - int? totalDuration, - int? coverImgId, - int? privacy, - int? trackUpdateTime, - int? trackCount, - int? updateTime, - String? commentThreadId, - String? coverImgUrl, - int? specialType, - bool? anonimous, - int? createTime, - bool? highQuality, - bool? newImported, - int? trackNumberUpdateTime, - int? playCount, - int? adType, - String? description, - List? tags, - bool? ordered, - int? status, - String? name, - int? id, - String? coverimgidStr, - bool? copied, - bool? containsTracks, - }) { - return UserPlaylistPlaylist() - ..subscribers = subscribers ?? this.subscribers - ..subscribed = subscribed ?? this.subscribed - ..creator = creator ?? this.creator - ..artists = artists ?? this.artists - ..tracks = tracks ?? this.tracks - ..top = top ?? this.top - ..updateFrequency = updateFrequency ?? this.updateFrequency - ..backgroundCoverId = backgroundCoverId ?? this.backgroundCoverId - ..backgroundCoverUrl = backgroundCoverUrl ?? this.backgroundCoverUrl - ..titleImage = titleImage ?? this.titleImage - ..titleImageUrl = titleImageUrl ?? this.titleImageUrl - ..englishTitle = englishTitle ?? this.englishTitle - ..opRecommend = opRecommend ?? this.opRecommend - ..subscribedCount = subscribedCount ?? this.subscribedCount - ..cloudTrackCount = cloudTrackCount ?? this.cloudTrackCount - ..userId = userId ?? this.userId - ..totalDuration = totalDuration ?? this.totalDuration - ..coverImgId = coverImgId ?? this.coverImgId - ..privacy = privacy ?? this.privacy - ..trackUpdateTime = trackUpdateTime ?? this.trackUpdateTime - ..trackCount = trackCount ?? this.trackCount - ..updateTime = updateTime ?? this.updateTime - ..commentThreadId = commentThreadId ?? this.commentThreadId - ..coverImgUrl = coverImgUrl ?? this.coverImgUrl - ..specialType = specialType ?? this.specialType - ..anonimous = anonimous ?? this.anonimous - ..createTime = createTime ?? this.createTime - ..highQuality = highQuality ?? this.highQuality - ..newImported = newImported ?? this.newImported - ..trackNumberUpdateTime = trackNumberUpdateTime ?? this.trackNumberUpdateTime - ..playCount = playCount ?? this.playCount - ..adType = adType ?? this.adType - ..description = description ?? this.description - ..tags = tags ?? this.tags - ..ordered = ordered ?? this.ordered - ..status = status ?? this.status - ..name = name ?? this.name - ..id = id ?? this.id - ..coverimgidStr = coverimgidStr ?? this.coverimgidStr - ..copied = copied ?? this.copied - ..containsTracks = containsTracks ?? this.containsTracks; - } -} - -UserPlaylistPlaylistCreator $UserPlaylistPlaylistCreatorFromJson(Map json) { - final UserPlaylistPlaylistCreator userPlaylistPlaylistCreator = UserPlaylistPlaylistCreator(); - final bool? defaultAvatar = jsonConvert.convert(json['defaultAvatar']); - if (defaultAvatar != null) { - userPlaylistPlaylistCreator.defaultAvatar = defaultAvatar; - } - final int? province = jsonConvert.convert(json['province']); - if (province != null) { - userPlaylistPlaylistCreator.province = province; - } - final int? authStatus = jsonConvert.convert(json['authStatus']); - if (authStatus != null) { - userPlaylistPlaylistCreator.authStatus = authStatus; - } - final bool? followed = jsonConvert.convert(json['followed']); - if (followed != null) { - userPlaylistPlaylistCreator.followed = followed; - } - final String? avatarUrl = jsonConvert.convert(json['avatarUrl']); - if (avatarUrl != null) { - userPlaylistPlaylistCreator.avatarUrl = avatarUrl; - } - final int? accountStatus = jsonConvert.convert(json['accountStatus']); - if (accountStatus != null) { - userPlaylistPlaylistCreator.accountStatus = accountStatus; - } - final int? gender = jsonConvert.convert(json['gender']); - if (gender != null) { - userPlaylistPlaylistCreator.gender = gender; - } - final int? city = jsonConvert.convert(json['city']); - if (city != null) { - userPlaylistPlaylistCreator.city = city; - } - final int? birthday = jsonConvert.convert(json['birthday']); - if (birthday != null) { - userPlaylistPlaylistCreator.birthday = birthday; - } - final int? userId = jsonConvert.convert(json['userId']); - if (userId != null) { - userPlaylistPlaylistCreator.userId = userId; - } - final int? userType = jsonConvert.convert(json['userType']); - if (userType != null) { - userPlaylistPlaylistCreator.userType = userType; - } - final String? nickname = jsonConvert.convert(json['nickname']); - if (nickname != null) { - userPlaylistPlaylistCreator.nickname = nickname; - } - final String? signature = jsonConvert.convert(json['signature']); - if (signature != null) { - userPlaylistPlaylistCreator.signature = signature; - } - final String? description = jsonConvert.convert(json['description']); - if (description != null) { - userPlaylistPlaylistCreator.description = description; - } - final String? detailDescription = jsonConvert.convert(json['detailDescription']); - if (detailDescription != null) { - userPlaylistPlaylistCreator.detailDescription = detailDescription; - } - final int? avatarImgId = jsonConvert.convert(json['avatarImgId']); - if (avatarImgId != null) { - userPlaylistPlaylistCreator.avatarImgId = avatarImgId; - } - final int? backgroundImgId = jsonConvert.convert(json['backgroundImgId']); - if (backgroundImgId != null) { - userPlaylistPlaylistCreator.backgroundImgId = backgroundImgId; - } - final String? backgroundUrl = jsonConvert.convert(json['backgroundUrl']); - if (backgroundUrl != null) { - userPlaylistPlaylistCreator.backgroundUrl = backgroundUrl; - } - final int? authority = jsonConvert.convert(json['authority']); - if (authority != null) { - userPlaylistPlaylistCreator.authority = authority; - } - final bool? mutual = jsonConvert.convert(json['mutual']); - if (mutual != null) { - userPlaylistPlaylistCreator.mutual = mutual; - } - final List? expertTags = (json['expertTags'] as List?)?.map( - (e) => jsonConvert.convert(e) as String).toList(); - if (expertTags != null) { - userPlaylistPlaylistCreator.expertTags = expertTags; - } - final int? djStatus = jsonConvert.convert(json['djStatus']); - if (djStatus != null) { - userPlaylistPlaylistCreator.djStatus = djStatus; - } - final int? vipType = jsonConvert.convert(json['vipType']); - if (vipType != null) { - userPlaylistPlaylistCreator.vipType = vipType; - } - final String? remarkName = jsonConvert.convert(json['remarkName']); - if (remarkName != null) { - userPlaylistPlaylistCreator.remarkName = remarkName; - } - final int? authenticationTypes = jsonConvert.convert(json['authenticationTypes']); - if (authenticationTypes != null) { - userPlaylistPlaylistCreator.authenticationTypes = authenticationTypes; - } - final String? avatarDetail = jsonConvert.convert(json['avatarDetail']); - if (avatarDetail != null) { - userPlaylistPlaylistCreator.avatarDetail = avatarDetail; - } - final String? backgroundImgIdStr = jsonConvert.convert(json['backgroundImgIdStr']); - if (backgroundImgIdStr != null) { - userPlaylistPlaylistCreator.backgroundImgIdStr = backgroundImgIdStr; - } - final bool? anchor = jsonConvert.convert(json['anchor']); - if (anchor != null) { - userPlaylistPlaylistCreator.anchor = anchor; - } - final String? avatarImgIdStr = jsonConvert.convert(json['avatarImgIdStr']); - if (avatarImgIdStr != null) { - userPlaylistPlaylistCreator.avatarImgIdStr = avatarImgIdStr; - } - final String? avatarimgidStr = jsonConvert.convert(json['avatarImgId_str']); - if (avatarimgidStr != null) { - userPlaylistPlaylistCreator.avatarimgidStr = avatarimgidStr; - } - return userPlaylistPlaylistCreator; -} - -Map $UserPlaylistPlaylistCreatorToJson(UserPlaylistPlaylistCreator entity) { - final Map data = {}; - data['defaultAvatar'] = entity.defaultAvatar; - data['province'] = entity.province; - data['authStatus'] = entity.authStatus; - data['followed'] = entity.followed; - data['avatarUrl'] = entity.avatarUrl; - data['accountStatus'] = entity.accountStatus; - data['gender'] = entity.gender; - data['city'] = entity.city; - data['birthday'] = entity.birthday; - data['userId'] = entity.userId; - data['userType'] = entity.userType; - data['nickname'] = entity.nickname; - data['signature'] = entity.signature; - data['description'] = entity.description; - data['detailDescription'] = entity.detailDescription; - data['avatarImgId'] = entity.avatarImgId; - data['backgroundImgId'] = entity.backgroundImgId; - data['backgroundUrl'] = entity.backgroundUrl; - data['authority'] = entity.authority; - data['mutual'] = entity.mutual; - data['expertTags'] = entity.expertTags; - data['djStatus'] = entity.djStatus; - data['vipType'] = entity.vipType; - data['remarkName'] = entity.remarkName; - data['authenticationTypes'] = entity.authenticationTypes; - data['avatarDetail'] = entity.avatarDetail; - data['backgroundImgIdStr'] = entity.backgroundImgIdStr; - data['anchor'] = entity.anchor; - data['avatarImgIdStr'] = entity.avatarImgIdStr; - data['avatarImgId_str'] = entity.avatarimgidStr; - return data; -} - -extension UserPlaylistPlaylistCreatorExtension on UserPlaylistPlaylistCreator { - UserPlaylistPlaylistCreator copyWith({ - bool? defaultAvatar, - int? province, - int? authStatus, - bool? followed, - String? avatarUrl, - int? accountStatus, - int? gender, - int? city, - int? birthday, - int? userId, - int? userType, - String? nickname, - String? signature, - String? description, - String? detailDescription, - int? avatarImgId, - int? backgroundImgId, - String? backgroundUrl, - int? authority, - bool? mutual, - List? expertTags, - int? djStatus, - int? vipType, - String? remarkName, - int? authenticationTypes, - String? avatarDetail, - String? backgroundImgIdStr, - bool? anchor, - String? avatarImgIdStr, - String? avatarimgidStr, - }) { - return UserPlaylistPlaylistCreator() - ..defaultAvatar = defaultAvatar ?? this.defaultAvatar - ..province = province ?? this.province - ..authStatus = authStatus ?? this.authStatus - ..followed = followed ?? this.followed - ..avatarUrl = avatarUrl ?? this.avatarUrl - ..accountStatus = accountStatus ?? this.accountStatus - ..gender = gender ?? this.gender - ..city = city ?? this.city - ..birthday = birthday ?? this.birthday - ..userId = userId ?? this.userId - ..userType = userType ?? this.userType - ..nickname = nickname ?? this.nickname - ..signature = signature ?? this.signature - ..description = description ?? this.description - ..detailDescription = detailDescription ?? this.detailDescription - ..avatarImgId = avatarImgId ?? this.avatarImgId - ..backgroundImgId = backgroundImgId ?? this.backgroundImgId - ..backgroundUrl = backgroundUrl ?? this.backgroundUrl - ..authority = authority ?? this.authority - ..mutual = mutual ?? this.mutual - ..expertTags = expertTags ?? this.expertTags - ..djStatus = djStatus ?? this.djStatus - ..vipType = vipType ?? this.vipType - ..remarkName = remarkName ?? this.remarkName - ..authenticationTypes = authenticationTypes ?? this.authenticationTypes - ..avatarDetail = avatarDetail ?? this.avatarDetail - ..backgroundImgIdStr = backgroundImgIdStr ?? this.backgroundImgIdStr - ..anchor = anchor ?? this.anchor - ..avatarImgIdStr = avatarImgIdStr ?? this.avatarImgIdStr - ..avatarimgidStr = avatarimgidStr ?? this.avatarimgidStr; - } -} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 9b4b51b..3534c95 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,13 +14,15 @@ dependencies: cookie_jar: ^4.0.8 encrypt: ^5.0.3 pointycastle: ^3.9.1 -# shared_preferences: ^2.0.0 + shared_preferences: ^2.0.0 pretty_dio_logger: ^1.4.0 meta: ^1.15.0 dependency_overrides: asn1lib: 1.5.0 dev_dependencies: + build_runner: ^2.4.0 + json_serializable: ^6.7.0 flutter_test: sdk: flutter flutter_lints: ^4.0.0