-
Notifications
You must be signed in to change notification settings - Fork 10
/
StatisticsPerLabel.ts
69 lines (60 loc) · 1.96 KB
/
StatisticsPerLabel.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
import {map, mapArray} from '../common/Mapper';
import BillableEncodingFeatureMinutes from './BillableEncodingFeatureMinutes';
import BillableEncodingMinutes from './BillableEncodingMinutes';
import EgressInformation from './EgressInformation';
import Statistics from './Statistics';
/**
* @export
* @class StatisticsPerLabel
*/
export class StatisticsPerLabel extends Statistics {
/**
* An optional error message, when the event is in error state (occurs at event: ERROR) (required)
* @type {string}
* @memberof StatisticsPerLabel
*/
public label?: string;
/**
* The billable minutes.
* @type {number}
* @memberof StatisticsPerLabel
*/
public billableMinutes?: number;
/**
* Billable minutes for each encoding configuration
* @type {BillableEncodingMinutes[]}
* @memberof StatisticsPerLabel
*/
public billableEncodingMinutes?: BillableEncodingMinutes[];
/**
* Billable minutes for muxings.
* @type {number}
* @memberof StatisticsPerLabel
*/
public billableTransmuxingMinutes?: number;
/**
* Billable minutes for features
* @type {BillableEncodingFeatureMinutes[]}
* @memberof StatisticsPerLabel
*/
public billableFeatureMinutes?: BillableEncodingFeatureMinutes[];
/**
* Billable egress output
* @type {EgressInformation[]}
* @memberof StatisticsPerLabel
*/
public billableEgressBytes?: EgressInformation[];
constructor(obj?: Partial<StatisticsPerLabel>) {
super(obj);
if(!obj) {
return;
}
this.label = map(obj.label);
this.billableMinutes = map(obj.billableMinutes);
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 StatisticsPerLabel;