-
Notifications
You must be signed in to change notification settings - Fork 10
/
ResponseErrorData.ts
58 lines (50 loc) · 1.39 KB
/
ResponseErrorData.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 Link from './Link';
import Message from './Message';
/**
* @export
* @class ResponseErrorData
*/
export class ResponseErrorData {
/**
* Contains an error code as defined in https://bitmovin.com/encoding-documentation/bitmovin-api/#/introduction/api-error-codes (required)
* @type {number}
* @memberof ResponseErrorData
*/
public code?: number;
/**
* General error message (required)
* @type {string}
* @memberof ResponseErrorData
*/
public message?: string;
/**
* More detailed message meant for developers (required)
* @type {string}
* @memberof ResponseErrorData
*/
public developerMessage?: string;
/**
* collection of links to webpages containing further information on the topic
* @type {Link[]}
* @memberof ResponseErrorData
*/
public links?: Link[];
/**
* collection of messages containing more detailed information on the cause of the error
* @type {Message[]}
* @memberof ResponseErrorData
*/
public details?: Message[];
constructor(obj?: Partial<ResponseErrorData>) {
if(!obj) {
return;
}
this.code = map(obj.code);
this.message = map(obj.message);
this.developerMessage = map(obj.developerMessage);
this.links = mapArray(obj.links, Link);
this.details = mapArray(obj.details, Message);
}
}
export default ResponseErrorData;