-
Notifications
You must be signed in to change notification settings - Fork 10
/
Organization.ts
68 lines (59 loc) · 1.64 KB
/
Organization.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
import {map, mapArray} from '../common/Mapper';
import BitmovinResource from './BitmovinResource';
import OrganizationType from './OrganizationType';
import ResourceLimitContainer from './ResourceLimitContainer';
import SignupSource from './SignupSource';
/**
* @export
* @class Organization
*/
export class Organization extends BitmovinResource {
/**
* Specifies the type of the organization in the hierachy. Only sub-organizations can be newly created. (required)
* @type {OrganizationType}
* @memberof Organization
*/
public type?: OrganizationType;
/**
* ID of the parent organization
* @type {string}
* @memberof Organization
*/
public parentId?: string;
/**
* Hexadecimal color
* @type {string}
* @memberof Organization
*/
public labelColor?: string;
/**
* @type {ResourceLimitContainer[]}
* @memberof Organization
*/
public limitsPerResource?: ResourceLimitContainer[];
/**
* which platform initiated organisation creation
* @type {SignupSource}
* @memberof Organization
*/
public signupSource?: SignupSource;
/**
* Flag indicating if MFA is required for the organization
* @type {boolean}
* @memberof Organization
*/
public mfaRequired?: boolean;
constructor(obj?: Partial<Organization>) {
super(obj);
if(!obj) {
return;
}
this.type = map(obj.type);
this.parentId = map(obj.parentId);
this.labelColor = map(obj.labelColor);
this.limitsPerResource = mapArray(obj.limitsPerResource, ResourceLimitContainer);
this.signupSource = map(obj.signupSource);
this.mfaRequired = map(obj.mfaRequired);
}
}
export default Organization;