/
BitmovinResource.ts
58 lines (50 loc) · 1.39 KB
/
BitmovinResource.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
import {map, mapArray} from '../common/Mapper';
import BitmovinResponse from './BitmovinResponse';
/**
* @export
* @class BitmovinResource
*/
export class BitmovinResource extends BitmovinResponse {
/**
* Name of the resource. Can be freely chosen by the user.
* @type {string}
* @memberof BitmovinResource
*/
public name?: string;
/**
* Description of the resource. Can be freely chosen by the user.
* @type {string}
* @memberof BitmovinResource
*/
public description?: string;
/**
* Creation timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ
* @type {Date}
* @memberof BitmovinResource
*/
public createdAt?: Date;
/**
* Modified timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ
* @type {Date}
* @memberof BitmovinResource
*/
public modifiedAt?: Date;
/**
* User-specific meta data. This can hold anything.
* @type {{ [key: string]: any; }}
* @memberof BitmovinResource
*/
public customData?: { [key: string]: any; };
constructor(obj?: Partial<BitmovinResource>) {
super(obj);
if(!obj) {
return;
}
this.name = map(obj.name);
this.description = map(obj.description);
this.createdAt = map(obj.createdAt, Date);
this.modifiedAt = map(obj.modifiedAt, Date);
this.customData = map(obj.customData);
}
}
export default BitmovinResource;