jld3103
2 years ago
16 changed files with 187 additions and 210 deletions
@ -0,0 +1,25 @@ |
|||||||
|
import 'package:json_annotation/json_annotation.dart'; |
||||||
|
import 'package:nextcloud/nextcloud.dart'; |
||||||
|
|
||||||
|
part 'push_notification.g.dart'; |
||||||
|
|
||||||
|
@JsonSerializable() |
||||||
|
class PushNotification { |
||||||
|
PushNotification({ |
||||||
|
required this.accountID, |
||||||
|
required this.priority, |
||||||
|
required this.type, |
||||||
|
required this.subject, |
||||||
|
}); |
||||||
|
|
||||||
|
factory PushNotification.fromJson(final Map<String, dynamic> json) => _$PushNotificationFromJson(json); |
||||||
|
Map<String, dynamic> toJson() => _$PushNotificationToJson(this); |
||||||
|
|
||||||
|
final String accountID; |
||||||
|
|
||||||
|
final String priority; |
||||||
|
|
||||||
|
final String type; |
||||||
|
|
||||||
|
final NextcloudNotificationsNotificationDecryptedSubject subject; |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND |
||||||
|
|
||||||
|
part of 'push_notification.dart'; |
||||||
|
|
||||||
|
// ************************************************************************** |
||||||
|
// JsonSerializableGenerator |
||||||
|
// ************************************************************************** |
||||||
|
|
||||||
|
PushNotification _$PushNotificationFromJson(Map<String, dynamic> json) => PushNotification( |
||||||
|
accountID: json['accountID'] as String, |
||||||
|
priority: json['priority'] as String, |
||||||
|
type: json['type'] as String, |
||||||
|
subject: NextcloudNotificationsNotificationDecryptedSubject.fromJson(json['subject'] as Map<String, dynamic>), |
||||||
|
); |
||||||
|
|
||||||
|
Map<String, dynamic> _$PushNotificationToJson(PushNotification instance) => <String, dynamic>{ |
||||||
|
'accountID': instance.accountID, |
||||||
|
'priority': instance.priority, |
||||||
|
'type': instance.type, |
||||||
|
'subject': instance.subject, |
||||||
|
}; |
@ -1,20 +0,0 @@ |
|||||||
import 'package:json_annotation/json_annotation.dart'; |
|
||||||
import 'package:nextcloud/nextcloud.dart'; |
|
||||||
|
|
||||||
part 'push_notification_with_account.g.dart'; |
|
||||||
|
|
||||||
@JsonSerializable() |
|
||||||
class PushNotificationWithAccountID { |
|
||||||
PushNotificationWithAccountID({ |
|
||||||
required this.notification, |
|
||||||
required this.accountID, |
|
||||||
}); |
|
||||||
|
|
||||||
factory PushNotificationWithAccountID.fromJson(final Map<String, dynamic> json) => |
|
||||||
_$PushNotificationWithAccountIDFromJson(json); |
|
||||||
Map<String, dynamic> toJson() => _$PushNotificationWithAccountIDToJson(this); |
|
||||||
|
|
||||||
final NextcloudNotificationsPushNotification notification; |
|
||||||
|
|
||||||
final String accountID; |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND |
|
||||||
|
|
||||||
part of 'push_notification_with_account.dart'; |
|
||||||
|
|
||||||
// ************************************************************************** |
|
||||||
// JsonSerializableGenerator |
|
||||||
// ************************************************************************** |
|
||||||
|
|
||||||
PushNotificationWithAccountID _$PushNotificationWithAccountIDFromJson(Map<String, dynamic> json) => |
|
||||||
PushNotificationWithAccountID( |
|
||||||
notification: NextcloudNotificationsPushNotification.fromJson(json['notification'] as Map<String, dynamic>), |
|
||||||
accountID: json['accountID'] as String, |
|
||||||
); |
|
||||||
|
|
||||||
Map<String, dynamic> _$PushNotificationWithAccountIDToJson(PushNotificationWithAccountID instance) => <String, dynamic>{ |
|
||||||
'notification': instance.notification, |
|
||||||
'accountID': instance.accountID, |
|
||||||
}; |
|
Loading…
Reference in new issue