// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'library.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_EmbyRawUserData _$EmbyRawUserDataFromJson(Map<String, dynamic> json) =>
    _EmbyRawUserData(
      PlaybackPositionTicks: _intOrNull(json['PlaybackPositionTicks']),
      PlayCount: _intOrNull(json['PlayCount']),
      UnplayedItemCount: _intOrNull(json['UnplayedItemCount']),
      IsFavorite: json['IsFavorite'] as bool?,
      Played: json['Played'] as bool?,
    );

Map<String, dynamic> _$EmbyRawUserDataToJson(_EmbyRawUserData instance) =>
    <String, dynamic>{
      'PlaybackPositionTicks': ?instance.PlaybackPositionTicks,
      'PlayCount': ?instance.PlayCount,
      'UnplayedItemCount': ?instance.UnplayedItemCount,
      'IsFavorite': ?instance.IsFavorite,
      'Played': ?instance.Played,
    };

_EmbyRawItem _$EmbyRawItemFromJson(Map<String, dynamic> json) => _EmbyRawItem(
  Id: json['Id'] as String,
  Name: json['Name'] as String,
  Type: json['Type'] as String?,
  Overview: json['Overview'] as String?,
  ProductionYear: _intOrNull(json['ProductionYear']),
  CommunityRating: _doubleOrNull(json['CommunityRating']),
  PremiereDate: json['PremiereDate'] as String?,
  SeriesName: json['SeriesName'] as String?,
  SeriesId: json['SeriesId'] as String?,
  SeasonId: json['SeasonId'] as String?,
  SeasonName: json['SeasonName'] as String?,
  IndexNumber: _intOrNull(json['IndexNumber']),
  ParentId: json['ParentId'] as String?,
  PrimaryImageTag: json['PrimaryImageTag'] as String?,
  ImageTags: _stringMapOrNull(json['ImageTags']),
  BackdropImageTags: _stringListOrNull(json['BackdropImageTags']),
  RunTimeTicks: _intOrNull(json['RunTimeTicks']),
  UserData: json['UserData'] == null
      ? null
      : EmbyRawUserData.fromJson(json['UserData'] as Map<String, dynamic>),
);

Map<String, dynamic> _$EmbyRawItemToJson(_EmbyRawItem instance) =>
    <String, dynamic>{
      'Id': instance.Id,
      'Name': instance.Name,
      'Type': ?instance.Type,
      'Overview': ?instance.Overview,
      'ProductionYear': ?instance.ProductionYear,
      'CommunityRating': ?instance.CommunityRating,
      'PremiereDate': ?instance.PremiereDate,
      'SeriesName': ?instance.SeriesName,
      'SeriesId': ?instance.SeriesId,
      'SeasonId': ?instance.SeasonId,
      'SeasonName': ?instance.SeasonName,
      'IndexNumber': ?instance.IndexNumber,
      'ParentId': ?instance.ParentId,
      'PrimaryImageTag': ?instance.PrimaryImageTag,
      'ImageTags': ?instance.ImageTags,
      'BackdropImageTags': ?instance.BackdropImageTags,
      'RunTimeTicks': ?instance.RunTimeTicks,
      'UserData': ?instance.UserData,
    };

_EmbyRawSeason _$EmbyRawSeasonFromJson(Map<String, dynamic> json) =>
    _EmbyRawSeason(
      Id: json['Id'] as String,
      Name: json['Name'] as String,
      IndexNumber: _intOrNull(json['IndexNumber']),
      ProductionYear: _intOrNull(json['ProductionYear']),
      ChildCount: _intOrNull(json['ChildCount']),
      PrimaryImageTag: json['PrimaryImageTag'] as String?,
      ImageTags: _stringMapOrNull(json['ImageTags']),
    );

Map<String, dynamic> _$EmbyRawSeasonToJson(_EmbyRawSeason instance) =>
    <String, dynamic>{
      'Id': instance.Id,
      'Name': instance.Name,
      'IndexNumber': ?instance.IndexNumber,
      'ProductionYear': ?instance.ProductionYear,
      'ChildCount': ?instance.ChildCount,
      'PrimaryImageTag': ?instance.PrimaryImageTag,
      'ImageTags': ?instance.ImageTags,
    };

_EmbyRawLibrary _$EmbyRawLibraryFromJson(Map<String, dynamic> json) =>
    _EmbyRawLibrary(
      Id: json['Id'] as String,
      Name: json['Name'] as String,
      CollectionType: json['CollectionType'] as String?,
      ImageTags: _stringMapOrNull(json['ImageTags']),
    );

Map<String, dynamic> _$EmbyRawLibraryToJson(_EmbyRawLibrary instance) =>
    <String, dynamic>{
      'Id': instance.Id,
      'Name': instance.Name,
      'CollectionType': ?instance.CollectionType,
      'ImageTags': ?instance.ImageTags,
    };

