import 'package:json_annotation/json_annotation.dart';

import '../../../api_params.dart';

part 'get_room_params.g.dart';

@JsonSerializable(explicitToJson: true)
class GetRoomParams extends ApiParams {
  GetRoomParamsStatusUpdate? noStatusUpdate;
  @JsonKey(toJson: _format)
  bool? includeStatus;
  int? modifiedSince;

  GetRoomParams({this.noStatusUpdate, this.includeStatus, this.modifiedSince});

  factory GetRoomParams.fromJson(Map<String, dynamic> json) =>
      _$GetRoomParamsFromJson(json);
  Map<String, dynamic> toJson() => _$GetRoomParamsToJson(this);

  static String _format(bool? v) => v.toString();
}

enum GetRoomParamsStatusUpdate {
  @JsonValue(0)
  defaults,
  @JsonValue(1)
  keepAlive,
}
