-
Notifications
You must be signed in to change notification settings - Fork 10
/
Condition.ts
51 lines (44 loc) · 1.37 KB
/
Condition.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
import {map, mapArray} from '../common/Mapper';
import AbstractCondition from './AbstractCondition';
import ConditionOperator from './ConditionOperator';
import ConditionType from './ConditionType';
/**
* @export
* @class Condition
*/
export class Condition extends AbstractCondition {
/**
* Discriminator property for AbstractCondition
* @type {string}
* @memberof Condition
*/
public readonly type: ConditionType = ConditionType.CONDITION;
/**
* The attribute that should be used for the evaluation. Valid values include, depending on the context: - HEIGHT - WIDTH - BITRATE - FPS - ASPECTRATIO - INPUTSTREAM - LANGUAGE - CHANNELFORMAT - CHANNELLAYOUT - STREAMCOUNT - AUDIOSTREAMCOUNT - VIDEOSTREAMCOUNT - DURATION - ROTATION (required)
* @type {string}
* @memberof Condition
*/
public attribute?: string;
/**
* The operator that should be used for the evaluation (required)
* @type {ConditionOperator}
* @memberof Condition
*/
public operator?: ConditionOperator;
/**
* The value that should be used for comparison (required)
* @type {string}
* @memberof Condition
*/
public value?: string;
constructor(obj?: Partial<Condition>) {
super(obj);
if(!obj) {
return;
}
this.attribute = map(obj.attribute);
this.operator = map(obj.operator);
this.value = map(obj.value);
}
}
export default Condition;