_EmbyRawLibraries _$EmbyRawLibrariesFromJson(Map<String, dynamic> json) =>
    _EmbyRawLibraries(
      Items: (json['Items'] as List<dynamic>)
          .map((e) => EmbyRawLibrary.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$EmbyRawLibrariesToJson(_EmbyRawLibraries instance) =>
    <String, dynamic>{'Items': instance.Items};

_EmbyRawMediaStream _$EmbyRawMediaStreamFromJson(Map<String, dynamic> json) =>
    _EmbyRawMediaStream(
      Index: _intOrNull(json['Index']),
      Type: json['Type'] as String?,
      Language: json['Language'] as String?,
      Codec: json['Codec'] as String?,
      Channels: _intOrNull(json['Channels']),
      DisplayTitle: json['DisplayTitle'] as String?,
      Title: json['Title'] as String?,
      IsDefault: json['IsDefault'] as bool?,
      IsForced: json['IsForced'] as bool?,
      IsExternal: json['IsExternal'] as bool?,
      DeliveryMethod: json['DeliveryMethod'] as String?,
      DeliveryUrl: json['DeliveryUrl'] as String?,
    );

Map<String, dynamic> _$EmbyRawMediaStreamToJson(_EmbyRawMediaStream instance) =>
    <String, dynamic>{
      'Index': ?instance.Index,
      'Type': ?instance.Type,
      'Language': ?instance.Language,
      'Codec': ?instance.Codec,
      'Channels': ?instance.Channels,
      'DisplayTitle': ?instance.DisplayTitle,
      'Title': ?instance.Title,
      'IsDefault': ?instance.IsDefault,
      'IsForced': ?instance.IsForced,
      'IsExternal': ?instance.IsExternal,
      'DeliveryMethod': ?instance.DeliveryMethod,
      'DeliveryUrl': ?instance.DeliveryUrl,
    };

_EmbyRawMediaSource _$EmbyRawMediaSourceFromJson(Map<String, dynamic> json) =>
    _EmbyRawMediaSource(
      Id: json['Id'] as String?,
      Name: json['Name'] as String?,
      Container: json['Container'] as String?,
      Bitrate: _intOrNull(json['Bitrate']),
      Size: _intOrNull(json['Size']),
      Width: _intOrNull(json['Width']),
      Height: _intOrNull(json['Height']),
      DefaultSubtitleStreamIndex: _intOrNull(
        json['DefaultSubtitleStreamIndex'],
      ),
      DefaultAudioStreamIndex: _intOrNull(json['DefaultAudioStreamIndex']),
      MediaStreams: (json['MediaStreams'] as List<dynamic>?)
          ?.map((e) => EmbyRawMediaStream.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$EmbyRawMediaSourceToJson(_EmbyRawMediaSource instance) =>
    <String, dynamic>{
      'Id': ?instance.Id,
      'Name': ?instance.Name,
      'Container': ?instance.Container,
      'Bitrate': ?instance.Bitrate,
      'Size': ?instance.Size,
      'Width': ?instance.Width,
      'Height': ?instance.Height,
      'DefaultSubtitleStreamIndex': ?instance.DefaultSubtitleStreamIndex,
      'DefaultAudioStreamIndex': ?instance.DefaultAudioStreamIndex,
      'MediaStreams': ?instance.MediaStreams,
    };

_LibraryLatestRes _$LibraryLatestResFromJson(Map<String, dynamic> json) =>
    _LibraryLatestRes(
      parentId: json['parentId'] as String,
      items: (json['items'] as List<dynamic>)
          .map((e) => EmbyRawItem.fromJson(e as Map<String, dynamic>))
          .toList(),
      totalCount: (json['totalCount'] as num?)?.toInt() ?? 0,
    );

Map<String, dynamic> _$LibraryLatestResToJson(_LibraryLatestRes instance) =>
    <String, dynamic>{
      'parentId': instance.parentId,
      'items': instance.items,
      'totalCount': instance.totalCount,
    };

_LibraryResumeRes _$LibraryResumeResFromJson(Map<String, dynamic> json) =>
    _LibraryResumeRes(
      Items: (json['Items'] as List<dynamic>)
          .map((e) => EmbyRawItem.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$LibraryResumeResToJson(_LibraryResumeRes instance) =>
    <String, dynamic>{'Items': instance.Items};

_FavoriteSetRes _$FavoriteSetResFromJson(Map<String, dynamic> json) =>
    _FavoriteSetRes(
      itemId: json['itemId'] as String,
      isFavorite: json['isFavorite'] as bool,
    );

Map<String, dynamic> _$FavoriteSetResToJson(_FavoriteSetRes instance) =>
    <String, dynamic>{
      'itemId': instance.itemId,
      'isFavorite': instance.isFavorite,
    };

_PlayedSetRes _$PlayedSetResFromJson(Map<String, dynamic> json) =>
    _PlayedSetRes(
      itemId: json['itemId'] as String,
      played: json['played'] as bool,
    );

Map<String, dynamic> _$PlayedSetResToJson(_PlayedSetRes instance) =>
    <String, dynamic>{'itemId': instance.itemId, 'played': instance.played};

_HideFromResumeRes _$HideFromResumeResFromJson(Map<String, dynamic> json) =>
    _HideFromResumeRes(
      itemId: json['itemId'] as String,
      hide: json['hide'] as bool,
    );

Map<String, dynamic> _$HideFromResumeResToJson(_HideFromResumeRes instance) =>
    <String, dynamic>{'itemId': instance.itemId, 'hide': instance.hide};

_ItemCountsRes _$ItemCountsResFromJson(Map<String, dynamic> json) =>
    _ItemCountsRes(
      movieCount: _intOrZero(json['MovieCount']),
      episodeCount: _intOrZero(json['EpisodeCount']),
    );

Map<String, dynamic> _$ItemCountsResToJson(_ItemCountsRes instance) =>
    <String, dynamic>{
      'MovieCount': instance.movieCount,
      'EpisodeCount': instance.episodeCount,
    };
