// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'timetable_state.dart';

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

_TimetableState _$TimetableStateFromJson(Map<String, dynamic> json) =>
    _TimetableState(
      weekCache:
          (json['weekCache'] as Map<String, dynamic>?)?.map(
            (k, e) => MapEntry(
              k,
              TimetableGetWeekResponse.fromJson(e as Map<String, dynamic>),
            ),
          ) ??
          const <String, TimetableGetWeekResponse>{},
      rooms: json['rooms'] == null
          ? null
          : TimetableGetRoomsResponse.fromJson(
              json['rooms'] as Map<String, dynamic>,
            ),
      subjects: json['subjects'] == null
          ? null
          : TimetableGetSubjectsResponse.fromJson(
              json['subjects'] as Map<String, dynamic>,
            ),
      schoolHolidays: json['schoolHolidays'] == null
          ? null
          : TimetableGetHolidaysResponse.fromJson(
              json['schoolHolidays'] as Map<String, dynamic>,
            ),
      schoolyear: json['schoolyear'] == null
          ? null
          : TimetableGetSchoolyearResponse.fromJson(
              json['schoolyear'] as Map<String, dynamic>,
            ),
      timegrid: json['timegrid'] == null
          ? null
          : TimetableGetTimegridResponse.fromJson(
              json['timegrid'] as Map<String, dynamic>,
            ),
      customEvents: json['customEvents'] == null
          ? null
          : GetCustomTimetableEventResponse.fromJson(
              json['customEvents'] as Map<String, dynamic>,
            ),
      startDate: DateTime.parse(json['startDate'] as String),
      endDate: DateTime.parse(json['endDate'] as String),
      dataVersion: (json['dataVersion'] as num?)?.toInt() ?? 0,
      accessibleStartDate: json['accessibleStartDate'] == null
          ? null
          : DateTime.parse(json['accessibleStartDate'] as String),
      accessibleEndDate: json['accessibleEndDate'] == null
          ? null
          : DateTime.parse(json['accessibleEndDate'] as String),
    );

Map<String, dynamic> _$TimetableStateToJson(_TimetableState instance) =>
    <String, dynamic>{
      'weekCache': instance.weekCache,
      'rooms': instance.rooms,
      'subjects': instance.subjects,
      'schoolHolidays': instance.schoolHolidays,
      'schoolyear': instance.schoolyear,
      'timegrid': instance.timegrid,
      'customEvents': instance.customEvents,
      'startDate': instance.startDate.toIso8601String(),
      'endDate': instance.endDate.toIso8601String(),
      'dataVersion': instance.dataVersion,
      'accessibleStartDate': instance.accessibleStartDate?.toIso8601String(),
      'accessibleEndDate': instance.accessibleEndDate?.toIso8601String(),
    };
