forked from kylebrowning/APNSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAPNSStartLiveActivityNotificationAPSStorage.swift
More file actions
51 lines (48 loc) · 1.56 KB
/
APNSStartLiveActivityNotificationAPSStorage.swift
File metadata and controls
51 lines (48 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//===----------------------------------------------------------------------===//
//
// This source file is part of the APNSwift open source project
//
// Copyright (c) 2022 the APNSwift project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of APNSwift project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Sendable, ContentState: Encodable & Sendable>:
Encodable & Sendable
{
enum CodingKeys: String, CodingKey {
case timestamp = "timestamp"
case event = "event"
case contentState = "content-state"
case staleDate = "stale-date"
case alert = "alert"
case attributes = "attributes"
case attributesType = "attributes-type"
}
var timestamp: Int
var event: String = "start"
var contentState: ContentState
var staleDate: Int?
var alert: APNSAlertNotificationContent
var attributes: Attributes
var attributesType: String
init(
timestamp: Int,
contentState: ContentState,
staleDate: Int?,
alert: APNSAlertNotificationContent,
attributes: Attributes,
attributesType: String
) {
self.timestamp = timestamp
self.contentState = contentState
self.staleDate = staleDate
self.alert = alert
self.attributes = attributes
self.attributesType = attributesType
}
}