import 'package:json_annotation/json_annotation.dart'; import '../../../apiParams.dart'; part 'getTimetableParams.g.dart'; @JsonSerializable(explicitToJson: true) class GetTimetableParams extends ApiParams { GetTimetableParamsOptions options; GetTimetableParams({required this.options}); factory GetTimetableParams.fromJson(Map json) => _$GetTimetableParamsFromJson(json); Map toJson() => _$GetTimetableParamsToJson(this); } @JsonSerializable(explicitToJson: true) class GetTimetableParamsOptions { GetTimetableParamsOptionsElement element; @JsonKey(includeIfNull: false) int? startDate; @JsonKey(includeIfNull: false) int? endDate; @JsonKey(includeIfNull: false) bool? onlyBaseTimetable; @JsonKey(includeIfNull: false) bool? showBooking; @JsonKey(includeIfNull: false) bool? showInfo; @JsonKey(includeIfNull: false) bool? showSubstText; @JsonKey(includeIfNull: false) bool? showLsText; @JsonKey(includeIfNull: false) bool? showLsNumber; @JsonKey(includeIfNull: false) bool? showStudentgroup; @JsonKey(includeIfNull: false) List? klasseFields; @JsonKey(includeIfNull: false) List? roomFields; @JsonKey(includeIfNull: false) List? subjectFields; @JsonKey(includeIfNull: false) List? teacherFields; GetTimetableParamsOptions({ required this.element, this.startDate, this.endDate, this.onlyBaseTimetable, this.showBooking, this.showInfo, this.showSubstText, this.showLsText, this.showLsNumber, this.showStudentgroup, this.klasseFields, this.roomFields, this.subjectFields, this.teacherFields }); factory GetTimetableParamsOptions.fromJson(Map json) => _$GetTimetableParamsOptionsFromJson(json); Map toJson() => _$GetTimetableParamsOptionsToJson(this); } enum GetTimetableParamsOptionsFields { @JsonValue('id') id, @JsonValue('name') name, @JsonValue('longname') longname, @JsonValue('externalkey') externalkey; static List all = [id, name, longname, externalkey]; } @JsonSerializable() class GetTimetableParamsOptionsElement { int id; int type; @JsonKey(includeIfNull: false) GetTimetableParamsOptionsElementKeyType? keyType; GetTimetableParamsOptionsElement({required this.id, required this.type, this.keyType}); factory GetTimetableParamsOptionsElement.fromJson(Map json) => _$GetTimetableParamsOptionsElementFromJson(json); Map toJson() => _$GetTimetableParamsOptionsElementToJson(this); } enum GetTimetableParamsOptionsElementKeyType { @JsonValue('id') id, @JsonValue('name') name, @JsonValue('externalkey') externalkey }