// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'backup.dart';

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

_BackupBundle _$BackupBundleFromJson(Map<String, dynamic> json) =>
    _BackupBundle(
      version: (json['version'] as num).toInt(),
      exportedAt: json['exportedAt'] as String,
      servers: (json['servers'] as List<dynamic>)
          .map((e) => EmbyServer.fromJson(e as Map<String, dynamic>))
          .toList(),
      sessions: (json['sessions'] as List<dynamic>)
          .map((e) => SessionData.fromJson(e as Map<String, dynamic>))
          .toList(),
      danmakuSources: json['danmakuSources'] == null
          ? const <DanmakuSource>[]
          : _danmakuSourcesFromJson(json['danmakuSources']),
      scriptWidgets:
          (json['scriptWidgets'] as List<dynamic>?)
              ?.map(
                (e) =>
                    InstalledScriptWidget.fromJson(e as Map<String, dynamic>),
              )
              .toList() ??
          const <InstalledScriptWidget>[],
      scriptWidgetSubscriptions:
          (json['scriptWidgetSubscriptions'] as List<dynamic>?)
              ?.map(
                (e) => ScriptWidgetSubscription.fromJson(
                  e as Map<String, dynamic>,
                ),
              )
              .toList() ??
          const <ScriptWidgetSubscription>[],
    );

Map<String, dynamic> _$BackupBundleToJson(_BackupBundle instance) =>
    <String, dynamic>{
      'version': instance.version,
      'exportedAt': instance.exportedAt,
      'servers': instance.servers,
      'sessions': instance.sessions,
      'danmakuSources': _danmakuSourcesToJson(instance.danmakuSources),
      'scriptWidgets': instance.scriptWidgets,
      'scriptWidgetSubscriptions': instance.scriptWidgetSubscriptions,
    };
