// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'media_item.dart';

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

PlexMediaItem _$PlexMediaItemFromJson(Map<String, dynamic> json) =>
    PlexMediaItem(
      id: readStringField(json, 'id') as String? ?? '',
      kind: _mediaKindFromJson(json['kind']),
      guid: json['guid'] as String?,
      title: json['title'] as String?,
      titleSort: json['titleSort'] as String?,
      summary: json['summary'] as String?,
      tagline: json['tagline'] as String?,
      originalTitle: json['originalTitle'] as String?,
      editionTitle: json['editionTitle'] as String?,
      studio: json['studio'] as String?,
      year: flexibleInt(json['year']),
      originallyAvailableAt: json['originallyAvailableAt'] as String?,
      contentRating: json['contentRating'] as String?,
      parentId: json['parentId'] as String?,
      parentTitle: json['parentTitle'] as String?,
      parentThumbPath: json['parentThumbPath'] as String?,
      parentIndex: flexibleInt(json['parentIndex']),
      index: flexibleInt(json['index']),
      grandparentId: json['grandparentId'] as String?,
      grandparentTitle: json['grandparentTitle'] as String?,
      grandparentThumbPath: json['grandparentThumbPath'] as String?,
      grandparentArtPath: json['grandparentArtPath'] as String?,
      thumbPath: json['thumbPath'] as String?,
      artPath: json['artPath'] as String?,
      clearLogoPath: json['clearLogoPath'] as String?,
      backgroundSquarePath: json['backgroundSquarePath'] as String?,
      durationMs: flexibleInt(json['durationMs']),
      viewOffsetMs: flexibleInt(json['viewOffsetMs']),
      viewCount: flexibleInt(json['viewCount']),
      lastViewedAt: flexibleInt(json['lastViewedAt']),
      leafCount: flexibleInt(json['leafCount']),
      viewedLeafCount: flexibleInt(json['viewedLeafCount']),
      childCount: flexibleInt(json['childCount']),
      addedAt: flexibleInt(json['addedAt']),
      updatedAt: flexibleInt(json['updatedAt']),
      rating: flexibleDouble(json['rating']),
      audienceRating: flexibleDouble(json['audienceRating']),
      userRating: flexibleDouble(json['userRating']),
      ratingImage: json['ratingImage'] as String?,
      audienceRatingImage: json['audienceRatingImage'] as String?,
      genres: _mediaItemStringList(json['genres']),
      directors: _mediaItemStringList(json['directors']),
      writers: _mediaItemStringList(json['writers']),
      producers: _mediaItemStringList(json['producers']),
      countries: _mediaItemStringList(json['countries']),
      collections: _mediaItemStringList(json['collections']),
      labels: _mediaItemStringList(json['labels']),
      styles: _mediaItemStringList(json['styles']),
      moods: _mediaItemStringList(json['moods']),
      roles: _mediaItemRolesFromJson(json['roles']),
      mediaVersions: _mediaItemVersionsFromJson(json['mediaVersions']),
      libraryId: json['libraryId'] as String?,
      libraryTitle: json['libraryTitle'] as String?,
      audioLanguage: json['audioLanguage'] as String?,
      subtitleLanguage: json['subtitleLanguage'] as String?,
      subtitleMode: flexibleInt(json['subtitleMode']),
      trailerKey: json['trailerKey'] as String?,
      playlistItemId: flexibleInt(json['playlistItemId']),
      playQueueItemId: flexibleInt(json['playQueueItemId']),
      subtype: json['subtype'] as String?,
      extraType: flexibleInt(json['extraType']),
      serverId: json['serverId'] as String?,
      serverName: json['serverName'] as String?,
      raw: _mediaItemRawFromJson(json['raw']),
    );

