-
Notifications
You must be signed in to change notification settings - Fork 10
/
CdnUsage.ts
48 lines (41 loc) · 1.14 KB
/
CdnUsage.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
import {map, mapArray} from '../common/Mapper';
/**
* @export
* @class CdnUsage
*/
export class CdnUsage {
/**
* UTC timestamp which marks the beginning of the time period for which the usage statistics are retrieved.
* @type {Date}
* @memberof CdnUsage
*/
public from?: Date;
/**
* UTC timestamp which marks the end of the time period for which the usage statistics are retrieved. The end date is exclusive. For example, if end is 2019-03-29T13:05:00Z, the cost and usage data are retrieved from the start date up to, but not including, 2019-03-29T13:05:00Z.
* @type {Date}
* @memberof CdnUsage
*/
public to?: Date;
/**
* Storage usage in GB per month.
* @type {number}
* @memberof CdnUsage
*/
public storageUsage?: number;
/**
* Transfer usage in GB.
* @type {number}
* @memberof CdnUsage
*/
public transferUsage?: number;
constructor(obj?: Partial<CdnUsage>) {
if(!obj) {
return;
}
this.from = map(obj.from, Date);
this.to = map(obj.to, Date);
this.storageUsage = map(obj.storageUsage);
this.transferUsage = map(obj.transferUsage);
}
}
export default CdnUsage;