// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'getTimetableParams.dart';

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

GetTimetableParams _$GetTimetableParamsFromJson(Map<String, dynamic> json) =>
    GetTimetableParams(
      options: GetTimetableParamsOptions.fromJson(
          json['options'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$GetTimetableParamsToJson(GetTimetableParams instance) =>
    <String, dynamic>{
      'options': instance.options.toJson(),
    };

GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson(
        Map<String, dynamic> json) =>
    GetTimetableParamsOptions(
      element: GetTimetableParamsOptionsElement.fromJson(
          json['element'] as Map<String, dynamic>),
      startDate: json['startDate'] as int?,
      endDate: json['endDate'] as int?,
      onlyBaseTimetable: json['onlyBaseTimetable'] as bool?,
      showBooking: json['showBooking'] as bool?,
      showInfo: json['showInfo'] as bool?,
      showSubstText: json['showSubstText'] as bool?,
      showLsText: json['showLsText'] as bool?,
      showLsNumber: json['showLsNumber'] as bool?,
      showStudentgroup: json['showStudentgroup'] as bool?,
      klasseFields: (json['klasseFields'] as List<dynamic>?)
          ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e))
          .toList(),
      roomFields: (json['roomFields'] as List<dynamic>?)
          ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e))
          .toList(),
      subjectFields: (json['subjectFields'] as List<dynamic>?)
          ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e))
          .toList(),
      teacherFields: (json['teacherFields'] as List<dynamic>?)
          ?.map((e) => $enumDecode(_$GetTimetableParamsOptionsFieldsEnumMap, e))
          .toList(),
    );

Map<String, dynamic> _$GetTimetableParamsOptionsToJson(
    GetTimetableParamsOptions instance) {
  final val = <String, dynamic>{
    'element': instance.element.toJson(),
  };

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

  writeNotNull('startDate', instance.startDate);
  writeNotNull('endDate', instance.endDate);
  writeNotNull('onlyBaseTimetable', instance.onlyBaseTimetable);
  writeNotNull('showBooking', instance.showBooking);
  writeNotNull('showInfo', instance.showInfo);
  writeNotNull('showSubstText', instance.showSubstText);
  writeNotNull('showLsText', instance.showLsText);
  writeNotNull('showLsNumber', instance.showLsNumber);
  writeNotNull('showStudentgroup', instance.showStudentgroup);
  writeNotNull(
      'klasseFields',
      instance.klasseFields
          ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
          .toList());
  writeNotNull(
      'roomFields',
      instance.roomFields
          ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
          .toList());
  writeNotNull(
      'subjectFields',
      instance.subjectFields
          ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
          .toList());
  writeNotNull(
      'teacherFields',
      instance.teacherFields
          ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
          .toList());
  return val;
}

const _$GetTimetableParamsOptionsFieldsEnumMap = {
  GetTimetableParamsOptionsFields.id: 'id',
  GetTimetableParamsOptionsFields.name: 'name',
  GetTimetableParamsOptionsFields.longname: 'longname',
  GetTimetableParamsOptionsFields.externalkey: 'externalkey',
};

GetTimetableParamsOptionsElement _$GetTimetableParamsOptionsElementFromJson(
        Map<String, dynamic> json) =>
    GetTimetableParamsOptionsElement(
      id: json['id'] as int,
      type: json['type'] as int,
      keyType: $enumDecodeNullable(
          _$GetTimetableParamsOptionsElementKeyTypeEnumMap, json['keyType']),
    );

Map<String, dynamic> _$GetTimetableParamsOptionsElementToJson(
    GetTimetableParamsOptionsElement instance) {
  final val = <String, dynamic>{
    'id': instance.id,
    'type': instance.type,
  };

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

  writeNotNull('keyType',
      _$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType]);
  return val;
}

const _$GetTimetableParamsOptionsElementKeyTypeEnumMap = {
  GetTimetableParamsOptionsElementKeyType.id: 'id',
  GetTimetableParamsOptionsElementKeyType.name: 'name',
  GetTimetableParamsOptionsElementKeyType.externalkey: 'externalkey',
};
