import 'package:json_annotation/json_annotation.dart';

import '../../../apiResponse.dart';

part 'getBreakersResponse.g.dart';

@JsonSerializable(explicitToJson: true)
class GetBreakersResponse extends ApiResponse {
  GetBreakersReponseObject global;
  Map<String, GetBreakersReponseObject> regional;

  GetBreakersResponse(this.global, this.regional);

  factory GetBreakersResponse.fromJson(Map<String, dynamic> json) => _$GetBreakersResponseFromJson(json);
  Map<String, dynamic> toJson() => _$GetBreakersResponseToJson(this);
}

@JsonSerializable()
class GetBreakersReponseObject {
  List<BreakerArea> areas;
  String message;

  GetBreakersReponseObject(this.areas, this.message);

  factory GetBreakersReponseObject.fromJson(Map<String, dynamic> json) => _$GetBreakersReponseObjectFromJson(json);
  Map<String, dynamic> toJson() => _$GetBreakersReponseObjectToJson(this);
}

enum BreakerArea {
  @JsonValue('GLOBAL') global,
  @JsonValue('TIMETABLE') timetable,
  @JsonValue('TALK') talk,
  @JsonValue('FILES') files,
  @JsonValue('MORE') more,
}