import 'package:json_annotation/json_annotation.dart';

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

part 'getRoomsResponse.g.dart';

@JsonSerializable(explicitToJson: true)
class GetRoomsResponse extends ApiResponse {
  Set<GetRoomsResponseObject> result;

  GetRoomsResponse(this.result);

  factory GetRoomsResponse.fromJson(Map<String, dynamic> json) => _$GetRoomsResponseFromJson(json);
  Map<String, dynamic> toJson() => _$GetRoomsResponseToJson(this);
}

@JsonSerializable(explicitToJson: true)
class GetRoomsResponseObject {
  int id;
  String name;
  String longName;
  bool active;
  String building;

  GetRoomsResponseObject(this.id, this.name, this.longName, this.active, this.building);

  factory GetRoomsResponseObject.fromJson(Map<String, dynamic> json) => _$GetRoomsResponseObjectFromJson(json);
  Map<String, dynamic> toJson() => _$GetRoomsResponseObjectToJson(this);
}