Map<String, dynamic> _$PlexMediaItemToJson(PlexMediaItem instance) =>
    <String, dynamic>{
      'id': instance.id,
      'kind': _mediaKindToJson(instance.kind),
      'guid': ?instance.guid,
      'title': ?instance.title,
      'titleSort': ?instance.titleSort,
      'summary': ?instance.summary,
      'tagline': ?instance.tagline,
      'originalTitle': ?instance.originalTitle,
      'editionTitle': ?instance.editionTitle,
      'studio': ?instance.studio,
      'year': ?instance.year,
      'originallyAvailableAt': ?instance.originallyAvailableAt,
      'contentRating': ?instance.contentRating,
      'parentId': ?instance.parentId,
      'parentTitle': ?instance.parentTitle,
      'parentThumbPath': ?instance.parentThumbPath,
      'parentIndex': ?instance.parentIndex,
      'index': ?instance.index,
      'grandparentId': ?instance.grandparentId,
      'grandparentTitle': ?instance.grandparentTitle,
      'grandparentThumbPath': ?instance.grandparentThumbPath,
      'grandparentArtPath': ?instance.grandparentArtPath,
      'thumbPath': ?instance.thumbPath,
      'artPath': ?instance.artPath,
      'clearLogoPath': ?instance.clearLogoPath,
      'backgroundSquarePath': ?instance.backgroundSquarePath,
      'durationMs': ?instance.durationMs,
      'viewOffsetMs': ?instance.viewOffsetMs,
      'viewCount': ?instance.viewCount,
      'lastViewedAt': ?instance.lastViewedAt,
      'leafCount': ?instance.leafCount,
      'viewedLeafCount': ?instance.viewedLeafCount,
      'childCount': ?instance.childCount,
      'addedAt': ?instance.addedAt,
      'updatedAt': ?instance.updatedAt,
      'rating': ?instance.rating,
      'audienceRating': ?instance.audienceRating,
      'userRating': ?instance.userRating,
      'ratingImage': ?instance.ratingImage,
      'audienceRatingImage': ?instance.audienceRatingImage,
      'genres': ?instance.genres,
      'directors': ?instance.directors,
      'writers': ?instance.writers,
      'producers': ?instance.producers,
      'countries': ?instance.countries,
      'collections': ?instance.collections,
      'labels': ?instance.labels,
      'styles': ?instance.styles,
      'moods': ?instance.moods,
      'roles': ?instance.roles?.map((e) => e.toJson()).toList(),
      'mediaVersions': ?instance.mediaVersions?.map((e) => e.toJson()).toList(),
      'libraryId': ?instance.libraryId,
      'libraryTitle': ?instance.libraryTitle,
      'audioLanguage': ?instance.audioLanguage,
      'subtitleLanguage': ?instance.subtitleLanguage,
      'subtitleMode': ?instance.subtitleMode,
      'trailerKey': ?instance.trailerKey,
      'playlistItemId': ?instance.playlistItemId,
      'playQueueItemId': ?instance.playQueueItemId,
      'subtype': ?instance.subtype,
      'extraType': ?instance.extraType,
      'serverId': ?instance.serverId,
      'serverName': ?instance.serverName,
      'raw': ?instance.raw,
    };

JellyfinMediaItem _$JellyfinMediaItemFromJson(Map<String, dynamic> json) =>
    JellyfinMediaItem(
      id: readStringField(json, 'id') as String? ?? '',
      kind: _mediaKindFromJson(json['kind']),
      guid: json['guid'] as String?,
      title: json['title'] as String?,
      titleSort: json['titleSort'] as String?,
      summary: json['summary'] as String?,
      tagline: json['tagline'] as String?,
      originalTitle: json['originalTitle'] as String?,
      studio: json['studio'] as String?,
      year: flexibleInt(json['year']),
      originallyAvailableAt: json['originallyAvailableAt'] as String?,
      contentRating: json['contentRating'] as String?,
      parentId: json['parentId'] as String?,
      parentTitle: json['parentTitle'] as String?,
      parentThumbPath: json['parentThumbPath'] as String?,
      parentIndex: flexibleInt(json['parentIndex']),
      index: flexibleInt(json['index']),
      grandparentId: json['grandparentId'] as String?,
      grandparentTitle: json['grandparentTitle'] as String?,
      grandparentThumbPath: json['grandparentThumbPath'] as String?,
      grandparentArtPath: json['grandparentArtPath'] as String?,
      thumbPath: json['thumbPath'] as String?,
      artPath: json['artPath'] as String?,
      clearLogoPath: json['clearLogoPath'] as String?,
      backgroundSquarePath: json['backgroundSquarePath'] as String?,
      durationMs: flexibleInt(json['durationMs']),
      viewOffsetMs: flexibleInt(json['viewOffsetMs']),
      viewCount: flexibleInt(json['viewCount']),
      lastViewedAt: flexibleInt(json['lastViewedAt']),
      leafCount: flexibleInt(json['leafCount']),
      viewedLeafCount: flexibleInt(json['viewedLeafCount']),
      childCount: flexibleInt(json['childCount']),
      addedAt: flexibleInt(json['addedAt']),
      updatedAt: flexibleInt(json['updatedAt']),
      rating: flexibleDouble(json['rating']),
      userRating: flexibleDouble(json['userRating']),
      genres: _mediaItemStringList(json['genres']),
      directors: _mediaItemStringList(json['directors']),
      writers: _mediaItemStringList(json['writers']),
      producers: _mediaItemStringList(json['producers']),
      countries: _mediaItemStringList(json['countries']),
      collections: _mediaItemStringList(json['collections']),
      labels: _mediaItemStringList(json['labels']),
      styles: _mediaItemStringList(json['styles']),
      moods: _mediaItemStringList(json['moods']),
      roles: _mediaItemRolesFromJson(json['roles']),
      mediaVersions: _mediaItemVersionsFromJson(json['mediaVersions']),
      libraryId: json['libraryId'] as String?,
      libraryTitle: json['libraryTitle'] as String?,
      audioLanguage: json['audioLanguage'] as String?,
      playlistItemId: json['playlistItemId'] as String?,
      serverId: json['serverId'] as String?,
      serverName: json['serverName'] as String?,
      raw: _mediaItemRawFromJson(json['raw']),
    );

