-
Notifications
You must be signed in to change notification settings - Fork 10
/
DailyStatistics.ts
90 lines (78 loc) · 2.29 KB
/
DailyStatistics.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import {map, mapArray} from '../common/Mapper';
import BillableEncodingFeatureMinutes from './BillableEncodingFeatureMinutes';
import BillableEncodingMinutes from './BillableEncodingMinutes';
import EgressInformation from './EgressInformation';
/**
* @export
* @class DailyStatistics
*/
export class DailyStatistics {
/**
* Date for the shown data. Format: yyyy-MM-dd (required)
* @type {Date}
* @memberof DailyStatistics
*/
public date?: Date;
/**
* Bytes encoded. (required)
* @type {number}
* @memberof DailyStatistics
*/
public bytesEncoded?: number;
/**
* Time in seconds encoded for this day. (required)
* @type {number}
* @memberof DailyStatistics
*/
public timeEncoded?: number;
/**
* The billable minutes.
* @type {number}
* @memberof DailyStatistics
*/
public billableMinutes?: number;
/**
* Label identifier.
* @type {string}
* @memberof DailyStatistics
*/
public label?: string;
/**
* Billable minutes for each encoding configuration.
* @type {BillableEncodingMinutes[]}
* @memberof DailyStatistics
*/
public billableEncodingMinutes?: BillableEncodingMinutes[];
/**
* Billable minutes for muxings.
* @type {number}
* @memberof DailyStatistics
*/
public billableTransmuxingMinutes?: number;
/**
* Billable minutes for features
* @type {BillableEncodingFeatureMinutes[]}
* @memberof DailyStatistics
*/
public billableFeatureMinutes?: BillableEncodingFeatureMinutes[];
/**
* @type {EgressInformation[]}
* @memberof DailyStatistics
*/
public billableEgressBytes?: EgressInformation[];
constructor(obj?: Partial<DailyStatistics>) {
if(!obj) {
return;
}
this.date = map(obj.date, Date);
this.bytesEncoded = map(obj.bytesEncoded);
this.timeEncoded = map(obj.timeEncoded);
this.billableMinutes = map(obj.billableMinutes);
this.label = map(obj.label);
this.billableEncodingMinutes = mapArray(obj.billableEncodingMinutes, BillableEncodingMinutes);
this.billableTransmuxingMinutes = map(obj.billableTransmuxingMinutes);
this.billableFeatureMinutes = mapArray(obj.billableFeatureMinutes, BillableEncodingFeatureMinutes);
this.billableEgressBytes = mapArray(obj.billableEgressBytes, EgressInformation);
}
}
export default DailyStatistics;