// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'getTimetableResponse.dart';

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

GetTimetableResponse _$GetTimetableResponseFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponse(
      (json['result'] as List<dynamic>)
          .map((e) =>
              GetTimetableResponseObject.fromJson(e as Map<String, dynamic>))
          .toSet(),
    )..headers = (json['headers'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, e as String),
      );

Map<String, dynamic> _$GetTimetableResponseToJson(
    GetTimetableResponse instance) {
  final val = <String, dynamic>{};

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('headers', instance.headers);
  val['result'] = instance.result.map((e) => e.toJson()).toList();
  return val;
}

GetTimetableResponseObject _$GetTimetableResponseObjectFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponseObject(
      id: json['id'] as int,
      date: json['date'] as int,
      startTime: json['startTime'] as int,
      endTime: json['endTime'] as int,
      lstype: json['lstype'] as String?,
      code: json['code'] as String?,
      info: json['info'] as String?,
      substText: json['substText'] as String?,
      lstext: json['lstext'] as String?,
      lsnumber: json['lsnumber'] as int?,
      statflags: json['statflags'] as String?,
      activityType: json['activityType'] as String?,
      sg: json['sg'] as String?,
      bkRemark: json['bkRemark'] as String?,
      kl: (json['kl'] as List<dynamic>)
          .map((e) => GetTimetableResponseObjectClass.fromJson(
              e as Map<String, dynamic>))
          .toList(),
      te: (json['te'] as List<dynamic>)
          .map((e) => GetTimetableResponseObjectTeacher.fromJson(
              e as Map<String, dynamic>))
          .toList(),
      su: (json['su'] as List<dynamic>)
          .map((e) => GetTimetableResponseObjectSubject.fromJson(
              e as Map<String, dynamic>))
          .toList(),
      ro: (json['ro'] as List<dynamic>)
          .map((e) => GetTimetableResponseObjectRoom.fromJson(
              e as Map<String, dynamic>))
          .toList(),
    )..bkText = json['bkText'] as String?;

Map<String, dynamic> _$GetTimetableResponseObjectToJson(
        GetTimetableResponseObject instance) =>
    <String, dynamic>{
      'id': instance.id,
      'date': instance.date,
      'startTime': instance.startTime,
      'endTime': instance.endTime,
      'lstype': instance.lstype,
      'code': instance.code,
      'info': instance.info,
      'substText': instance.substText,
      'lstext': instance.lstext,
      'lsnumber': instance.lsnumber,
      'statflags': instance.statflags,
      'activityType': instance.activityType,
      'sg': instance.sg,
      'bkRemark': instance.bkRemark,
      'bkText': instance.bkText,
      'kl': instance.kl.map((e) => e.toJson()).toList(),
      'te': instance.te.map((e) => e.toJson()).toList(),
      'su': instance.su.map((e) => e.toJson()).toList(),
      'ro': instance.ro.map((e) => e.toJson()).toList(),
    };

GetTimetableResponseObjectFields _$GetTimetableResponseObjectFieldsFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponseObjectFields(
      (json['te'] as List<dynamic>?)
          ?.map((e) => GetTimetableResponseObjectFieldsObject.fromJson(
              e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$GetTimetableResponseObjectFieldsToJson(
        GetTimetableResponseObjectFields instance) =>
    <String, dynamic>{
      'te': instance.te?.map((e) => e.toJson()).toList(),
    };

GetTimetableResponseObjectFieldsObject
    _$GetTimetableResponseObjectFieldsObjectFromJson(
            Map<String, dynamic> json) =>
        GetTimetableResponseObjectFieldsObject(
          id: json['id'] as int?,
          name: json['name'] as String?,
          longname: json['longname'] as String?,
          externalkey: json['externalkey'] as String?,
        );

Map<String, dynamic> _$GetTimetableResponseObjectFieldsObjectToJson(
        GetTimetableResponseObjectFieldsObject instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'longname': instance.longname,
      'externalkey': instance.externalkey,
    };

GetTimetableResponseObjectClass _$GetTimetableResponseObjectClassFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponseObjectClass(
      json['id'] as int,
      json['name'] as String,
      json['longname'] as String,
      json['externalkey'] as String?,
    );

Map<String, dynamic> _$GetTimetableResponseObjectClassToJson(
        GetTimetableResponseObjectClass instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'longname': instance.longname,
      'externalkey': instance.externalkey,
    };

GetTimetableResponseObjectTeacher _$GetTimetableResponseObjectTeacherFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponseObjectTeacher(
      json['id'] as int,
      json['name'] as String,
      json['longname'] as String,
      json['orgid'] as int?,
      json['orgname'] as String?,
      json['externalkey'] as String?,
    );

Map<String, dynamic> _$GetTimetableResponseObjectTeacherToJson(
        GetTimetableResponseObjectTeacher instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'longname': instance.longname,
      'orgid': instance.orgid,
      'orgname': instance.orgname,
      'externalkey': instance.externalkey,
    };

GetTimetableResponseObjectSubject _$GetTimetableResponseObjectSubjectFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponseObjectSubject(
      json['id'] as int,
      json['name'] as String,
      json['longname'] as String,
    );

Map<String, dynamic> _$GetTimetableResponseObjectSubjectToJson(
        GetTimetableResponseObjectSubject instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'longname': instance.longname,
    };

GetTimetableResponseObjectRoom _$GetTimetableResponseObjectRoomFromJson(
        Map<String, dynamic> json) =>
    GetTimetableResponseObjectRoom(
      json['id'] as int,
      json['name'] as String,
      json['longname'] as String,
    );

Map<String, dynamic> _$GetTimetableResponseObjectRoomToJson(
        GetTimetableResponseObjectRoom instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'longname': instance.longname,
    };