Map<String, dynamic> _$JellyfinMediaItemToJson(JellyfinMediaItem instance) =>
    <String, dynamic>{
      'id': instance.id,
      'kind': _mediaKindToJson(instance.kind),
      'guid': ?instance.guid,
      'title': ?instance.title,
      'titleSort': ?instance.titleSort,
      'summary': ?instance.summary,
      'tagline': ?instance.tagline,
      'originalTitle': ?instance.originalTitle,
      'studio': ?instance.studio,
      'year': ?instance.year,
      'originallyAvailableAt': ?instance.originallyAvailableAt,
      'contentRating': ?instance.contentRating,
      'parentId': ?instance.parentId,
      'parentTitle': ?instance.parentTitle,
      'parentThumbPath': ?instance.parentThumbPath,
      'parentIndex': ?instance.parentIndex,
      'index': ?instance.index,
      'grandparentId': ?instance.grandparentId,
      'grandparentTitle': ?instance.grandparentTitle,
      'grandparentThumbPath': ?instance.grandparentThumbPath,
      'grandparentArtPath': ?instance.grandparentArtPath,
      'thumbPath': ?instance.thumbPath,
      'artPath': ?instance.artPath,
      'clearLogoPath': ?instance.clearLogoPath,
      'backgroundSquarePath': ?instance.backgroundSquarePath,
      'durationMs': ?instance.durationMs,
      'viewOffsetMs': ?instance.viewOffsetMs,
      'viewCount': ?instance.viewCount,
      'lastViewedAt': ?instance.lastViewedAt,
      'leafCount': ?instance.leafCount,
      'viewedLeafCount': ?instance.viewedLeafCount,
      'childCount': ?instance.childCount,
      'addedAt': ?instance.addedAt,
      'updatedAt': ?instance.updatedAt,
      'rating': ?instance.rating,
      'userRating': ?instance.userRating,
      'genres': ?instance.genres,
      'directors': ?instance.directors,
      'writers': ?instance.writers,
      'producers': ?instance.producers,
      'countries': ?instance.countries,
      'collections': ?instance.collections,
      'labels': ?instance.labels,
      'styles': ?instance.styles,
      'moods': ?instance.moods,
      'roles': ?instance.roles?.map((e) => e.toJson()).toList(),
      'mediaVersions': ?instance.mediaVersions?.map((e) => e.toJson()).toList(),
      'libraryId': ?instance.libraryId,
      'libraryTitle': ?instance.libraryTitle,
      'audioLanguage': ?instance.audioLanguage,
      'playlistItemId': ?instance.playlistItemId,
      'serverId': ?instance.serverId,
      'serverName': ?instance.serverName,
      'raw': ?instance.raw,
    };
