-
Notifications
You must be signed in to change notification settings - Fork 10
/
PrewarmedEncoderPool.ts
85 lines (74 loc) · 2.49 KB
/
PrewarmedEncoderPool.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import {map, mapArray} from '../common/Mapper';
import BitmovinResource from './BitmovinResource';
import CloudRegion from './CloudRegion';
import PrewarmedEncoderDiskSize from './PrewarmedEncoderDiskSize';
import PrewarmedEncoderPoolStatus from './PrewarmedEncoderPoolStatus';
/**
* @export
* @class PrewarmedEncoderPool
*/
export class PrewarmedEncoderPool extends BitmovinResource {
/**
* The encoder version which the pool's instances will be running (required)
* @type {string}
* @memberof PrewarmedEncoderPool
*/
public encoderVersion?: string;
/**
* The cloud region in which the pool's instances will be running. Must be a specific region (e.g. not 'AUTO', 'GOOGLE' or 'EUROPE') (required)
* @type {CloudRegion}
* @memberof PrewarmedEncoderPool
*/
public cloudRegion?: CloudRegion;
/**
* Define an external infrastructure to run the pool on.
* @type {string}
* @memberof PrewarmedEncoderPool
*/
public infrastructureId?: string;
/**
* Disk size of the prewarmed instances in GB. Needs to be chosen depending on input file sizes and encoding features used. (required)
* @type {PrewarmedEncoderDiskSize}
* @memberof PrewarmedEncoderPool
*/
public diskSize?: PrewarmedEncoderDiskSize;
/**
* Number of instances to keep prewarmed while the pool is running (required)
* @type {number}
* @memberof PrewarmedEncoderPool
*/
public targetPoolSize?: number;
/**
* Activate dynamic pool behaviour. Pool will increase/decrease based on usage. Minimum pool size is set by targetPoolSize.
* @type {boolean}
* @memberof PrewarmedEncoderPool
*/
public dynamicPool?: boolean;
/**
* Create pool with GPU instances for hardware encoding presets (e.g., VOD_HARDWARE_SHORTFORM).
* @type {boolean}
* @memberof PrewarmedEncoderPool
*/
public gpuEnabled?: boolean;
/**
* Current status of the pool.
* @type {PrewarmedEncoderPoolStatus}
* @memberof PrewarmedEncoderPool
*/
public status?: PrewarmedEncoderPoolStatus;
constructor(obj?: Partial<PrewarmedEncoderPool>) {
super(obj);
if(!obj) {
return;
}
this.encoderVersion = map(obj.encoderVersion);
this.cloudRegion = map(obj.cloudRegion);
this.infrastructureId = map(obj.infrastructureId);
this.diskSize = map(obj.diskSize);
this.targetPoolSize = map(obj.targetPoolSize);
this.dynamicPool = map(obj.dynamicPool);
this.gpuEnabled = map(obj.gpuEnabled);
this.status = map(obj.status);
}
}
export default PrewarmedEncoderPool;