// GENERATED CODE - DO NOT MODIFY BY HAND part of 'downloaded_chapter.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _$DownloadedChapterImpl _$$DownloadedChapterImplFromJson( Map json) => _$DownloadedChapterImpl( id: json['id'] as String, seriesId: json['seriesId'] as String, serverId: json['serverId'] as String, entryId: json['entryId'] as String, title: json['title'] as String, contentType: $enumDecode(_$ChapterContentTypeEnumMap, json['contentType']), status: $enumDecodeNullable(_$DownloadStatusEnumMap, json['status']) ?? DownloadStatus.pending, filePath: json['filePath'] as String?, totalPages: (json['totalPages'] as num?)?.toInt() ?? 0, downloadedPages: (json['downloadedPages'] as num?)?.toInt() ?? 0, entryJson: json['entryJson'] as String, coverUrl: json['coverUrl'] as String?, coverPath: json['coverPath'] as String?, sortOrder: (json['sortOrder'] as num?)?.toInt() ?? 0, errorMessage: json['errorMessage'] as String?, downloadedAt: json['downloadedAt'] == null ? null : DateTime.parse(json['downloadedAt'] as String), updatedAt: DateTime.parse(json['updatedAt'] as String), ); Map _$$DownloadedChapterImplToJson( _$DownloadedChapterImpl instance) => { 'id': instance.id, 'seriesId': instance.seriesId, 'serverId': instance.serverId, 'entryId': instance.entryId, 'title': instance.title, 'contentType': _$ChapterContentTypeEnumMap[instance.contentType]!, 'status': _$DownloadStatusEnumMap[instance.status]!, 'filePath': instance.filePath, 'totalPages': instance.totalPages, 'downloadedPages': instance.downloadedPages, 'entryJson': instance.entryJson, 'coverUrl': instance.coverUrl, 'coverPath': instance.coverPath, 'sortOrder': instance.sortOrder, 'errorMessage': instance.errorMessage, 'downloadedAt': instance.downloadedAt?.toIso8601String(), 'updatedAt': instance.updatedAt.toIso8601String(), }; const _$ChapterContentTypeEnumMap = { ChapterContentType.epub: 'epub', ChapterContentType.imageStream: 'imageStream', }; const _$DownloadStatusEnumMap = { DownloadStatus.pending: 'pending', DownloadStatus.downloading: 'downloading', DownloadStatus.complete: 'complete', DownloadStatus.partial: 'partial', DownloadStatus.failed: 'failed', };