-
Notifications
You must be signed in to change notification settings - Fork 10
/
StreamsResponse.ts
69 lines (59 loc) · 1.57 KB
/
StreamsResponse.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 StreamsLiveResponse from './StreamsLiveResponse';
import StreamsType from './StreamsType';
import StreamsVideoResponse from './StreamsVideoResponse';
export type StreamsResponseUnion =
StreamsVideoResponse |
StreamsLiveResponse;
/**
* @export
* @class StreamsResponse
*/
export class StreamsResponse {
protected static readonly _discriminatorName = 'type';
protected static readonly _discriminatorMapping: { [key in keyof typeof StreamsType]: string; } = {
VIDEO: 'StreamsVideoResponse',
LIVE: 'StreamsLiveResponse'
};
/**
* The identifier of the stream
* @type {string}
* @memberof StreamsResponse
*/
public id?: string;
/**
* The title of the stream
* @type {string}
* @memberof StreamsResponse
*/
public title?: string;
/**
* The description of the stream
* @type {string}
* @memberof StreamsResponse
*/
public description?: string;
/**
* Creation timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ
* @type {Date}
* @memberof StreamsResponse
*/
public createdAt?: Date;
/**
* Type of the Stream contained in the StreamsResponse
* @type {StreamsType}
* @memberof StreamsResponse
*/
public type?: StreamsType;
constructor(obj?: Partial<StreamsResponse>) {
if(!obj) {
return;
}
this.id = map(obj.id);
this.title = map(obj.title);
this.description = map(obj.description);
this.createdAt = map(obj.createdAt, Date);
this.type = map(obj.type);
}
}
export default StreamsResponse;