-
Notifications
You must be signed in to change notification settings - Fork 13
/
NURootEntity.js
60 lines (57 loc) · 1.69 KB
/
NURootEntity.js
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
import NUAttribute from './NUAttribute';
import NUEntity from './NUEntity';
/*
This class models the Root Entity object
*/
export default class NURootEntity extends NUEntity {
static attributeDescriptors = {
...NUEntity.attributeDescriptors,
APIKey: new NUAttribute({
localName: 'APIKey',
attributeType: NUAttribute.ATTR_TYPE_STRING,
}),
APIKeyExpiry: new NUAttribute({
localName: 'APIKeyExpiry',
attributeType: NUAttribute.ATTR_TYPE_STRING,
}),
newPassword: new NUAttribute({
localName: 'newPassword',
attributeType: NUAttribute.ATTR_TYPE_STRING,
isPassword: true,
}),
password: new NUAttribute({
localName: 'password',
attributeType: NUAttribute.ATTR_TYPE_STRING,
isPassword: true,
isRequired: true,
}),
passwordConfirm: new NUAttribute({
localName: 'passwordConfirm',
attributeType: NUAttribute.ATTR_TYPE_STRING,
isPassword: true,
}),
role: new NUAttribute({
localName: 'role',
attributeType: NUAttribute.ATTR_TYPE_STRING,
}),
userName: new NUAttribute({
localName: 'userName',
attributeType: NUAttribute.ATTR_TYPE_STRING,
}),
}
constructor() {
super();
this.defineProperties({
APIKey: null,
APIKeyExpiry: null,
newPassword: null,
password: null,
passwordConfirm: null,
role: null,
userName: null,
});
}
get resourceName() {
return this.RESTName;
}
}