33 lines
884 B
Dart
33 lines
884 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
import 'package:marianum_mobile/api/apiParams.dart';
|
|
|
|
part 'getChatParams.g.dart';
|
|
|
|
@JsonSerializable(explicitToJson: true, includeIfNull: false)
|
|
class GetChatParams extends ApiParams {
|
|
GetChatParamsSwitch lookIntoFuture;
|
|
int? limit;
|
|
int? lastKnownMessageId;
|
|
int? lastCommonReadId;
|
|
int? timeout;
|
|
GetChatParamsSwitch? setReadMarker;
|
|
GetChatParamsSwitch? includeLastKnown;
|
|
|
|
GetChatParams({
|
|
required this.lookIntoFuture,
|
|
this.limit,
|
|
this.lastKnownMessageId,
|
|
this.lastCommonReadId,
|
|
this.timeout,
|
|
this.setReadMarker,
|
|
this.includeLastKnown
|
|
});
|
|
|
|
factory GetChatParams.fromJson(Map<String, dynamic> json) => _$GetChatParamsFromJson(json);
|
|
Map<String, dynamic> toJson() => _$GetChatParamsToJson(this);
|
|
}
|
|
|
|
enum GetChatParamsSwitch {
|
|
@JsonValue(1) on,
|
|
@JsonValue(0) off,
|
|
} |