// GENERATED CODE - DO NOT MODIFY BY HAND part of 'jellyfin_open_api.swagger.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** AccessSchedule _$AccessScheduleFromJson(Map json) => AccessSchedule( id: (json['Id'] as num?)?.toInt(), userId: json['UserId'] as String?, dayOfWeek: dynamicDayOfWeekNullableFromJson(json['DayOfWeek']), startHour: (json['StartHour'] as num?)?.toDouble(), endHour: (json['EndHour'] as num?)?.toDouble(), ); Map _$AccessScheduleToJson(AccessSchedule instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('UserId', instance.userId); writeNotNull('DayOfWeek', dynamicDayOfWeekNullableToJson(instance.dayOfWeek)); writeNotNull('StartHour', instance.startHour); writeNotNull('EndHour', instance.endHour); return val; } ActivityLogEntry _$ActivityLogEntryFromJson(Map json) => ActivityLogEntry( id: (json['Id'] as num?)?.toInt(), name: json['Name'] as String?, overview: json['Overview'] as String?, shortOverview: json['ShortOverview'] as String?, type: json['Type'] as String?, itemId: json['ItemId'] as String?, date: json['Date'] == null ? null : DateTime.parse(json['Date'] as String), userId: json['UserId'] as String?, userPrimaryImageTag: json['UserPrimaryImageTag'] as String?, severity: logLevelNullableFromJson(json['Severity']), ); Map _$ActivityLogEntryToJson(ActivityLogEntry instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('Name', instance.name); writeNotNull('Overview', instance.overview); writeNotNull('ShortOverview', instance.shortOverview); writeNotNull('Type', instance.type); writeNotNull('ItemId', instance.itemId); writeNotNull('Date', instance.date?.toIso8601String()); writeNotNull('UserId', instance.userId); writeNotNull('UserPrimaryImageTag', instance.userPrimaryImageTag); writeNotNull('Severity', logLevelNullableToJson(instance.severity)); return val; } ActivityLogEntryMessage _$ActivityLogEntryMessageFromJson( Map json) => ActivityLogEntryMessage( data: (json['Data'] as List?) ?.map((e) => ActivityLogEntry.fromJson(e as Map)) .toList() ?? [], messageId: json['MessageId'] as String?, messageType: ActivityLogEntryMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$ActivityLogEntryMessageToJson( ActivityLogEntryMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.map((e) => e.toJson()).toList()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ActivityLogEntryQueryResult _$ActivityLogEntryQueryResultFromJson( Map json) => ActivityLogEntryQueryResult( items: (json['Items'] as List?) ?.map((e) => ActivityLogEntry.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$ActivityLogEntryQueryResultToJson( ActivityLogEntryQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } ActivityLogEntryStartMessage _$ActivityLogEntryStartMessageFromJson( Map json) => ActivityLogEntryStartMessage( data: json['Data'] as String?, messageType: ActivityLogEntryStartMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ActivityLogEntryStartMessageToJson( ActivityLogEntryStartMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ActivityLogEntryStopMessage _$ActivityLogEntryStopMessageFromJson( Map json) => ActivityLogEntryStopMessage( messageType: ActivityLogEntryStopMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ActivityLogEntryStopMessageToJson( ActivityLogEntryStopMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } AddVirtualFolderDto _$AddVirtualFolderDtoFromJson(Map json) => AddVirtualFolderDto( libraryOptions: json['LibraryOptions'] == null ? null : LibraryOptions.fromJson( json['LibraryOptions'] as Map), ); Map _$AddVirtualFolderDtoToJson(AddVirtualFolderDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('LibraryOptions', instance.libraryOptions?.toJson()); return val; } AlbumInfo _$AlbumInfoFromJson(Map json) => AlbumInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, albumArtists: (json['AlbumArtists'] as List?) ?.map((e) => e as String) .toList() ?? [], artistProviderIds: json['ArtistProviderIds'] as Map?, songInfos: (json['SongInfos'] as List?) ?.map((e) => SongInfo.fromJson(e as Map)) .toList() ?? [], ); Map _$AlbumInfoToJson(AlbumInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); writeNotNull('AlbumArtists', instance.albumArtists); writeNotNull('ArtistProviderIds', instance.artistProviderIds); writeNotNull( 'SongInfos', instance.songInfos?.map((e) => e.toJson()).toList()); return val; } AlbumInfoRemoteSearchQuery _$AlbumInfoRemoteSearchQueryFromJson( Map json) => AlbumInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : AlbumInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$AlbumInfoRemoteSearchQueryToJson( AlbumInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } AllThemeMediaResult _$AllThemeMediaResultFromJson(Map json) => AllThemeMediaResult( themeVideosResult: json['ThemeVideosResult'] == null ? null : ThemeMediaResult.fromJson( json['ThemeVideosResult'] as Map), themeSongsResult: json['ThemeSongsResult'] == null ? null : ThemeMediaResult.fromJson( json['ThemeSongsResult'] as Map), soundtrackSongsResult: json['SoundtrackSongsResult'] == null ? null : ThemeMediaResult.fromJson( json['SoundtrackSongsResult'] as Map), ); Map _$AllThemeMediaResultToJson(AllThemeMediaResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ThemeVideosResult', instance.themeVideosResult?.toJson()); writeNotNull('ThemeSongsResult', instance.themeSongsResult?.toJson()); writeNotNull( 'SoundtrackSongsResult', instance.soundtrackSongsResult?.toJson()); return val; } ArtistInfo _$ArtistInfoFromJson(Map json) => ArtistInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, songInfos: (json['SongInfos'] as List?) ?.map((e) => SongInfo.fromJson(e as Map)) .toList() ?? [], ); Map _$ArtistInfoToJson(ArtistInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); writeNotNull( 'SongInfos', instance.songInfos?.map((e) => e.toJson()).toList()); return val; } ArtistInfoRemoteSearchQuery _$ArtistInfoRemoteSearchQueryFromJson( Map json) => ArtistInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : ArtistInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$ArtistInfoRemoteSearchQueryToJson( ArtistInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } AuthenticateUserByName _$AuthenticateUserByNameFromJson( Map json) => AuthenticateUserByName( username: json['Username'] as String?, pw: json['Pw'] as String?, ); Map _$AuthenticateUserByNameToJson( AuthenticateUserByName instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Username', instance.username); writeNotNull('Pw', instance.pw); return val; } AuthenticationInfo _$AuthenticationInfoFromJson(Map json) => AuthenticationInfo( id: (json['Id'] as num?)?.toInt(), accessToken: json['AccessToken'] as String?, deviceId: json['DeviceId'] as String?, appName: json['AppName'] as String?, appVersion: json['AppVersion'] as String?, deviceName: json['DeviceName'] as String?, userId: json['UserId'] as String?, isActive: json['IsActive'] as bool?, dateCreated: json['DateCreated'] == null ? null : DateTime.parse(json['DateCreated'] as String), dateRevoked: json['DateRevoked'] == null ? null : DateTime.parse(json['DateRevoked'] as String), dateLastActivity: json['DateLastActivity'] == null ? null : DateTime.parse(json['DateLastActivity'] as String), userName: json['UserName'] as String?, ); Map _$AuthenticationInfoToJson(AuthenticationInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('AccessToken', instance.accessToken); writeNotNull('DeviceId', instance.deviceId); writeNotNull('AppName', instance.appName); writeNotNull('AppVersion', instance.appVersion); writeNotNull('DeviceName', instance.deviceName); writeNotNull('UserId', instance.userId); writeNotNull('IsActive', instance.isActive); writeNotNull('DateCreated', instance.dateCreated?.toIso8601String()); writeNotNull('DateRevoked', instance.dateRevoked?.toIso8601String()); writeNotNull( 'DateLastActivity', instance.dateLastActivity?.toIso8601String()); writeNotNull('UserName', instance.userName); return val; } AuthenticationInfoQueryResult _$AuthenticationInfoQueryResultFromJson( Map json) => AuthenticationInfoQueryResult( items: (json['Items'] as List?) ?.map( (e) => AuthenticationInfo.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$AuthenticationInfoQueryResultToJson( AuthenticationInfoQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } AuthenticationResult _$AuthenticationResultFromJson( Map json) => AuthenticationResult( user: json['User'] == null ? null : UserDto.fromJson(json['User'] as Map), sessionInfo: json['SessionInfo'] == null ? null : SessionInfoDto.fromJson( json['SessionInfo'] as Map), accessToken: json['AccessToken'] as String?, serverId: json['ServerId'] as String?, ); Map _$AuthenticationResultToJson( AuthenticationResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('User', instance.user?.toJson()); writeNotNull('SessionInfo', instance.sessionInfo?.toJson()); writeNotNull('AccessToken', instance.accessToken); writeNotNull('ServerId', instance.serverId); return val; } BaseItemDto _$BaseItemDtoFromJson(Map json) => BaseItemDto( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, serverId: json['ServerId'] as String?, id: json['Id'] as String?, etag: json['Etag'] as String?, sourceType: json['SourceType'] as String?, playlistItemId: json['PlaylistItemId'] as String?, dateCreated: json['DateCreated'] == null ? null : DateTime.parse(json['DateCreated'] as String), dateLastMediaAdded: json['DateLastMediaAdded'] == null ? null : DateTime.parse(json['DateLastMediaAdded'] as String), extraType: extraTypeNullableFromJson(json['ExtraType']), airsBeforeSeasonNumber: (json['AirsBeforeSeasonNumber'] as num?)?.toInt(), airsAfterSeasonNumber: (json['AirsAfterSeasonNumber'] as num?)?.toInt(), airsBeforeEpisodeNumber: (json['AirsBeforeEpisodeNumber'] as num?)?.toInt(), canDelete: json['CanDelete'] as bool?, canDownload: json['CanDownload'] as bool?, hasLyrics: json['HasLyrics'] as bool?, hasSubtitles: json['HasSubtitles'] as bool?, preferredMetadataLanguage: json['PreferredMetadataLanguage'] as String?, preferredMetadataCountryCode: json['PreferredMetadataCountryCode'] as String?, container: json['Container'] as String?, sortName: json['SortName'] as String?, forcedSortName: json['ForcedSortName'] as String?, video3DFormat: video3DFormatNullableFromJson(json['Video3DFormat']), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), externalUrls: (json['ExternalUrls'] as List?) ?.map((e) => ExternalUrl.fromJson(e as Map)) .toList() ?? [], mediaSources: (json['MediaSources'] as List?) ?.map((e) => MediaSourceInfo.fromJson(e as Map)) .toList() ?? [], criticRating: (json['CriticRating'] as num?)?.toDouble(), productionLocations: (json['ProductionLocations'] as List?) ?.map((e) => e as String) .toList() ?? [], path: json['Path'] as String?, enableMediaSourceDisplay: json['EnableMediaSourceDisplay'] as bool?, officialRating: json['OfficialRating'] as String?, customRating: json['CustomRating'] as String?, channelId: json['ChannelId'] as String?, channelName: json['ChannelName'] as String?, overview: json['Overview'] as String?, taglines: (json['Taglines'] as List?) ?.map((e) => e as String) .toList() ?? [], genres: (json['Genres'] as List?) ?.map((e) => e as String) .toList() ?? [], communityRating: (json['CommunityRating'] as num?)?.toDouble(), cumulativeRunTimeTicks: (json['CumulativeRunTimeTicks'] as num?)?.toInt(), runTimeTicks: (json['RunTimeTicks'] as num?)?.toInt(), playAccess: playAccessNullableFromJson(json['PlayAccess']), aspectRatio: json['AspectRatio'] as String?, productionYear: (json['ProductionYear'] as num?)?.toInt(), isPlaceHolder: json['IsPlaceHolder'] as bool?, number: json['Number'] as String?, channelNumber: json['ChannelNumber'] as String?, indexNumber: (json['IndexNumber'] as num?)?.toInt(), indexNumberEnd: (json['IndexNumberEnd'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), remoteTrailers: (json['RemoteTrailers'] as List?) ?.map((e) => MediaUrl.fromJson(e as Map)) .toList() ?? [], providerIds: json['ProviderIds'] as Map?, isHD: json['IsHD'] as bool?, isFolder: json['IsFolder'] as bool?, parentId: json['ParentId'] as String?, type: baseItemKindNullableFromJson(json['Type']), people: (json['People'] as List?) ?.map((e) => BaseItemPerson.fromJson(e as Map)) .toList() ?? [], studios: (json['Studios'] as List?) ?.map((e) => NameGuidPair.fromJson(e as Map)) .toList() ?? [], genreItems: (json['GenreItems'] as List?) ?.map((e) => NameGuidPair.fromJson(e as Map)) .toList() ?? [], parentLogoItemId: json['ParentLogoItemId'] as String?, parentBackdropItemId: json['ParentBackdropItemId'] as String?, parentBackdropImageTags: (json['ParentBackdropImageTags'] as List?) ?.map((e) => e as String) .toList() ?? [], localTrailerCount: (json['LocalTrailerCount'] as num?)?.toInt(), userData: json['UserData'] == null ? null : UserItemDataDto.fromJson(json['UserData'] as Map), recursiveItemCount: (json['RecursiveItemCount'] as num?)?.toInt(), childCount: (json['ChildCount'] as num?)?.toInt(), seriesName: json['SeriesName'] as String?, seriesId: json['SeriesId'] as String?, seasonId: json['SeasonId'] as String?, specialFeatureCount: (json['SpecialFeatureCount'] as num?)?.toInt(), displayPreferencesId: json['DisplayPreferencesId'] as String?, status: json['Status'] as String?, airTime: json['AirTime'] as String?, airDays: dayOfWeekListFromJson(json['AirDays'] as List?), tags: (json['Tags'] as List?)?.map((e) => e as String).toList() ?? [], primaryImageAspectRatio: (json['PrimaryImageAspectRatio'] as num?)?.toDouble(), artists: (json['Artists'] as List?) ?.map((e) => e as String) .toList() ?? [], artistItems: (json['ArtistItems'] as List?) ?.map((e) => NameGuidPair.fromJson(e as Map)) .toList() ?? [], album: json['Album'] as String?, collectionType: collectionTypeNullableFromJson(json['CollectionType']), displayOrder: json['DisplayOrder'] as String?, albumId: json['AlbumId'] as String?, albumPrimaryImageTag: json['AlbumPrimaryImageTag'] as String?, seriesPrimaryImageTag: json['SeriesPrimaryImageTag'] as String?, albumArtist: json['AlbumArtist'] as String?, albumArtists: (json['AlbumArtists'] as List?) ?.map((e) => NameGuidPair.fromJson(e as Map)) .toList() ?? [], seasonName: json['SeasonName'] as String?, mediaStreams: (json['MediaStreams'] as List?) ?.map((e) => MediaStream.fromJson(e as Map)) .toList() ?? [], videoType: videoTypeNullableFromJson(json['VideoType']), partCount: (json['PartCount'] as num?)?.toInt(), mediaSourceCount: (json['MediaSourceCount'] as num?)?.toInt(), imageTags: json['ImageTags'] as Map?, backdropImageTags: (json['BackdropImageTags'] as List?) ?.map((e) => e as String) .toList() ?? [], screenshotImageTags: (json['ScreenshotImageTags'] as List?) ?.map((e) => e as String) .toList() ?? [], parentLogoImageTag: json['ParentLogoImageTag'] as String?, parentArtItemId: json['ParentArtItemId'] as String?, parentArtImageTag: json['ParentArtImageTag'] as String?, seriesThumbImageTag: json['SeriesThumbImageTag'] as String?, imageBlurHashes: json['ImageBlurHashes'] == null ? null : BaseItemDto$ImageBlurHashes.fromJson( json['ImageBlurHashes'] as Map), seriesStudio: json['SeriesStudio'] as String?, parentThumbItemId: json['ParentThumbItemId'] as String?, parentThumbImageTag: json['ParentThumbImageTag'] as String?, parentPrimaryImageItemId: json['ParentPrimaryImageItemId'] as String?, parentPrimaryImageTag: json['ParentPrimaryImageTag'] as String?, chapters: (json['Chapters'] as List?) ?.map((e) => ChapterInfo.fromJson(e as Map)) .toList() ?? [], trickplay: json['Trickplay'] as Map?, locationType: locationTypeNullableFromJson(json['LocationType']), isoType: isoTypeNullableFromJson(json['IsoType']), mediaType: mediaTypeNullableFromJson(json['MediaType']), endDate: json['EndDate'] == null ? null : DateTime.parse(json['EndDate'] as String), lockedFields: metadataFieldListFromJson(json['LockedFields'] as List?), trailerCount: (json['TrailerCount'] as num?)?.toInt(), movieCount: (json['MovieCount'] as num?)?.toInt(), seriesCount: (json['SeriesCount'] as num?)?.toInt(), programCount: (json['ProgramCount'] as num?)?.toInt(), episodeCount: (json['EpisodeCount'] as num?)?.toInt(), songCount: (json['SongCount'] as num?)?.toInt(), albumCount: (json['AlbumCount'] as num?)?.toInt(), artistCount: (json['ArtistCount'] as num?)?.toInt(), musicVideoCount: (json['MusicVideoCount'] as num?)?.toInt(), lockData: json['LockData'] as bool?, width: (json['Width'] as num?)?.toInt(), height: (json['Height'] as num?)?.toInt(), cameraMake: json['CameraMake'] as String?, cameraModel: json['CameraModel'] as String?, software: json['Software'] as String?, exposureTime: (json['ExposureTime'] as num?)?.toDouble(), focalLength: (json['FocalLength'] as num?)?.toDouble(), imageOrientation: imageOrientationNullableFromJson(json['ImageOrientation']), aperture: (json['Aperture'] as num?)?.toDouble(), shutterSpeed: (json['ShutterSpeed'] as num?)?.toDouble(), latitude: (json['Latitude'] as num?)?.toDouble(), longitude: (json['Longitude'] as num?)?.toDouble(), altitude: (json['Altitude'] as num?)?.toDouble(), isoSpeedRating: (json['IsoSpeedRating'] as num?)?.toInt(), seriesTimerId: json['SeriesTimerId'] as String?, programId: json['ProgramId'] as String?, channelPrimaryImageTag: json['ChannelPrimaryImageTag'] as String?, startDate: json['StartDate'] == null ? null : DateTime.parse(json['StartDate'] as String), completionPercentage: (json['CompletionPercentage'] as num?)?.toDouble(), isRepeat: json['IsRepeat'] as bool?, episodeTitle: json['EpisodeTitle'] as String?, channelType: channelTypeNullableFromJson(json['ChannelType']), audio: programAudioNullableFromJson(json['Audio']), isMovie: json['IsMovie'] as bool?, isSports: json['IsSports'] as bool?, isSeries: json['IsSeries'] as bool?, isLive: json['IsLive'] as bool?, isNews: json['IsNews'] as bool?, isKids: json['IsKids'] as bool?, isPremiere: json['IsPremiere'] as bool?, timerId: json['TimerId'] as String?, normalizationGain: (json['NormalizationGain'] as num?)?.toDouble(), currentProgram: json['CurrentProgram'] == null ? null : BaseItemDto.fromJson( json['CurrentProgram'] as Map), ); Map _$BaseItemDtoToJson(BaseItemDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('ServerId', instance.serverId); writeNotNull('Id', instance.id); writeNotNull('Etag', instance.etag); writeNotNull('SourceType', instance.sourceType); writeNotNull('PlaylistItemId', instance.playlistItemId); writeNotNull('DateCreated', instance.dateCreated?.toIso8601String()); writeNotNull( 'DateLastMediaAdded', instance.dateLastMediaAdded?.toIso8601String()); writeNotNull('ExtraType', extraTypeNullableToJson(instance.extraType)); writeNotNull('AirsBeforeSeasonNumber', instance.airsBeforeSeasonNumber); writeNotNull('AirsAfterSeasonNumber', instance.airsAfterSeasonNumber); writeNotNull('AirsBeforeEpisodeNumber', instance.airsBeforeEpisodeNumber); writeNotNull('CanDelete', instance.canDelete); writeNotNull('CanDownload', instance.canDownload); writeNotNull('HasLyrics', instance.hasLyrics); writeNotNull('HasSubtitles', instance.hasSubtitles); writeNotNull('PreferredMetadataLanguage', instance.preferredMetadataLanguage); writeNotNull( 'PreferredMetadataCountryCode', instance.preferredMetadataCountryCode); writeNotNull('Container', instance.container); writeNotNull('SortName', instance.sortName); writeNotNull('ForcedSortName', instance.forcedSortName); writeNotNull( 'Video3DFormat', video3DFormatNullableToJson(instance.video3DFormat)); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull( 'ExternalUrls', instance.externalUrls?.map((e) => e.toJson()).toList()); writeNotNull( 'MediaSources', instance.mediaSources?.map((e) => e.toJson()).toList()); writeNotNull('CriticRating', instance.criticRating); writeNotNull('ProductionLocations', instance.productionLocations); writeNotNull('Path', instance.path); writeNotNull('EnableMediaSourceDisplay', instance.enableMediaSourceDisplay); writeNotNull('OfficialRating', instance.officialRating); writeNotNull('CustomRating', instance.customRating); writeNotNull('ChannelId', instance.channelId); writeNotNull('ChannelName', instance.channelName); writeNotNull('Overview', instance.overview); writeNotNull('Taglines', instance.taglines); writeNotNull('Genres', instance.genres); writeNotNull('CommunityRating', instance.communityRating); writeNotNull('CumulativeRunTimeTicks', instance.cumulativeRunTimeTicks); writeNotNull('RunTimeTicks', instance.runTimeTicks); writeNotNull('PlayAccess', playAccessNullableToJson(instance.playAccess)); writeNotNull('AspectRatio', instance.aspectRatio); writeNotNull('ProductionYear', instance.productionYear); writeNotNull('IsPlaceHolder', instance.isPlaceHolder); writeNotNull('Number', instance.number); writeNotNull('ChannelNumber', instance.channelNumber); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('IndexNumberEnd', instance.indexNumberEnd); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('RemoteTrailers', instance.remoteTrailers?.map((e) => e.toJson()).toList()); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('IsHD', instance.isHD); writeNotNull('IsFolder', instance.isFolder); writeNotNull('ParentId', instance.parentId); writeNotNull('Type', baseItemKindNullableToJson(instance.type)); writeNotNull('People', instance.people?.map((e) => e.toJson()).toList()); writeNotNull('Studios', instance.studios?.map((e) => e.toJson()).toList()); writeNotNull( 'GenreItems', instance.genreItems?.map((e) => e.toJson()).toList()); writeNotNull('ParentLogoItemId', instance.parentLogoItemId); writeNotNull('ParentBackdropItemId', instance.parentBackdropItemId); writeNotNull('ParentBackdropImageTags', instance.parentBackdropImageTags); writeNotNull('LocalTrailerCount', instance.localTrailerCount); writeNotNull('UserData', instance.userData?.toJson()); writeNotNull('RecursiveItemCount', instance.recursiveItemCount); writeNotNull('ChildCount', instance.childCount); writeNotNull('SeriesName', instance.seriesName); writeNotNull('SeriesId', instance.seriesId); writeNotNull('SeasonId', instance.seasonId); writeNotNull('SpecialFeatureCount', instance.specialFeatureCount); writeNotNull('DisplayPreferencesId', instance.displayPreferencesId); writeNotNull('Status', instance.status); writeNotNull('AirTime', instance.airTime); val['AirDays'] = dayOfWeekListToJson(instance.airDays); writeNotNull('Tags', instance.tags); writeNotNull('PrimaryImageAspectRatio', instance.primaryImageAspectRatio); writeNotNull('Artists', instance.artists); writeNotNull( 'ArtistItems', instance.artistItems?.map((e) => e.toJson()).toList()); writeNotNull('Album', instance.album); writeNotNull( 'CollectionType', collectionTypeNullableToJson(instance.collectionType)); writeNotNull('DisplayOrder', instance.displayOrder); writeNotNull('AlbumId', instance.albumId); writeNotNull('AlbumPrimaryImageTag', instance.albumPrimaryImageTag); writeNotNull('SeriesPrimaryImageTag', instance.seriesPrimaryImageTag); writeNotNull('AlbumArtist', instance.albumArtist); writeNotNull( 'AlbumArtists', instance.albumArtists?.map((e) => e.toJson()).toList()); writeNotNull('SeasonName', instance.seasonName); writeNotNull( 'MediaStreams', instance.mediaStreams?.map((e) => e.toJson()).toList()); writeNotNull('VideoType', videoTypeNullableToJson(instance.videoType)); writeNotNull('PartCount', instance.partCount); writeNotNull('MediaSourceCount', instance.mediaSourceCount); writeNotNull('ImageTags', instance.imageTags); writeNotNull('BackdropImageTags', instance.backdropImageTags); writeNotNull('ScreenshotImageTags', instance.screenshotImageTags); writeNotNull('ParentLogoImageTag', instance.parentLogoImageTag); writeNotNull('ParentArtItemId', instance.parentArtItemId); writeNotNull('ParentArtImageTag', instance.parentArtImageTag); writeNotNull('SeriesThumbImageTag', instance.seriesThumbImageTag); writeNotNull('ImageBlurHashes', instance.imageBlurHashes?.toJson()); writeNotNull('SeriesStudio', instance.seriesStudio); writeNotNull('ParentThumbItemId', instance.parentThumbItemId); writeNotNull('ParentThumbImageTag', instance.parentThumbImageTag); writeNotNull('ParentPrimaryImageItemId', instance.parentPrimaryImageItemId); writeNotNull('ParentPrimaryImageTag', instance.parentPrimaryImageTag); writeNotNull('Chapters', instance.chapters?.map((e) => e.toJson()).toList()); writeNotNull('Trickplay', instance.trickplay); writeNotNull( 'LocationType', locationTypeNullableToJson(instance.locationType)); writeNotNull('IsoType', isoTypeNullableToJson(instance.isoType)); writeNotNull('MediaType', mediaTypeNullableToJson(instance.mediaType)); writeNotNull('EndDate', instance.endDate?.toIso8601String()); val['LockedFields'] = metadataFieldListToJson(instance.lockedFields); writeNotNull('TrailerCount', instance.trailerCount); writeNotNull('MovieCount', instance.movieCount); writeNotNull('SeriesCount', instance.seriesCount); writeNotNull('ProgramCount', instance.programCount); writeNotNull('EpisodeCount', instance.episodeCount); writeNotNull('SongCount', instance.songCount); writeNotNull('AlbumCount', instance.albumCount); writeNotNull('ArtistCount', instance.artistCount); writeNotNull('MusicVideoCount', instance.musicVideoCount); writeNotNull('LockData', instance.lockData); writeNotNull('Width', instance.width); writeNotNull('Height', instance.height); writeNotNull('CameraMake', instance.cameraMake); writeNotNull('CameraModel', instance.cameraModel); writeNotNull('Software', instance.software); writeNotNull('ExposureTime', instance.exposureTime); writeNotNull('FocalLength', instance.focalLength); writeNotNull('ImageOrientation', imageOrientationNullableToJson(instance.imageOrientation)); writeNotNull('Aperture', instance.aperture); writeNotNull('ShutterSpeed', instance.shutterSpeed); writeNotNull('Latitude', instance.latitude); writeNotNull('Longitude', instance.longitude); writeNotNull('Altitude', instance.altitude); writeNotNull('IsoSpeedRating', instance.isoSpeedRating); writeNotNull('SeriesTimerId', instance.seriesTimerId); writeNotNull('ProgramId', instance.programId); writeNotNull('ChannelPrimaryImageTag', instance.channelPrimaryImageTag); writeNotNull('StartDate', instance.startDate?.toIso8601String()); writeNotNull('CompletionPercentage', instance.completionPercentage); writeNotNull('IsRepeat', instance.isRepeat); writeNotNull('EpisodeTitle', instance.episodeTitle); writeNotNull('ChannelType', channelTypeNullableToJson(instance.channelType)); writeNotNull('Audio', programAudioNullableToJson(instance.audio)); writeNotNull('IsMovie', instance.isMovie); writeNotNull('IsSports', instance.isSports); writeNotNull('IsSeries', instance.isSeries); writeNotNull('IsLive', instance.isLive); writeNotNull('IsNews', instance.isNews); writeNotNull('IsKids', instance.isKids); writeNotNull('IsPremiere', instance.isPremiere); writeNotNull('TimerId', instance.timerId); writeNotNull('NormalizationGain', instance.normalizationGain); writeNotNull('CurrentProgram', instance.currentProgram?.toJson()); return val; } BaseItemDtoQueryResult _$BaseItemDtoQueryResultFromJson( Map json) => BaseItemDtoQueryResult( items: (json['Items'] as List?) ?.map((e) => BaseItemDto.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$BaseItemDtoQueryResultToJson( BaseItemDtoQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } BaseItemPerson _$BaseItemPersonFromJson(Map json) => BaseItemPerson( name: json['Name'] as String?, id: json['Id'] as String?, role: json['Role'] as String?, type: personKindNullableFromJson(json['Type']), primaryImageTag: json['PrimaryImageTag'] as String?, imageBlurHashes: json['ImageBlurHashes'] == null ? null : BaseItemPerson$ImageBlurHashes.fromJson( json['ImageBlurHashes'] as Map), ); Map _$BaseItemPersonToJson(BaseItemPerson instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Id', instance.id); writeNotNull('Role', instance.role); writeNotNull('Type', personKindNullableToJson(instance.type)); writeNotNull('PrimaryImageTag', instance.primaryImageTag); writeNotNull('ImageBlurHashes', instance.imageBlurHashes?.toJson()); return val; } BasePluginConfiguration _$BasePluginConfigurationFromJson( Map json) => BasePluginConfiguration(); Map _$BasePluginConfigurationToJson( BasePluginConfiguration instance) => {}; BookInfo _$BookInfoFromJson(Map json) => BookInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, seriesName: json['SeriesName'] as String?, ); Map _$BookInfoToJson(BookInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); writeNotNull('SeriesName', instance.seriesName); return val; } BookInfoRemoteSearchQuery _$BookInfoRemoteSearchQueryFromJson( Map json) => BookInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : BookInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$BookInfoRemoteSearchQueryToJson( BookInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } BoxSetInfo _$BoxSetInfoFromJson(Map json) => BoxSetInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, ); Map _$BoxSetInfoToJson(BoxSetInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); return val; } BoxSetInfoRemoteSearchQuery _$BoxSetInfoRemoteSearchQueryFromJson( Map json) => BoxSetInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : BoxSetInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$BoxSetInfoRemoteSearchQueryToJson( BoxSetInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } BrandingOptions _$BrandingOptionsFromJson(Map json) => BrandingOptions( loginDisclaimer: json['LoginDisclaimer'] as String?, customCss: json['CustomCss'] as String?, splashscreenEnabled: json['SplashscreenEnabled'] as bool?, ); Map _$BrandingOptionsToJson(BrandingOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('LoginDisclaimer', instance.loginDisclaimer); writeNotNull('CustomCss', instance.customCss); writeNotNull('SplashscreenEnabled', instance.splashscreenEnabled); return val; } BufferRequestDto _$BufferRequestDtoFromJson(Map json) => BufferRequestDto( when: json['When'] == null ? null : DateTime.parse(json['When'] as String), positionTicks: (json['PositionTicks'] as num?)?.toInt(), isPlaying: json['IsPlaying'] as bool?, playlistItemId: json['PlaylistItemId'] as String?, ); Map _$BufferRequestDtoToJson(BufferRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('When', instance.when?.toIso8601String()); writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('IsPlaying', instance.isPlaying); writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } CastReceiverApplication _$CastReceiverApplicationFromJson( Map json) => CastReceiverApplication( id: json['Id'] as String?, name: json['Name'] as String?, ); Map _$CastReceiverApplicationToJson( CastReceiverApplication instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('Name', instance.name); return val; } ChannelFeatures _$ChannelFeaturesFromJson(Map json) => ChannelFeatures( name: json['Name'] as String?, id: json['Id'] as String?, canSearch: json['CanSearch'] as bool?, mediaTypes: channelMediaTypeListFromJson(json['MediaTypes'] as List?), contentTypes: channelMediaContentTypeListFromJson(json['ContentTypes'] as List?), maxPageSize: (json['MaxPageSize'] as num?)?.toInt(), autoRefreshLevels: (json['AutoRefreshLevels'] as num?)?.toInt(), defaultSortFields: channelItemSortFieldListFromJson(json['DefaultSortFields'] as List?), supportsSortOrderToggle: json['SupportsSortOrderToggle'] as bool?, supportsLatestMedia: json['SupportsLatestMedia'] as bool?, canFilter: json['CanFilter'] as bool?, supportsContentDownloading: json['SupportsContentDownloading'] as bool?, ); Map _$ChannelFeaturesToJson(ChannelFeatures instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Id', instance.id); writeNotNull('CanSearch', instance.canSearch); val['MediaTypes'] = channelMediaTypeListToJson(instance.mediaTypes); val['ContentTypes'] = channelMediaContentTypeListToJson(instance.contentTypes); writeNotNull('MaxPageSize', instance.maxPageSize); writeNotNull('AutoRefreshLevels', instance.autoRefreshLevels); val['DefaultSortFields'] = channelItemSortFieldListToJson(instance.defaultSortFields); writeNotNull('SupportsSortOrderToggle', instance.supportsSortOrderToggle); writeNotNull('SupportsLatestMedia', instance.supportsLatestMedia); writeNotNull('CanFilter', instance.canFilter); writeNotNull( 'SupportsContentDownloading', instance.supportsContentDownloading); return val; } ChannelMappingOptionsDto _$ChannelMappingOptionsDtoFromJson( Map json) => ChannelMappingOptionsDto( tunerChannels: (json['TunerChannels'] as List?) ?.map((e) => TunerChannelMapping.fromJson(e as Map)) .toList() ?? [], providerChannels: (json['ProviderChannels'] as List?) ?.map((e) => NameIdPair.fromJson(e as Map)) .toList() ?? [], mappings: (json['Mappings'] as List?) ?.map((e) => NameValuePair.fromJson(e as Map)) .toList() ?? [], providerName: json['ProviderName'] as String?, ); Map _$ChannelMappingOptionsDtoToJson( ChannelMappingOptionsDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'TunerChannels', instance.tunerChannels?.map((e) => e.toJson()).toList()); writeNotNull('ProviderChannels', instance.providerChannels?.map((e) => e.toJson()).toList()); writeNotNull('Mappings', instance.mappings?.map((e) => e.toJson()).toList()); writeNotNull('ProviderName', instance.providerName); return val; } ChapterInfo _$ChapterInfoFromJson(Map json) => ChapterInfo( startPositionTicks: (json['StartPositionTicks'] as num?)?.toInt(), name: json['Name'] as String?, imagePath: json['ImagePath'] as String?, imageDateModified: json['ImageDateModified'] == null ? null : DateTime.parse(json['ImageDateModified'] as String), imageTag: json['ImageTag'] as String?, ); Map _$ChapterInfoToJson(ChapterInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('StartPositionTicks', instance.startPositionTicks); writeNotNull('Name', instance.name); writeNotNull('ImagePath', instance.imagePath); writeNotNull( 'ImageDateModified', instance.imageDateModified?.toIso8601String()); writeNotNull('ImageTag', instance.imageTag); return val; } ClientCapabilitiesDto _$ClientCapabilitiesDtoFromJson( Map json) => ClientCapabilitiesDto( playableMediaTypes: mediaTypeListFromJson(json['PlayableMediaTypes'] as List?), supportedCommands: generalCommandTypeListFromJson(json['SupportedCommands'] as List?), supportsMediaControl: json['SupportsMediaControl'] as bool?, supportsPersistentIdentifier: json['SupportsPersistentIdentifier'] as bool?, deviceProfile: json['DeviceProfile'] == null ? null : DeviceProfile.fromJson( json['DeviceProfile'] as Map), appStoreUrl: json['AppStoreUrl'] as String?, iconUrl: json['IconUrl'] as String?, ); Map _$ClientCapabilitiesDtoToJson( ClientCapabilitiesDto instance) { final val = { 'PlayableMediaTypes': mediaTypeListToJson(instance.playableMediaTypes), 'SupportedCommands': generalCommandTypeListToJson(instance.supportedCommands), }; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SupportsMediaControl', instance.supportsMediaControl); writeNotNull( 'SupportsPersistentIdentifier', instance.supportsPersistentIdentifier); writeNotNull('DeviceProfile', instance.deviceProfile?.toJson()); writeNotNull('AppStoreUrl', instance.appStoreUrl); writeNotNull('IconUrl', instance.iconUrl); return val; } ClientLogDocumentResponseDto _$ClientLogDocumentResponseDtoFromJson( Map json) => ClientLogDocumentResponseDto( fileName: json['FileName'] as String?, ); Map _$ClientLogDocumentResponseDtoToJson( ClientLogDocumentResponseDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('FileName', instance.fileName); return val; } CodecProfile _$CodecProfileFromJson(Map json) => CodecProfile( type: codecTypeNullableFromJson(json['Type']), conditions: (json['Conditions'] as List?) ?.map((e) => ProfileCondition.fromJson(e as Map)) .toList() ?? [], applyConditions: (json['ApplyConditions'] as List?) ?.map((e) => ProfileCondition.fromJson(e as Map)) .toList() ?? [], codec: json['Codec'] as String?, container: json['Container'] as String?, subContainer: json['SubContainer'] as String?, ); Map _$CodecProfileToJson(CodecProfile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Type', codecTypeNullableToJson(instance.type)); writeNotNull( 'Conditions', instance.conditions?.map((e) => e.toJson()).toList()); writeNotNull('ApplyConditions', instance.applyConditions?.map((e) => e.toJson()).toList()); writeNotNull('Codec', instance.codec); writeNotNull('Container', instance.container); writeNotNull('SubContainer', instance.subContainer); return val; } CollectionCreationResult _$CollectionCreationResultFromJson( Map json) => CollectionCreationResult( id: json['Id'] as String?, ); Map _$CollectionCreationResultToJson( CollectionCreationResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); return val; } ConfigImageTypes _$ConfigImageTypesFromJson(Map json) => ConfigImageTypes( backdropSizes: (json['BackdropSizes'] as List?) ?.map((e) => e as String) .toList() ?? [], baseUrl: json['BaseUrl'] as String?, logoSizes: (json['LogoSizes'] as List?) ?.map((e) => e as String) .toList() ?? [], posterSizes: (json['PosterSizes'] as List?) ?.map((e) => e as String) .toList() ?? [], profileSizes: (json['ProfileSizes'] as List?) ?.map((e) => e as String) .toList() ?? [], secureBaseUrl: json['SecureBaseUrl'] as String?, stillSizes: (json['StillSizes'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$ConfigImageTypesToJson(ConfigImageTypes instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('BackdropSizes', instance.backdropSizes); writeNotNull('BaseUrl', instance.baseUrl); writeNotNull('LogoSizes', instance.logoSizes); writeNotNull('PosterSizes', instance.posterSizes); writeNotNull('ProfileSizes', instance.profileSizes); writeNotNull('SecureBaseUrl', instance.secureBaseUrl); writeNotNull('StillSizes', instance.stillSizes); return val; } ConfigurationPageInfo _$ConfigurationPageInfoFromJson( Map json) => ConfigurationPageInfo( name: json['Name'] as String?, enableInMainMenu: json['EnableInMainMenu'] as bool?, menuSection: json['MenuSection'] as String?, menuIcon: json['MenuIcon'] as String?, displayName: json['DisplayName'] as String?, pluginId: json['PluginId'] as String?, ); Map _$ConfigurationPageInfoToJson( ConfigurationPageInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('EnableInMainMenu', instance.enableInMainMenu); writeNotNull('MenuSection', instance.menuSection); writeNotNull('MenuIcon', instance.menuIcon); writeNotNull('DisplayName', instance.displayName); writeNotNull('PluginId', instance.pluginId); return val; } ContainerProfile _$ContainerProfileFromJson(Map json) => ContainerProfile( type: dlnaProfileTypeNullableFromJson(json['Type']), conditions: (json['Conditions'] as List?) ?.map((e) => ProfileCondition.fromJson(e as Map)) .toList() ?? [], container: json['Container'] as String?, subContainer: json['SubContainer'] as String?, ); Map _$ContainerProfileToJson(ContainerProfile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Type', dlnaProfileTypeNullableToJson(instance.type)); writeNotNull( 'Conditions', instance.conditions?.map((e) => e.toJson()).toList()); writeNotNull('Container', instance.container); writeNotNull('SubContainer', instance.subContainer); return val; } CountryInfo _$CountryInfoFromJson(Map json) => CountryInfo( name: json['Name'] as String?, displayName: json['DisplayName'] as String?, twoLetterISORegionName: json['TwoLetterISORegionName'] as String?, threeLetterISORegionName: json['ThreeLetterISORegionName'] as String?, ); Map _$CountryInfoToJson(CountryInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('DisplayName', instance.displayName); writeNotNull('TwoLetterISORegionName', instance.twoLetterISORegionName); writeNotNull('ThreeLetterISORegionName', instance.threeLetterISORegionName); return val; } CreatePlaylistDto _$CreatePlaylistDtoFromJson(Map json) => CreatePlaylistDto( name: json['Name'] as String?, ids: (json['Ids'] as List?)?.map((e) => e as String).toList() ?? [], userId: json['UserId'] as String?, mediaType: mediaTypeNullableFromJson(json['MediaType']), users: (json['Users'] as List?) ?.map((e) => PlaylistUserPermissions.fromJson(e as Map)) .toList() ?? [], isPublic: json['IsPublic'] as bool?, ); Map _$CreatePlaylistDtoToJson(CreatePlaylistDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Ids', instance.ids); writeNotNull('UserId', instance.userId); writeNotNull('MediaType', mediaTypeNullableToJson(instance.mediaType)); writeNotNull('Users', instance.users?.map((e) => e.toJson()).toList()); writeNotNull('IsPublic', instance.isPublic); return val; } CreateUserByName _$CreateUserByNameFromJson(Map json) => CreateUserByName( name: json['Name'] as String, password: json['Password'] as String?, ); Map _$CreateUserByNameToJson(CreateUserByName instance) { final val = { 'Name': instance.name, }; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Password', instance.password); return val; } CultureDto _$CultureDtoFromJson(Map json) => CultureDto( name: json['Name'] as String?, displayName: json['DisplayName'] as String?, twoLetterISOLanguageName: json['TwoLetterISOLanguageName'] as String?, threeLetterISOLanguageName: json['ThreeLetterISOLanguageName'] as String?, threeLetterISOLanguageNames: (json['ThreeLetterISOLanguageNames'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$CultureDtoToJson(CultureDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('DisplayName', instance.displayName); writeNotNull('TwoLetterISOLanguageName', instance.twoLetterISOLanguageName); writeNotNull( 'ThreeLetterISOLanguageName', instance.threeLetterISOLanguageName); writeNotNull( 'ThreeLetterISOLanguageNames', instance.threeLetterISOLanguageNames); return val; } DefaultDirectoryBrowserInfoDto _$DefaultDirectoryBrowserInfoDtoFromJson( Map json) => DefaultDirectoryBrowserInfoDto( path: json['Path'] as String?, ); Map _$DefaultDirectoryBrowserInfoDtoToJson( DefaultDirectoryBrowserInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Path', instance.path); return val; } DeviceInfoDto _$DeviceInfoDtoFromJson(Map json) => DeviceInfoDto( name: json['Name'] as String?, customName: json['CustomName'] as String?, accessToken: json['AccessToken'] as String?, id: json['Id'] as String?, lastUserName: json['LastUserName'] as String?, appName: json['AppName'] as String?, appVersion: json['AppVersion'] as String?, lastUserId: json['LastUserId'] as String?, dateLastActivity: json['DateLastActivity'] == null ? null : DateTime.parse(json['DateLastActivity'] as String), capabilities: json['Capabilities'] == null ? null : ClientCapabilitiesDto.fromJson( json['Capabilities'] as Map), iconUrl: json['IconUrl'] as String?, ); Map _$DeviceInfoDtoToJson(DeviceInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('CustomName', instance.customName); writeNotNull('AccessToken', instance.accessToken); writeNotNull('Id', instance.id); writeNotNull('LastUserName', instance.lastUserName); writeNotNull('AppName', instance.appName); writeNotNull('AppVersion', instance.appVersion); writeNotNull('LastUserId', instance.lastUserId); writeNotNull( 'DateLastActivity', instance.dateLastActivity?.toIso8601String()); writeNotNull('Capabilities', instance.capabilities?.toJson()); writeNotNull('IconUrl', instance.iconUrl); return val; } DeviceInfoDtoQueryResult _$DeviceInfoDtoQueryResultFromJson( Map json) => DeviceInfoDtoQueryResult( items: (json['Items'] as List?) ?.map((e) => DeviceInfoDto.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$DeviceInfoDtoQueryResultToJson( DeviceInfoDtoQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } DeviceOptionsDto _$DeviceOptionsDtoFromJson(Map json) => DeviceOptionsDto( id: (json['Id'] as num?)?.toInt(), deviceId: json['DeviceId'] as String?, customName: json['CustomName'] as String?, ); Map _$DeviceOptionsDtoToJson(DeviceOptionsDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('DeviceId', instance.deviceId); writeNotNull('CustomName', instance.customName); return val; } DeviceProfile _$DeviceProfileFromJson(Map json) => DeviceProfile( name: json['Name'] as String?, id: json['Id'] as String?, maxStreamingBitrate: (json['MaxStreamingBitrate'] as num?)?.toInt(), maxStaticBitrate: (json['MaxStaticBitrate'] as num?)?.toInt(), musicStreamingTranscodingBitrate: (json['MusicStreamingTranscodingBitrate'] as num?)?.toInt(), maxStaticMusicBitrate: (json['MaxStaticMusicBitrate'] as num?)?.toInt(), directPlayProfiles: (json['DirectPlayProfiles'] as List?) ?.map( (e) => DirectPlayProfile.fromJson(e as Map)) .toList() ?? [], transcodingProfiles: (json['TranscodingProfiles'] as List?) ?.map( (e) => TranscodingProfile.fromJson(e as Map)) .toList() ?? [], containerProfiles: (json['ContainerProfiles'] as List?) ?.map((e) => ContainerProfile.fromJson(e as Map)) .toList() ?? [], codecProfiles: (json['CodecProfiles'] as List?) ?.map((e) => CodecProfile.fromJson(e as Map)) .toList() ?? [], subtitleProfiles: (json['SubtitleProfiles'] as List?) ?.map((e) => SubtitleProfile.fromJson(e as Map)) .toList() ?? [], ); Map _$DeviceProfileToJson(DeviceProfile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Id', instance.id); writeNotNull('MaxStreamingBitrate', instance.maxStreamingBitrate); writeNotNull('MaxStaticBitrate', instance.maxStaticBitrate); writeNotNull('MusicStreamingTranscodingBitrate', instance.musicStreamingTranscodingBitrate); writeNotNull('MaxStaticMusicBitrate', instance.maxStaticMusicBitrate); writeNotNull('DirectPlayProfiles', instance.directPlayProfiles?.map((e) => e.toJson()).toList()); writeNotNull('TranscodingProfiles', instance.transcodingProfiles?.map((e) => e.toJson()).toList()); writeNotNull('ContainerProfiles', instance.containerProfiles?.map((e) => e.toJson()).toList()); writeNotNull( 'CodecProfiles', instance.codecProfiles?.map((e) => e.toJson()).toList()); writeNotNull('SubtitleProfiles', instance.subtitleProfiles?.map((e) => e.toJson()).toList()); return val; } DirectPlayProfile _$DirectPlayProfileFromJson(Map json) => DirectPlayProfile( container: json['Container'] as String?, audioCodec: json['AudioCodec'] as String?, videoCodec: json['VideoCodec'] as String?, type: dlnaProfileTypeNullableFromJson(json['Type']), ); Map _$DirectPlayProfileToJson(DirectPlayProfile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Container', instance.container); writeNotNull('AudioCodec', instance.audioCodec); writeNotNull('VideoCodec', instance.videoCodec); writeNotNull('Type', dlnaProfileTypeNullableToJson(instance.type)); return val; } DisplayPreferencesDto _$DisplayPreferencesDtoFromJson( Map json) => DisplayPreferencesDto( id: json['Id'] as String?, viewType: json['ViewType'] as String?, sortBy: json['SortBy'] as String?, indexBy: json['IndexBy'] as String?, rememberIndexing: json['RememberIndexing'] as bool?, primaryImageHeight: (json['PrimaryImageHeight'] as num?)?.toInt(), primaryImageWidth: (json['PrimaryImageWidth'] as num?)?.toInt(), customPrefs: json['CustomPrefs'] as Map?, scrollDirection: scrollDirectionNullableFromJson(json['ScrollDirection']), showBackdrop: json['ShowBackdrop'] as bool?, rememberSorting: json['RememberSorting'] as bool?, sortOrder: sortOrderNullableFromJson(json['SortOrder']), showSidebar: json['ShowSidebar'] as bool?, $Client: json['Client'] as String?, ); Map _$DisplayPreferencesDtoToJson( DisplayPreferencesDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('ViewType', instance.viewType); writeNotNull('SortBy', instance.sortBy); writeNotNull('IndexBy', instance.indexBy); writeNotNull('RememberIndexing', instance.rememberIndexing); writeNotNull('PrimaryImageHeight', instance.primaryImageHeight); writeNotNull('PrimaryImageWidth', instance.primaryImageWidth); writeNotNull('CustomPrefs', instance.customPrefs); writeNotNull('ScrollDirection', scrollDirectionNullableToJson(instance.scrollDirection)); writeNotNull('ShowBackdrop', instance.showBackdrop); writeNotNull('RememberSorting', instance.rememberSorting); writeNotNull('SortOrder', sortOrderNullableToJson(instance.sortOrder)); writeNotNull('ShowSidebar', instance.showSidebar); writeNotNull('Client', instance.$Client); return val; } EncodingOptions _$EncodingOptionsFromJson(Map json) => EncodingOptions( encodingThreadCount: (json['EncodingThreadCount'] as num?)?.toInt(), transcodingTempPath: json['TranscodingTempPath'] as String?, fallbackFontPath: json['FallbackFontPath'] as String?, enableFallbackFont: json['EnableFallbackFont'] as bool?, enableAudioVbr: json['EnableAudioVbr'] as bool?, downMixAudioBoost: (json['DownMixAudioBoost'] as num?)?.toDouble(), downMixStereoAlgorithm: downMixStereoAlgorithmsNullableFromJson( json['DownMixStereoAlgorithm']), maxMuxingQueueSize: (json['MaxMuxingQueueSize'] as num?)?.toInt(), enableThrottling: json['EnableThrottling'] as bool?, throttleDelaySeconds: (json['ThrottleDelaySeconds'] as num?)?.toInt(), enableSegmentDeletion: json['EnableSegmentDeletion'] as bool?, segmentKeepSeconds: (json['SegmentKeepSeconds'] as num?)?.toInt(), hardwareAccelerationType: hardwareAccelerationTypeNullableFromJson( json['HardwareAccelerationType']), encoderAppPath: json['EncoderAppPath'] as String?, encoderAppPathDisplay: json['EncoderAppPathDisplay'] as String?, vaapiDevice: json['VaapiDevice'] as String?, qsvDevice: json['QsvDevice'] as String?, enableTonemapping: json['EnableTonemapping'] as bool?, enableVppTonemapping: json['EnableVppTonemapping'] as bool?, enableVideoToolboxTonemapping: json['EnableVideoToolboxTonemapping'] as bool?, tonemappingAlgorithm: tonemappingAlgorithmNullableFromJson(json['TonemappingAlgorithm']), tonemappingMode: tonemappingModeNullableFromJson(json['TonemappingMode']), tonemappingRange: tonemappingRangeNullableFromJson(json['TonemappingRange']), tonemappingDesat: (json['TonemappingDesat'] as num?)?.toDouble(), tonemappingPeak: (json['TonemappingPeak'] as num?)?.toDouble(), tonemappingParam: (json['TonemappingParam'] as num?)?.toDouble(), vppTonemappingBrightness: (json['VppTonemappingBrightness'] as num?)?.toDouble(), vppTonemappingContrast: (json['VppTonemappingContrast'] as num?)?.toDouble(), h264Crf: (json['H264Crf'] as num?)?.toInt(), h265Crf: (json['H265Crf'] as num?)?.toInt(), encoderPreset: encoderPresetNullableFromJson(json['EncoderPreset']), deinterlaceDoubleRate: json['DeinterlaceDoubleRate'] as bool?, deinterlaceMethod: deinterlaceMethodNullableFromJson(json['DeinterlaceMethod']), enableDecodingColorDepth10Hevc: json['EnableDecodingColorDepth10Hevc'] as bool?, enableDecodingColorDepth10Vp9: json['EnableDecodingColorDepth10Vp9'] as bool?, enableDecodingColorDepth10HevcRext: json['EnableDecodingColorDepth10HevcRext'] as bool?, enableDecodingColorDepth12HevcRext: json['EnableDecodingColorDepth12HevcRext'] as bool?, enableEnhancedNvdecDecoder: json['EnableEnhancedNvdecDecoder'] as bool?, preferSystemNativeHwDecoder: json['PreferSystemNativeHwDecoder'] as bool?, enableIntelLowPowerH264HwEncoder: json['EnableIntelLowPowerH264HwEncoder'] as bool?, enableIntelLowPowerHevcHwEncoder: json['EnableIntelLowPowerHevcHwEncoder'] as bool?, enableHardwareEncoding: json['EnableHardwareEncoding'] as bool?, allowHevcEncoding: json['AllowHevcEncoding'] as bool?, allowAv1Encoding: json['AllowAv1Encoding'] as bool?, enableSubtitleExtraction: json['EnableSubtitleExtraction'] as bool?, hardwareDecodingCodecs: (json['HardwareDecodingCodecs'] as List?) ?.map((e) => e as String) .toList() ?? [], allowOnDemandMetadataBasedKeyframeExtractionForExtensions: (json['AllowOnDemandMetadataBasedKeyframeExtractionForExtensions'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$EncodingOptionsToJson(EncodingOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('EncodingThreadCount', instance.encodingThreadCount); writeNotNull('TranscodingTempPath', instance.transcodingTempPath); writeNotNull('FallbackFontPath', instance.fallbackFontPath); writeNotNull('EnableFallbackFont', instance.enableFallbackFont); writeNotNull('EnableAudioVbr', instance.enableAudioVbr); writeNotNull('DownMixAudioBoost', instance.downMixAudioBoost); writeNotNull('DownMixStereoAlgorithm', downMixStereoAlgorithmsNullableToJson(instance.downMixStereoAlgorithm)); writeNotNull('MaxMuxingQueueSize', instance.maxMuxingQueueSize); writeNotNull('EnableThrottling', instance.enableThrottling); writeNotNull('ThrottleDelaySeconds', instance.throttleDelaySeconds); writeNotNull('EnableSegmentDeletion', instance.enableSegmentDeletion); writeNotNull('SegmentKeepSeconds', instance.segmentKeepSeconds); writeNotNull( 'HardwareAccelerationType', hardwareAccelerationTypeNullableToJson( instance.hardwareAccelerationType)); writeNotNull('EncoderAppPath', instance.encoderAppPath); writeNotNull('EncoderAppPathDisplay', instance.encoderAppPathDisplay); writeNotNull('VaapiDevice', instance.vaapiDevice); writeNotNull('QsvDevice', instance.qsvDevice); writeNotNull('EnableTonemapping', instance.enableTonemapping); writeNotNull('EnableVppTonemapping', instance.enableVppTonemapping); writeNotNull( 'EnableVideoToolboxTonemapping', instance.enableVideoToolboxTonemapping); writeNotNull('TonemappingAlgorithm', tonemappingAlgorithmNullableToJson(instance.tonemappingAlgorithm)); writeNotNull('TonemappingMode', tonemappingModeNullableToJson(instance.tonemappingMode)); writeNotNull('TonemappingRange', tonemappingRangeNullableToJson(instance.tonemappingRange)); writeNotNull('TonemappingDesat', instance.tonemappingDesat); writeNotNull('TonemappingPeak', instance.tonemappingPeak); writeNotNull('TonemappingParam', instance.tonemappingParam); writeNotNull('VppTonemappingBrightness', instance.vppTonemappingBrightness); writeNotNull('VppTonemappingContrast', instance.vppTonemappingContrast); writeNotNull('H264Crf', instance.h264Crf); writeNotNull('H265Crf', instance.h265Crf); writeNotNull( 'EncoderPreset', encoderPresetNullableToJson(instance.encoderPreset)); writeNotNull('DeinterlaceDoubleRate', instance.deinterlaceDoubleRate); writeNotNull('DeinterlaceMethod', deinterlaceMethodNullableToJson(instance.deinterlaceMethod)); writeNotNull('EnableDecodingColorDepth10Hevc', instance.enableDecodingColorDepth10Hevc); writeNotNull( 'EnableDecodingColorDepth10Vp9', instance.enableDecodingColorDepth10Vp9); writeNotNull('EnableDecodingColorDepth10HevcRext', instance.enableDecodingColorDepth10HevcRext); writeNotNull('EnableDecodingColorDepth12HevcRext', instance.enableDecodingColorDepth12HevcRext); writeNotNull( 'EnableEnhancedNvdecDecoder', instance.enableEnhancedNvdecDecoder); writeNotNull( 'PreferSystemNativeHwDecoder', instance.preferSystemNativeHwDecoder); writeNotNull('EnableIntelLowPowerH264HwEncoder', instance.enableIntelLowPowerH264HwEncoder); writeNotNull('EnableIntelLowPowerHevcHwEncoder', instance.enableIntelLowPowerHevcHwEncoder); writeNotNull('EnableHardwareEncoding', instance.enableHardwareEncoding); writeNotNull('AllowHevcEncoding', instance.allowHevcEncoding); writeNotNull('AllowAv1Encoding', instance.allowAv1Encoding); writeNotNull('EnableSubtitleExtraction', instance.enableSubtitleExtraction); writeNotNull('HardwareDecodingCodecs', instance.hardwareDecodingCodecs); writeNotNull('AllowOnDemandMetadataBasedKeyframeExtractionForExtensions', instance.allowOnDemandMetadataBasedKeyframeExtractionForExtensions); return val; } EndPointInfo _$EndPointInfoFromJson(Map json) => EndPointInfo( isLocal: json['IsLocal'] as bool?, isInNetwork: json['IsInNetwork'] as bool?, ); Map _$EndPointInfoToJson(EndPointInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('IsLocal', instance.isLocal); writeNotNull('IsInNetwork', instance.isInNetwork); return val; } ExternalIdInfo _$ExternalIdInfoFromJson(Map json) => ExternalIdInfo( name: json['Name'] as String?, key: json['Key'] as String?, type: externalIdMediaTypeNullableFromJson(json['Type']), urlFormatString: json['UrlFormatString'] as String?, ); Map _$ExternalIdInfoToJson(ExternalIdInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Key', instance.key); writeNotNull('Type', externalIdMediaTypeNullableToJson(instance.type)); writeNotNull('UrlFormatString', instance.urlFormatString); return val; } ExternalUrl _$ExternalUrlFromJson(Map json) => ExternalUrl( name: json['Name'] as String?, url: json['Url'] as String?, ); Map _$ExternalUrlToJson(ExternalUrl instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Url', instance.url); return val; } FileSystemEntryInfo _$FileSystemEntryInfoFromJson(Map json) => FileSystemEntryInfo( name: json['Name'] as String?, path: json['Path'] as String?, type: fileSystemEntryTypeNullableFromJson(json['Type']), ); Map _$FileSystemEntryInfoToJson(FileSystemEntryInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Path', instance.path); writeNotNull('Type', fileSystemEntryTypeNullableToJson(instance.type)); return val; } FontFile _$FontFileFromJson(Map json) => FontFile( name: json['Name'] as String?, size: (json['Size'] as num?)?.toInt(), dateCreated: json['DateCreated'] == null ? null : DateTime.parse(json['DateCreated'] as String), dateModified: json['DateModified'] == null ? null : DateTime.parse(json['DateModified'] as String), ); Map _$FontFileToJson(FontFile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Size', instance.size); writeNotNull('DateCreated', instance.dateCreated?.toIso8601String()); writeNotNull('DateModified', instance.dateModified?.toIso8601String()); return val; } ForceKeepAliveMessage _$ForceKeepAliveMessageFromJson( Map json) => ForceKeepAliveMessage( data: (json['Data'] as num?)?.toInt(), messageId: json['MessageId'] as String?, messageType: ForceKeepAliveMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$ForceKeepAliveMessageToJson( ForceKeepAliveMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ForgotPasswordDto _$ForgotPasswordDtoFromJson(Map json) => ForgotPasswordDto( enteredUsername: json['EnteredUsername'] as String, ); Map _$ForgotPasswordDtoToJson(ForgotPasswordDto instance) => { 'EnteredUsername': instance.enteredUsername, }; ForgotPasswordPinDto _$ForgotPasswordPinDtoFromJson( Map json) => ForgotPasswordPinDto( pin: json['Pin'] as String, ); Map _$ForgotPasswordPinDtoToJson( ForgotPasswordPinDto instance) => { 'Pin': instance.pin, }; ForgotPasswordResult _$ForgotPasswordResultFromJson( Map json) => ForgotPasswordResult( action: forgotPasswordActionNullableFromJson(json['Action']), pinFile: json['PinFile'] as String?, pinExpirationDate: json['PinExpirationDate'] == null ? null : DateTime.parse(json['PinExpirationDate'] as String), ); Map _$ForgotPasswordResultToJson( ForgotPasswordResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Action', forgotPasswordActionNullableToJson(instance.action)); writeNotNull('PinFile', instance.pinFile); writeNotNull( 'PinExpirationDate', instance.pinExpirationDate?.toIso8601String()); return val; } GeneralCommand _$GeneralCommandFromJson(Map json) => GeneralCommand( name: generalCommandTypeNullableFromJson(json['Name']), controllingUserId: json['ControllingUserId'] as String?, arguments: json['Arguments'] as Map?, ); Map _$GeneralCommandToJson(GeneralCommand instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', generalCommandTypeNullableToJson(instance.name)); writeNotNull('ControllingUserId', instance.controllingUserId); writeNotNull('Arguments', instance.arguments); return val; } GeneralCommandMessage _$GeneralCommandMessageFromJson( Map json) => GeneralCommandMessage( data: json['Data'] == null ? null : GeneralCommand.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: GeneralCommandMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$GeneralCommandMessageToJson( GeneralCommandMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } GetProgramsDto _$GetProgramsDtoFromJson(Map json) => GetProgramsDto( channelIds: (json['ChannelIds'] as List?) ?.map((e) => e as String) .toList() ?? [], userId: json['UserId'] as String?, minStartDate: json['MinStartDate'] == null ? null : DateTime.parse(json['MinStartDate'] as String), hasAired: json['HasAired'] as bool?, isAiring: json['IsAiring'] as bool?, maxStartDate: json['MaxStartDate'] == null ? null : DateTime.parse(json['MaxStartDate'] as String), minEndDate: json['MinEndDate'] == null ? null : DateTime.parse(json['MinEndDate'] as String), maxEndDate: json['MaxEndDate'] == null ? null : DateTime.parse(json['MaxEndDate'] as String), isMovie: json['IsMovie'] as bool?, isSeries: json['IsSeries'] as bool?, isNews: json['IsNews'] as bool?, isKids: json['IsKids'] as bool?, isSports: json['IsSports'] as bool?, startIndex: (json['StartIndex'] as num?)?.toInt(), limit: (json['Limit'] as num?)?.toInt(), sortBy: itemSortByListFromJson(json['SortBy'] as List?), sortOrder: sortOrderListFromJson(json['SortOrder'] as List?), genres: (json['Genres'] as List?) ?.map((e) => e as String) .toList() ?? [], genreIds: (json['GenreIds'] as List?) ?.map((e) => e as String) .toList() ?? [], enableImages: json['EnableImages'] as bool?, enableTotalRecordCount: json['EnableTotalRecordCount'] as bool? ?? true, imageTypeLimit: (json['ImageTypeLimit'] as num?)?.toInt(), enableImageTypes: imageTypeListFromJson(json['EnableImageTypes'] as List?), enableUserData: json['EnableUserData'] as bool?, seriesTimerId: json['SeriesTimerId'] as String?, librarySeriesId: json['LibrarySeriesId'] as String?, fields: itemFieldsListFromJson(json['Fields'] as List?), ); Map _$GetProgramsDtoToJson(GetProgramsDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ChannelIds', instance.channelIds); writeNotNull('UserId', instance.userId); writeNotNull('MinStartDate', instance.minStartDate?.toIso8601String()); writeNotNull('HasAired', instance.hasAired); writeNotNull('IsAiring', instance.isAiring); writeNotNull('MaxStartDate', instance.maxStartDate?.toIso8601String()); writeNotNull('MinEndDate', instance.minEndDate?.toIso8601String()); writeNotNull('MaxEndDate', instance.maxEndDate?.toIso8601String()); writeNotNull('IsMovie', instance.isMovie); writeNotNull('IsSeries', instance.isSeries); writeNotNull('IsNews', instance.isNews); writeNotNull('IsKids', instance.isKids); writeNotNull('IsSports', instance.isSports); writeNotNull('StartIndex', instance.startIndex); writeNotNull('Limit', instance.limit); val['SortBy'] = itemSortByListToJson(instance.sortBy); val['SortOrder'] = sortOrderListToJson(instance.sortOrder); writeNotNull('Genres', instance.genres); writeNotNull('GenreIds', instance.genreIds); writeNotNull('EnableImages', instance.enableImages); writeNotNull('EnableTotalRecordCount', instance.enableTotalRecordCount); writeNotNull('ImageTypeLimit', instance.imageTypeLimit); val['EnableImageTypes'] = imageTypeListToJson(instance.enableImageTypes); writeNotNull('EnableUserData', instance.enableUserData); writeNotNull('SeriesTimerId', instance.seriesTimerId); writeNotNull('LibrarySeriesId', instance.librarySeriesId); val['Fields'] = itemFieldsListToJson(instance.fields); return val; } GroupInfoDto _$GroupInfoDtoFromJson(Map json) => GroupInfoDto( groupId: json['GroupId'] as String?, groupName: json['GroupName'] as String?, state: groupStateTypeNullableFromJson(json['State']), participants: (json['Participants'] as List?) ?.map((e) => e as String) .toList() ?? [], lastUpdatedAt: json['LastUpdatedAt'] == null ? null : DateTime.parse(json['LastUpdatedAt'] as String), ); Map _$GroupInfoDtoToJson(GroupInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('GroupName', instance.groupName); writeNotNull('State', groupStateTypeNullableToJson(instance.state)); writeNotNull('Participants', instance.participants); writeNotNull('LastUpdatedAt', instance.lastUpdatedAt?.toIso8601String()); return val; } GroupInfoDtoGroupUpdate _$GroupInfoDtoGroupUpdateFromJson( Map json) => GroupInfoDtoGroupUpdate( groupId: json['GroupId'] as String?, type: groupUpdateTypeNullableFromJson(json['Type']), data: json['Data'] == null ? null : GroupInfoDto.fromJson(json['Data'] as Map), ); Map _$GroupInfoDtoGroupUpdateToJson( GroupInfoDtoGroupUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('Type', groupUpdateTypeNullableToJson(instance.type)); writeNotNull('Data', instance.data?.toJson()); return val; } GroupStateUpdate _$GroupStateUpdateFromJson(Map json) => GroupStateUpdate( state: groupStateTypeNullableFromJson(json['State']), reason: playbackRequestTypeNullableFromJson(json['Reason']), ); Map _$GroupStateUpdateToJson(GroupStateUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('State', groupStateTypeNullableToJson(instance.state)); writeNotNull('Reason', playbackRequestTypeNullableToJson(instance.reason)); return val; } GroupStateUpdateGroupUpdate _$GroupStateUpdateGroupUpdateFromJson( Map json) => GroupStateUpdateGroupUpdate( groupId: json['GroupId'] as String?, type: groupUpdateTypeNullableFromJson(json['Type']), data: json['Data'] == null ? null : GroupStateUpdate.fromJson(json['Data'] as Map), ); Map _$GroupStateUpdateGroupUpdateToJson( GroupStateUpdateGroupUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('Type', groupUpdateTypeNullableToJson(instance.type)); writeNotNull('Data', instance.data?.toJson()); return val; } GroupUpdate _$GroupUpdateFromJson(Map json) => GroupUpdate( groupId: json['GroupId'] as String?, type: groupUpdateTypeNullableFromJson(json['Type']), ); Map _$GroupUpdateToJson(GroupUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('Type', groupUpdateTypeNullableToJson(instance.type)); return val; } GuideInfo _$GuideInfoFromJson(Map json) => GuideInfo( startDate: json['StartDate'] == null ? null : DateTime.parse(json['StartDate'] as String), endDate: json['EndDate'] == null ? null : DateTime.parse(json['EndDate'] as String), ); Map _$GuideInfoToJson(GuideInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('StartDate', instance.startDate?.toIso8601String()); writeNotNull('EndDate', instance.endDate?.toIso8601String()); return val; } IgnoreWaitRequestDto _$IgnoreWaitRequestDtoFromJson( Map json) => IgnoreWaitRequestDto( ignoreWait: json['IgnoreWait'] as bool?, ); Map _$IgnoreWaitRequestDtoToJson( IgnoreWaitRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('IgnoreWait', instance.ignoreWait); return val; } ImageInfo _$ImageInfoFromJson(Map json) => ImageInfo( imageType: imageTypeNullableFromJson(json['ImageType']), imageIndex: (json['ImageIndex'] as num?)?.toInt(), imageTag: json['ImageTag'] as String?, path: json['Path'] as String?, blurHash: json['BlurHash'] as String?, height: (json['Height'] as num?)?.toInt(), width: (json['Width'] as num?)?.toInt(), size: (json['Size'] as num?)?.toInt(), ); Map _$ImageInfoToJson(ImageInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ImageType', imageTypeNullableToJson(instance.imageType)); writeNotNull('ImageIndex', instance.imageIndex); writeNotNull('ImageTag', instance.imageTag); writeNotNull('Path', instance.path); writeNotNull('BlurHash', instance.blurHash); writeNotNull('Height', instance.height); writeNotNull('Width', instance.width); writeNotNull('Size', instance.size); return val; } ImageOption _$ImageOptionFromJson(Map json) => ImageOption( type: imageTypeNullableFromJson(json['Type']), limit: (json['Limit'] as num?)?.toInt(), minWidth: (json['MinWidth'] as num?)?.toInt(), ); Map _$ImageOptionToJson(ImageOption instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Type', imageTypeNullableToJson(instance.type)); writeNotNull('Limit', instance.limit); writeNotNull('MinWidth', instance.minWidth); return val; } ImageProviderInfo _$ImageProviderInfoFromJson(Map json) => ImageProviderInfo( name: json['Name'] as String?, supportedImages: imageTypeListFromJson(json['SupportedImages'] as List?), ); Map _$ImageProviderInfoToJson(ImageProviderInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); val['SupportedImages'] = imageTypeListToJson(instance.supportedImages); return val; } InboundKeepAliveMessage _$InboundKeepAliveMessageFromJson( Map json) => InboundKeepAliveMessage( messageType: InboundKeepAliveMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$InboundKeepAliveMessageToJson( InboundKeepAliveMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } InboundWebSocketMessage _$InboundWebSocketMessageFromJson( Map json) => InboundWebSocketMessage(); Map _$InboundWebSocketMessageToJson( InboundWebSocketMessage instance) => {}; InstallationInfo _$InstallationInfoFromJson(Map json) => InstallationInfo( guid: json['Guid'] as String?, name: json['Name'] as String?, version: json['Version'] as String?, changelog: json['Changelog'] as String?, sourceUrl: json['SourceUrl'] as String?, checksum: json['Checksum'] as String?, packageInfo: json['PackageInfo'] == null ? null : PackageInfo.fromJson(json['PackageInfo'] as Map), ); Map _$InstallationInfoToJson(InstallationInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Guid', instance.guid); writeNotNull('Name', instance.name); writeNotNull('Version', instance.version); writeNotNull('Changelog', instance.changelog); writeNotNull('SourceUrl', instance.sourceUrl); writeNotNull('Checksum', instance.checksum); writeNotNull('PackageInfo', instance.packageInfo?.toJson()); return val; } IPlugin _$IPluginFromJson(Map json) => IPlugin( name: json['Name'] as String?, description: json['Description'] as String?, id: json['Id'] as String?, version: json['Version'] as String?, assemblyFilePath: json['AssemblyFilePath'] as String?, canUninstall: json['CanUninstall'] as bool?, dataFolderPath: json['DataFolderPath'] as String?, ); Map _$IPluginToJson(IPlugin instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Description', instance.description); writeNotNull('Id', instance.id); writeNotNull('Version', instance.version); writeNotNull('AssemblyFilePath', instance.assemblyFilePath); writeNotNull('CanUninstall', instance.canUninstall); writeNotNull('DataFolderPath', instance.dataFolderPath); return val; } ItemCounts _$ItemCountsFromJson(Map json) => ItemCounts( movieCount: (json['MovieCount'] as num?)?.toInt(), seriesCount: (json['SeriesCount'] as num?)?.toInt(), episodeCount: (json['EpisodeCount'] as num?)?.toInt(), artistCount: (json['ArtistCount'] as num?)?.toInt(), programCount: (json['ProgramCount'] as num?)?.toInt(), trailerCount: (json['TrailerCount'] as num?)?.toInt(), songCount: (json['SongCount'] as num?)?.toInt(), albumCount: (json['AlbumCount'] as num?)?.toInt(), musicVideoCount: (json['MusicVideoCount'] as num?)?.toInt(), boxSetCount: (json['BoxSetCount'] as num?)?.toInt(), bookCount: (json['BookCount'] as num?)?.toInt(), itemCount: (json['ItemCount'] as num?)?.toInt(), ); Map _$ItemCountsToJson(ItemCounts instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MovieCount', instance.movieCount); writeNotNull('SeriesCount', instance.seriesCount); writeNotNull('EpisodeCount', instance.episodeCount); writeNotNull('ArtistCount', instance.artistCount); writeNotNull('ProgramCount', instance.programCount); writeNotNull('TrailerCount', instance.trailerCount); writeNotNull('SongCount', instance.songCount); writeNotNull('AlbumCount', instance.albumCount); writeNotNull('MusicVideoCount', instance.musicVideoCount); writeNotNull('BoxSetCount', instance.boxSetCount); writeNotNull('BookCount', instance.bookCount); writeNotNull('ItemCount', instance.itemCount); return val; } JoinGroupRequestDto _$JoinGroupRequestDtoFromJson(Map json) => JoinGroupRequestDto( groupId: json['GroupId'] as String?, ); Map _$JoinGroupRequestDtoToJson(JoinGroupRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); return val; } LibraryChangedMessage _$LibraryChangedMessageFromJson( Map json) => LibraryChangedMessage( data: json['Data'] == null ? null : LibraryUpdateInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: LibraryChangedMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$LibraryChangedMessageToJson( LibraryChangedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } LibraryOptionInfoDto _$LibraryOptionInfoDtoFromJson( Map json) => LibraryOptionInfoDto( name: json['Name'] as String?, defaultEnabled: json['DefaultEnabled'] as bool?, ); Map _$LibraryOptionInfoDtoToJson( LibraryOptionInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('DefaultEnabled', instance.defaultEnabled); return val; } LibraryOptions _$LibraryOptionsFromJson(Map json) => LibraryOptions( enabled: json['Enabled'] as bool?, enablePhotos: json['EnablePhotos'] as bool?, enableRealtimeMonitor: json['EnableRealtimeMonitor'] as bool?, enableLUFSScan: json['EnableLUFSScan'] as bool?, enableChapterImageExtraction: json['EnableChapterImageExtraction'] as bool?, extractChapterImagesDuringLibraryScan: json['ExtractChapterImagesDuringLibraryScan'] as bool?, enableTrickplayImageExtraction: json['EnableTrickplayImageExtraction'] as bool?, extractTrickplayImagesDuringLibraryScan: json['ExtractTrickplayImagesDuringLibraryScan'] as bool?, pathInfos: (json['PathInfos'] as List?) ?.map((e) => MediaPathInfo.fromJson(e as Map)) .toList() ?? [], saveLocalMetadata: json['SaveLocalMetadata'] as bool?, enableInternetProviders: json['EnableInternetProviders'] as bool?, enableAutomaticSeriesGrouping: json['EnableAutomaticSeriesGrouping'] as bool?, enableEmbeddedTitles: json['EnableEmbeddedTitles'] as bool?, enableEmbeddedExtrasTitles: json['EnableEmbeddedExtrasTitles'] as bool?, enableEmbeddedEpisodeInfos: json['EnableEmbeddedEpisodeInfos'] as bool?, automaticRefreshIntervalDays: (json['AutomaticRefreshIntervalDays'] as num?)?.toInt(), preferredMetadataLanguage: json['PreferredMetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, seasonZeroDisplayName: json['SeasonZeroDisplayName'] as String?, metadataSavers: (json['MetadataSavers'] as List?) ?.map((e) => e as String) .toList() ?? [], disabledLocalMetadataReaders: (json['DisabledLocalMetadataReaders'] as List?) ?.map((e) => e as String) .toList() ?? [], localMetadataReaderOrder: (json['LocalMetadataReaderOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], disabledSubtitleFetchers: (json['DisabledSubtitleFetchers'] as List?) ?.map((e) => e as String) .toList() ?? [], subtitleFetcherOrder: (json['SubtitleFetcherOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], disabledMediaSegmentProviders: (json['DisabledMediaSegmentProviders'] as List?) ?.map((e) => e as String) .toList() ?? [], mediaSegmentProvideOrder: (json['MediaSegmentProvideOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], skipSubtitlesIfEmbeddedSubtitlesPresent: json['SkipSubtitlesIfEmbeddedSubtitlesPresent'] as bool?, skipSubtitlesIfAudioTrackMatches: json['SkipSubtitlesIfAudioTrackMatches'] as bool?, subtitleDownloadLanguages: (json['SubtitleDownloadLanguages'] as List?) ?.map((e) => e as String) .toList() ?? [], requirePerfectSubtitleMatch: json['RequirePerfectSubtitleMatch'] as bool?, saveSubtitlesWithMedia: json['SaveSubtitlesWithMedia'] as bool?, saveLyricsWithMedia: json['SaveLyricsWithMedia'] as bool? ?? false, saveTrickplayWithMedia: json['SaveTrickplayWithMedia'] as bool? ?? false, disabledLyricFetchers: (json['DisabledLyricFetchers'] as List?) ?.map((e) => e as String) .toList() ?? [], lyricFetcherOrder: (json['LyricFetcherOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], preferNonstandardArtistsTag: json['PreferNonstandardArtistsTag'] as bool? ?? false, useCustomTagDelimiters: json['UseCustomTagDelimiters'] as bool? ?? false, customTagDelimiters: (json['CustomTagDelimiters'] as List?) ?.map((e) => e as String) .toList() ?? [], delimiterWhitelist: (json['DelimiterWhitelist'] as List?) ?.map((e) => e as String) .toList() ?? [], automaticallyAddToCollection: json['AutomaticallyAddToCollection'] as bool?, allowEmbeddedSubtitles: embeddedSubtitleOptionsNullableFromJson( json['AllowEmbeddedSubtitles']), typeOptions: (json['TypeOptions'] as List?) ?.map((e) => TypeOptions.fromJson(e as Map)) .toList() ?? [], ); Map _$LibraryOptionsToJson(LibraryOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Enabled', instance.enabled); writeNotNull('EnablePhotos', instance.enablePhotos); writeNotNull('EnableRealtimeMonitor', instance.enableRealtimeMonitor); writeNotNull('EnableLUFSScan', instance.enableLUFSScan); writeNotNull( 'EnableChapterImageExtraction', instance.enableChapterImageExtraction); writeNotNull('ExtractChapterImagesDuringLibraryScan', instance.extractChapterImagesDuringLibraryScan); writeNotNull('EnableTrickplayImageExtraction', instance.enableTrickplayImageExtraction); writeNotNull('ExtractTrickplayImagesDuringLibraryScan', instance.extractTrickplayImagesDuringLibraryScan); writeNotNull( 'PathInfos', instance.pathInfos?.map((e) => e.toJson()).toList()); writeNotNull('SaveLocalMetadata', instance.saveLocalMetadata); writeNotNull('EnableInternetProviders', instance.enableInternetProviders); writeNotNull( 'EnableAutomaticSeriesGrouping', instance.enableAutomaticSeriesGrouping); writeNotNull('EnableEmbeddedTitles', instance.enableEmbeddedTitles); writeNotNull( 'EnableEmbeddedExtrasTitles', instance.enableEmbeddedExtrasTitles); writeNotNull( 'EnableEmbeddedEpisodeInfos', instance.enableEmbeddedEpisodeInfos); writeNotNull( 'AutomaticRefreshIntervalDays', instance.automaticRefreshIntervalDays); writeNotNull('PreferredMetadataLanguage', instance.preferredMetadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('SeasonZeroDisplayName', instance.seasonZeroDisplayName); writeNotNull('MetadataSavers', instance.metadataSavers); writeNotNull( 'DisabledLocalMetadataReaders', instance.disabledLocalMetadataReaders); writeNotNull('LocalMetadataReaderOrder', instance.localMetadataReaderOrder); writeNotNull('DisabledSubtitleFetchers', instance.disabledSubtitleFetchers); writeNotNull('SubtitleFetcherOrder', instance.subtitleFetcherOrder); writeNotNull( 'DisabledMediaSegmentProviders', instance.disabledMediaSegmentProviders); writeNotNull('MediaSegmentProvideOrder', instance.mediaSegmentProvideOrder); writeNotNull('SkipSubtitlesIfEmbeddedSubtitlesPresent', instance.skipSubtitlesIfEmbeddedSubtitlesPresent); writeNotNull('SkipSubtitlesIfAudioTrackMatches', instance.skipSubtitlesIfAudioTrackMatches); writeNotNull('SubtitleDownloadLanguages', instance.subtitleDownloadLanguages); writeNotNull( 'RequirePerfectSubtitleMatch', instance.requirePerfectSubtitleMatch); writeNotNull('SaveSubtitlesWithMedia', instance.saveSubtitlesWithMedia); writeNotNull('SaveLyricsWithMedia', instance.saveLyricsWithMedia); writeNotNull('SaveTrickplayWithMedia', instance.saveTrickplayWithMedia); writeNotNull('DisabledLyricFetchers', instance.disabledLyricFetchers); writeNotNull('LyricFetcherOrder', instance.lyricFetcherOrder); writeNotNull( 'PreferNonstandardArtistsTag', instance.preferNonstandardArtistsTag); writeNotNull('UseCustomTagDelimiters', instance.useCustomTagDelimiters); writeNotNull('CustomTagDelimiters', instance.customTagDelimiters); writeNotNull('DelimiterWhitelist', instance.delimiterWhitelist); writeNotNull( 'AutomaticallyAddToCollection', instance.automaticallyAddToCollection); writeNotNull('AllowEmbeddedSubtitles', embeddedSubtitleOptionsNullableToJson(instance.allowEmbeddedSubtitles)); writeNotNull( 'TypeOptions', instance.typeOptions?.map((e) => e.toJson()).toList()); return val; } LibraryOptionsResultDto _$LibraryOptionsResultDtoFromJson( Map json) => LibraryOptionsResultDto( metadataSavers: (json['MetadataSavers'] as List?) ?.map((e) => LibraryOptionInfoDto.fromJson(e as Map)) .toList() ?? [], metadataReaders: (json['MetadataReaders'] as List?) ?.map((e) => LibraryOptionInfoDto.fromJson(e as Map)) .toList() ?? [], subtitleFetchers: (json['SubtitleFetchers'] as List?) ?.map((e) => LibraryOptionInfoDto.fromJson(e as Map)) .toList() ?? [], lyricFetchers: (json['LyricFetchers'] as List?) ?.map((e) => LibraryOptionInfoDto.fromJson(e as Map)) .toList() ?? [], typeOptions: (json['TypeOptions'] as List?) ?.map((e) => LibraryTypeOptionsDto.fromJson(e as Map)) .toList() ?? [], ); Map _$LibraryOptionsResultDtoToJson( LibraryOptionsResultDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MetadataSavers', instance.metadataSavers?.map((e) => e.toJson()).toList()); writeNotNull('MetadataReaders', instance.metadataReaders?.map((e) => e.toJson()).toList()); writeNotNull('SubtitleFetchers', instance.subtitleFetchers?.map((e) => e.toJson()).toList()); writeNotNull( 'LyricFetchers', instance.lyricFetchers?.map((e) => e.toJson()).toList()); writeNotNull( 'TypeOptions', instance.typeOptions?.map((e) => e.toJson()).toList()); return val; } LibraryTypeOptionsDto _$LibraryTypeOptionsDtoFromJson( Map json) => LibraryTypeOptionsDto( type: json['Type'] as String?, metadataFetchers: (json['MetadataFetchers'] as List?) ?.map((e) => LibraryOptionInfoDto.fromJson(e as Map)) .toList() ?? [], imageFetchers: (json['ImageFetchers'] as List?) ?.map((e) => LibraryOptionInfoDto.fromJson(e as Map)) .toList() ?? [], supportedImageTypes: imageTypeListFromJson(json['SupportedImageTypes'] as List?), defaultImageOptions: (json['DefaultImageOptions'] as List?) ?.map((e) => ImageOption.fromJson(e as Map)) .toList() ?? [], ); Map _$LibraryTypeOptionsDtoToJson( LibraryTypeOptionsDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Type', instance.type); writeNotNull('MetadataFetchers', instance.metadataFetchers?.map((e) => e.toJson()).toList()); writeNotNull( 'ImageFetchers', instance.imageFetchers?.map((e) => e.toJson()).toList()); val['SupportedImageTypes'] = imageTypeListToJson(instance.supportedImageTypes); writeNotNull('DefaultImageOptions', instance.defaultImageOptions?.map((e) => e.toJson()).toList()); return val; } LibraryUpdateInfo _$LibraryUpdateInfoFromJson(Map json) => LibraryUpdateInfo( foldersAddedTo: (json['FoldersAddedTo'] as List?) ?.map((e) => e as String) .toList() ?? [], foldersRemovedFrom: (json['FoldersRemovedFrom'] as List?) ?.map((e) => e as String) .toList() ?? [], itemsAdded: (json['ItemsAdded'] as List?) ?.map((e) => e as String) .toList() ?? [], itemsRemoved: (json['ItemsRemoved'] as List?) ?.map((e) => e as String) .toList() ?? [], itemsUpdated: (json['ItemsUpdated'] as List?) ?.map((e) => e as String) .toList() ?? [], collectionFolders: (json['CollectionFolders'] as List?) ?.map((e) => e as String) .toList() ?? [], isEmpty: json['IsEmpty'] as bool?, ); Map _$LibraryUpdateInfoToJson(LibraryUpdateInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('FoldersAddedTo', instance.foldersAddedTo); writeNotNull('FoldersRemovedFrom', instance.foldersRemovedFrom); writeNotNull('ItemsAdded', instance.itemsAdded); writeNotNull('ItemsRemoved', instance.itemsRemoved); writeNotNull('ItemsUpdated', instance.itemsUpdated); writeNotNull('CollectionFolders', instance.collectionFolders); writeNotNull('IsEmpty', instance.isEmpty); return val; } ListingsProviderInfo _$ListingsProviderInfoFromJson( Map json) => ListingsProviderInfo( id: json['Id'] as String?, type: json['Type'] as String?, username: json['Username'] as String?, password: json['Password'] as String?, listingsId: json['ListingsId'] as String?, zipCode: json['ZipCode'] as String?, country: json['Country'] as String?, path: json['Path'] as String?, enabledTuners: (json['EnabledTuners'] as List?) ?.map((e) => e as String) .toList() ?? [], enableAllTuners: json['EnableAllTuners'] as bool?, newsCategories: (json['NewsCategories'] as List?) ?.map((e) => e as String) .toList() ?? [], sportsCategories: (json['SportsCategories'] as List?) ?.map((e) => e as String) .toList() ?? [], kidsCategories: (json['KidsCategories'] as List?) ?.map((e) => e as String) .toList() ?? [], movieCategories: (json['MovieCategories'] as List?) ?.map((e) => e as String) .toList() ?? [], channelMappings: (json['ChannelMappings'] as List?) ?.map((e) => NameValuePair.fromJson(e as Map)) .toList() ?? [], moviePrefix: json['MoviePrefix'] as String?, preferredLanguage: json['PreferredLanguage'] as String?, userAgent: json['UserAgent'] as String?, ); Map _$ListingsProviderInfoToJson( ListingsProviderInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('Type', instance.type); writeNotNull('Username', instance.username); writeNotNull('Password', instance.password); writeNotNull('ListingsId', instance.listingsId); writeNotNull('ZipCode', instance.zipCode); writeNotNull('Country', instance.country); writeNotNull('Path', instance.path); writeNotNull('EnabledTuners', instance.enabledTuners); writeNotNull('EnableAllTuners', instance.enableAllTuners); writeNotNull('NewsCategories', instance.newsCategories); writeNotNull('SportsCategories', instance.sportsCategories); writeNotNull('KidsCategories', instance.kidsCategories); writeNotNull('MovieCategories', instance.movieCategories); writeNotNull('ChannelMappings', instance.channelMappings?.map((e) => e.toJson()).toList()); writeNotNull('MoviePrefix', instance.moviePrefix); writeNotNull('PreferredLanguage', instance.preferredLanguage); writeNotNull('UserAgent', instance.userAgent); return val; } LiveStreamResponse _$LiveStreamResponseFromJson(Map json) => LiveStreamResponse( mediaSource: json['MediaSource'] == null ? null : MediaSourceInfo.fromJson( json['MediaSource'] as Map), ); Map _$LiveStreamResponseToJson(LiveStreamResponse instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MediaSource', instance.mediaSource?.toJson()); return val; } LiveTvInfo _$LiveTvInfoFromJson(Map json) => LiveTvInfo( services: (json['Services'] as List?) ?.map( (e) => LiveTvServiceInfo.fromJson(e as Map)) .toList() ?? [], isEnabled: json['IsEnabled'] as bool?, enabledUsers: (json['EnabledUsers'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$LiveTvInfoToJson(LiveTvInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Services', instance.services?.map((e) => e.toJson()).toList()); writeNotNull('IsEnabled', instance.isEnabled); writeNotNull('EnabledUsers', instance.enabledUsers); return val; } LiveTvOptions _$LiveTvOptionsFromJson(Map json) => LiveTvOptions( guideDays: (json['GuideDays'] as num?)?.toInt(), recordingPath: json['RecordingPath'] as String?, movieRecordingPath: json['MovieRecordingPath'] as String?, seriesRecordingPath: json['SeriesRecordingPath'] as String?, enableRecordingSubfolders: json['EnableRecordingSubfolders'] as bool?, enableOriginalAudioWithEncodedRecordings: json['EnableOriginalAudioWithEncodedRecordings'] as bool?, tunerHosts: (json['TunerHosts'] as List?) ?.map((e) => TunerHostInfo.fromJson(e as Map)) .toList() ?? [], listingProviders: (json['ListingProviders'] as List?) ?.map((e) => ListingsProviderInfo.fromJson(e as Map)) .toList() ?? [], prePaddingSeconds: (json['PrePaddingSeconds'] as num?)?.toInt(), postPaddingSeconds: (json['PostPaddingSeconds'] as num?)?.toInt(), mediaLocationsCreated: (json['MediaLocationsCreated'] as List?) ?.map((e) => e as String) .toList() ?? [], recordingPostProcessor: json['RecordingPostProcessor'] as String?, recordingPostProcessorArguments: json['RecordingPostProcessorArguments'] as String?, saveRecordingNFO: json['SaveRecordingNFO'] as bool?, saveRecordingImages: json['SaveRecordingImages'] as bool?, ); Map _$LiveTvOptionsToJson(LiveTvOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GuideDays', instance.guideDays); writeNotNull('RecordingPath', instance.recordingPath); writeNotNull('MovieRecordingPath', instance.movieRecordingPath); writeNotNull('SeriesRecordingPath', instance.seriesRecordingPath); writeNotNull('EnableRecordingSubfolders', instance.enableRecordingSubfolders); writeNotNull('EnableOriginalAudioWithEncodedRecordings', instance.enableOriginalAudioWithEncodedRecordings); writeNotNull( 'TunerHosts', instance.tunerHosts?.map((e) => e.toJson()).toList()); writeNotNull('ListingProviders', instance.listingProviders?.map((e) => e.toJson()).toList()); writeNotNull('PrePaddingSeconds', instance.prePaddingSeconds); writeNotNull('PostPaddingSeconds', instance.postPaddingSeconds); writeNotNull('MediaLocationsCreated', instance.mediaLocationsCreated); writeNotNull('RecordingPostProcessor', instance.recordingPostProcessor); writeNotNull('RecordingPostProcessorArguments', instance.recordingPostProcessorArguments); writeNotNull('SaveRecordingNFO', instance.saveRecordingNFO); writeNotNull('SaveRecordingImages', instance.saveRecordingImages); return val; } LiveTvServiceInfo _$LiveTvServiceInfoFromJson(Map json) => LiveTvServiceInfo( name: json['Name'] as String?, homePageUrl: json['HomePageUrl'] as String?, status: liveTvServiceStatusNullableFromJson(json['Status']), statusMessage: json['StatusMessage'] as String?, version: json['Version'] as String?, hasUpdateAvailable: json['HasUpdateAvailable'] as bool?, isVisible: json['IsVisible'] as bool?, tuners: (json['Tuners'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$LiveTvServiceInfoToJson(LiveTvServiceInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('HomePageUrl', instance.homePageUrl); writeNotNull('Status', liveTvServiceStatusNullableToJson(instance.status)); writeNotNull('StatusMessage', instance.statusMessage); writeNotNull('Version', instance.version); writeNotNull('HasUpdateAvailable', instance.hasUpdateAvailable); writeNotNull('IsVisible', instance.isVisible); writeNotNull('Tuners', instance.tuners); return val; } LocalizationOption _$LocalizationOptionFromJson(Map json) => LocalizationOption( name: json['Name'] as String?, $Value: json['Value'] as String?, ); Map _$LocalizationOptionToJson(LocalizationOption instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Value', instance.$Value); return val; } LogFile _$LogFileFromJson(Map json) => LogFile( dateCreated: json['DateCreated'] == null ? null : DateTime.parse(json['DateCreated'] as String), dateModified: json['DateModified'] == null ? null : DateTime.parse(json['DateModified'] as String), size: (json['Size'] as num?)?.toInt(), name: json['Name'] as String?, ); Map _$LogFileToJson(LogFile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('DateCreated', instance.dateCreated?.toIso8601String()); writeNotNull('DateModified', instance.dateModified?.toIso8601String()); writeNotNull('Size', instance.size); writeNotNull('Name', instance.name); return val; } LyricDto _$LyricDtoFromJson(Map json) => LyricDto( metadata: json['Metadata'] == null ? null : LyricMetadata.fromJson(json['Metadata'] as Map), lyrics: (json['Lyrics'] as List?) ?.map((e) => LyricLine.fromJson(e as Map)) .toList() ?? [], ); Map _$LyricDtoToJson(LyricDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Metadata', instance.metadata?.toJson()); writeNotNull('Lyrics', instance.lyrics?.map((e) => e.toJson()).toList()); return val; } LyricLine _$LyricLineFromJson(Map json) => LyricLine( text: json['Text'] as String?, start: (json['Start'] as num?)?.toInt(), ); Map _$LyricLineToJson(LyricLine instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Text', instance.text); writeNotNull('Start', instance.start); return val; } LyricMetadata _$LyricMetadataFromJson(Map json) => LyricMetadata( artist: json['Artist'] as String?, album: json['Album'] as String?, title: json['Title'] as String?, author: json['Author'] as String?, length: (json['Length'] as num?)?.toInt(), by: json['By'] as String?, offset: (json['Offset'] as num?)?.toInt(), creator: json['Creator'] as String?, version: json['Version'] as String?, isSynced: json['IsSynced'] as bool?, ); Map _$LyricMetadataToJson(LyricMetadata instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Artist', instance.artist); writeNotNull('Album', instance.album); writeNotNull('Title', instance.title); writeNotNull('Author', instance.author); writeNotNull('Length', instance.length); writeNotNull('By', instance.by); writeNotNull('Offset', instance.offset); writeNotNull('Creator', instance.creator); writeNotNull('Version', instance.version); writeNotNull('IsSynced', instance.isSynced); return val; } MediaAttachment _$MediaAttachmentFromJson(Map json) => MediaAttachment( codec: json['Codec'] as String?, codecTag: json['CodecTag'] as String?, comment: json['Comment'] as String?, index: (json['Index'] as num?)?.toInt(), fileName: json['FileName'] as String?, mimeType: json['MimeType'] as String?, deliveryUrl: json['DeliveryUrl'] as String?, ); Map _$MediaAttachmentToJson(MediaAttachment instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Codec', instance.codec); writeNotNull('CodecTag', instance.codecTag); writeNotNull('Comment', instance.comment); writeNotNull('Index', instance.index); writeNotNull('FileName', instance.fileName); writeNotNull('MimeType', instance.mimeType); writeNotNull('DeliveryUrl', instance.deliveryUrl); return val; } MediaPathDto _$MediaPathDtoFromJson(Map json) => MediaPathDto( name: json['Name'] as String, path: json['Path'] as String?, pathInfo: json['PathInfo'] == null ? null : MediaPathInfo.fromJson(json['PathInfo'] as Map), ); Map _$MediaPathDtoToJson(MediaPathDto instance) { final val = { 'Name': instance.name, }; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Path', instance.path); writeNotNull('PathInfo', instance.pathInfo?.toJson()); return val; } MediaPathInfo _$MediaPathInfoFromJson(Map json) => MediaPathInfo( path: json['Path'] as String?, ); Map _$MediaPathInfoToJson(MediaPathInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Path', instance.path); return val; } MediaSegmentDto _$MediaSegmentDtoFromJson(Map json) => MediaSegmentDto( id: json['Id'] as String?, itemId: json['ItemId'] as String?, type: mediaSegmentTypeNullableFromJson(json['Type']), startTicks: (json['StartTicks'] as num?)?.toInt(), endTicks: (json['EndTicks'] as num?)?.toInt(), ); Map _$MediaSegmentDtoToJson(MediaSegmentDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('ItemId', instance.itemId); writeNotNull('Type', mediaSegmentTypeNullableToJson(instance.type)); writeNotNull('StartTicks', instance.startTicks); writeNotNull('EndTicks', instance.endTicks); return val; } MediaSegmentDtoQueryResult _$MediaSegmentDtoQueryResultFromJson( Map json) => MediaSegmentDtoQueryResult( items: (json['Items'] as List?) ?.map((e) => MediaSegmentDto.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$MediaSegmentDtoQueryResultToJson( MediaSegmentDtoQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } MediaSourceInfo _$MediaSourceInfoFromJson(Map json) => MediaSourceInfo( protocol: mediaProtocolNullableFromJson(json['Protocol']), id: json['Id'] as String?, path: json['Path'] as String?, encoderPath: json['EncoderPath'] as String?, encoderProtocol: mediaProtocolNullableFromJson(json['EncoderProtocol']), type: mediaSourceTypeNullableFromJson(json['Type']), container: json['Container'] as String?, size: (json['Size'] as num?)?.toInt(), name: json['Name'] as String?, isRemote: json['IsRemote'] as bool?, eTag: json['ETag'] as String?, runTimeTicks: (json['RunTimeTicks'] as num?)?.toInt(), readAtNativeFramerate: json['ReadAtNativeFramerate'] as bool?, ignoreDts: json['IgnoreDts'] as bool?, ignoreIndex: json['IgnoreIndex'] as bool?, genPtsInput: json['GenPtsInput'] as bool?, supportsTranscoding: json['SupportsTranscoding'] as bool?, supportsDirectStream: json['SupportsDirectStream'] as bool?, supportsDirectPlay: json['SupportsDirectPlay'] as bool?, isInfiniteStream: json['IsInfiniteStream'] as bool?, useMostCompatibleTranscodingProfile: json['UseMostCompatibleTranscodingProfile'] as bool? ?? false, requiresOpening: json['RequiresOpening'] as bool?, openToken: json['OpenToken'] as String?, requiresClosing: json['RequiresClosing'] as bool?, liveStreamId: json['LiveStreamId'] as String?, bufferMs: (json['BufferMs'] as num?)?.toInt(), requiresLooping: json['RequiresLooping'] as bool?, supportsProbing: json['SupportsProbing'] as bool?, videoType: videoTypeNullableFromJson(json['VideoType']), isoType: isoTypeNullableFromJson(json['IsoType']), video3DFormat: video3DFormatNullableFromJson(json['Video3DFormat']), mediaStreams: (json['MediaStreams'] as List?) ?.map((e) => MediaStream.fromJson(e as Map)) .toList() ?? [], mediaAttachments: (json['MediaAttachments'] as List?) ?.map((e) => MediaAttachment.fromJson(e as Map)) .toList() ?? [], formats: (json['Formats'] as List?) ?.map((e) => e as String) .toList() ?? [], bitrate: (json['Bitrate'] as num?)?.toInt(), fallbackMaxStreamingBitrate: (json['FallbackMaxStreamingBitrate'] as num?)?.toInt(), timestamp: transportStreamTimestampNullableFromJson(json['Timestamp']), requiredHttpHeaders: json['RequiredHttpHeaders'] as Map?, transcodingUrl: json['TranscodingUrl'] as String?, transcodingSubProtocol: mediaStreamProtocolNullableFromJson(json['TranscodingSubProtocol']), transcodingContainer: json['TranscodingContainer'] as String?, analyzeDurationMs: (json['AnalyzeDurationMs'] as num?)?.toInt(), defaultAudioStreamIndex: (json['DefaultAudioStreamIndex'] as num?)?.toInt(), defaultSubtitleStreamIndex: (json['DefaultSubtitleStreamIndex'] as num?)?.toInt(), hasSegments: json['HasSegments'] as bool?, ); Map _$MediaSourceInfoToJson(MediaSourceInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Protocol', mediaProtocolNullableToJson(instance.protocol)); writeNotNull('Id', instance.id); writeNotNull('Path', instance.path); writeNotNull('EncoderPath', instance.encoderPath); writeNotNull( 'EncoderProtocol', mediaProtocolNullableToJson(instance.encoderProtocol)); writeNotNull('Type', mediaSourceTypeNullableToJson(instance.type)); writeNotNull('Container', instance.container); writeNotNull('Size', instance.size); writeNotNull('Name', instance.name); writeNotNull('IsRemote', instance.isRemote); writeNotNull('ETag', instance.eTag); writeNotNull('RunTimeTicks', instance.runTimeTicks); writeNotNull('ReadAtNativeFramerate', instance.readAtNativeFramerate); writeNotNull('IgnoreDts', instance.ignoreDts); writeNotNull('IgnoreIndex', instance.ignoreIndex); writeNotNull('GenPtsInput', instance.genPtsInput); writeNotNull('SupportsTranscoding', instance.supportsTranscoding); writeNotNull('SupportsDirectStream', instance.supportsDirectStream); writeNotNull('SupportsDirectPlay', instance.supportsDirectPlay); writeNotNull('IsInfiniteStream', instance.isInfiniteStream); writeNotNull('UseMostCompatibleTranscodingProfile', instance.useMostCompatibleTranscodingProfile); writeNotNull('RequiresOpening', instance.requiresOpening); writeNotNull('OpenToken', instance.openToken); writeNotNull('RequiresClosing', instance.requiresClosing); writeNotNull('LiveStreamId', instance.liveStreamId); writeNotNull('BufferMs', instance.bufferMs); writeNotNull('RequiresLooping', instance.requiresLooping); writeNotNull('SupportsProbing', instance.supportsProbing); writeNotNull('VideoType', videoTypeNullableToJson(instance.videoType)); writeNotNull('IsoType', isoTypeNullableToJson(instance.isoType)); writeNotNull( 'Video3DFormat', video3DFormatNullableToJson(instance.video3DFormat)); writeNotNull( 'MediaStreams', instance.mediaStreams?.map((e) => e.toJson()).toList()); writeNotNull('MediaAttachments', instance.mediaAttachments?.map((e) => e.toJson()).toList()); writeNotNull('Formats', instance.formats); writeNotNull('Bitrate', instance.bitrate); writeNotNull( 'FallbackMaxStreamingBitrate', instance.fallbackMaxStreamingBitrate); writeNotNull( 'Timestamp', transportStreamTimestampNullableToJson(instance.timestamp)); writeNotNull('RequiredHttpHeaders', instance.requiredHttpHeaders); writeNotNull('TranscodingUrl', instance.transcodingUrl); writeNotNull('TranscodingSubProtocol', mediaStreamProtocolNullableToJson(instance.transcodingSubProtocol)); writeNotNull('TranscodingContainer', instance.transcodingContainer); writeNotNull('AnalyzeDurationMs', instance.analyzeDurationMs); writeNotNull('DefaultAudioStreamIndex', instance.defaultAudioStreamIndex); writeNotNull( 'DefaultSubtitleStreamIndex', instance.defaultSubtitleStreamIndex); writeNotNull('HasSegments', instance.hasSegments); return val; } MediaStream _$MediaStreamFromJson(Map json) => MediaStream( codec: json['Codec'] as String?, codecTag: json['CodecTag'] as String?, language: json['Language'] as String?, colorRange: json['ColorRange'] as String?, colorSpace: json['ColorSpace'] as String?, colorTransfer: json['ColorTransfer'] as String?, colorPrimaries: json['ColorPrimaries'] as String?, dvVersionMajor: (json['DvVersionMajor'] as num?)?.toInt(), dvVersionMinor: (json['DvVersionMinor'] as num?)?.toInt(), dvProfile: (json['DvProfile'] as num?)?.toInt(), dvLevel: (json['DvLevel'] as num?)?.toInt(), rpuPresentFlag: (json['RpuPresentFlag'] as num?)?.toInt(), elPresentFlag: (json['ElPresentFlag'] as num?)?.toInt(), blPresentFlag: (json['BlPresentFlag'] as num?)?.toInt(), dvBlSignalCompatibilityId: (json['DvBlSignalCompatibilityId'] as num?)?.toInt(), rotation: (json['Rotation'] as num?)?.toInt(), comment: json['Comment'] as String?, timeBase: json['TimeBase'] as String?, codecTimeBase: json['CodecTimeBase'] as String?, title: json['Title'] as String?, videoRange: videoRangeNullableFromJson(json['VideoRange']), videoRangeType: videoRangeTypeNullableFromJson(json['VideoRangeType']), videoDoViTitle: json['VideoDoViTitle'] as String?, audioSpatialFormat: MediaStream.audioSpatialFormatAudioSpatialFormatNullableFromJson( json['AudioSpatialFormat']), localizedUndefined: json['LocalizedUndefined'] as String?, localizedDefault: json['LocalizedDefault'] as String?, localizedForced: json['LocalizedForced'] as String?, localizedExternal: json['LocalizedExternal'] as String?, localizedHearingImpaired: json['LocalizedHearingImpaired'] as String?, displayTitle: json['DisplayTitle'] as String?, nalLengthSize: json['NalLengthSize'] as String?, isInterlaced: json['IsInterlaced'] as bool?, isAVC: json['IsAVC'] as bool?, channelLayout: json['ChannelLayout'] as String?, bitRate: (json['BitRate'] as num?)?.toInt(), bitDepth: (json['BitDepth'] as num?)?.toInt(), refFrames: (json['RefFrames'] as num?)?.toInt(), packetLength: (json['PacketLength'] as num?)?.toInt(), channels: (json['Channels'] as num?)?.toInt(), sampleRate: (json['SampleRate'] as num?)?.toInt(), isDefault: json['IsDefault'] as bool?, isForced: json['IsForced'] as bool?, isHearingImpaired: json['IsHearingImpaired'] as bool?, height: (json['Height'] as num?)?.toInt(), width: (json['Width'] as num?)?.toInt(), averageFrameRate: (json['AverageFrameRate'] as num?)?.toDouble(), realFrameRate: (json['RealFrameRate'] as num?)?.toDouble(), referenceFrameRate: (json['ReferenceFrameRate'] as num?)?.toDouble(), profile: json['Profile'] as String?, type: mediaStreamTypeNullableFromJson(json['Type']), aspectRatio: json['AspectRatio'] as String?, index: (json['Index'] as num?)?.toInt(), score: (json['Score'] as num?)?.toInt(), isExternal: json['IsExternal'] as bool?, deliveryMethod: subtitleDeliveryMethodNullableFromJson(json['DeliveryMethod']), deliveryUrl: json['DeliveryUrl'] as String?, isExternalUrl: json['IsExternalUrl'] as bool?, isTextSubtitleStream: json['IsTextSubtitleStream'] as bool?, supportsExternalStream: json['SupportsExternalStream'] as bool?, path: json['Path'] as String?, pixelFormat: json['PixelFormat'] as String?, level: (json['Level'] as num?)?.toDouble(), isAnamorphic: json['IsAnamorphic'] as bool?, ); Map _$MediaStreamToJson(MediaStream instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Codec', instance.codec); writeNotNull('CodecTag', instance.codecTag); writeNotNull('Language', instance.language); writeNotNull('ColorRange', instance.colorRange); writeNotNull('ColorSpace', instance.colorSpace); writeNotNull('ColorTransfer', instance.colorTransfer); writeNotNull('ColorPrimaries', instance.colorPrimaries); writeNotNull('DvVersionMajor', instance.dvVersionMajor); writeNotNull('DvVersionMinor', instance.dvVersionMinor); writeNotNull('DvProfile', instance.dvProfile); writeNotNull('DvLevel', instance.dvLevel); writeNotNull('RpuPresentFlag', instance.rpuPresentFlag); writeNotNull('ElPresentFlag', instance.elPresentFlag); writeNotNull('BlPresentFlag', instance.blPresentFlag); writeNotNull('DvBlSignalCompatibilityId', instance.dvBlSignalCompatibilityId); writeNotNull('Rotation', instance.rotation); writeNotNull('Comment', instance.comment); writeNotNull('TimeBase', instance.timeBase); writeNotNull('CodecTimeBase', instance.codecTimeBase); writeNotNull('Title', instance.title); writeNotNull('VideoRange', videoRangeNullableToJson(instance.videoRange)); writeNotNull( 'VideoRangeType', videoRangeTypeNullableToJson(instance.videoRangeType)); writeNotNull('VideoDoViTitle', instance.videoDoViTitle); writeNotNull('AudioSpatialFormat', audioSpatialFormatNullableToJson(instance.audioSpatialFormat)); writeNotNull('LocalizedUndefined', instance.localizedUndefined); writeNotNull('LocalizedDefault', instance.localizedDefault); writeNotNull('LocalizedForced', instance.localizedForced); writeNotNull('LocalizedExternal', instance.localizedExternal); writeNotNull('LocalizedHearingImpaired', instance.localizedHearingImpaired); writeNotNull('DisplayTitle', instance.displayTitle); writeNotNull('NalLengthSize', instance.nalLengthSize); writeNotNull('IsInterlaced', instance.isInterlaced); writeNotNull('IsAVC', instance.isAVC); writeNotNull('ChannelLayout', instance.channelLayout); writeNotNull('BitRate', instance.bitRate); writeNotNull('BitDepth', instance.bitDepth); writeNotNull('RefFrames', instance.refFrames); writeNotNull('PacketLength', instance.packetLength); writeNotNull('Channels', instance.channels); writeNotNull('SampleRate', instance.sampleRate); writeNotNull('IsDefault', instance.isDefault); writeNotNull('IsForced', instance.isForced); writeNotNull('IsHearingImpaired', instance.isHearingImpaired); writeNotNull('Height', instance.height); writeNotNull('Width', instance.width); writeNotNull('AverageFrameRate', instance.averageFrameRate); writeNotNull('RealFrameRate', instance.realFrameRate); writeNotNull('ReferenceFrameRate', instance.referenceFrameRate); writeNotNull('Profile', instance.profile); writeNotNull('Type', mediaStreamTypeNullableToJson(instance.type)); writeNotNull('AspectRatio', instance.aspectRatio); writeNotNull('Index', instance.index); writeNotNull('Score', instance.score); writeNotNull('IsExternal', instance.isExternal); writeNotNull('DeliveryMethod', subtitleDeliveryMethodNullableToJson(instance.deliveryMethod)); writeNotNull('DeliveryUrl', instance.deliveryUrl); writeNotNull('IsExternalUrl', instance.isExternalUrl); writeNotNull('IsTextSubtitleStream', instance.isTextSubtitleStream); writeNotNull('SupportsExternalStream', instance.supportsExternalStream); writeNotNull('Path', instance.path); writeNotNull('PixelFormat', instance.pixelFormat); writeNotNull('Level', instance.level); writeNotNull('IsAnamorphic', instance.isAnamorphic); return val; } MediaUpdateInfoDto _$MediaUpdateInfoDtoFromJson(Map json) => MediaUpdateInfoDto( updates: (json['Updates'] as List?) ?.map((e) => MediaUpdateInfoPathDto.fromJson(e as Map)) .toList() ?? [], ); Map _$MediaUpdateInfoDtoToJson(MediaUpdateInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Updates', instance.updates?.map((e) => e.toJson()).toList()); return val; } MediaUpdateInfoPathDto _$MediaUpdateInfoPathDtoFromJson( Map json) => MediaUpdateInfoPathDto( path: json['Path'] as String?, updateType: json['UpdateType'] as String?, ); Map _$MediaUpdateInfoPathDtoToJson( MediaUpdateInfoPathDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Path', instance.path); writeNotNull('UpdateType', instance.updateType); return val; } MediaUrl _$MediaUrlFromJson(Map json) => MediaUrl( url: json['Url'] as String?, name: json['Name'] as String?, ); Map _$MediaUrlToJson(MediaUrl instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Url', instance.url); writeNotNull('Name', instance.name); return val; } MessageCommand _$MessageCommandFromJson(Map json) => MessageCommand( header: json['Header'] as String?, text: json['Text'] as String, timeoutMs: (json['TimeoutMs'] as num?)?.toInt(), ); Map _$MessageCommandToJson(MessageCommand instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Header', instance.header); val['Text'] = instance.text; writeNotNull('TimeoutMs', instance.timeoutMs); return val; } MetadataConfiguration _$MetadataConfigurationFromJson( Map json) => MetadataConfiguration( useFileCreationTimeForDateAdded: json['UseFileCreationTimeForDateAdded'] as bool?, ); Map _$MetadataConfigurationToJson( MetadataConfiguration instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UseFileCreationTimeForDateAdded', instance.useFileCreationTimeForDateAdded); return val; } MetadataEditorInfo _$MetadataEditorInfoFromJson(Map json) => MetadataEditorInfo( parentalRatingOptions: (json['ParentalRatingOptions'] as List?) ?.map((e) => ParentalRating.fromJson(e as Map)) .toList() ?? [], countries: (json['Countries'] as List?) ?.map((e) => CountryInfo.fromJson(e as Map)) .toList() ?? [], cultures: (json['Cultures'] as List?) ?.map((e) => CultureDto.fromJson(e as Map)) .toList() ?? [], externalIdInfos: (json['ExternalIdInfos'] as List?) ?.map((e) => ExternalIdInfo.fromJson(e as Map)) .toList() ?? [], contentType: collectionTypeNullableFromJson(json['ContentType']), contentTypeOptions: (json['ContentTypeOptions'] as List?) ?.map((e) => NameValuePair.fromJson(e as Map)) .toList() ?? [], ); Map _$MetadataEditorInfoToJson(MetadataEditorInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ParentalRatingOptions', instance.parentalRatingOptions?.map((e) => e.toJson()).toList()); writeNotNull( 'Countries', instance.countries?.map((e) => e.toJson()).toList()); writeNotNull('Cultures', instance.cultures?.map((e) => e.toJson()).toList()); writeNotNull('ExternalIdInfos', instance.externalIdInfos?.map((e) => e.toJson()).toList()); writeNotNull( 'ContentType', collectionTypeNullableToJson(instance.contentType)); writeNotNull('ContentTypeOptions', instance.contentTypeOptions?.map((e) => e.toJson()).toList()); return val; } MetadataOptions _$MetadataOptionsFromJson(Map json) => MetadataOptions( itemType: json['ItemType'] as String?, disabledMetadataSavers: (json['DisabledMetadataSavers'] as List?) ?.map((e) => e as String) .toList() ?? [], localMetadataReaderOrder: (json['LocalMetadataReaderOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], disabledMetadataFetchers: (json['DisabledMetadataFetchers'] as List?) ?.map((e) => e as String) .toList() ?? [], metadataFetcherOrder: (json['MetadataFetcherOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], disabledImageFetchers: (json['DisabledImageFetchers'] as List?) ?.map((e) => e as String) .toList() ?? [], imageFetcherOrder: (json['ImageFetcherOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$MetadataOptionsToJson(MetadataOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ItemType', instance.itemType); writeNotNull('DisabledMetadataSavers', instance.disabledMetadataSavers); writeNotNull('LocalMetadataReaderOrder', instance.localMetadataReaderOrder); writeNotNull('DisabledMetadataFetchers', instance.disabledMetadataFetchers); writeNotNull('MetadataFetcherOrder', instance.metadataFetcherOrder); writeNotNull('DisabledImageFetchers', instance.disabledImageFetchers); writeNotNull('ImageFetcherOrder', instance.imageFetcherOrder); return val; } MovePlaylistItemRequestDto _$MovePlaylistItemRequestDtoFromJson( Map json) => MovePlaylistItemRequestDto( playlistItemId: json['PlaylistItemId'] as String?, newIndex: (json['NewIndex'] as num?)?.toInt(), ); Map _$MovePlaylistItemRequestDtoToJson( MovePlaylistItemRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlaylistItemId', instance.playlistItemId); writeNotNull('NewIndex', instance.newIndex); return val; } MovieInfo _$MovieInfoFromJson(Map json) => MovieInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, ); Map _$MovieInfoToJson(MovieInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); return val; } MovieInfoRemoteSearchQuery _$MovieInfoRemoteSearchQueryFromJson( Map json) => MovieInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : MovieInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$MovieInfoRemoteSearchQueryToJson( MovieInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } MusicVideoInfo _$MusicVideoInfoFromJson(Map json) => MusicVideoInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, artists: (json['Artists'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$MusicVideoInfoToJson(MusicVideoInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); writeNotNull('Artists', instance.artists); return val; } MusicVideoInfoRemoteSearchQuery _$MusicVideoInfoRemoteSearchQueryFromJson( Map json) => MusicVideoInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : MusicVideoInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$MusicVideoInfoRemoteSearchQueryToJson( MusicVideoInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } NameGuidPair _$NameGuidPairFromJson(Map json) => NameGuidPair( name: json['Name'] as String?, id: json['Id'] as String?, ); Map _$NameGuidPairToJson(NameGuidPair instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Id', instance.id); return val; } NameIdPair _$NameIdPairFromJson(Map json) => NameIdPair( name: json['Name'] as String?, id: json['Id'] as String?, ); Map _$NameIdPairToJson(NameIdPair instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Id', instance.id); return val; } NameValuePair _$NameValuePairFromJson(Map json) => NameValuePair( name: json['Name'] as String?, $Value: json['Value'] as String?, ); Map _$NameValuePairToJson(NameValuePair instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Value', instance.$Value); return val; } NetworkConfiguration _$NetworkConfigurationFromJson( Map json) => NetworkConfiguration( baseUrl: json['BaseUrl'] as String?, enableHttps: json['EnableHttps'] as bool?, requireHttps: json['RequireHttps'] as bool?, certificatePath: json['CertificatePath'] as String?, certificatePassword: json['CertificatePassword'] as String?, internalHttpPort: (json['InternalHttpPort'] as num?)?.toInt(), internalHttpsPort: (json['InternalHttpsPort'] as num?)?.toInt(), publicHttpPort: (json['PublicHttpPort'] as num?)?.toInt(), publicHttpsPort: (json['PublicHttpsPort'] as num?)?.toInt(), autoDiscovery: json['AutoDiscovery'] as bool?, enableUPnP: json['EnableUPnP'] as bool?, enableIPv4: json['EnableIPv4'] as bool?, enableIPv6: json['EnableIPv6'] as bool?, enableRemoteAccess: json['EnableRemoteAccess'] as bool?, localNetworkSubnets: (json['LocalNetworkSubnets'] as List?) ?.map((e) => e as String) .toList() ?? [], localNetworkAddresses: (json['LocalNetworkAddresses'] as List?) ?.map((e) => e as String) .toList() ?? [], knownProxies: (json['KnownProxies'] as List?) ?.map((e) => e as String) .toList() ?? [], ignoreVirtualInterfaces: json['IgnoreVirtualInterfaces'] as bool?, virtualInterfaceNames: (json['VirtualInterfaceNames'] as List?) ?.map((e) => e as String) .toList() ?? [], enablePublishedServerUriByRequest: json['EnablePublishedServerUriByRequest'] as bool?, publishedServerUriBySubnet: (json['PublishedServerUriBySubnet'] as List?) ?.map((e) => e as String) .toList() ?? [], remoteIPFilter: (json['RemoteIPFilter'] as List?) ?.map((e) => e as String) .toList() ?? [], isRemoteIPFilterBlacklist: json['IsRemoteIPFilterBlacklist'] as bool?, ); Map _$NetworkConfigurationToJson( NetworkConfiguration instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('BaseUrl', instance.baseUrl); writeNotNull('EnableHttps', instance.enableHttps); writeNotNull('RequireHttps', instance.requireHttps); writeNotNull('CertificatePath', instance.certificatePath); writeNotNull('CertificatePassword', instance.certificatePassword); writeNotNull('InternalHttpPort', instance.internalHttpPort); writeNotNull('InternalHttpsPort', instance.internalHttpsPort); writeNotNull('PublicHttpPort', instance.publicHttpPort); writeNotNull('PublicHttpsPort', instance.publicHttpsPort); writeNotNull('AutoDiscovery', instance.autoDiscovery); writeNotNull('EnableUPnP', instance.enableUPnP); writeNotNull('EnableIPv4', instance.enableIPv4); writeNotNull('EnableIPv6', instance.enableIPv6); writeNotNull('EnableRemoteAccess', instance.enableRemoteAccess); writeNotNull('LocalNetworkSubnets', instance.localNetworkSubnets); writeNotNull('LocalNetworkAddresses', instance.localNetworkAddresses); writeNotNull('KnownProxies', instance.knownProxies); writeNotNull('IgnoreVirtualInterfaces', instance.ignoreVirtualInterfaces); writeNotNull('VirtualInterfaceNames', instance.virtualInterfaceNames); writeNotNull('EnablePublishedServerUriByRequest', instance.enablePublishedServerUriByRequest); writeNotNull( 'PublishedServerUriBySubnet', instance.publishedServerUriBySubnet); writeNotNull('RemoteIPFilter', instance.remoteIPFilter); writeNotNull('IsRemoteIPFilterBlacklist', instance.isRemoteIPFilterBlacklist); return val; } NewGroupRequestDto _$NewGroupRequestDtoFromJson(Map json) => NewGroupRequestDto( groupName: json['GroupName'] as String?, ); Map _$NewGroupRequestDtoToJson(NewGroupRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupName', instance.groupName); return val; } NextItemRequestDto _$NextItemRequestDtoFromJson(Map json) => NextItemRequestDto( playlistItemId: json['PlaylistItemId'] as String?, ); Map _$NextItemRequestDtoToJson(NextItemRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } OpenLiveStreamDto _$OpenLiveStreamDtoFromJson(Map json) => OpenLiveStreamDto( openToken: json['OpenToken'] as String?, userId: json['UserId'] as String?, playSessionId: json['PlaySessionId'] as String?, maxStreamingBitrate: (json['MaxStreamingBitrate'] as num?)?.toInt(), startTimeTicks: (json['StartTimeTicks'] as num?)?.toInt(), audioStreamIndex: (json['AudioStreamIndex'] as num?)?.toInt(), subtitleStreamIndex: (json['SubtitleStreamIndex'] as num?)?.toInt(), maxAudioChannels: (json['MaxAudioChannels'] as num?)?.toInt(), itemId: json['ItemId'] as String?, enableDirectPlay: json['EnableDirectPlay'] as bool?, enableDirectStream: json['EnableDirectStream'] as bool?, alwaysBurnInSubtitleWhenTranscoding: json['AlwaysBurnInSubtitleWhenTranscoding'] as bool?, deviceProfile: json['DeviceProfile'] == null ? null : DeviceProfile.fromJson( json['DeviceProfile'] as Map), directPlayProtocols: mediaProtocolListFromJson(json['DirectPlayProtocols'] as List?), ); Map _$OpenLiveStreamDtoToJson(OpenLiveStreamDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('OpenToken', instance.openToken); writeNotNull('UserId', instance.userId); writeNotNull('PlaySessionId', instance.playSessionId); writeNotNull('MaxStreamingBitrate', instance.maxStreamingBitrate); writeNotNull('StartTimeTicks', instance.startTimeTicks); writeNotNull('AudioStreamIndex', instance.audioStreamIndex); writeNotNull('SubtitleStreamIndex', instance.subtitleStreamIndex); writeNotNull('MaxAudioChannels', instance.maxAudioChannels); writeNotNull('ItemId', instance.itemId); writeNotNull('EnableDirectPlay', instance.enableDirectPlay); writeNotNull('EnableDirectStream', instance.enableDirectStream); writeNotNull('AlwaysBurnInSubtitleWhenTranscoding', instance.alwaysBurnInSubtitleWhenTranscoding); writeNotNull('DeviceProfile', instance.deviceProfile?.toJson()); val['DirectPlayProtocols'] = mediaProtocolListToJson(instance.directPlayProtocols); return val; } OutboundKeepAliveMessage _$OutboundKeepAliveMessageFromJson( Map json) => OutboundKeepAliveMessage( messageId: json['MessageId'] as String?, messageType: OutboundKeepAliveMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$OutboundKeepAliveMessageToJson( OutboundKeepAliveMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } OutboundWebSocketMessage _$OutboundWebSocketMessageFromJson( Map json) => OutboundWebSocketMessage(); Map _$OutboundWebSocketMessageToJson( OutboundWebSocketMessage instance) => {}; PackageInfo _$PackageInfoFromJson(Map json) => PackageInfo( name: json['name'] as String?, description: json['description'] as String?, overview: json['overview'] as String?, owner: json['owner'] as String?, category: json['category'] as String?, guid: json['guid'] as String?, versions: (json['versions'] as List?) ?.map((e) => VersionInfo.fromJson(e as Map)) .toList() ?? [], imageUrl: json['imageUrl'] as String?, ); Map _$PackageInfoToJson(PackageInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('name', instance.name); writeNotNull('description', instance.description); writeNotNull('overview', instance.overview); writeNotNull('owner', instance.owner); writeNotNull('category', instance.category); writeNotNull('guid', instance.guid); writeNotNull('versions', instance.versions?.map((e) => e.toJson()).toList()); writeNotNull('imageUrl', instance.imageUrl); return val; } ParentalRating _$ParentalRatingFromJson(Map json) => ParentalRating( name: json['Name'] as String?, $Value: (json['Value'] as num?)?.toInt(), ); Map _$ParentalRatingToJson(ParentalRating instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Value', instance.$Value); return val; } PathSubstitution _$PathSubstitutionFromJson(Map json) => PathSubstitution( from: json['From'] as String?, to: json['To'] as String?, ); Map _$PathSubstitutionToJson(PathSubstitution instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('From', instance.from); writeNotNull('To', instance.to); return val; } PersonLookupInfo _$PersonLookupInfoFromJson(Map json) => PersonLookupInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, ); Map _$PersonLookupInfoToJson(PersonLookupInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); return val; } PersonLookupInfoRemoteSearchQuery _$PersonLookupInfoRemoteSearchQueryFromJson( Map json) => PersonLookupInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : PersonLookupInfo.fromJson( json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$PersonLookupInfoRemoteSearchQueryToJson( PersonLookupInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } PingRequestDto _$PingRequestDtoFromJson(Map json) => PingRequestDto( ping: (json['Ping'] as num?)?.toInt(), ); Map _$PingRequestDtoToJson(PingRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Ping', instance.ping); return val; } PinRedeemResult _$PinRedeemResultFromJson(Map json) => PinRedeemResult( success: json['Success'] as bool?, usersReset: (json['UsersReset'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$PinRedeemResultToJson(PinRedeemResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Success', instance.success); writeNotNull('UsersReset', instance.usersReset); return val; } PlaybackInfoDto _$PlaybackInfoDtoFromJson(Map json) => PlaybackInfoDto( userId: json['UserId'] as String?, maxStreamingBitrate: (json['MaxStreamingBitrate'] as num?)?.toInt(), startTimeTicks: (json['StartTimeTicks'] as num?)?.toInt(), audioStreamIndex: (json['AudioStreamIndex'] as num?)?.toInt(), subtitleStreamIndex: (json['SubtitleStreamIndex'] as num?)?.toInt(), maxAudioChannels: (json['MaxAudioChannels'] as num?)?.toInt(), mediaSourceId: json['MediaSourceId'] as String?, liveStreamId: json['LiveStreamId'] as String?, deviceProfile: json['DeviceProfile'] == null ? null : DeviceProfile.fromJson( json['DeviceProfile'] as Map), enableDirectPlay: json['EnableDirectPlay'] as bool?, enableDirectStream: json['EnableDirectStream'] as bool?, enableTranscoding: json['EnableTranscoding'] as bool?, allowVideoStreamCopy: json['AllowVideoStreamCopy'] as bool?, allowAudioStreamCopy: json['AllowAudioStreamCopy'] as bool?, autoOpenLiveStream: json['AutoOpenLiveStream'] as bool?, alwaysBurnInSubtitleWhenTranscoding: json['AlwaysBurnInSubtitleWhenTranscoding'] as bool?, ); Map _$PlaybackInfoDtoToJson(PlaybackInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UserId', instance.userId); writeNotNull('MaxStreamingBitrate', instance.maxStreamingBitrate); writeNotNull('StartTimeTicks', instance.startTimeTicks); writeNotNull('AudioStreamIndex', instance.audioStreamIndex); writeNotNull('SubtitleStreamIndex', instance.subtitleStreamIndex); writeNotNull('MaxAudioChannels', instance.maxAudioChannels); writeNotNull('MediaSourceId', instance.mediaSourceId); writeNotNull('LiveStreamId', instance.liveStreamId); writeNotNull('DeviceProfile', instance.deviceProfile?.toJson()); writeNotNull('EnableDirectPlay', instance.enableDirectPlay); writeNotNull('EnableDirectStream', instance.enableDirectStream); writeNotNull('EnableTranscoding', instance.enableTranscoding); writeNotNull('AllowVideoStreamCopy', instance.allowVideoStreamCopy); writeNotNull('AllowAudioStreamCopy', instance.allowAudioStreamCopy); writeNotNull('AutoOpenLiveStream', instance.autoOpenLiveStream); writeNotNull('AlwaysBurnInSubtitleWhenTranscoding', instance.alwaysBurnInSubtitleWhenTranscoding); return val; } PlaybackInfoResponse _$PlaybackInfoResponseFromJson( Map json) => PlaybackInfoResponse( mediaSources: (json['MediaSources'] as List?) ?.map((e) => MediaSourceInfo.fromJson(e as Map)) .toList() ?? [], playSessionId: json['PlaySessionId'] as String?, errorCode: playbackErrorCodeNullableFromJson(json['ErrorCode']), ); Map _$PlaybackInfoResponseToJson( PlaybackInfoResponse instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'MediaSources', instance.mediaSources?.map((e) => e.toJson()).toList()); writeNotNull('PlaySessionId', instance.playSessionId); writeNotNull( 'ErrorCode', playbackErrorCodeNullableToJson(instance.errorCode)); return val; } PlaybackProgressInfo _$PlaybackProgressInfoFromJson( Map json) => PlaybackProgressInfo( canSeek: json['CanSeek'] as bool?, item: json['Item'] == null ? null : BaseItemDto.fromJson(json['Item'] as Map), itemId: json['ItemId'] as String?, sessionId: json['SessionId'] as String?, mediaSourceId: json['MediaSourceId'] as String?, audioStreamIndex: (json['AudioStreamIndex'] as num?)?.toInt(), subtitleStreamIndex: (json['SubtitleStreamIndex'] as num?)?.toInt(), isPaused: json['IsPaused'] as bool?, isMuted: json['IsMuted'] as bool?, positionTicks: (json['PositionTicks'] as num?)?.toInt(), playbackStartTimeTicks: (json['PlaybackStartTimeTicks'] as num?)?.toInt(), volumeLevel: (json['VolumeLevel'] as num?)?.toInt(), brightness: (json['Brightness'] as num?)?.toInt(), aspectRatio: json['AspectRatio'] as String?, playMethod: playMethodNullableFromJson(json['PlayMethod']), liveStreamId: json['LiveStreamId'] as String?, playSessionId: json['PlaySessionId'] as String?, repeatMode: repeatModeNullableFromJson(json['RepeatMode']), playbackOrder: playbackOrderNullableFromJson(json['PlaybackOrder']), nowPlayingQueue: (json['NowPlayingQueue'] as List?) ?.map((e) => QueueItem.fromJson(e as Map)) .toList() ?? [], playlistItemId: json['PlaylistItemId'] as String?, ); Map _$PlaybackProgressInfoToJson( PlaybackProgressInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('CanSeek', instance.canSeek); writeNotNull('Item', instance.item?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SessionId', instance.sessionId); writeNotNull('MediaSourceId', instance.mediaSourceId); writeNotNull('AudioStreamIndex', instance.audioStreamIndex); writeNotNull('SubtitleStreamIndex', instance.subtitleStreamIndex); writeNotNull('IsPaused', instance.isPaused); writeNotNull('IsMuted', instance.isMuted); writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('PlaybackStartTimeTicks', instance.playbackStartTimeTicks); writeNotNull('VolumeLevel', instance.volumeLevel); writeNotNull('Brightness', instance.brightness); writeNotNull('AspectRatio', instance.aspectRatio); writeNotNull('PlayMethod', playMethodNullableToJson(instance.playMethod)); writeNotNull('LiveStreamId', instance.liveStreamId); writeNotNull('PlaySessionId', instance.playSessionId); writeNotNull('RepeatMode', repeatModeNullableToJson(instance.repeatMode)); writeNotNull( 'PlaybackOrder', playbackOrderNullableToJson(instance.playbackOrder)); writeNotNull('NowPlayingQueue', instance.nowPlayingQueue?.map((e) => e.toJson()).toList()); writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } PlaybackStartInfo _$PlaybackStartInfoFromJson(Map json) => PlaybackStartInfo( canSeek: json['CanSeek'] as bool?, item: json['Item'] == null ? null : BaseItemDto.fromJson(json['Item'] as Map), itemId: json['ItemId'] as String?, sessionId: json['SessionId'] as String?, mediaSourceId: json['MediaSourceId'] as String?, audioStreamIndex: (json['AudioStreamIndex'] as num?)?.toInt(), subtitleStreamIndex: (json['SubtitleStreamIndex'] as num?)?.toInt(), isPaused: json['IsPaused'] as bool?, isMuted: json['IsMuted'] as bool?, positionTicks: (json['PositionTicks'] as num?)?.toInt(), playbackStartTimeTicks: (json['PlaybackStartTimeTicks'] as num?)?.toInt(), volumeLevel: (json['VolumeLevel'] as num?)?.toInt(), brightness: (json['Brightness'] as num?)?.toInt(), aspectRatio: json['AspectRatio'] as String?, playMethod: playMethodNullableFromJson(json['PlayMethod']), liveStreamId: json['LiveStreamId'] as String?, playSessionId: json['PlaySessionId'] as String?, repeatMode: repeatModeNullableFromJson(json['RepeatMode']), playbackOrder: playbackOrderNullableFromJson(json['PlaybackOrder']), nowPlayingQueue: (json['NowPlayingQueue'] as List?) ?.map((e) => QueueItem.fromJson(e as Map)) .toList() ?? [], playlistItemId: json['PlaylistItemId'] as String?, ); Map _$PlaybackStartInfoToJson(PlaybackStartInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('CanSeek', instance.canSeek); writeNotNull('Item', instance.item?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SessionId', instance.sessionId); writeNotNull('MediaSourceId', instance.mediaSourceId); writeNotNull('AudioStreamIndex', instance.audioStreamIndex); writeNotNull('SubtitleStreamIndex', instance.subtitleStreamIndex); writeNotNull('IsPaused', instance.isPaused); writeNotNull('IsMuted', instance.isMuted); writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('PlaybackStartTimeTicks', instance.playbackStartTimeTicks); writeNotNull('VolumeLevel', instance.volumeLevel); writeNotNull('Brightness', instance.brightness); writeNotNull('AspectRatio', instance.aspectRatio); writeNotNull('PlayMethod', playMethodNullableToJson(instance.playMethod)); writeNotNull('LiveStreamId', instance.liveStreamId); writeNotNull('PlaySessionId', instance.playSessionId); writeNotNull('RepeatMode', repeatModeNullableToJson(instance.repeatMode)); writeNotNull( 'PlaybackOrder', playbackOrderNullableToJson(instance.playbackOrder)); writeNotNull('NowPlayingQueue', instance.nowPlayingQueue?.map((e) => e.toJson()).toList()); writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } PlaybackStopInfo _$PlaybackStopInfoFromJson(Map json) => PlaybackStopInfo( item: json['Item'] == null ? null : BaseItemDto.fromJson(json['Item'] as Map), itemId: json['ItemId'] as String?, sessionId: json['SessionId'] as String?, mediaSourceId: json['MediaSourceId'] as String?, positionTicks: (json['PositionTicks'] as num?)?.toInt(), liveStreamId: json['LiveStreamId'] as String?, playSessionId: json['PlaySessionId'] as String?, failed: json['Failed'] as bool?, nextMediaType: json['NextMediaType'] as String?, playlistItemId: json['PlaylistItemId'] as String?, nowPlayingQueue: (json['NowPlayingQueue'] as List?) ?.map((e) => QueueItem.fromJson(e as Map)) .toList() ?? [], ); Map _$PlaybackStopInfoToJson(PlaybackStopInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Item', instance.item?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SessionId', instance.sessionId); writeNotNull('MediaSourceId', instance.mediaSourceId); writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('LiveStreamId', instance.liveStreamId); writeNotNull('PlaySessionId', instance.playSessionId); writeNotNull('Failed', instance.failed); writeNotNull('NextMediaType', instance.nextMediaType); writeNotNull('PlaylistItemId', instance.playlistItemId); writeNotNull('NowPlayingQueue', instance.nowPlayingQueue?.map((e) => e.toJson()).toList()); return val; } PlayerStateInfo _$PlayerStateInfoFromJson(Map json) => PlayerStateInfo( positionTicks: (json['PositionTicks'] as num?)?.toInt(), canSeek: json['CanSeek'] as bool?, isPaused: json['IsPaused'] as bool?, isMuted: json['IsMuted'] as bool?, volumeLevel: (json['VolumeLevel'] as num?)?.toInt(), audioStreamIndex: (json['AudioStreamIndex'] as num?)?.toInt(), subtitleStreamIndex: (json['SubtitleStreamIndex'] as num?)?.toInt(), mediaSourceId: json['MediaSourceId'] as String?, playMethod: playMethodNullableFromJson(json['PlayMethod']), repeatMode: repeatModeNullableFromJson(json['RepeatMode']), playbackOrder: playbackOrderNullableFromJson(json['PlaybackOrder']), liveStreamId: json['LiveStreamId'] as String?, ); Map _$PlayerStateInfoToJson(PlayerStateInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('CanSeek', instance.canSeek); writeNotNull('IsPaused', instance.isPaused); writeNotNull('IsMuted', instance.isMuted); writeNotNull('VolumeLevel', instance.volumeLevel); writeNotNull('AudioStreamIndex', instance.audioStreamIndex); writeNotNull('SubtitleStreamIndex', instance.subtitleStreamIndex); writeNotNull('MediaSourceId', instance.mediaSourceId); writeNotNull('PlayMethod', playMethodNullableToJson(instance.playMethod)); writeNotNull('RepeatMode', repeatModeNullableToJson(instance.repeatMode)); writeNotNull( 'PlaybackOrder', playbackOrderNullableToJson(instance.playbackOrder)); writeNotNull('LiveStreamId', instance.liveStreamId); return val; } PlaylistCreationResult _$PlaylistCreationResultFromJson( Map json) => PlaylistCreationResult( id: json['Id'] as String?, ); Map _$PlaylistCreationResultToJson( PlaylistCreationResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); return val; } PlaylistDto _$PlaylistDtoFromJson(Map json) => PlaylistDto( openAccess: json['OpenAccess'] as bool?, shares: (json['Shares'] as List?) ?.map((e) => PlaylistUserPermissions.fromJson(e as Map)) .toList() ?? [], itemIds: (json['ItemIds'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$PlaylistDtoToJson(PlaylistDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('OpenAccess', instance.openAccess); writeNotNull('Shares', instance.shares?.map((e) => e.toJson()).toList()); writeNotNull('ItemIds', instance.itemIds); return val; } PlaylistUserPermissions _$PlaylistUserPermissionsFromJson( Map json) => PlaylistUserPermissions( userId: json['UserId'] as String?, canEdit: json['CanEdit'] as bool?, ); Map _$PlaylistUserPermissionsToJson( PlaylistUserPermissions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UserId', instance.userId); writeNotNull('CanEdit', instance.canEdit); return val; } PlayMessage _$PlayMessageFromJson(Map json) => PlayMessage( data: json['Data'] == null ? null : PlayRequest.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PlayMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$PlayMessageToJson(PlayMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PlayQueueUpdate _$PlayQueueUpdateFromJson(Map json) => PlayQueueUpdate( reason: playQueueUpdateReasonNullableFromJson(json['Reason']), lastUpdate: json['LastUpdate'] == null ? null : DateTime.parse(json['LastUpdate'] as String), playlist: (json['Playlist'] as List?) ?.map( (e) => SyncPlayQueueItem.fromJson(e as Map)) .toList() ?? [], playingItemIndex: (json['PlayingItemIndex'] as num?)?.toInt(), startPositionTicks: (json['StartPositionTicks'] as num?)?.toInt(), isPlaying: json['IsPlaying'] as bool?, shuffleMode: groupShuffleModeNullableFromJson(json['ShuffleMode']), repeatMode: groupRepeatModeNullableFromJson(json['RepeatMode']), ); Map _$PlayQueueUpdateToJson(PlayQueueUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Reason', playQueueUpdateReasonNullableToJson(instance.reason)); writeNotNull('LastUpdate', instance.lastUpdate?.toIso8601String()); writeNotNull('Playlist', instance.playlist?.map((e) => e.toJson()).toList()); writeNotNull('PlayingItemIndex', instance.playingItemIndex); writeNotNull('StartPositionTicks', instance.startPositionTicks); writeNotNull('IsPlaying', instance.isPlaying); writeNotNull( 'ShuffleMode', groupShuffleModeNullableToJson(instance.shuffleMode)); writeNotNull( 'RepeatMode', groupRepeatModeNullableToJson(instance.repeatMode)); return val; } PlayQueueUpdateGroupUpdate _$PlayQueueUpdateGroupUpdateFromJson( Map json) => PlayQueueUpdateGroupUpdate( groupId: json['GroupId'] as String?, type: groupUpdateTypeNullableFromJson(json['Type']), data: json['Data'] == null ? null : PlayQueueUpdate.fromJson(json['Data'] as Map), ); Map _$PlayQueueUpdateGroupUpdateToJson( PlayQueueUpdateGroupUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('Type', groupUpdateTypeNullableToJson(instance.type)); writeNotNull('Data', instance.data?.toJson()); return val; } PlayRequest _$PlayRequestFromJson(Map json) => PlayRequest( itemIds: (json['ItemIds'] as List?) ?.map((e) => e as String) .toList() ?? [], startPositionTicks: (json['StartPositionTicks'] as num?)?.toInt(), playCommand: playCommandNullableFromJson(json['PlayCommand']), controllingUserId: json['ControllingUserId'] as String?, subtitleStreamIndex: (json['SubtitleStreamIndex'] as num?)?.toInt(), audioStreamIndex: (json['AudioStreamIndex'] as num?)?.toInt(), mediaSourceId: json['MediaSourceId'] as String?, startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$PlayRequestToJson(PlayRequest instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ItemIds', instance.itemIds); writeNotNull('StartPositionTicks', instance.startPositionTicks); writeNotNull('PlayCommand', playCommandNullableToJson(instance.playCommand)); writeNotNull('ControllingUserId', instance.controllingUserId); writeNotNull('SubtitleStreamIndex', instance.subtitleStreamIndex); writeNotNull('AudioStreamIndex', instance.audioStreamIndex); writeNotNull('MediaSourceId', instance.mediaSourceId); writeNotNull('StartIndex', instance.startIndex); return val; } PlayRequestDto _$PlayRequestDtoFromJson(Map json) => PlayRequestDto( playingQueue: (json['PlayingQueue'] as List?) ?.map((e) => e as String) .toList() ?? [], playingItemPosition: (json['PlayingItemPosition'] as num?)?.toInt(), startPositionTicks: (json['StartPositionTicks'] as num?)?.toInt(), ); Map _$PlayRequestDtoToJson(PlayRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlayingQueue', instance.playingQueue); writeNotNull('PlayingItemPosition', instance.playingItemPosition); writeNotNull('StartPositionTicks', instance.startPositionTicks); return val; } PlaystateMessage _$PlaystateMessageFromJson(Map json) => PlaystateMessage( data: json['Data'] == null ? null : PlaystateRequest.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PlaystateMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$PlaystateMessageToJson(PlaystateMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PlaystateRequest _$PlaystateRequestFromJson(Map json) => PlaystateRequest( command: playstateCommandNullableFromJson(json['Command']), seekPositionTicks: (json['SeekPositionTicks'] as num?)?.toInt(), controllingUserId: json['ControllingUserId'] as String?, ); Map _$PlaystateRequestToJson(PlaystateRequest instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Command', playstateCommandNullableToJson(instance.command)); writeNotNull('SeekPositionTicks', instance.seekPositionTicks); writeNotNull('ControllingUserId', instance.controllingUserId); return val; } PluginInfo _$PluginInfoFromJson(Map json) => PluginInfo( name: json['Name'] as String?, version: json['Version'] as String?, configurationFileName: json['ConfigurationFileName'] as String?, description: json['Description'] as String?, id: json['Id'] as String?, canUninstall: json['CanUninstall'] as bool?, hasImage: json['HasImage'] as bool?, status: pluginStatusNullableFromJson(json['Status']), ); Map _$PluginInfoToJson(PluginInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Version', instance.version); writeNotNull('ConfigurationFileName', instance.configurationFileName); writeNotNull('Description', instance.description); writeNotNull('Id', instance.id); writeNotNull('CanUninstall', instance.canUninstall); writeNotNull('HasImage', instance.hasImage); writeNotNull('Status', pluginStatusNullableToJson(instance.status)); return val; } PluginInstallationCancelledMessage _$PluginInstallationCancelledMessageFromJson( Map json) => PluginInstallationCancelledMessage( data: json['Data'] == null ? null : InstallationInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PluginInstallationCancelledMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$PluginInstallationCancelledMessageToJson( PluginInstallationCancelledMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PluginInstallationCompletedMessage _$PluginInstallationCompletedMessageFromJson( Map json) => PluginInstallationCompletedMessage( data: json['Data'] == null ? null : InstallationInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PluginInstallationCompletedMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$PluginInstallationCompletedMessageToJson( PluginInstallationCompletedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PluginInstallationFailedMessage _$PluginInstallationFailedMessageFromJson( Map json) => PluginInstallationFailedMessage( data: json['Data'] == null ? null : InstallationInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PluginInstallationFailedMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$PluginInstallationFailedMessageToJson( PluginInstallationFailedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PluginInstallingMessage _$PluginInstallingMessageFromJson( Map json) => PluginInstallingMessage( data: json['Data'] == null ? null : InstallationInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PluginInstallingMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$PluginInstallingMessageToJson( PluginInstallingMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PluginUninstalledMessage _$PluginUninstalledMessageFromJson( Map json) => PluginUninstalledMessage( data: json['Data'] == null ? null : PluginInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: PluginUninstalledMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$PluginUninstalledMessageToJson( PluginUninstalledMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } PreviousItemRequestDto _$PreviousItemRequestDtoFromJson( Map json) => PreviousItemRequestDto( playlistItemId: json['PlaylistItemId'] as String?, ); Map _$PreviousItemRequestDtoToJson( PreviousItemRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } ProblemDetails _$ProblemDetailsFromJson(Map json) => ProblemDetails( type: json['type'] as String?, title: json['title'] as String?, status: (json['status'] as num?)?.toInt(), detail: json['detail'] as String?, instance: json['instance'] as String?, ); Map _$ProblemDetailsToJson(ProblemDetails instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('type', instance.type); writeNotNull('title', instance.title); writeNotNull('status', instance.status); writeNotNull('detail', instance.detail); writeNotNull('instance', instance.instance); return val; } ProfileCondition _$ProfileConditionFromJson(Map json) => ProfileCondition( condition: profileConditionTypeNullableFromJson(json['Condition']), property: profileConditionValueNullableFromJson(json['Property']), $Value: json['Value'] as String?, isRequired: json['IsRequired'] as bool?, ); Map _$ProfileConditionToJson(ProfileCondition instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'Condition', profileConditionTypeNullableToJson(instance.condition)); writeNotNull( 'Property', profileConditionValueNullableToJson(instance.property)); writeNotNull('Value', instance.$Value); writeNotNull('IsRequired', instance.isRequired); return val; } PublicSystemInfo _$PublicSystemInfoFromJson(Map json) => PublicSystemInfo( localAddress: json['LocalAddress'] as String?, serverName: json['ServerName'] as String?, version: json['Version'] as String?, productName: json['ProductName'] as String?, operatingSystem: json['OperatingSystem'] as String?, id: json['Id'] as String?, startupWizardCompleted: json['StartupWizardCompleted'] as bool?, ); Map _$PublicSystemInfoToJson(PublicSystemInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('LocalAddress', instance.localAddress); writeNotNull('ServerName', instance.serverName); writeNotNull('Version', instance.version); writeNotNull('ProductName', instance.productName); writeNotNull('OperatingSystem', instance.operatingSystem); writeNotNull('Id', instance.id); writeNotNull('StartupWizardCompleted', instance.startupWizardCompleted); return val; } QueryFilters _$QueryFiltersFromJson(Map json) => QueryFilters( genres: (json['Genres'] as List?) ?.map((e) => NameGuidPair.fromJson(e as Map)) .toList() ?? [], tags: (json['Tags'] as List?)?.map((e) => e as String).toList() ?? [], ); Map _$QueryFiltersToJson(QueryFilters instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Genres', instance.genres?.map((e) => e.toJson()).toList()); writeNotNull('Tags', instance.tags); return val; } QueryFiltersLegacy _$QueryFiltersLegacyFromJson(Map json) => QueryFiltersLegacy( genres: (json['Genres'] as List?) ?.map((e) => e as String) .toList() ?? [], tags: (json['Tags'] as List?)?.map((e) => e as String).toList() ?? [], officialRatings: (json['OfficialRatings'] as List?) ?.map((e) => e as String) .toList() ?? [], years: (json['Years'] as List?) ?.map((e) => (e as num).toInt()) .toList() ?? [], ); Map _$QueryFiltersLegacyToJson(QueryFiltersLegacy instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Genres', instance.genres); writeNotNull('Tags', instance.tags); writeNotNull('OfficialRatings', instance.officialRatings); writeNotNull('Years', instance.years); return val; } QueueItem _$QueueItemFromJson(Map json) => QueueItem( id: json['Id'] as String?, playlistItemId: json['PlaylistItemId'] as String?, ); Map _$QueueItemToJson(QueueItem instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } QueueRequestDto _$QueueRequestDtoFromJson(Map json) => QueueRequestDto( itemIds: (json['ItemIds'] as List?) ?.map((e) => e as String) .toList() ?? [], mode: groupQueueModeNullableFromJson(json['Mode']), ); Map _$QueueRequestDtoToJson(QueueRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ItemIds', instance.itemIds); writeNotNull('Mode', groupQueueModeNullableToJson(instance.mode)); return val; } QuickConnectDto _$QuickConnectDtoFromJson(Map json) => QuickConnectDto( secret: json['Secret'] as String, ); Map _$QuickConnectDtoToJson(QuickConnectDto instance) => { 'Secret': instance.secret, }; QuickConnectResult _$QuickConnectResultFromJson(Map json) => QuickConnectResult( authenticated: json['Authenticated'] as bool?, secret: json['Secret'] as String?, code: json['Code'] as String?, deviceId: json['DeviceId'] as String?, deviceName: json['DeviceName'] as String?, appName: json['AppName'] as String?, appVersion: json['AppVersion'] as String?, dateAdded: json['DateAdded'] == null ? null : DateTime.parse(json['DateAdded'] as String), ); Map _$QuickConnectResultToJson(QuickConnectResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Authenticated', instance.authenticated); writeNotNull('Secret', instance.secret); writeNotNull('Code', instance.code); writeNotNull('DeviceId', instance.deviceId); writeNotNull('DeviceName', instance.deviceName); writeNotNull('AppName', instance.appName); writeNotNull('AppVersion', instance.appVersion); writeNotNull('DateAdded', instance.dateAdded?.toIso8601String()); return val; } ReadyRequestDto _$ReadyRequestDtoFromJson(Map json) => ReadyRequestDto( when: json['When'] == null ? null : DateTime.parse(json['When'] as String), positionTicks: (json['PositionTicks'] as num?)?.toInt(), isPlaying: json['IsPlaying'] as bool?, playlistItemId: json['PlaylistItemId'] as String?, ); Map _$ReadyRequestDtoToJson(ReadyRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('When', instance.when?.toIso8601String()); writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('IsPlaying', instance.isPlaying); writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } RecommendationDto _$RecommendationDtoFromJson(Map json) => RecommendationDto( items: (json['Items'] as List?) ?.map((e) => BaseItemDto.fromJson(e as Map)) .toList() ?? [], recommendationType: recommendationTypeNullableFromJson(json['RecommendationType']), baselineItemName: json['BaselineItemName'] as String?, categoryId: json['CategoryId'] as String?, ); Map _$RecommendationDtoToJson(RecommendationDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('RecommendationType', recommendationTypeNullableToJson(instance.recommendationType)); writeNotNull('BaselineItemName', instance.baselineItemName); writeNotNull('CategoryId', instance.categoryId); return val; } RefreshProgressMessage _$RefreshProgressMessageFromJson( Map json) => RefreshProgressMessage( data: json['Data'] as Map?, messageId: json['MessageId'] as String?, messageType: RefreshProgressMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$RefreshProgressMessageToJson( RefreshProgressMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } RemoteImageInfo _$RemoteImageInfoFromJson(Map json) => RemoteImageInfo( providerName: json['ProviderName'] as String?, url: json['Url'] as String?, thumbnailUrl: json['ThumbnailUrl'] as String?, height: (json['Height'] as num?)?.toInt(), width: (json['Width'] as num?)?.toInt(), communityRating: (json['CommunityRating'] as num?)?.toDouble(), voteCount: (json['VoteCount'] as num?)?.toInt(), language: json['Language'] as String?, type: imageTypeNullableFromJson(json['Type']), ratingType: ratingTypeNullableFromJson(json['RatingType']), ); Map _$RemoteImageInfoToJson(RemoteImageInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ProviderName', instance.providerName); writeNotNull('Url', instance.url); writeNotNull('ThumbnailUrl', instance.thumbnailUrl); writeNotNull('Height', instance.height); writeNotNull('Width', instance.width); writeNotNull('CommunityRating', instance.communityRating); writeNotNull('VoteCount', instance.voteCount); writeNotNull('Language', instance.language); writeNotNull('Type', imageTypeNullableToJson(instance.type)); writeNotNull('RatingType', ratingTypeNullableToJson(instance.ratingType)); return val; } RemoteImageResult _$RemoteImageResultFromJson(Map json) => RemoteImageResult( images: (json['Images'] as List?) ?.map((e) => RemoteImageInfo.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), providers: (json['Providers'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$RemoteImageResultToJson(RemoteImageResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Images', instance.images?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('Providers', instance.providers); return val; } RemoteLyricInfoDto _$RemoteLyricInfoDtoFromJson(Map json) => RemoteLyricInfoDto( id: json['Id'] as String?, providerName: json['ProviderName'] as String?, lyrics: json['Lyrics'] == null ? null : LyricDto.fromJson(json['Lyrics'] as Map), ); Map _$RemoteLyricInfoDtoToJson(RemoteLyricInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('ProviderName', instance.providerName); writeNotNull('Lyrics', instance.lyrics?.toJson()); return val; } RemoteSearchResult _$RemoteSearchResultFromJson(Map json) => RemoteSearchResult( name: json['Name'] as String?, providerIds: json['ProviderIds'] as Map?, productionYear: (json['ProductionYear'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), indexNumberEnd: (json['IndexNumberEnd'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), imageUrl: json['ImageUrl'] as String?, searchProviderName: json['SearchProviderName'] as String?, overview: json['Overview'] as String?, albumArtist: json['AlbumArtist'] == null ? null : RemoteSearchResult.fromJson( json['AlbumArtist'] as Map), artists: (json['Artists'] as List?) ?.map( (e) => RemoteSearchResult.fromJson(e as Map)) .toList() ?? [], ); Map _$RemoteSearchResultToJson(RemoteSearchResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('ProductionYear', instance.productionYear); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('IndexNumberEnd', instance.indexNumberEnd); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('ImageUrl', instance.imageUrl); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('Overview', instance.overview); writeNotNull('AlbumArtist', instance.albumArtist?.toJson()); writeNotNull('Artists', instance.artists?.map((e) => e.toJson()).toList()); return val; } RemoteSubtitleInfo _$RemoteSubtitleInfoFromJson(Map json) => RemoteSubtitleInfo( threeLetterISOLanguageName: json['ThreeLetterISOLanguageName'] as String?, id: json['Id'] as String?, providerName: json['ProviderName'] as String?, name: json['Name'] as String?, format: json['Format'] as String?, author: json['Author'] as String?, comment: json['Comment'] as String?, dateCreated: json['DateCreated'] == null ? null : DateTime.parse(json['DateCreated'] as String), communityRating: (json['CommunityRating'] as num?)?.toDouble(), frameRate: (json['FrameRate'] as num?)?.toDouble(), downloadCount: (json['DownloadCount'] as num?)?.toInt(), isHashMatch: json['IsHashMatch'] as bool?, aiTranslated: json['AiTranslated'] as bool?, machineTranslated: json['MachineTranslated'] as bool?, forced: json['Forced'] as bool?, hearingImpaired: json['HearingImpaired'] as bool?, ); Map _$RemoteSubtitleInfoToJson(RemoteSubtitleInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'ThreeLetterISOLanguageName', instance.threeLetterISOLanguageName); writeNotNull('Id', instance.id); writeNotNull('ProviderName', instance.providerName); writeNotNull('Name', instance.name); writeNotNull('Format', instance.format); writeNotNull('Author', instance.author); writeNotNull('Comment', instance.comment); writeNotNull('DateCreated', instance.dateCreated?.toIso8601String()); writeNotNull('CommunityRating', instance.communityRating); writeNotNull('FrameRate', instance.frameRate); writeNotNull('DownloadCount', instance.downloadCount); writeNotNull('IsHashMatch', instance.isHashMatch); writeNotNull('AiTranslated', instance.aiTranslated); writeNotNull('MachineTranslated', instance.machineTranslated); writeNotNull('Forced', instance.forced); writeNotNull('HearingImpaired', instance.hearingImpaired); return val; } RemoveFromPlaylistRequestDto _$RemoveFromPlaylistRequestDtoFromJson( Map json) => RemoveFromPlaylistRequestDto( playlistItemIds: (json['PlaylistItemIds'] as List?) ?.map((e) => e as String) .toList() ?? [], clearPlaylist: json['ClearPlaylist'] as bool?, clearPlayingItem: json['ClearPlayingItem'] as bool?, ); Map _$RemoveFromPlaylistRequestDtoToJson( RemoveFromPlaylistRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlaylistItemIds', instance.playlistItemIds); writeNotNull('ClearPlaylist', instance.clearPlaylist); writeNotNull('ClearPlayingItem', instance.clearPlayingItem); return val; } RepositoryInfo _$RepositoryInfoFromJson(Map json) => RepositoryInfo( name: json['Name'] as String?, url: json['Url'] as String?, enabled: json['Enabled'] as bool?, ); Map _$RepositoryInfoToJson(RepositoryInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Url', instance.url); writeNotNull('Enabled', instance.enabled); return val; } RestartRequiredMessage _$RestartRequiredMessageFromJson( Map json) => RestartRequiredMessage( messageId: json['MessageId'] as String?, messageType: RestartRequiredMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$RestartRequiredMessageToJson( RestartRequiredMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ScheduledTaskEndedMessage _$ScheduledTaskEndedMessageFromJson( Map json) => ScheduledTaskEndedMessage( data: json['Data'] == null ? null : TaskResult.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: ScheduledTaskEndedMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ScheduledTaskEndedMessageToJson( ScheduledTaskEndedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ScheduledTasksInfoMessage _$ScheduledTasksInfoMessageFromJson( Map json) => ScheduledTasksInfoMessage( data: (json['Data'] as List?) ?.map((e) => TaskInfo.fromJson(e as Map)) .toList() ?? [], messageId: json['MessageId'] as String?, messageType: ScheduledTasksInfoMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ScheduledTasksInfoMessageToJson( ScheduledTasksInfoMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.map((e) => e.toJson()).toList()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ScheduledTasksInfoStartMessage _$ScheduledTasksInfoStartMessageFromJson( Map json) => ScheduledTasksInfoStartMessage( data: json['Data'] as String?, messageType: ScheduledTasksInfoStartMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ScheduledTasksInfoStartMessageToJson( ScheduledTasksInfoStartMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ScheduledTasksInfoStopMessage _$ScheduledTasksInfoStopMessageFromJson( Map json) => ScheduledTasksInfoStopMessage( messageType: ScheduledTasksInfoStopMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ScheduledTasksInfoStopMessageToJson( ScheduledTasksInfoStopMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SearchHint _$SearchHintFromJson(Map json) => SearchHint( itemId: json['ItemId'] as String?, id: json['Id'] as String?, name: json['Name'] as String?, matchedTerm: json['MatchedTerm'] as String?, indexNumber: (json['IndexNumber'] as num?)?.toInt(), productionYear: (json['ProductionYear'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), primaryImageTag: json['PrimaryImageTag'] as String?, thumbImageTag: json['ThumbImageTag'] as String?, thumbImageItemId: json['ThumbImageItemId'] as String?, backdropImageTag: json['BackdropImageTag'] as String?, backdropImageItemId: json['BackdropImageItemId'] as String?, type: baseItemKindNullableFromJson(json['Type']), isFolder: json['IsFolder'] as bool?, runTimeTicks: (json['RunTimeTicks'] as num?)?.toInt(), mediaType: mediaTypeNullableFromJson(json['MediaType']), startDate: json['StartDate'] == null ? null : DateTime.parse(json['StartDate'] as String), endDate: json['EndDate'] == null ? null : DateTime.parse(json['EndDate'] as String), series: json['Series'] as String?, status: json['Status'] as String?, album: json['Album'] as String?, albumId: json['AlbumId'] as String?, albumArtist: json['AlbumArtist'] as String?, artists: (json['Artists'] as List?) ?.map((e) => e as String) .toList() ?? [], songCount: (json['SongCount'] as num?)?.toInt(), episodeCount: (json['EpisodeCount'] as num?)?.toInt(), channelId: json['ChannelId'] as String?, channelName: json['ChannelName'] as String?, primaryImageAspectRatio: (json['PrimaryImageAspectRatio'] as num?)?.toDouble(), ); Map _$SearchHintToJson(SearchHint instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ItemId', instance.itemId); writeNotNull('Id', instance.id); writeNotNull('Name', instance.name); writeNotNull('MatchedTerm', instance.matchedTerm); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ProductionYear', instance.productionYear); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PrimaryImageTag', instance.primaryImageTag); writeNotNull('ThumbImageTag', instance.thumbImageTag); writeNotNull('ThumbImageItemId', instance.thumbImageItemId); writeNotNull('BackdropImageTag', instance.backdropImageTag); writeNotNull('BackdropImageItemId', instance.backdropImageItemId); writeNotNull('Type', baseItemKindNullableToJson(instance.type)); writeNotNull('IsFolder', instance.isFolder); writeNotNull('RunTimeTicks', instance.runTimeTicks); writeNotNull('MediaType', mediaTypeNullableToJson(instance.mediaType)); writeNotNull('StartDate', instance.startDate?.toIso8601String()); writeNotNull('EndDate', instance.endDate?.toIso8601String()); writeNotNull('Series', instance.series); writeNotNull('Status', instance.status); writeNotNull('Album', instance.album); writeNotNull('AlbumId', instance.albumId); writeNotNull('AlbumArtist', instance.albumArtist); writeNotNull('Artists', instance.artists); writeNotNull('SongCount', instance.songCount); writeNotNull('EpisodeCount', instance.episodeCount); writeNotNull('ChannelId', instance.channelId); writeNotNull('ChannelName', instance.channelName); writeNotNull('PrimaryImageAspectRatio', instance.primaryImageAspectRatio); return val; } SearchHintResult _$SearchHintResultFromJson(Map json) => SearchHintResult( searchHints: (json['SearchHints'] as List?) ?.map((e) => SearchHint.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), ); Map _$SearchHintResultToJson(SearchHintResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'SearchHints', instance.searchHints?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); return val; } SeekRequestDto _$SeekRequestDtoFromJson(Map json) => SeekRequestDto( positionTicks: (json['PositionTicks'] as num?)?.toInt(), ); Map _$SeekRequestDtoToJson(SeekRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PositionTicks', instance.positionTicks); return val; } SendCommand _$SendCommandFromJson(Map json) => SendCommand( groupId: json['GroupId'] as String?, playlistItemId: json['PlaylistItemId'] as String?, when: json['When'] == null ? null : DateTime.parse(json['When'] as String), positionTicks: (json['PositionTicks'] as num?)?.toInt(), command: sendCommandTypeNullableFromJson(json['Command']), emittedAt: json['EmittedAt'] == null ? null : DateTime.parse(json['EmittedAt'] as String), ); Map _$SendCommandToJson(SendCommand instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('PlaylistItemId', instance.playlistItemId); writeNotNull('When', instance.when?.toIso8601String()); writeNotNull('PositionTicks', instance.positionTicks); writeNotNull('Command', sendCommandTypeNullableToJson(instance.command)); writeNotNull('EmittedAt', instance.emittedAt?.toIso8601String()); return val; } SeriesInfo _$SeriesInfoFromJson(Map json) => SeriesInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, ); Map _$SeriesInfoToJson(SeriesInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); return val; } SeriesInfoRemoteSearchQuery _$SeriesInfoRemoteSearchQueryFromJson( Map json) => SeriesInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : SeriesInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$SeriesInfoRemoteSearchQueryToJson( SeriesInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } SeriesTimerCancelledMessage _$SeriesTimerCancelledMessageFromJson( Map json) => SeriesTimerCancelledMessage( data: json['Data'] == null ? null : TimerEventInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: SeriesTimerCancelledMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$SeriesTimerCancelledMessageToJson( SeriesTimerCancelledMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SeriesTimerCreatedMessage _$SeriesTimerCreatedMessageFromJson( Map json) => SeriesTimerCreatedMessage( data: json['Data'] == null ? null : TimerEventInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: SeriesTimerCreatedMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$SeriesTimerCreatedMessageToJson( SeriesTimerCreatedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SeriesTimerInfoDto _$SeriesTimerInfoDtoFromJson(Map json) => SeriesTimerInfoDto( id: json['Id'] as String?, type: json['Type'] as String?, serverId: json['ServerId'] as String?, externalId: json['ExternalId'] as String?, channelId: json['ChannelId'] as String?, externalChannelId: json['ExternalChannelId'] as String?, channelName: json['ChannelName'] as String?, channelPrimaryImageTag: json['ChannelPrimaryImageTag'] as String?, programId: json['ProgramId'] as String?, externalProgramId: json['ExternalProgramId'] as String?, name: json['Name'] as String?, overview: json['Overview'] as String?, startDate: json['StartDate'] == null ? null : DateTime.parse(json['StartDate'] as String), endDate: json['EndDate'] == null ? null : DateTime.parse(json['EndDate'] as String), serviceName: json['ServiceName'] as String?, priority: (json['Priority'] as num?)?.toInt(), prePaddingSeconds: (json['PrePaddingSeconds'] as num?)?.toInt(), postPaddingSeconds: (json['PostPaddingSeconds'] as num?)?.toInt(), isPrePaddingRequired: json['IsPrePaddingRequired'] as bool?, parentBackdropItemId: json['ParentBackdropItemId'] as String?, parentBackdropImageTags: (json['ParentBackdropImageTags'] as List?) ?.map((e) => e as String) .toList() ?? [], isPostPaddingRequired: json['IsPostPaddingRequired'] as bool?, keepUntil: keepUntilNullableFromJson(json['KeepUntil']), recordAnyTime: json['RecordAnyTime'] as bool?, skipEpisodesInLibrary: json['SkipEpisodesInLibrary'] as bool?, recordAnyChannel: json['RecordAnyChannel'] as bool?, keepUpTo: (json['KeepUpTo'] as num?)?.toInt(), recordNewOnly: json['RecordNewOnly'] as bool?, days: dayOfWeekListFromJson(json['Days'] as List?), dayPattern: dayPatternNullableFromJson(json['DayPattern']), imageTags: json['ImageTags'] as Map?, parentThumbItemId: json['ParentThumbItemId'] as String?, parentThumbImageTag: json['ParentThumbImageTag'] as String?, parentPrimaryImageItemId: json['ParentPrimaryImageItemId'] as String?, parentPrimaryImageTag: json['ParentPrimaryImageTag'] as String?, ); Map _$SeriesTimerInfoDtoToJson(SeriesTimerInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('Type', instance.type); writeNotNull('ServerId', instance.serverId); writeNotNull('ExternalId', instance.externalId); writeNotNull('ChannelId', instance.channelId); writeNotNull('ExternalChannelId', instance.externalChannelId); writeNotNull('ChannelName', instance.channelName); writeNotNull('ChannelPrimaryImageTag', instance.channelPrimaryImageTag); writeNotNull('ProgramId', instance.programId); writeNotNull('ExternalProgramId', instance.externalProgramId); writeNotNull('Name', instance.name); writeNotNull('Overview', instance.overview); writeNotNull('StartDate', instance.startDate?.toIso8601String()); writeNotNull('EndDate', instance.endDate?.toIso8601String()); writeNotNull('ServiceName', instance.serviceName); writeNotNull('Priority', instance.priority); writeNotNull('PrePaddingSeconds', instance.prePaddingSeconds); writeNotNull('PostPaddingSeconds', instance.postPaddingSeconds); writeNotNull('IsPrePaddingRequired', instance.isPrePaddingRequired); writeNotNull('ParentBackdropItemId', instance.parentBackdropItemId); writeNotNull('ParentBackdropImageTags', instance.parentBackdropImageTags); writeNotNull('IsPostPaddingRequired', instance.isPostPaddingRequired); writeNotNull('KeepUntil', keepUntilNullableToJson(instance.keepUntil)); writeNotNull('RecordAnyTime', instance.recordAnyTime); writeNotNull('SkipEpisodesInLibrary', instance.skipEpisodesInLibrary); writeNotNull('RecordAnyChannel', instance.recordAnyChannel); writeNotNull('KeepUpTo', instance.keepUpTo); writeNotNull('RecordNewOnly', instance.recordNewOnly); val['Days'] = dayOfWeekListToJson(instance.days); writeNotNull('DayPattern', dayPatternNullableToJson(instance.dayPattern)); writeNotNull('ImageTags', instance.imageTags); writeNotNull('ParentThumbItemId', instance.parentThumbItemId); writeNotNull('ParentThumbImageTag', instance.parentThumbImageTag); writeNotNull('ParentPrimaryImageItemId', instance.parentPrimaryImageItemId); writeNotNull('ParentPrimaryImageTag', instance.parentPrimaryImageTag); return val; } SeriesTimerInfoDtoQueryResult _$SeriesTimerInfoDtoQueryResultFromJson( Map json) => SeriesTimerInfoDtoQueryResult( items: (json['Items'] as List?) ?.map( (e) => SeriesTimerInfoDto.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$SeriesTimerInfoDtoQueryResultToJson( SeriesTimerInfoDtoQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } ServerConfiguration _$ServerConfigurationFromJson(Map json) => ServerConfiguration( logFileRetentionDays: (json['LogFileRetentionDays'] as num?)?.toInt(), isStartupWizardCompleted: json['IsStartupWizardCompleted'] as bool?, cachePath: json['CachePath'] as String?, previousVersion: json['PreviousVersion'] as String?, previousVersionStr: json['PreviousVersionStr'] as String?, enableMetrics: json['EnableMetrics'] as bool?, enableNormalizedItemByNameIds: json['EnableNormalizedItemByNameIds'] as bool?, isPortAuthorized: json['IsPortAuthorized'] as bool?, quickConnectAvailable: json['QuickConnectAvailable'] as bool?, enableCaseSensitiveItemIds: json['EnableCaseSensitiveItemIds'] as bool?, disableLiveTvChannelUserDataName: json['DisableLiveTvChannelUserDataName'] as bool?, metadataPath: json['MetadataPath'] as String?, preferredMetadataLanguage: json['PreferredMetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, sortReplaceCharacters: (json['SortReplaceCharacters'] as List?) ?.map((e) => e as String) .toList() ?? [], sortRemoveCharacters: (json['SortRemoveCharacters'] as List?) ?.map((e) => e as String) .toList() ?? [], sortRemoveWords: (json['SortRemoveWords'] as List?) ?.map((e) => e as String) .toList() ?? [], minResumePct: (json['MinResumePct'] as num?)?.toInt(), maxResumePct: (json['MaxResumePct'] as num?)?.toInt(), minResumeDurationSeconds: (json['MinResumeDurationSeconds'] as num?)?.toInt(), minAudiobookResume: (json['MinAudiobookResume'] as num?)?.toInt(), maxAudiobookResume: (json['MaxAudiobookResume'] as num?)?.toInt(), inactiveSessionThreshold: (json['InactiveSessionThreshold'] as num?)?.toInt(), libraryMonitorDelay: (json['LibraryMonitorDelay'] as num?)?.toInt(), libraryUpdateDuration: (json['LibraryUpdateDuration'] as num?)?.toInt(), imageSavingConvention: imageSavingConventionNullableFromJson(json['ImageSavingConvention']), metadataOptions: (json['MetadataOptions'] as List?) ?.map((e) => MetadataOptions.fromJson(e as Map)) .toList() ?? [], skipDeserializationForBasicTypes: json['SkipDeserializationForBasicTypes'] as bool?, serverName: json['ServerName'] as String?, uICulture: json['UICulture'] as String?, saveMetadataHidden: json['SaveMetadataHidden'] as bool?, contentTypes: (json['ContentTypes'] as List?) ?.map((e) => NameValuePair.fromJson(e as Map)) .toList() ?? [], remoteClientBitrateLimit: (json['RemoteClientBitrateLimit'] as num?)?.toInt(), enableFolderView: json['EnableFolderView'] as bool?, enableGroupingIntoCollections: json['EnableGroupingIntoCollections'] as bool?, displaySpecialsWithinSeasons: json['DisplaySpecialsWithinSeasons'] as bool?, codecsUsed: (json['CodecsUsed'] as List?) ?.map((e) => e as String) .toList() ?? [], pluginRepositories: (json['PluginRepositories'] as List?) ?.map((e) => RepositoryInfo.fromJson(e as Map)) .toList() ?? [], enableExternalContentInSuggestions: json['EnableExternalContentInSuggestions'] as bool?, imageExtractionTimeoutMs: (json['ImageExtractionTimeoutMs'] as num?)?.toInt(), pathSubstitutions: (json['PathSubstitutions'] as List?) ?.map((e) => PathSubstitution.fromJson(e as Map)) .toList() ?? [], enableSlowResponseWarning: json['EnableSlowResponseWarning'] as bool?, slowResponseThresholdMs: (json['SlowResponseThresholdMs'] as num?)?.toInt(), corsHosts: (json['CorsHosts'] as List?) ?.map((e) => e as String) .toList() ?? [], activityLogRetentionDays: (json['ActivityLogRetentionDays'] as num?)?.toInt(), libraryScanFanoutConcurrency: (json['LibraryScanFanoutConcurrency'] as num?)?.toInt(), libraryMetadataRefreshConcurrency: (json['LibraryMetadataRefreshConcurrency'] as num?)?.toInt(), removeOldPlugins: json['RemoveOldPlugins'] as bool?, allowClientLogUpload: json['AllowClientLogUpload'] as bool?, dummyChapterDuration: (json['DummyChapterDuration'] as num?)?.toInt(), chapterImageResolution: imageResolutionNullableFromJson(json['ChapterImageResolution']), parallelImageEncodingLimit: (json['ParallelImageEncodingLimit'] as num?)?.toInt(), castReceiverApplications: (json['CastReceiverApplications'] as List?) ?.map((e) => CastReceiverApplication.fromJson(e as Map)) .toList() ?? [], trickplayOptions: json['TrickplayOptions'] == null ? null : TrickplayOptions.fromJson( json['TrickplayOptions'] as Map), ); Map _$ServerConfigurationToJson(ServerConfiguration instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('LogFileRetentionDays', instance.logFileRetentionDays); writeNotNull('IsStartupWizardCompleted', instance.isStartupWizardCompleted); writeNotNull('CachePath', instance.cachePath); writeNotNull('PreviousVersion', instance.previousVersion); writeNotNull('PreviousVersionStr', instance.previousVersionStr); writeNotNull('EnableMetrics', instance.enableMetrics); writeNotNull( 'EnableNormalizedItemByNameIds', instance.enableNormalizedItemByNameIds); writeNotNull('IsPortAuthorized', instance.isPortAuthorized); writeNotNull('QuickConnectAvailable', instance.quickConnectAvailable); writeNotNull( 'EnableCaseSensitiveItemIds', instance.enableCaseSensitiveItemIds); writeNotNull('DisableLiveTvChannelUserDataName', instance.disableLiveTvChannelUserDataName); writeNotNull('MetadataPath', instance.metadataPath); writeNotNull('PreferredMetadataLanguage', instance.preferredMetadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('SortReplaceCharacters', instance.sortReplaceCharacters); writeNotNull('SortRemoveCharacters', instance.sortRemoveCharacters); writeNotNull('SortRemoveWords', instance.sortRemoveWords); writeNotNull('MinResumePct', instance.minResumePct); writeNotNull('MaxResumePct', instance.maxResumePct); writeNotNull('MinResumeDurationSeconds', instance.minResumeDurationSeconds); writeNotNull('MinAudiobookResume', instance.minAudiobookResume); writeNotNull('MaxAudiobookResume', instance.maxAudiobookResume); writeNotNull('InactiveSessionThreshold', instance.inactiveSessionThreshold); writeNotNull('LibraryMonitorDelay', instance.libraryMonitorDelay); writeNotNull('LibraryUpdateDuration', instance.libraryUpdateDuration); writeNotNull('ImageSavingConvention', imageSavingConventionNullableToJson(instance.imageSavingConvention)); writeNotNull('MetadataOptions', instance.metadataOptions?.map((e) => e.toJson()).toList()); writeNotNull('SkipDeserializationForBasicTypes', instance.skipDeserializationForBasicTypes); writeNotNull('ServerName', instance.serverName); writeNotNull('UICulture', instance.uICulture); writeNotNull('SaveMetadataHidden', instance.saveMetadataHidden); writeNotNull( 'ContentTypes', instance.contentTypes?.map((e) => e.toJson()).toList()); writeNotNull('RemoteClientBitrateLimit', instance.remoteClientBitrateLimit); writeNotNull('EnableFolderView', instance.enableFolderView); writeNotNull( 'EnableGroupingIntoCollections', instance.enableGroupingIntoCollections); writeNotNull( 'DisplaySpecialsWithinSeasons', instance.displaySpecialsWithinSeasons); writeNotNull('CodecsUsed', instance.codecsUsed); writeNotNull('PluginRepositories', instance.pluginRepositories?.map((e) => e.toJson()).toList()); writeNotNull('EnableExternalContentInSuggestions', instance.enableExternalContentInSuggestions); writeNotNull('ImageExtractionTimeoutMs', instance.imageExtractionTimeoutMs); writeNotNull('PathSubstitutions', instance.pathSubstitutions?.map((e) => e.toJson()).toList()); writeNotNull('EnableSlowResponseWarning', instance.enableSlowResponseWarning); writeNotNull('SlowResponseThresholdMs', instance.slowResponseThresholdMs); writeNotNull('CorsHosts', instance.corsHosts); writeNotNull('ActivityLogRetentionDays', instance.activityLogRetentionDays); writeNotNull( 'LibraryScanFanoutConcurrency', instance.libraryScanFanoutConcurrency); writeNotNull('LibraryMetadataRefreshConcurrency', instance.libraryMetadataRefreshConcurrency); writeNotNull('RemoveOldPlugins', instance.removeOldPlugins); writeNotNull('AllowClientLogUpload', instance.allowClientLogUpload); writeNotNull('DummyChapterDuration', instance.dummyChapterDuration); writeNotNull('ChapterImageResolution', imageResolutionNullableToJson(instance.chapterImageResolution)); writeNotNull( 'ParallelImageEncodingLimit', instance.parallelImageEncodingLimit); writeNotNull('CastReceiverApplications', instance.castReceiverApplications?.map((e) => e.toJson()).toList()); writeNotNull('TrickplayOptions', instance.trickplayOptions?.toJson()); return val; } ServerDiscoveryInfo _$ServerDiscoveryInfoFromJson(Map json) => ServerDiscoveryInfo( address: json['Address'] as String?, id: json['Id'] as String?, name: json['Name'] as String?, endpointAddress: json['EndpointAddress'] as String?, ); Map _$ServerDiscoveryInfoToJson(ServerDiscoveryInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Address', instance.address); writeNotNull('Id', instance.id); writeNotNull('Name', instance.name); writeNotNull('EndpointAddress', instance.endpointAddress); return val; } ServerRestartingMessage _$ServerRestartingMessageFromJson( Map json) => ServerRestartingMessage( messageId: json['MessageId'] as String?, messageType: ServerRestartingMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$ServerRestartingMessageToJson( ServerRestartingMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } ServerShuttingDownMessage _$ServerShuttingDownMessageFromJson( Map json) => ServerShuttingDownMessage( messageId: json['MessageId'] as String?, messageType: ServerShuttingDownMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$ServerShuttingDownMessageToJson( ServerShuttingDownMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SessionInfoDto _$SessionInfoDtoFromJson(Map json) => SessionInfoDto( playState: json['PlayState'] == null ? null : PlayerStateInfo.fromJson(json['PlayState'] as Map), additionalUsers: (json['AdditionalUsers'] as List?) ?.map((e) => SessionUserInfo.fromJson(e as Map)) .toList() ?? [], capabilities: json['Capabilities'] == null ? null : ClientCapabilitiesDto.fromJson( json['Capabilities'] as Map), remoteEndPoint: json['RemoteEndPoint'] as String?, playableMediaTypes: mediaTypeListFromJson(json['PlayableMediaTypes'] as List?), id: json['Id'] as String?, userId: json['UserId'] as String?, userName: json['UserName'] as String?, $Client: json['Client'] as String?, lastActivityDate: json['LastActivityDate'] == null ? null : DateTime.parse(json['LastActivityDate'] as String), lastPlaybackCheckIn: json['LastPlaybackCheckIn'] == null ? null : DateTime.parse(json['LastPlaybackCheckIn'] as String), lastPausedDate: json['LastPausedDate'] == null ? null : DateTime.parse(json['LastPausedDate'] as String), deviceName: json['DeviceName'] as String?, deviceType: json['DeviceType'] as String?, nowPlayingItem: json['NowPlayingItem'] == null ? null : BaseItemDto.fromJson( json['NowPlayingItem'] as Map), nowViewingItem: json['NowViewingItem'] == null ? null : BaseItemDto.fromJson( json['NowViewingItem'] as Map), deviceId: json['DeviceId'] as String?, applicationVersion: json['ApplicationVersion'] as String?, transcodingInfo: json['TranscodingInfo'] == null ? null : TranscodingInfo.fromJson( json['TranscodingInfo'] as Map), isActive: json['IsActive'] as bool?, supportsMediaControl: json['SupportsMediaControl'] as bool?, supportsRemoteControl: json['SupportsRemoteControl'] as bool?, nowPlayingQueue: (json['NowPlayingQueue'] as List?) ?.map((e) => QueueItem.fromJson(e as Map)) .toList() ?? [], nowPlayingQueueFullItems: (json['NowPlayingQueueFullItems'] as List?) ?.map((e) => BaseItemDto.fromJson(e as Map)) .toList() ?? [], hasCustomDeviceName: json['HasCustomDeviceName'] as bool?, playlistItemId: json['PlaylistItemId'] as String?, serverId: json['ServerId'] as String?, userPrimaryImageTag: json['UserPrimaryImageTag'] as String?, supportedCommands: generalCommandTypeListFromJson(json['SupportedCommands'] as List?), ); Map _$SessionInfoDtoToJson(SessionInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlayState', instance.playState?.toJson()); writeNotNull('AdditionalUsers', instance.additionalUsers?.map((e) => e.toJson()).toList()); writeNotNull('Capabilities', instance.capabilities?.toJson()); writeNotNull('RemoteEndPoint', instance.remoteEndPoint); val['PlayableMediaTypes'] = mediaTypeListToJson(instance.playableMediaTypes); writeNotNull('Id', instance.id); writeNotNull('UserId', instance.userId); writeNotNull('UserName', instance.userName); writeNotNull('Client', instance.$Client); writeNotNull( 'LastActivityDate', instance.lastActivityDate?.toIso8601String()); writeNotNull( 'LastPlaybackCheckIn', instance.lastPlaybackCheckIn?.toIso8601String()); writeNotNull('LastPausedDate', instance.lastPausedDate?.toIso8601String()); writeNotNull('DeviceName', instance.deviceName); writeNotNull('DeviceType', instance.deviceType); writeNotNull('NowPlayingItem', instance.nowPlayingItem?.toJson()); writeNotNull('NowViewingItem', instance.nowViewingItem?.toJson()); writeNotNull('DeviceId', instance.deviceId); writeNotNull('ApplicationVersion', instance.applicationVersion); writeNotNull('TranscodingInfo', instance.transcodingInfo?.toJson()); writeNotNull('IsActive', instance.isActive); writeNotNull('SupportsMediaControl', instance.supportsMediaControl); writeNotNull('SupportsRemoteControl', instance.supportsRemoteControl); writeNotNull('NowPlayingQueue', instance.nowPlayingQueue?.map((e) => e.toJson()).toList()); writeNotNull('NowPlayingQueueFullItems', instance.nowPlayingQueueFullItems?.map((e) => e.toJson()).toList()); writeNotNull('HasCustomDeviceName', instance.hasCustomDeviceName); writeNotNull('PlaylistItemId', instance.playlistItemId); writeNotNull('ServerId', instance.serverId); writeNotNull('UserPrimaryImageTag', instance.userPrimaryImageTag); val['SupportedCommands'] = generalCommandTypeListToJson(instance.supportedCommands); return val; } SessionsMessage _$SessionsMessageFromJson(Map json) => SessionsMessage( data: (json['Data'] as List?) ?.map((e) => SessionInfoDto.fromJson(e as Map)) .toList() ?? [], messageId: json['MessageId'] as String?, messageType: SessionsMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$SessionsMessageToJson(SessionsMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.map((e) => e.toJson()).toList()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SessionsStartMessage _$SessionsStartMessageFromJson( Map json) => SessionsStartMessage( data: json['Data'] as String?, messageType: SessionsStartMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$SessionsStartMessageToJson( SessionsStartMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SessionsStopMessage _$SessionsStopMessageFromJson(Map json) => SessionsStopMessage( messageType: SessionsStopMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$SessionsStopMessageToJson(SessionsStopMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SessionUserInfo _$SessionUserInfoFromJson(Map json) => SessionUserInfo( userId: json['UserId'] as String?, userName: json['UserName'] as String?, ); Map _$SessionUserInfoToJson(SessionUserInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UserId', instance.userId); writeNotNull('UserName', instance.userName); return val; } SetChannelMappingDto _$SetChannelMappingDtoFromJson( Map json) => SetChannelMappingDto( providerId: json['ProviderId'] as String, tunerChannelId: json['TunerChannelId'] as String, providerChannelId: json['ProviderChannelId'] as String, ); Map _$SetChannelMappingDtoToJson( SetChannelMappingDto instance) => { 'ProviderId': instance.providerId, 'TunerChannelId': instance.tunerChannelId, 'ProviderChannelId': instance.providerChannelId, }; SetPlaylistItemRequestDto _$SetPlaylistItemRequestDtoFromJson( Map json) => SetPlaylistItemRequestDto( playlistItemId: json['PlaylistItemId'] as String?, ); Map _$SetPlaylistItemRequestDtoToJson( SetPlaylistItemRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } SetRepeatModeRequestDto _$SetRepeatModeRequestDtoFromJson( Map json) => SetRepeatModeRequestDto( mode: groupRepeatModeNullableFromJson(json['Mode']), ); Map _$SetRepeatModeRequestDtoToJson( SetRepeatModeRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Mode', groupRepeatModeNullableToJson(instance.mode)); return val; } SetShuffleModeRequestDto _$SetShuffleModeRequestDtoFromJson( Map json) => SetShuffleModeRequestDto( mode: groupShuffleModeNullableFromJson(json['Mode']), ); Map _$SetShuffleModeRequestDtoToJson( SetShuffleModeRequestDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Mode', groupShuffleModeNullableToJson(instance.mode)); return val; } SongInfo _$SongInfoFromJson(Map json) => SongInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, albumArtists: (json['AlbumArtists'] as List?) ?.map((e) => e as String) .toList() ?? [], album: json['Album'] as String?, artists: (json['Artists'] as List?) ?.map((e) => e as String) .toList() ?? [], ); Map _$SongInfoToJson(SongInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); writeNotNull('AlbumArtists', instance.albumArtists); writeNotNull('Album', instance.album); writeNotNull('Artists', instance.artists); return val; } SpecialViewOptionDto _$SpecialViewOptionDtoFromJson( Map json) => SpecialViewOptionDto( name: json['Name'] as String?, id: json['Id'] as String?, ); Map _$SpecialViewOptionDtoToJson( SpecialViewOptionDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Id', instance.id); return val; } StartupConfigurationDto _$StartupConfigurationDtoFromJson( Map json) => StartupConfigurationDto( uICulture: json['UICulture'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, preferredMetadataLanguage: json['PreferredMetadataLanguage'] as String?, ); Map _$StartupConfigurationDtoToJson( StartupConfigurationDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UICulture', instance.uICulture); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('PreferredMetadataLanguage', instance.preferredMetadataLanguage); return val; } StartupRemoteAccessDto _$StartupRemoteAccessDtoFromJson( Map json) => StartupRemoteAccessDto( enableRemoteAccess: json['EnableRemoteAccess'] as bool, enableAutomaticPortMapping: json['EnableAutomaticPortMapping'] as bool, ); Map _$StartupRemoteAccessDtoToJson( StartupRemoteAccessDto instance) => { 'EnableRemoteAccess': instance.enableRemoteAccess, 'EnableAutomaticPortMapping': instance.enableAutomaticPortMapping, }; StartupUserDto _$StartupUserDtoFromJson(Map json) => StartupUserDto( name: json['Name'] as String?, password: json['Password'] as String?, ); Map _$StartupUserDtoToJson(StartupUserDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Password', instance.password); return val; } StringGroupUpdate _$StringGroupUpdateFromJson(Map json) => StringGroupUpdate( groupId: json['GroupId'] as String?, type: groupUpdateTypeNullableFromJson(json['Type']), data: json['Data'] as String?, ); Map _$StringGroupUpdateToJson(StringGroupUpdate instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('GroupId', instance.groupId); writeNotNull('Type', groupUpdateTypeNullableToJson(instance.type)); writeNotNull('Data', instance.data); return val; } SubtitleOptions _$SubtitleOptionsFromJson(Map json) => SubtitleOptions( skipIfEmbeddedSubtitlesPresent: json['SkipIfEmbeddedSubtitlesPresent'] as bool?, skipIfAudioTrackMatches: json['SkipIfAudioTrackMatches'] as bool?, downloadLanguages: (json['DownloadLanguages'] as List?) ?.map((e) => e as String) .toList() ?? [], downloadMovieSubtitles: json['DownloadMovieSubtitles'] as bool?, downloadEpisodeSubtitles: json['DownloadEpisodeSubtitles'] as bool?, openSubtitlesUsername: json['OpenSubtitlesUsername'] as String?, openSubtitlesPasswordHash: json['OpenSubtitlesPasswordHash'] as String?, isOpenSubtitleVipAccount: json['IsOpenSubtitleVipAccount'] as bool?, requirePerfectMatch: json['RequirePerfectMatch'] as bool?, ); Map _$SubtitleOptionsToJson(SubtitleOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SkipIfEmbeddedSubtitlesPresent', instance.skipIfEmbeddedSubtitlesPresent); writeNotNull('SkipIfAudioTrackMatches', instance.skipIfAudioTrackMatches); writeNotNull('DownloadLanguages', instance.downloadLanguages); writeNotNull('DownloadMovieSubtitles', instance.downloadMovieSubtitles); writeNotNull('DownloadEpisodeSubtitles', instance.downloadEpisodeSubtitles); writeNotNull('OpenSubtitlesUsername', instance.openSubtitlesUsername); writeNotNull('OpenSubtitlesPasswordHash', instance.openSubtitlesPasswordHash); writeNotNull('IsOpenSubtitleVipAccount', instance.isOpenSubtitleVipAccount); writeNotNull('RequirePerfectMatch', instance.requirePerfectMatch); return val; } SubtitleProfile _$SubtitleProfileFromJson(Map json) => SubtitleProfile( format: json['Format'] as String?, method: subtitleDeliveryMethodNullableFromJson(json['Method']), didlMode: json['DidlMode'] as String?, language: json['Language'] as String?, container: json['Container'] as String?, ); Map _$SubtitleProfileToJson(SubtitleProfile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Format', instance.format); writeNotNull('Method', subtitleDeliveryMethodNullableToJson(instance.method)); writeNotNull('DidlMode', instance.didlMode); writeNotNull('Language', instance.language); writeNotNull('Container', instance.container); return val; } SyncPlayCommandMessage _$SyncPlayCommandMessageFromJson( Map json) => SyncPlayCommandMessage( data: json['Data'] == null ? null : SendCommand.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: SyncPlayCommandMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$SyncPlayCommandMessageToJson( SyncPlayCommandMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SyncPlayGroupUpdateCommandMessage _$SyncPlayGroupUpdateCommandMessageFromJson( Map json) => SyncPlayGroupUpdateCommandMessage( data: json['Data'] == null ? null : GroupUpdate.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: SyncPlayGroupUpdateCommandMessage .sessionMessageTypeMessageTypeNullableFromJson(json['MessageType']), ); Map _$SyncPlayGroupUpdateCommandMessageToJson( SyncPlayGroupUpdateCommandMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } SyncPlayQueueItem _$SyncPlayQueueItemFromJson(Map json) => SyncPlayQueueItem( itemId: json['ItemId'] as String?, playlistItemId: json['PlaylistItemId'] as String?, ); Map _$SyncPlayQueueItemToJson(SyncPlayQueueItem instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ItemId', instance.itemId); writeNotNull('PlaylistItemId', instance.playlistItemId); return val; } SystemInfo _$SystemInfoFromJson(Map json) => SystemInfo( localAddress: json['LocalAddress'] as String?, serverName: json['ServerName'] as String?, version: json['Version'] as String?, productName: json['ProductName'] as String?, operatingSystem: json['OperatingSystem'] as String?, id: json['Id'] as String?, startupWizardCompleted: json['StartupWizardCompleted'] as bool?, operatingSystemDisplayName: json['OperatingSystemDisplayName'] as String?, packageName: json['PackageName'] as String?, hasPendingRestart: json['HasPendingRestart'] as bool?, isShuttingDown: json['IsShuttingDown'] as bool?, supportsLibraryMonitor: json['SupportsLibraryMonitor'] as bool?, webSocketPortNumber: (json['WebSocketPortNumber'] as num?)?.toInt(), completedInstallations: (json['CompletedInstallations'] as List?) ?.map((e) => InstallationInfo.fromJson(e as Map)) .toList() ?? [], canSelfRestart: json['CanSelfRestart'] as bool? ?? true, canLaunchWebBrowser: json['CanLaunchWebBrowser'] as bool? ?? false, programDataPath: json['ProgramDataPath'] as String?, webPath: json['WebPath'] as String?, itemsByNamePath: json['ItemsByNamePath'] as String?, cachePath: json['CachePath'] as String?, logPath: json['LogPath'] as String?, internalMetadataPath: json['InternalMetadataPath'] as String?, transcodingTempPath: json['TranscodingTempPath'] as String?, castReceiverApplications: (json['CastReceiverApplications'] as List?) ?.map((e) => CastReceiverApplication.fromJson(e as Map)) .toList() ?? [], hasUpdateAvailable: json['HasUpdateAvailable'] as bool? ?? false, encoderLocation: json['EncoderLocation'] as String?, systemArchitecture: json['SystemArchitecture'] as String?, ); Map _$SystemInfoToJson(SystemInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('LocalAddress', instance.localAddress); writeNotNull('ServerName', instance.serverName); writeNotNull('Version', instance.version); writeNotNull('ProductName', instance.productName); writeNotNull('OperatingSystem', instance.operatingSystem); writeNotNull('Id', instance.id); writeNotNull('StartupWizardCompleted', instance.startupWizardCompleted); writeNotNull( 'OperatingSystemDisplayName', instance.operatingSystemDisplayName); writeNotNull('PackageName', instance.packageName); writeNotNull('HasPendingRestart', instance.hasPendingRestart); writeNotNull('IsShuttingDown', instance.isShuttingDown); writeNotNull('SupportsLibraryMonitor', instance.supportsLibraryMonitor); writeNotNull('WebSocketPortNumber', instance.webSocketPortNumber); writeNotNull('CompletedInstallations', instance.completedInstallations?.map((e) => e.toJson()).toList()); writeNotNull('CanSelfRestart', instance.canSelfRestart); writeNotNull('CanLaunchWebBrowser', instance.canLaunchWebBrowser); writeNotNull('ProgramDataPath', instance.programDataPath); writeNotNull('WebPath', instance.webPath); writeNotNull('ItemsByNamePath', instance.itemsByNamePath); writeNotNull('CachePath', instance.cachePath); writeNotNull('LogPath', instance.logPath); writeNotNull('InternalMetadataPath', instance.internalMetadataPath); writeNotNull('TranscodingTempPath', instance.transcodingTempPath); writeNotNull('CastReceiverApplications', instance.castReceiverApplications?.map((e) => e.toJson()).toList()); writeNotNull('HasUpdateAvailable', instance.hasUpdateAvailable); writeNotNull('EncoderLocation', instance.encoderLocation); writeNotNull('SystemArchitecture', instance.systemArchitecture); return val; } TaskInfo _$TaskInfoFromJson(Map json) => TaskInfo( name: json['Name'] as String?, state: taskStateNullableFromJson(json['State']), currentProgressPercentage: (json['CurrentProgressPercentage'] as num?)?.toDouble(), id: json['Id'] as String?, lastExecutionResult: json['LastExecutionResult'] == null ? null : TaskResult.fromJson( json['LastExecutionResult'] as Map), triggers: (json['Triggers'] as List?) ?.map((e) => TaskTriggerInfo.fromJson(e as Map)) .toList() ?? [], description: json['Description'] as String?, category: json['Category'] as String?, isHidden: json['IsHidden'] as bool?, key: json['Key'] as String?, ); Map _$TaskInfoToJson(TaskInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('State', taskStateNullableToJson(instance.state)); writeNotNull('CurrentProgressPercentage', instance.currentProgressPercentage); writeNotNull('Id', instance.id); writeNotNull('LastExecutionResult', instance.lastExecutionResult?.toJson()); writeNotNull('Triggers', instance.triggers?.map((e) => e.toJson()).toList()); writeNotNull('Description', instance.description); writeNotNull('Category', instance.category); writeNotNull('IsHidden', instance.isHidden); writeNotNull('Key', instance.key); return val; } TaskResult _$TaskResultFromJson(Map json) => TaskResult( startTimeUtc: json['StartTimeUtc'] == null ? null : DateTime.parse(json['StartTimeUtc'] as String), endTimeUtc: json['EndTimeUtc'] == null ? null : DateTime.parse(json['EndTimeUtc'] as String), status: taskCompletionStatusNullableFromJson(json['Status']), name: json['Name'] as String?, key: json['Key'] as String?, id: json['Id'] as String?, errorMessage: json['ErrorMessage'] as String?, longErrorMessage: json['LongErrorMessage'] as String?, ); Map _$TaskResultToJson(TaskResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('StartTimeUtc', instance.startTimeUtc?.toIso8601String()); writeNotNull('EndTimeUtc', instance.endTimeUtc?.toIso8601String()); writeNotNull('Status', taskCompletionStatusNullableToJson(instance.status)); writeNotNull('Name', instance.name); writeNotNull('Key', instance.key); writeNotNull('Id', instance.id); writeNotNull('ErrorMessage', instance.errorMessage); writeNotNull('LongErrorMessage', instance.longErrorMessage); return val; } TaskTriggerInfo _$TaskTriggerInfoFromJson(Map json) => TaskTriggerInfo( type: json['Type'] as String?, timeOfDayTicks: (json['TimeOfDayTicks'] as num?)?.toInt(), intervalTicks: (json['IntervalTicks'] as num?)?.toInt(), dayOfWeek: dayOfWeekNullableFromJson(json['DayOfWeek']), maxRuntimeTicks: (json['MaxRuntimeTicks'] as num?)?.toInt(), ); Map _$TaskTriggerInfoToJson(TaskTriggerInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Type', instance.type); writeNotNull('TimeOfDayTicks', instance.timeOfDayTicks); writeNotNull('IntervalTicks', instance.intervalTicks); writeNotNull('DayOfWeek', dayOfWeekNullableToJson(instance.dayOfWeek)); writeNotNull('MaxRuntimeTicks', instance.maxRuntimeTicks); return val; } ThemeMediaResult _$ThemeMediaResultFromJson(Map json) => ThemeMediaResult( items: (json['Items'] as List?) ?.map((e) => BaseItemDto.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ownerId: json['OwnerId'] as String?, ); Map _$ThemeMediaResultToJson(ThemeMediaResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); writeNotNull('OwnerId', instance.ownerId); return val; } TimerCancelledMessage _$TimerCancelledMessageFromJson( Map json) => TimerCancelledMessage( data: json['Data'] == null ? null : TimerEventInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: TimerCancelledMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$TimerCancelledMessageToJson( TimerCancelledMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } TimerCreatedMessage _$TimerCreatedMessageFromJson(Map json) => TimerCreatedMessage( data: json['Data'] == null ? null : TimerEventInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: TimerCreatedMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$TimerCreatedMessageToJson(TimerCreatedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } TimerEventInfo _$TimerEventInfoFromJson(Map json) => TimerEventInfo( id: json['Id'] as String?, programId: json['ProgramId'] as String?, ); Map _$TimerEventInfoToJson(TimerEventInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('ProgramId', instance.programId); return val; } TimerInfoDto _$TimerInfoDtoFromJson(Map json) => TimerInfoDto( id: json['Id'] as String?, type: json['Type'] as String?, serverId: json['ServerId'] as String?, externalId: json['ExternalId'] as String?, channelId: json['ChannelId'] as String?, externalChannelId: json['ExternalChannelId'] as String?, channelName: json['ChannelName'] as String?, channelPrimaryImageTag: json['ChannelPrimaryImageTag'] as String?, programId: json['ProgramId'] as String?, externalProgramId: json['ExternalProgramId'] as String?, name: json['Name'] as String?, overview: json['Overview'] as String?, startDate: json['StartDate'] == null ? null : DateTime.parse(json['StartDate'] as String), endDate: json['EndDate'] == null ? null : DateTime.parse(json['EndDate'] as String), serviceName: json['ServiceName'] as String?, priority: (json['Priority'] as num?)?.toInt(), prePaddingSeconds: (json['PrePaddingSeconds'] as num?)?.toInt(), postPaddingSeconds: (json['PostPaddingSeconds'] as num?)?.toInt(), isPrePaddingRequired: json['IsPrePaddingRequired'] as bool?, parentBackdropItemId: json['ParentBackdropItemId'] as String?, parentBackdropImageTags: (json['ParentBackdropImageTags'] as List?) ?.map((e) => e as String) .toList() ?? [], isPostPaddingRequired: json['IsPostPaddingRequired'] as bool?, keepUntil: keepUntilNullableFromJson(json['KeepUntil']), status: recordingStatusNullableFromJson(json['Status']), seriesTimerId: json['SeriesTimerId'] as String?, externalSeriesTimerId: json['ExternalSeriesTimerId'] as String?, runTimeTicks: (json['RunTimeTicks'] as num?)?.toInt(), programInfo: json['ProgramInfo'] == null ? null : BaseItemDto.fromJson(json['ProgramInfo'] as Map), ); Map _$TimerInfoDtoToJson(TimerInfoDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('Type', instance.type); writeNotNull('ServerId', instance.serverId); writeNotNull('ExternalId', instance.externalId); writeNotNull('ChannelId', instance.channelId); writeNotNull('ExternalChannelId', instance.externalChannelId); writeNotNull('ChannelName', instance.channelName); writeNotNull('ChannelPrimaryImageTag', instance.channelPrimaryImageTag); writeNotNull('ProgramId', instance.programId); writeNotNull('ExternalProgramId', instance.externalProgramId); writeNotNull('Name', instance.name); writeNotNull('Overview', instance.overview); writeNotNull('StartDate', instance.startDate?.toIso8601String()); writeNotNull('EndDate', instance.endDate?.toIso8601String()); writeNotNull('ServiceName', instance.serviceName); writeNotNull('Priority', instance.priority); writeNotNull('PrePaddingSeconds', instance.prePaddingSeconds); writeNotNull('PostPaddingSeconds', instance.postPaddingSeconds); writeNotNull('IsPrePaddingRequired', instance.isPrePaddingRequired); writeNotNull('ParentBackdropItemId', instance.parentBackdropItemId); writeNotNull('ParentBackdropImageTags', instance.parentBackdropImageTags); writeNotNull('IsPostPaddingRequired', instance.isPostPaddingRequired); writeNotNull('KeepUntil', keepUntilNullableToJson(instance.keepUntil)); writeNotNull('Status', recordingStatusNullableToJson(instance.status)); writeNotNull('SeriesTimerId', instance.seriesTimerId); writeNotNull('ExternalSeriesTimerId', instance.externalSeriesTimerId); writeNotNull('RunTimeTicks', instance.runTimeTicks); writeNotNull('ProgramInfo', instance.programInfo?.toJson()); return val; } TimerInfoDtoQueryResult _$TimerInfoDtoQueryResultFromJson( Map json) => TimerInfoDtoQueryResult( items: (json['Items'] as List?) ?.map((e) => TimerInfoDto.fromJson(e as Map)) .toList() ?? [], totalRecordCount: (json['TotalRecordCount'] as num?)?.toInt(), startIndex: (json['StartIndex'] as num?)?.toInt(), ); Map _$TimerInfoDtoQueryResultToJson( TimerInfoDtoQueryResult instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Items', instance.items?.map((e) => e.toJson()).toList()); writeNotNull('TotalRecordCount', instance.totalRecordCount); writeNotNull('StartIndex', instance.startIndex); return val; } TrailerInfo _$TrailerInfoFromJson(Map json) => TrailerInfo( name: json['Name'] as String?, originalTitle: json['OriginalTitle'] as String?, path: json['Path'] as String?, metadataLanguage: json['MetadataLanguage'] as String?, metadataCountryCode: json['MetadataCountryCode'] as String?, providerIds: json['ProviderIds'] as Map?, year: (json['Year'] as num?)?.toInt(), indexNumber: (json['IndexNumber'] as num?)?.toInt(), parentIndexNumber: (json['ParentIndexNumber'] as num?)?.toInt(), premiereDate: json['PremiereDate'] == null ? null : DateTime.parse(json['PremiereDate'] as String), isAutomated: json['IsAutomated'] as bool?, ); Map _$TrailerInfoToJson(TrailerInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('OriginalTitle', instance.originalTitle); writeNotNull('Path', instance.path); writeNotNull('MetadataLanguage', instance.metadataLanguage); writeNotNull('MetadataCountryCode', instance.metadataCountryCode); writeNotNull('ProviderIds', instance.providerIds); writeNotNull('Year', instance.year); writeNotNull('IndexNumber', instance.indexNumber); writeNotNull('ParentIndexNumber', instance.parentIndexNumber); writeNotNull('PremiereDate', instance.premiereDate?.toIso8601String()); writeNotNull('IsAutomated', instance.isAutomated); return val; } TrailerInfoRemoteSearchQuery _$TrailerInfoRemoteSearchQueryFromJson( Map json) => TrailerInfoRemoteSearchQuery( searchInfo: json['SearchInfo'] == null ? null : TrailerInfo.fromJson(json['SearchInfo'] as Map), itemId: json['ItemId'] as String?, searchProviderName: json['SearchProviderName'] as String?, includeDisabledProviders: json['IncludeDisabledProviders'] as bool?, ); Map _$TrailerInfoRemoteSearchQueryToJson( TrailerInfoRemoteSearchQuery instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('SearchInfo', instance.searchInfo?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('SearchProviderName', instance.searchProviderName); writeNotNull('IncludeDisabledProviders', instance.includeDisabledProviders); return val; } TranscodingInfo _$TranscodingInfoFromJson(Map json) => TranscodingInfo( audioCodec: json['AudioCodec'] as String?, videoCodec: json['VideoCodec'] as String?, container: json['Container'] as String?, isVideoDirect: json['IsVideoDirect'] as bool?, isAudioDirect: json['IsAudioDirect'] as bool?, bitrate: (json['Bitrate'] as num?)?.toInt(), framerate: (json['Framerate'] as num?)?.toDouble(), completionPercentage: (json['CompletionPercentage'] as num?)?.toDouble(), width: (json['Width'] as num?)?.toInt(), height: (json['Height'] as num?)?.toInt(), audioChannels: (json['AudioChannels'] as num?)?.toInt(), hardwareAccelerationType: hardwareAccelerationTypeNullableFromJson( json['HardwareAccelerationType']), transcodeReasons: transcodeReasonListFromJson(json['TranscodeReasons'] as List?), ); Map _$TranscodingInfoToJson(TranscodingInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('AudioCodec', instance.audioCodec); writeNotNull('VideoCodec', instance.videoCodec); writeNotNull('Container', instance.container); writeNotNull('IsVideoDirect', instance.isVideoDirect); writeNotNull('IsAudioDirect', instance.isAudioDirect); writeNotNull('Bitrate', instance.bitrate); writeNotNull('Framerate', instance.framerate); writeNotNull('CompletionPercentage', instance.completionPercentage); writeNotNull('Width', instance.width); writeNotNull('Height', instance.height); writeNotNull('AudioChannels', instance.audioChannels); writeNotNull( 'HardwareAccelerationType', hardwareAccelerationTypeNullableToJson( instance.hardwareAccelerationType)); val['TranscodeReasons'] = transcodeReasonListToJson(instance.transcodeReasons); return val; } TranscodingProfile _$TranscodingProfileFromJson(Map json) => TranscodingProfile( container: json['Container'] as String?, type: dlnaProfileTypeNullableFromJson(json['Type']), videoCodec: json['VideoCodec'] as String?, audioCodec: json['AudioCodec'] as String?, protocol: mediaStreamProtocolNullableFromJson(json['Protocol']), estimateContentLength: json['EstimateContentLength'] as bool? ?? false, enableMpegtsM2TsMode: json['EnableMpegtsM2TsMode'] as bool? ?? false, transcodeSeekInfo: TranscodingProfile.transcodeSeekInfoTranscodeSeekInfoNullableFromJson( json['TranscodeSeekInfo']), copyTimestamps: json['CopyTimestamps'] as bool? ?? false, context: TranscodingProfile.encodingContextContextNullableFromJson( json['Context']), enableSubtitlesInManifest: json['EnableSubtitlesInManifest'] as bool? ?? false, maxAudioChannels: json['MaxAudioChannels'] as String?, minSegments: (json['MinSegments'] as num?)?.toInt(), segmentLength: (json['SegmentLength'] as num?)?.toInt(), breakOnNonKeyFrames: json['BreakOnNonKeyFrames'] as bool? ?? false, conditions: (json['Conditions'] as List?) ?.map((e) => ProfileCondition.fromJson(e as Map)) .toList() ?? [], enableAudioVbrEncoding: json['EnableAudioVbrEncoding'] as bool? ?? true, ); Map _$TranscodingProfileToJson(TranscodingProfile instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Container', instance.container); writeNotNull('Type', dlnaProfileTypeNullableToJson(instance.type)); writeNotNull('VideoCodec', instance.videoCodec); writeNotNull('AudioCodec', instance.audioCodec); writeNotNull( 'Protocol', mediaStreamProtocolNullableToJson(instance.protocol)); writeNotNull('EstimateContentLength', instance.estimateContentLength); writeNotNull('EnableMpegtsM2TsMode', instance.enableMpegtsM2TsMode); writeNotNull('TranscodeSeekInfo', transcodeSeekInfoNullableToJson(instance.transcodeSeekInfo)); writeNotNull('CopyTimestamps', instance.copyTimestamps); writeNotNull('Context', encodingContextNullableToJson(instance.context)); writeNotNull('EnableSubtitlesInManifest', instance.enableSubtitlesInManifest); writeNotNull('MaxAudioChannels', instance.maxAudioChannels); writeNotNull('MinSegments', instance.minSegments); writeNotNull('SegmentLength', instance.segmentLength); writeNotNull('BreakOnNonKeyFrames', instance.breakOnNonKeyFrames); writeNotNull( 'Conditions', instance.conditions?.map((e) => e.toJson()).toList()); writeNotNull('EnableAudioVbrEncoding', instance.enableAudioVbrEncoding); return val; } TrickplayInfo _$TrickplayInfoFromJson(Map json) => TrickplayInfo( width: (json['Width'] as num?)?.toInt(), height: (json['Height'] as num?)?.toInt(), tileWidth: (json['TileWidth'] as num?)?.toInt(), tileHeight: (json['TileHeight'] as num?)?.toInt(), thumbnailCount: (json['ThumbnailCount'] as num?)?.toInt(), interval: (json['Interval'] as num?)?.toInt(), bandwidth: (json['Bandwidth'] as num?)?.toInt(), ); Map _$TrickplayInfoToJson(TrickplayInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Width', instance.width); writeNotNull('Height', instance.height); writeNotNull('TileWidth', instance.tileWidth); writeNotNull('TileHeight', instance.tileHeight); writeNotNull('ThumbnailCount', instance.thumbnailCount); writeNotNull('Interval', instance.interval); writeNotNull('Bandwidth', instance.bandwidth); return val; } TrickplayOptions _$TrickplayOptionsFromJson(Map json) => TrickplayOptions( enableHwAcceleration: json['EnableHwAcceleration'] as bool?, enableHwEncoding: json['EnableHwEncoding'] as bool?, enableKeyFrameOnlyExtraction: json['EnableKeyFrameOnlyExtraction'] as bool?, scanBehavior: trickplayScanBehaviorNullableFromJson(json['ScanBehavior']), processPriority: processPriorityClassNullableFromJson(json['ProcessPriority']), interval: (json['Interval'] as num?)?.toInt(), widthResolutions: (json['WidthResolutions'] as List?) ?.map((e) => (e as num).toInt()) .toList() ?? [], tileWidth: (json['TileWidth'] as num?)?.toInt(), tileHeight: (json['TileHeight'] as num?)?.toInt(), qscale: (json['Qscale'] as num?)?.toInt(), jpegQuality: (json['JpegQuality'] as num?)?.toInt(), processThreads: (json['ProcessThreads'] as num?)?.toInt(), ); Map _$TrickplayOptionsToJson(TrickplayOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('EnableHwAcceleration', instance.enableHwAcceleration); writeNotNull('EnableHwEncoding', instance.enableHwEncoding); writeNotNull( 'EnableKeyFrameOnlyExtraction', instance.enableKeyFrameOnlyExtraction); writeNotNull('ScanBehavior', trickplayScanBehaviorNullableToJson(instance.scanBehavior)); writeNotNull('ProcessPriority', processPriorityClassNullableToJson(instance.processPriority)); writeNotNull('Interval', instance.interval); writeNotNull('WidthResolutions', instance.widthResolutions); writeNotNull('TileWidth', instance.tileWidth); writeNotNull('TileHeight', instance.tileHeight); writeNotNull('Qscale', instance.qscale); writeNotNull('JpegQuality', instance.jpegQuality); writeNotNull('ProcessThreads', instance.processThreads); return val; } TunerChannelMapping _$TunerChannelMappingFromJson(Map json) => TunerChannelMapping( name: json['Name'] as String?, providerChannelName: json['ProviderChannelName'] as String?, providerChannelId: json['ProviderChannelId'] as String?, id: json['Id'] as String?, ); Map _$TunerChannelMappingToJson(TunerChannelMapping instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('ProviderChannelName', instance.providerChannelName); writeNotNull('ProviderChannelId', instance.providerChannelId); writeNotNull('Id', instance.id); return val; } TunerHostInfo _$TunerHostInfoFromJson(Map json) => TunerHostInfo( id: json['Id'] as String?, url: json['Url'] as String?, type: json['Type'] as String?, deviceId: json['DeviceId'] as String?, friendlyName: json['FriendlyName'] as String?, importFavoritesOnly: json['ImportFavoritesOnly'] as bool?, allowHWTranscoding: json['AllowHWTranscoding'] as bool?, allowFmp4TranscodingContainer: json['AllowFmp4TranscodingContainer'] as bool?, allowStreamSharing: json['AllowStreamSharing'] as bool?, fallbackMaxStreamingBitrate: (json['FallbackMaxStreamingBitrate'] as num?)?.toInt(), enableStreamLooping: json['EnableStreamLooping'] as bool?, source: json['Source'] as String?, tunerCount: (json['TunerCount'] as num?)?.toInt(), userAgent: json['UserAgent'] as String?, ignoreDts: json['IgnoreDts'] as bool?, ); Map _$TunerHostInfoToJson(TunerHostInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('Url', instance.url); writeNotNull('Type', instance.type); writeNotNull('DeviceId', instance.deviceId); writeNotNull('FriendlyName', instance.friendlyName); writeNotNull('ImportFavoritesOnly', instance.importFavoritesOnly); writeNotNull('AllowHWTranscoding', instance.allowHWTranscoding); writeNotNull( 'AllowFmp4TranscodingContainer', instance.allowFmp4TranscodingContainer); writeNotNull('AllowStreamSharing', instance.allowStreamSharing); writeNotNull( 'FallbackMaxStreamingBitrate', instance.fallbackMaxStreamingBitrate); writeNotNull('EnableStreamLooping', instance.enableStreamLooping); writeNotNull('Source', instance.source); writeNotNull('TunerCount', instance.tunerCount); writeNotNull('UserAgent', instance.userAgent); writeNotNull('IgnoreDts', instance.ignoreDts); return val; } TypeOptions _$TypeOptionsFromJson(Map json) => TypeOptions( type: json['Type'] as String?, metadataFetchers: (json['MetadataFetchers'] as List?) ?.map((e) => e as String) .toList() ?? [], metadataFetcherOrder: (json['MetadataFetcherOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], imageFetchers: (json['ImageFetchers'] as List?) ?.map((e) => e as String) .toList() ?? [], imageFetcherOrder: (json['ImageFetcherOrder'] as List?) ?.map((e) => e as String) .toList() ?? [], imageOptions: (json['ImageOptions'] as List?) ?.map((e) => ImageOption.fromJson(e as Map)) .toList() ?? [], ); Map _$TypeOptionsToJson(TypeOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Type', instance.type); writeNotNull('MetadataFetchers', instance.metadataFetchers); writeNotNull('MetadataFetcherOrder', instance.metadataFetcherOrder); writeNotNull('ImageFetchers', instance.imageFetchers); writeNotNull('ImageFetcherOrder', instance.imageFetcherOrder); writeNotNull( 'ImageOptions', instance.imageOptions?.map((e) => e.toJson()).toList()); return val; } UpdateLibraryOptionsDto _$UpdateLibraryOptionsDtoFromJson( Map json) => UpdateLibraryOptionsDto( id: json['Id'] as String?, libraryOptions: json['LibraryOptions'] == null ? null : LibraryOptions.fromJson( json['LibraryOptions'] as Map), ); Map _$UpdateLibraryOptionsDtoToJson( UpdateLibraryOptionsDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Id', instance.id); writeNotNull('LibraryOptions', instance.libraryOptions?.toJson()); return val; } UpdateMediaPathRequestDto _$UpdateMediaPathRequestDtoFromJson( Map json) => UpdateMediaPathRequestDto( name: json['Name'] as String, pathInfo: MediaPathInfo.fromJson(json['PathInfo'] as Map), ); Map _$UpdateMediaPathRequestDtoToJson( UpdateMediaPathRequestDto instance) => { 'Name': instance.name, 'PathInfo': instance.pathInfo.toJson(), }; UpdatePlaylistDto _$UpdatePlaylistDtoFromJson(Map json) => UpdatePlaylistDto( name: json['Name'] as String?, ids: (json['Ids'] as List?)?.map((e) => e as String).toList() ?? [], users: (json['Users'] as List?) ?.map((e) => PlaylistUserPermissions.fromJson(e as Map)) .toList() ?? [], isPublic: json['IsPublic'] as bool?, ); Map _$UpdatePlaylistDtoToJson(UpdatePlaylistDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Ids', instance.ids); writeNotNull('Users', instance.users?.map((e) => e.toJson()).toList()); writeNotNull('IsPublic', instance.isPublic); return val; } UpdatePlaylistUserDto _$UpdatePlaylistUserDtoFromJson( Map json) => UpdatePlaylistUserDto( canEdit: json['CanEdit'] as bool?, ); Map _$UpdatePlaylistUserDtoToJson( UpdatePlaylistUserDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('CanEdit', instance.canEdit); return val; } UpdateUserItemDataDto _$UpdateUserItemDataDtoFromJson( Map json) => UpdateUserItemDataDto( rating: (json['Rating'] as num?)?.toDouble(), playedPercentage: (json['PlayedPercentage'] as num?)?.toDouble(), unplayedItemCount: (json['UnplayedItemCount'] as num?)?.toInt(), playbackPositionTicks: (json['PlaybackPositionTicks'] as num?)?.toInt(), playCount: (json['PlayCount'] as num?)?.toInt(), isFavorite: json['IsFavorite'] as bool?, likes: json['Likes'] as bool?, lastPlayedDate: json['LastPlayedDate'] == null ? null : DateTime.parse(json['LastPlayedDate'] as String), played: json['Played'] as bool?, key: json['Key'] as String?, itemId: json['ItemId'] as String?, ); Map _$UpdateUserItemDataDtoToJson( UpdateUserItemDataDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Rating', instance.rating); writeNotNull('PlayedPercentage', instance.playedPercentage); writeNotNull('UnplayedItemCount', instance.unplayedItemCount); writeNotNull('PlaybackPositionTicks', instance.playbackPositionTicks); writeNotNull('PlayCount', instance.playCount); writeNotNull('IsFavorite', instance.isFavorite); writeNotNull('Likes', instance.likes); writeNotNull('LastPlayedDate', instance.lastPlayedDate?.toIso8601String()); writeNotNull('Played', instance.played); writeNotNull('Key', instance.key); writeNotNull('ItemId', instance.itemId); return val; } UpdateUserPassword _$UpdateUserPasswordFromJson(Map json) => UpdateUserPassword( currentPassword: json['CurrentPassword'] as String?, currentPw: json['CurrentPw'] as String?, newPw: json['NewPw'] as String?, resetPassword: json['ResetPassword'] as bool?, ); Map _$UpdateUserPasswordToJson(UpdateUserPassword instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('CurrentPassword', instance.currentPassword); writeNotNull('CurrentPw', instance.currentPw); writeNotNull('NewPw', instance.newPw); writeNotNull('ResetPassword', instance.resetPassword); return val; } UploadSubtitleDto _$UploadSubtitleDtoFromJson(Map json) => UploadSubtitleDto( language: json['Language'] as String, format: json['Format'] as String, isForced: json['IsForced'] as bool, isHearingImpaired: json['IsHearingImpaired'] as bool, data: json['Data'] as String, ); Map _$UploadSubtitleDtoToJson(UploadSubtitleDto instance) => { 'Language': instance.language, 'Format': instance.format, 'IsForced': instance.isForced, 'IsHearingImpaired': instance.isHearingImpaired, 'Data': instance.data, }; UserConfiguration _$UserConfigurationFromJson(Map json) => UserConfiguration( audioLanguagePreference: json['AudioLanguagePreference'] as String?, playDefaultAudioTrack: json['PlayDefaultAudioTrack'] as bool?, subtitleLanguagePreference: json['SubtitleLanguagePreference'] as String?, displayMissingEpisodes: json['DisplayMissingEpisodes'] as bool?, groupedFolders: (json['GroupedFolders'] as List?) ?.map((e) => e as String) .toList() ?? [], subtitleMode: subtitlePlaybackModeNullableFromJson(json['SubtitleMode']), displayCollectionsView: json['DisplayCollectionsView'] as bool?, enableLocalPassword: json['EnableLocalPassword'] as bool?, orderedViews: (json['OrderedViews'] as List?) ?.map((e) => e as String) .toList() ?? [], latestItemsExcludes: (json['LatestItemsExcludes'] as List?) ?.map((e) => e as String) .toList() ?? [], myMediaExcludes: (json['MyMediaExcludes'] as List?) ?.map((e) => e as String) .toList() ?? [], hidePlayedInLatest: json['HidePlayedInLatest'] as bool?, rememberAudioSelections: json['RememberAudioSelections'] as bool?, rememberSubtitleSelections: json['RememberSubtitleSelections'] as bool?, enableNextEpisodeAutoPlay: json['EnableNextEpisodeAutoPlay'] as bool?, castReceiverId: json['CastReceiverId'] as String?, ); Map _$UserConfigurationToJson(UserConfiguration instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('AudioLanguagePreference', instance.audioLanguagePreference); writeNotNull('PlayDefaultAudioTrack', instance.playDefaultAudioTrack); writeNotNull( 'SubtitleLanguagePreference', instance.subtitleLanguagePreference); writeNotNull('DisplayMissingEpisodes', instance.displayMissingEpisodes); writeNotNull('GroupedFolders', instance.groupedFolders); writeNotNull('SubtitleMode', subtitlePlaybackModeNullableToJson(instance.subtitleMode)); writeNotNull('DisplayCollectionsView', instance.displayCollectionsView); writeNotNull('EnableLocalPassword', instance.enableLocalPassword); writeNotNull('OrderedViews', instance.orderedViews); writeNotNull('LatestItemsExcludes', instance.latestItemsExcludes); writeNotNull('MyMediaExcludes', instance.myMediaExcludes); writeNotNull('HidePlayedInLatest', instance.hidePlayedInLatest); writeNotNull('RememberAudioSelections', instance.rememberAudioSelections); writeNotNull( 'RememberSubtitleSelections', instance.rememberSubtitleSelections); writeNotNull('EnableNextEpisodeAutoPlay', instance.enableNextEpisodeAutoPlay); writeNotNull('CastReceiverId', instance.castReceiverId); return val; } UserDataChangedMessage _$UserDataChangedMessageFromJson( Map json) => UserDataChangedMessage( data: json['Data'] == null ? null : UserDataChangeInfo.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: UserDataChangedMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$UserDataChangedMessageToJson( UserDataChangedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } UserDataChangeInfo _$UserDataChangeInfoFromJson(Map json) => UserDataChangeInfo( userId: json['UserId'] as String?, userDataList: (json['UserDataList'] as List?) ?.map((e) => UserItemDataDto.fromJson(e as Map)) .toList() ?? [], ); Map _$UserDataChangeInfoToJson(UserDataChangeInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UserId', instance.userId); writeNotNull( 'UserDataList', instance.userDataList?.map((e) => e.toJson()).toList()); return val; } UserDeletedMessage _$UserDeletedMessageFromJson(Map json) => UserDeletedMessage( data: json['Data'] as String?, messageId: json['MessageId'] as String?, messageType: UserDeletedMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$UserDeletedMessageToJson(UserDeletedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } UserDto _$UserDtoFromJson(Map json) => UserDto( name: json['Name'] as String?, serverId: json['ServerId'] as String?, serverName: json['ServerName'] as String?, id: json['Id'] as String?, primaryImageTag: json['PrimaryImageTag'] as String?, hasPassword: json['HasPassword'] as bool?, hasConfiguredPassword: json['HasConfiguredPassword'] as bool?, hasConfiguredEasyPassword: json['HasConfiguredEasyPassword'] as bool?, enableAutoLogin: json['EnableAutoLogin'] as bool?, lastLoginDate: json['LastLoginDate'] == null ? null : DateTime.parse(json['LastLoginDate'] as String), lastActivityDate: json['LastActivityDate'] == null ? null : DateTime.parse(json['LastActivityDate'] as String), configuration: json['Configuration'] == null ? null : UserConfiguration.fromJson( json['Configuration'] as Map), policy: json['Policy'] == null ? null : UserPolicy.fromJson(json['Policy'] as Map), primaryImageAspectRatio: (json['PrimaryImageAspectRatio'] as num?)?.toDouble(), ); Map _$UserDtoToJson(UserDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('ServerId', instance.serverId); writeNotNull('ServerName', instance.serverName); writeNotNull('Id', instance.id); writeNotNull('PrimaryImageTag', instance.primaryImageTag); writeNotNull('HasPassword', instance.hasPassword); writeNotNull('HasConfiguredPassword', instance.hasConfiguredPassword); writeNotNull('HasConfiguredEasyPassword', instance.hasConfiguredEasyPassword); writeNotNull('EnableAutoLogin', instance.enableAutoLogin); writeNotNull('LastLoginDate', instance.lastLoginDate?.toIso8601String()); writeNotNull( 'LastActivityDate', instance.lastActivityDate?.toIso8601String()); writeNotNull('Configuration', instance.configuration?.toJson()); writeNotNull('Policy', instance.policy?.toJson()); writeNotNull('PrimaryImageAspectRatio', instance.primaryImageAspectRatio); return val; } UserItemDataDto _$UserItemDataDtoFromJson(Map json) => UserItemDataDto( rating: (json['Rating'] as num?)?.toDouble(), playedPercentage: (json['PlayedPercentage'] as num?)?.toDouble(), unplayedItemCount: (json['UnplayedItemCount'] as num?)?.toInt(), playbackPositionTicks: (json['PlaybackPositionTicks'] as num?)?.toInt(), playCount: (json['PlayCount'] as num?)?.toInt(), isFavorite: json['IsFavorite'] as bool?, likes: json['Likes'] as bool?, lastPlayedDate: json['LastPlayedDate'] == null ? null : DateTime.parse(json['LastPlayedDate'] as String), played: json['Played'] as bool?, key: json['Key'] as String?, itemId: json['ItemId'] as String?, ); Map _$UserItemDataDtoToJson(UserItemDataDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Rating', instance.rating); writeNotNull('PlayedPercentage', instance.playedPercentage); writeNotNull('UnplayedItemCount', instance.unplayedItemCount); writeNotNull('PlaybackPositionTicks', instance.playbackPositionTicks); writeNotNull('PlayCount', instance.playCount); writeNotNull('IsFavorite', instance.isFavorite); writeNotNull('Likes', instance.likes); writeNotNull('LastPlayedDate', instance.lastPlayedDate?.toIso8601String()); writeNotNull('Played', instance.played); writeNotNull('Key', instance.key); writeNotNull('ItemId', instance.itemId); return val; } UserPolicy _$UserPolicyFromJson(Map json) => UserPolicy( isAdministrator: json['IsAdministrator'] as bool?, isHidden: json['IsHidden'] as bool?, enableCollectionManagement: json['EnableCollectionManagement'] as bool? ?? false, enableSubtitleManagement: json['EnableSubtitleManagement'] as bool? ?? false, enableLyricManagement: json['EnableLyricManagement'] as bool? ?? false, isDisabled: json['IsDisabled'] as bool?, maxParentalRating: (json['MaxParentalRating'] as num?)?.toInt(), blockedTags: (json['BlockedTags'] as List?) ?.map((e) => e as String) .toList() ?? [], allowedTags: (json['AllowedTags'] as List?) ?.map((e) => e as String) .toList() ?? [], enableUserPreferenceAccess: json['EnableUserPreferenceAccess'] as bool?, accessSchedules: (json['AccessSchedules'] as List?) ?.map((e) => AccessSchedule.fromJson(e as Map)) .toList() ?? [], blockUnratedItems: unratedItemListFromJson(json['BlockUnratedItems'] as List?), enableRemoteControlOfOtherUsers: json['EnableRemoteControlOfOtherUsers'] as bool?, enableSharedDeviceControl: json['EnableSharedDeviceControl'] as bool?, enableRemoteAccess: json['EnableRemoteAccess'] as bool?, enableLiveTvManagement: json['EnableLiveTvManagement'] as bool?, enableLiveTvAccess: json['EnableLiveTvAccess'] as bool?, enableMediaPlayback: json['EnableMediaPlayback'] as bool?, enableAudioPlaybackTranscoding: json['EnableAudioPlaybackTranscoding'] as bool?, enableVideoPlaybackTranscoding: json['EnableVideoPlaybackTranscoding'] as bool?, enablePlaybackRemuxing: json['EnablePlaybackRemuxing'] as bool?, forceRemoteSourceTranscoding: json['ForceRemoteSourceTranscoding'] as bool?, enableContentDeletion: json['EnableContentDeletion'] as bool?, enableContentDeletionFromFolders: (json['EnableContentDeletionFromFolders'] as List?) ?.map((e) => e as String) .toList() ?? [], enableContentDownloading: json['EnableContentDownloading'] as bool?, enableSyncTranscoding: json['EnableSyncTranscoding'] as bool?, enableMediaConversion: json['EnableMediaConversion'] as bool?, enabledDevices: (json['EnabledDevices'] as List?) ?.map((e) => e as String) .toList() ?? [], enableAllDevices: json['EnableAllDevices'] as bool?, enabledChannels: (json['EnabledChannels'] as List?) ?.map((e) => e as String) .toList() ?? [], enableAllChannels: json['EnableAllChannels'] as bool?, enabledFolders: (json['EnabledFolders'] as List?) ?.map((e) => e as String) .toList() ?? [], enableAllFolders: json['EnableAllFolders'] as bool?, invalidLoginAttemptCount: (json['InvalidLoginAttemptCount'] as num?)?.toInt(), loginAttemptsBeforeLockout: (json['LoginAttemptsBeforeLockout'] as num?)?.toInt(), maxActiveSessions: (json['MaxActiveSessions'] as num?)?.toInt(), enablePublicSharing: json['EnablePublicSharing'] as bool?, blockedMediaFolders: (json['BlockedMediaFolders'] as List?) ?.map((e) => e as String) .toList() ?? [], blockedChannels: (json['BlockedChannels'] as List?) ?.map((e) => e as String) .toList() ?? [], remoteClientBitrateLimit: (json['RemoteClientBitrateLimit'] as num?)?.toInt(), authenticationProviderId: json['AuthenticationProviderId'] as String, passwordResetProviderId: json['PasswordResetProviderId'] as String, syncPlayAccess: syncPlayUserAccessTypeNullableFromJson(json['SyncPlayAccess']), ); Map _$UserPolicyToJson(UserPolicy instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('IsAdministrator', instance.isAdministrator); writeNotNull('IsHidden', instance.isHidden); writeNotNull( 'EnableCollectionManagement', instance.enableCollectionManagement); writeNotNull('EnableSubtitleManagement', instance.enableSubtitleManagement); writeNotNull('EnableLyricManagement', instance.enableLyricManagement); writeNotNull('IsDisabled', instance.isDisabled); writeNotNull('MaxParentalRating', instance.maxParentalRating); writeNotNull('BlockedTags', instance.blockedTags); writeNotNull('AllowedTags', instance.allowedTags); writeNotNull( 'EnableUserPreferenceAccess', instance.enableUserPreferenceAccess); writeNotNull('AccessSchedules', instance.accessSchedules?.map((e) => e.toJson()).toList()); val['BlockUnratedItems'] = unratedItemListToJson(instance.blockUnratedItems); writeNotNull('EnableRemoteControlOfOtherUsers', instance.enableRemoteControlOfOtherUsers); writeNotNull('EnableSharedDeviceControl', instance.enableSharedDeviceControl); writeNotNull('EnableRemoteAccess', instance.enableRemoteAccess); writeNotNull('EnableLiveTvManagement', instance.enableLiveTvManagement); writeNotNull('EnableLiveTvAccess', instance.enableLiveTvAccess); writeNotNull('EnableMediaPlayback', instance.enableMediaPlayback); writeNotNull('EnableAudioPlaybackTranscoding', instance.enableAudioPlaybackTranscoding); writeNotNull('EnableVideoPlaybackTranscoding', instance.enableVideoPlaybackTranscoding); writeNotNull('EnablePlaybackRemuxing', instance.enablePlaybackRemuxing); writeNotNull( 'ForceRemoteSourceTranscoding', instance.forceRemoteSourceTranscoding); writeNotNull('EnableContentDeletion', instance.enableContentDeletion); writeNotNull('EnableContentDeletionFromFolders', instance.enableContentDeletionFromFolders); writeNotNull('EnableContentDownloading', instance.enableContentDownloading); writeNotNull('EnableSyncTranscoding', instance.enableSyncTranscoding); writeNotNull('EnableMediaConversion', instance.enableMediaConversion); writeNotNull('EnabledDevices', instance.enabledDevices); writeNotNull('EnableAllDevices', instance.enableAllDevices); writeNotNull('EnabledChannels', instance.enabledChannels); writeNotNull('EnableAllChannels', instance.enableAllChannels); writeNotNull('EnabledFolders', instance.enabledFolders); writeNotNull('EnableAllFolders', instance.enableAllFolders); writeNotNull('InvalidLoginAttemptCount', instance.invalidLoginAttemptCount); writeNotNull( 'LoginAttemptsBeforeLockout', instance.loginAttemptsBeforeLockout); writeNotNull('MaxActiveSessions', instance.maxActiveSessions); writeNotNull('EnablePublicSharing', instance.enablePublicSharing); writeNotNull('BlockedMediaFolders', instance.blockedMediaFolders); writeNotNull('BlockedChannels', instance.blockedChannels); writeNotNull('RemoteClientBitrateLimit', instance.remoteClientBitrateLimit); val['AuthenticationProviderId'] = instance.authenticationProviderId; val['PasswordResetProviderId'] = instance.passwordResetProviderId; writeNotNull('SyncPlayAccess', syncPlayUserAccessTypeNullableToJson(instance.syncPlayAccess)); return val; } UserUpdatedMessage _$UserUpdatedMessageFromJson(Map json) => UserUpdatedMessage( data: json['Data'] == null ? null : UserDto.fromJson(json['Data'] as Map), messageId: json['MessageId'] as String?, messageType: UserUpdatedMessage.sessionMessageTypeMessageTypeNullableFromJson( json['MessageType']), ); Map _$UserUpdatedMessageToJson(UserUpdatedMessage instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Data', instance.data?.toJson()); writeNotNull('MessageId', instance.messageId); writeNotNull( 'MessageType', sessionMessageTypeNullableToJson(instance.messageType)); return val; } UtcTimeResponse _$UtcTimeResponseFromJson(Map json) => UtcTimeResponse( requestReceptionTime: json['RequestReceptionTime'] == null ? null : DateTime.parse(json['RequestReceptionTime'] as String), responseTransmissionTime: json['ResponseTransmissionTime'] == null ? null : DateTime.parse(json['ResponseTransmissionTime'] as String), ); Map _$UtcTimeResponseToJson(UtcTimeResponse instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull( 'RequestReceptionTime', instance.requestReceptionTime?.toIso8601String()); writeNotNull('ResponseTransmissionTime', instance.responseTransmissionTime?.toIso8601String()); return val; } ValidatePathDto _$ValidatePathDtoFromJson(Map json) => ValidatePathDto( validateWritable: json['ValidateWritable'] as bool?, path: json['Path'] as String?, isFile: json['IsFile'] as bool?, ); Map _$ValidatePathDtoToJson(ValidatePathDto instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('ValidateWritable', instance.validateWritable); writeNotNull('Path', instance.path); writeNotNull('IsFile', instance.isFile); return val; } VersionInfo _$VersionInfoFromJson(Map json) => VersionInfo( version: json['version'] as String?, versionNumber: json['VersionNumber'] as String?, changelog: json['changelog'] as String?, targetAbi: json['targetAbi'] as String?, sourceUrl: json['sourceUrl'] as String?, checksum: json['checksum'] as String?, timestamp: json['timestamp'] as String?, repositoryName: json['repositoryName'] as String?, repositoryUrl: json['repositoryUrl'] as String?, ); Map _$VersionInfoToJson(VersionInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('version', instance.version); writeNotNull('VersionNumber', instance.versionNumber); writeNotNull('changelog', instance.changelog); writeNotNull('targetAbi', instance.targetAbi); writeNotNull('sourceUrl', instance.sourceUrl); writeNotNull('checksum', instance.checksum); writeNotNull('timestamp', instance.timestamp); writeNotNull('repositoryName', instance.repositoryName); writeNotNull('repositoryUrl', instance.repositoryUrl); return val; } VirtualFolderInfo _$VirtualFolderInfoFromJson(Map json) => VirtualFolderInfo( name: json['Name'] as String?, locations: (json['Locations'] as List?) ?.map((e) => e as String) .toList() ?? [], collectionType: collectionTypeOptionsNullableFromJson(json['CollectionType']), libraryOptions: json['LibraryOptions'] == null ? null : LibraryOptions.fromJson( json['LibraryOptions'] as Map), itemId: json['ItemId'] as String?, primaryImageItemId: json['PrimaryImageItemId'] as String?, refreshProgress: (json['RefreshProgress'] as num?)?.toDouble(), refreshStatus: json['RefreshStatus'] as String?, ); Map _$VirtualFolderInfoToJson(VirtualFolderInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Name', instance.name); writeNotNull('Locations', instance.locations); writeNotNull('CollectionType', collectionTypeOptionsNullableToJson(instance.collectionType)); writeNotNull('LibraryOptions', instance.libraryOptions?.toJson()); writeNotNull('ItemId', instance.itemId); writeNotNull('PrimaryImageItemId', instance.primaryImageItemId); writeNotNull('RefreshProgress', instance.refreshProgress); writeNotNull('RefreshStatus', instance.refreshStatus); return val; } WakeOnLanInfo _$WakeOnLanInfoFromJson(Map json) => WakeOnLanInfo( macAddress: json['MacAddress'] as String?, port: (json['Port'] as num?)?.toInt(), ); Map _$WakeOnLanInfoToJson(WakeOnLanInfo instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('MacAddress', instance.macAddress); writeNotNull('Port', instance.port); return val; } WebSocketMessage _$WebSocketMessageFromJson(Map json) => WebSocketMessage(); Map _$WebSocketMessageToJson(WebSocketMessage instance) => {}; XbmcMetadataOptions _$XbmcMetadataOptionsFromJson(Map json) => XbmcMetadataOptions( userId: json['UserId'] as String?, releaseDateFormat: json['ReleaseDateFormat'] as String?, saveImagePathsInNfo: json['SaveImagePathsInNfo'] as bool?, enablePathSubstitution: json['EnablePathSubstitution'] as bool?, enableExtraThumbsDuplication: json['EnableExtraThumbsDuplication'] as bool?, ); Map _$XbmcMetadataOptionsToJson(XbmcMetadataOptions instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('UserId', instance.userId); writeNotNull('ReleaseDateFormat', instance.releaseDateFormat); writeNotNull('SaveImagePathsInNfo', instance.saveImagePathsInNfo); writeNotNull('EnablePathSubstitution', instance.enablePathSubstitution); writeNotNull( 'EnableExtraThumbsDuplication', instance.enableExtraThumbsDuplication); return val; } BaseItemDto$ImageBlurHashes _$BaseItemDto$ImageBlurHashesFromJson( Map json) => BaseItemDto$ImageBlurHashes( primary: json['Primary'] as Map?, art: json['Art'] as Map?, backdrop: json['Backdrop'] as Map?, banner: json['Banner'] as Map?, logo: json['Logo'] as Map?, thumb: json['Thumb'] as Map?, disc: json['Disc'] as Map?, box: json['Box'] as Map?, screenshot: json['Screenshot'] as Map?, menu: json['Menu'] as Map?, chapter: json['Chapter'] as Map?, boxRear: json['BoxRear'] as Map?, profile: json['Profile'] as Map?, ); Map _$BaseItemDto$ImageBlurHashesToJson( BaseItemDto$ImageBlurHashes instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Primary', instance.primary); writeNotNull('Art', instance.art); writeNotNull('Backdrop', instance.backdrop); writeNotNull('Banner', instance.banner); writeNotNull('Logo', instance.logo); writeNotNull('Thumb', instance.thumb); writeNotNull('Disc', instance.disc); writeNotNull('Box', instance.box); writeNotNull('Screenshot', instance.screenshot); writeNotNull('Menu', instance.menu); writeNotNull('Chapter', instance.chapter); writeNotNull('BoxRear', instance.boxRear); writeNotNull('Profile', instance.profile); return val; } BaseItemPerson$ImageBlurHashes _$BaseItemPerson$ImageBlurHashesFromJson( Map json) => BaseItemPerson$ImageBlurHashes( primary: json['Primary'] as Map?, art: json['Art'] as Map?, backdrop: json['Backdrop'] as Map?, banner: json['Banner'] as Map?, logo: json['Logo'] as Map?, thumb: json['Thumb'] as Map?, disc: json['Disc'] as Map?, box: json['Box'] as Map?, screenshot: json['Screenshot'] as Map?, menu: json['Menu'] as Map?, chapter: json['Chapter'] as Map?, boxRear: json['BoxRear'] as Map?, profile: json['Profile'] as Map?, ); Map _$BaseItemPerson$ImageBlurHashesToJson( BaseItemPerson$ImageBlurHashes instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('Primary', instance.primary); writeNotNull('Art', instance.art); writeNotNull('Backdrop', instance.backdrop); writeNotNull('Banner', instance.banner); writeNotNull('Logo', instance.logo); writeNotNull('Thumb', instance.thumb); writeNotNull('Disc', instance.disc); writeNotNull('Box', instance.box); writeNotNull('Screenshot', instance.screenshot); writeNotNull('Menu', instance.menu); writeNotNull('Chapter', instance.chapter); writeNotNull('BoxRear', instance.boxRear); writeNotNull('Profile', instance.profile); return val; }