Added emergency remote breakers
This commit is contained in:
36
lib/api/mhsl/breaker/getBreakers/getBreakersResponse.dart
Normal file
36
lib/api/mhsl/breaker/getBreakers/getBreakersResponse.dart
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
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,
|
||||
}
|
Reference in New Issue
Block a user