-
Notifications
You must be signed in to change notification settings - Fork 10
/
HttpInput.ts
58 lines (50 loc) · 1.06 KB
/
HttpInput.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 Input from './Input';
import InputType from './InputType';
/**
* @export
* @class HttpInput
*/
export class HttpInput extends Input {
/**
* Discriminator property for Input
* @type {string}
* @memberof HttpInput
*/
public readonly type: InputType = InputType.HTTP;
/**
* Host Url or IP of the HTTP server (required)
* @type {string}
* @memberof HttpInput
*/
public host?: string;
/**
* Basic Auth Username, if required
* @type {string}
* @memberof HttpInput
*/
public username?: string;
/**
* Basic Auth Password, if required
* @type {string}
* @memberof HttpInput
*/
public password?: string;
/**
* Custom Port
* @type {number}
* @memberof HttpInput
*/
public port?: number;
constructor(obj?: Partial<HttpInput>) {
super(obj);
if(!obj) {
return;
}
this.host = map(obj.host);
this.username = map(obj.username);
this.password = map(obj.password);
this.port = map(obj.port);
}
}
export default HttpInput;