-
Notifications
You must be signed in to change notification settings - Fork 10
/
NotificationStateEntry.ts
57 lines (49 loc) · 1.29 KB
/
NotificationStateEntry.ts
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
52
53
54
55
56
import {map, mapArray} from '../common/Mapper';
import BitmovinResponse from './BitmovinResponse';
import NotificationStates from './NotificationStates';
/**
* @export
* @class NotificationStateEntry
*/
export class NotificationStateEntry extends BitmovinResponse {
/**
* @type {NotificationStates}
* @memberof NotificationStateEntry
*/
public state?: NotificationStates;
/**
* Indicate if notification was sent (required)
* @type {boolean}
* @memberof NotificationStateEntry
*/
public muted?: boolean;
/**
* The notification this state belongs to (required)
* @type {string}
* @memberof NotificationStateEntry
*/
public notificationId?: string;
/**
* Indicate if triggered for specific resource (required)
* @type {string}
* @memberof NotificationStateEntry
*/
public resourceId?: string;
/**
* @type {Date}
* @memberof NotificationStateEntry
*/
public triggeredAt?: Date;
constructor(obj?: Partial<NotificationStateEntry>) {
super(obj);
if(!obj) {
return;
}
this.state = map(obj.state);
this.muted = map(obj.muted);
this.notificationId = map(obj.notificationId);
this.resourceId = map(obj.resourceId);
this.triggeredAt = map(obj.triggeredAt, Date);
}
}
export default NotificationStateEntry;