// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'timetable_get_week_response.dart';

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

McTimetableTeacher _$McTimetableTeacherFromJson(Map<String, dynamic> json) =>
    McTimetableTeacher(
      shortName: json['shortName'] as String,
      displayName: json['displayName'] as String,
      originalShortName: json['originalShortName'] as String?,
      originalDisplayName: json['originalDisplayName'] as String?,
    );

Map<String, dynamic> _$McTimetableTeacherToJson(McTimetableTeacher instance) =>
    <String, dynamic>{
      'shortName': instance.shortName,
      'displayName': instance.displayName,
      'originalShortName': instance.originalShortName,
      'originalDisplayName': instance.originalDisplayName,
    };

McTimetableEntry _$McTimetableEntryFromJson(Map<String, dynamic> json) =>
    McTimetableEntry(
      id: (json['id'] as num).toInt(),
      date: McTimetableEntry._dateFromJson(json['date'] as String),
      startTime: McTimetableEntry._timeFromJson(json['startTime'] as String),
      endTime: McTimetableEntry._timeFromJson(json['endTime'] as String),
      subjects: (json['subjects'] as List<dynamic>)
          .map((e) => e as String)
          .toList(),
      teachers: (json['teachers'] as List<dynamic>)
          .map((e) => McTimetableTeacher.fromJson(e as Map<String, dynamic>))
          .toList(),
      rooms: (json['rooms'] as List<dynamic>).map((e) => e as String).toList(),
      classNames: (json['classNames'] as List<dynamic>)
          .map((e) => e as String)
          .toList(),
      lessonType: json['lessonType'] as String,
      status: json['status'] as String,
      substitutionText: json['substitutionText'] as String?,
      lessonText: json['lessonText'] as String?,
      infoText: json['infoText'] as String?,
    );

Map<String, dynamic> _$McTimetableEntryToJson(McTimetableEntry instance) =>
    <String, dynamic>{
      'id': instance.id,
      'date': McTimetableEntry._dateToJson(instance.date),
      'startTime': McTimetableEntry._timeToJson(instance.startTime),
      'endTime': McTimetableEntry._timeToJson(instance.endTime),
      'subjects': instance.subjects,
      'teachers': instance.teachers.map((e) => e.toJson()).toList(),
      'rooms': instance.rooms,
      'classNames': instance.classNames,
      'lessonType': instance.lessonType,
      'status': instance.status,
      'substitutionText': instance.substitutionText,
      'lessonText': instance.lessonText,
      'infoText': instance.infoText,
    };

TimetableGetWeekResponse _$TimetableGetWeekResponseFromJson(
  Map<String, dynamic> json,
) =>
    TimetableGetWeekResponse(
        from: McTimetableEntry._dateFromJson(json['from'] as String),
        until: McTimetableEntry._dateFromJson(json['until'] as String),
        entries: (json['entries'] as List<dynamic>)
            .map((e) => McTimetableEntry.fromJson(e as Map<String, dynamic>))
            .toList(),
      )
      ..headers = (json['headers'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, e as String),
      );

Map<String, dynamic> _$TimetableGetWeekResponseToJson(
  TimetableGetWeekResponse instance,
) => <String, dynamic>{
  'headers': ?instance.headers,
  'from': McTimetableEntry._dateToJson(instance.from),
  'until': McTimetableEntry._dateToJson(instance.until),
  'entries': instance.entries.map((e) => e.toJson()).toList(),
};
