You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1013 B
33 lines
1013 B
2 years ago
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
import 'package:nextcloud/nextcloud.dart';
|
||
|
|
||
|
part 'nextcloud_notification.g.dart';
|
||
|
|
||
|
@JsonSerializable()
|
||
|
class NextcloudNotification {
|
||
|
NextcloudNotification({
|
||
|
required this.accountID,
|
||
|
required this.priority,
|
||
|
required this.type,
|
||
|
required this.subject,
|
||
|
});
|
||
|
|
||
|
factory NextcloudNotification.fromJson(final Map<String, dynamic> json) => _$NextcloudNotificationFromJson(json);
|
||
|
Map<String, dynamic> toJson() => _$NextcloudNotificationToJson(this);
|
||
|
|
||
|
final String accountID;
|
||
|
final String priority;
|
||
|
final String type;
|
||
|
|
||
|
@JsonKey(
|
||
|
fromJson: _fromJsonSubject,
|
||
|
toJson: _toJsonSubject,
|
||
|
)
|
||
|
final NotificationsPushNotificationDecryptedSubject subject;
|
||
|
}
|
||
|
|
||
|
NotificationsPushNotificationDecryptedSubject _fromJsonSubject(final Map<String, dynamic> data) =>
|
||
|
NotificationsPushNotificationDecryptedSubject.fromJson(data)!;
|
||
|
|
||
|
Map<String, dynamic>? _toJsonSubject(NotificationsPushNotificationDecryptedSubject subject) => subject.toJson();
|