@ricado/api-client 1.4.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  3. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  4. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  5. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  6. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  7. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  8. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  9. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  10. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  11. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  12. package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  13. package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  14. package/lib/Controllers/Packhouse/Site/PackrunController.js +4 -4
  15. package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  16. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  17. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  18. package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
  19. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  20. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  21. package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
  22. package/lib/Controllers/Site/AlarmController.js +4 -4
  23. package/lib/Controllers/Site/AlarmGroupController.js +4 -4
  24. package/lib/Controllers/Site/DefinitionController.js +4 -4
  25. package/lib/Controllers/Site/PermanentObjectController.js +4 -4
  26. package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
  27. package/lib/Controllers/Site/PointController.js +4 -4
  28. package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
  29. package/lib/Models/AccountPolicyModel.js +26 -130
  30. package/lib/Models/ApiAccountModel.js +26 -130
  31. package/lib/Models/CompanyModel.js +20 -98
  32. package/lib/Models/FirebaseTokenModel.js +29 -146
  33. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +40 -192
  34. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +37 -176
  35. package/lib/Models/Packhouse/Site/CompacSizerModel.js +55 -272
  36. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +43 -208
  37. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +37 -176
  38. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +31 -144
  39. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +49 -240
  40. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +55 -272
  41. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +37 -176
  42. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +31 -144
  43. package/lib/Models/Packhouse/Site/PackTypeModel.js +37 -176
  44. package/lib/Models/Packhouse/Site/PackingLineModel.js +58 -288
  45. package/lib/Models/Packhouse/Site/PackrunModel.js +58 -288
  46. package/lib/Models/Packhouse/Site/RejectBinModel.js +40 -192
  47. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +49 -240
  48. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +43 -208
  49. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +49 -240
  50. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +124 -640
  51. package/lib/Models/Packhouse/Site/ShiftModel.js +70 -352
  52. package/lib/Models/Packhouse/Site/VarietyModel.js +37 -176
  53. package/lib/Models/RTUModel.js +23 -114
  54. package/lib/Models/RTUPluginModel.js +20 -98
  55. package/lib/Models/Site/AlarmGroupModel.js +34 -160
  56. package/lib/Models/Site/AlarmModel.js +64 -320
  57. package/lib/Models/Site/DefinitionModel.js +31 -144
  58. package/lib/Models/Site/PermanentObjectDataModel.js +37 -176
  59. package/lib/Models/Site/PermanentObjectModel.js +34 -160
  60. package/lib/Models/Site/PointModel.js +46 -224
  61. package/lib/Models/Site/TemporaryObjectModel.js +31 -144
  62. package/lib/Models/Site/index.js +0 -3
  63. package/lib/Models/SiteModel.js +23 -114
  64. package/lib/Models/TokenModel.js +35 -178
  65. package/lib/Models/UserAccountActionTokenModel.js +38 -194
  66. package/lib/Models/UserAccountModel.js +35 -178
  67. package/lib/PackageVersion.js +1 -1
  68. package/lib/index.d.ts +834 -1589
  69. package/package.json +1 -1
  70. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  71. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  72. package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  73. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  74. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  75. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  76. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  77. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  78. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  79. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  80. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  81. package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  82. package/src/Controllers/Packhouse/Site/PackrunController.js +4 -4
  83. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  84. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  85. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  86. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  87. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  88. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  89. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  90. package/src/Controllers/Site/AlarmController.js +4 -4
  91. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  92. package/src/Controllers/Site/DefinitionController.js +4 -4
  93. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  94. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  95. package/src/Controllers/Site/PointController.js +4 -4
  96. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  97. package/src/Models/AccountPolicyModel.js +21 -117
  98. package/src/Models/ApiAccountModel.js +21 -117
  99. package/src/Models/CompanyModel.js +15 -87
  100. package/src/Models/FirebaseTokenModel.js +24 -132
  101. package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
  102. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
  103. package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
  104. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
  105. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
  106. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
  107. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
  108. package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
  109. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
  110. package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
  111. package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
  112. package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
  113. package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
  114. package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
  115. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
  116. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
  117. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
  118. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
  119. package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
  120. package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
  121. package/src/Models/RTUModel.js +18 -102
  122. package/src/Models/RTUPluginModel.js +15 -87
  123. package/src/Models/Site/AlarmGroupModel.js +27 -144
  124. package/src/Models/Site/AlarmModel.js +57 -294
  125. package/src/Models/Site/DefinitionModel.js +24 -129
  126. package/src/Models/Site/PermanentObjectDataModel.js +30 -159
  127. package/src/Models/Site/PermanentObjectModel.js +27 -144
  128. package/src/Models/Site/PointModel.js +39 -204
  129. package/src/Models/Site/TemporaryObjectModel.js +24 -129
  130. package/src/Models/Site/index.js +0 -2
  131. package/src/Models/SiteModel.js +18 -102
  132. package/src/Models/TokenModel.js +30 -162
  133. package/src/Models/UserAccountActionTokenModel.js +33 -177
  134. package/src/Models/UserAccountModel.js +30 -162
  135. package/src/PackageVersion.js +1 -1
  136. package/lib/Models/Site/BaseSiteModel.js +0 -58
  137. package/src/Models/Site/BaseSiteModel.js +0 -30
@@ -4,24 +4,23 @@
4
4
  * Do Not Edit this File Manually!
5
5
  */
6
6
 
7
- import BaseSiteModel from '../../../Models/Site/BaseSiteModel';
7
+ import BaseModel from '../../../Models/BaseModel';
8
8
 
9
9
  /**
10
10
  * Model Class for a Variety
11
11
  *
12
12
  * @class
13
13
  * @hideconstructor
14
- * @extends BaseSiteModel
14
+ * @extends BaseModel
15
15
  */
16
- class VarietyModel extends BaseSiteModel
16
+ class VarietyModel extends BaseModel
17
17
  {
18
18
  /**
19
19
  * VarietyModel Constructor
20
20
  *
21
21
  * @protected
22
- * @param {number} siteId The Site ID associated with this Variety
23
22
  */
24
- constructor(siteId)
23
+ constructor()
25
24
  {
26
25
  super();
27
26
 
@@ -29,192 +28,65 @@ class VarietyModel extends BaseSiteModel
29
28
  * The Variety ID
30
29
  *
31
30
  * @type {string}
32
- * @private
31
+ * @public
33
32
  */
34
- this._id = undefined;
33
+ this.id = undefined;
35
34
 
36
35
  /**
37
36
  * The Variety Code
38
37
  *
39
38
  * @type {string}
40
- * @private
39
+ * @public
41
40
  */
42
- this._code = undefined;
41
+ this.code = undefined;
43
42
 
44
43
  /**
45
44
  * The Variety Name
46
45
  *
47
46
  * @type {string}
48
- * @private
47
+ * @public
49
48
  */
50
- this._name = undefined;
49
+ this.name = undefined;
51
50
 
52
51
  /**
53
52
  * The Variety Description
54
53
  *
55
54
  * @type {string}
56
- * @private
55
+ * @public
57
56
  */
58
- this._description = undefined;
57
+ this.description = undefined;
59
58
 
60
59
  /**
61
60
  * The Variety Image Source
62
61
  *
63
62
  * @type {string}
64
- * @private
63
+ * @public
65
64
  */
66
- this._image = undefined;
65
+ this.image = undefined;
67
66
 
68
67
  /**
69
68
  * An Array of Fruit Sizes Defined for this Variety
70
69
  *
71
70
  * @type {Array<{size: string}>}
72
- * @private
71
+ * @public
73
72
  */
74
- this._fruitSizes = undefined;
73
+ this.fruitSizes = undefined;
75
74
 
76
75
  /**
77
76
  * Whether the Variety has been deleted
78
77
  *
79
78
  * @type {boolean}
80
- * @private
79
+ * @public
81
80
  */
82
- this._deleted = undefined;
81
+ this.deleted = undefined;
83
82
 
84
83
  /**
85
84
  * When the Variety was last updated
86
85
  *
87
86
  * @type {Date}
88
- * @private
87
+ * @public
89
88
  */
90
- this._updateTimestamp = undefined;
91
-
92
- /**
93
- * The Site ID associated with this Variety
94
- *
95
- * @type {number}
96
- * @private
97
- */
98
- this._siteId = siteId;
99
- }
100
-
101
- /**
102
- * The Variety ID
103
- *
104
- * @public
105
- * @type {string}
106
- */
107
- get id()
108
- {
109
- return this._id;
110
- }
111
-
112
- /**
113
- * The Variety Code
114
- *
115
- * @public
116
- * @type {string}
117
- */
118
- get code()
119
- {
120
- return this._code;
121
- }
122
-
123
- /**
124
- * The Variety Name
125
- *
126
- * @public
127
- * @type {string}
128
- */
129
- get name()
130
- {
131
- return this._name;
132
- }
133
-
134
- /**
135
- * The Variety Description
136
- *
137
- * @public
138
- * @type {string}
139
- */
140
- get description()
141
- {
142
- return this._description;
143
- }
144
-
145
- /**
146
- * The Variety Image Source
147
- *
148
- * @public
149
- * @type {string}
150
- */
151
- get image()
152
- {
153
- return this._image;
154
- }
155
-
156
- /**
157
- * An Array of Fruit Sizes Defined for this Variety
158
- *
159
- * @public
160
- * @type {Array<{size: string}>}
161
- */
162
- get fruitSizes()
163
- {
164
- return this._fruitSizes;
165
- }
166
-
167
- /**
168
- * Whether the Variety has been deleted
169
- *
170
- * @public
171
- * @type {boolean}
172
- */
173
- get deleted()
174
- {
175
- return this._deleted;
176
- }
177
-
178
- /**
179
- * When the Variety was last updated
180
- *
181
- * @public
182
- * @type {Date}
183
- */
184
- get updateTimestamp()
185
- {
186
- return this._updateTimestamp;
187
- }
188
-
189
- /**
190
- * The Site ID associated with this Variety
191
- *
192
- * @public
193
- * @type {number}
194
- */
195
- get siteId()
196
- {
197
- return this._siteId;
198
- }
199
-
200
- /**
201
- * Convert this **VarietyModel** to a JSON Object
202
- *
203
- * @public
204
- * @return {Object<string, any>}
205
- */
206
- toJSON()
207
- {
208
- return {
209
- id: this._id,
210
- code: this._code,
211
- name: this._name,
212
- description: this._description,
213
- image: this._image,
214
- fruitSizes: this._fruitSizes,
215
- deleted: this._deleted,
216
- updateTimestamp: this._updateTimestamp
217
- };
89
+ this.updateTimestamp = undefined;
218
90
  }
219
91
 
220
92
  /**
@@ -223,12 +95,11 @@ class VarietyModel extends BaseSiteModel
223
95
  * @static
224
96
  * @public
225
97
  * @param {Object<string, any>|string} json A JSON Object or JSON String
226
- * @param {number} siteId The Site ID associated with this Variety
227
98
  * @return {VarietyModel}
228
99
  */
229
- static fromJSON(json, siteId)
100
+ static fromJSON(json)
230
101
  {
231
- let model = new VarietyModel(siteId);
102
+ let model = new VarietyModel();
232
103
 
233
104
  /**
234
105
  * The JSON Object
@@ -248,7 +119,7 @@ class VarietyModel extends BaseSiteModel
248
119
 
249
120
  if('id' in jsonObject)
250
121
  {
251
- model._id = (function(){
122
+ model.id = (function(){
252
123
  if(typeof jsonObject['id'] !== 'string')
253
124
  {
254
125
  return String(jsonObject['id']);
@@ -260,7 +131,7 @@ class VarietyModel extends BaseSiteModel
260
131
 
261
132
  if('code' in jsonObject)
262
133
  {
263
- model._code = (function(){
134
+ model.code = (function(){
264
135
  if(typeof jsonObject['code'] !== 'string')
265
136
  {
266
137
  return String(jsonObject['code']);
@@ -272,7 +143,7 @@ class VarietyModel extends BaseSiteModel
272
143
 
273
144
  if('name' in jsonObject)
274
145
  {
275
- model._name = (function(){
146
+ model.name = (function(){
276
147
  if(typeof jsonObject['name'] !== 'string')
277
148
  {
278
149
  return String(jsonObject['name']);
@@ -284,7 +155,7 @@ class VarietyModel extends BaseSiteModel
284
155
 
285
156
  if('description' in jsonObject)
286
157
  {
287
- model._description = (function(){
158
+ model.description = (function(){
288
159
  if(typeof jsonObject['description'] !== 'string')
289
160
  {
290
161
  return String(jsonObject['description']);
@@ -296,7 +167,7 @@ class VarietyModel extends BaseSiteModel
296
167
 
297
168
  if('image' in jsonObject)
298
169
  {
299
- model._image = (function(){
170
+ model.image = (function(){
300
171
  if(typeof jsonObject['image'] !== 'string')
301
172
  {
302
173
  return String(jsonObject['image']);
@@ -308,7 +179,7 @@ class VarietyModel extends BaseSiteModel
308
179
 
309
180
  if('fruitSizes' in jsonObject)
310
181
  {
311
- model._fruitSizes = (function(){
182
+ model.fruitSizes = (function(){
312
183
  if(Array.isArray(jsonObject['fruitSizes']) !== true)
313
184
  {
314
185
  return [];
@@ -342,7 +213,7 @@ class VarietyModel extends BaseSiteModel
342
213
 
343
214
  if('deleted' in jsonObject)
344
215
  {
345
- model._deleted = (function(){
216
+ model.deleted = (function(){
346
217
  if(typeof jsonObject['deleted'] !== 'boolean')
347
218
  {
348
219
  return Boolean(jsonObject['deleted']);
@@ -354,7 +225,7 @@ class VarietyModel extends BaseSiteModel
354
225
 
355
226
  if('updateTimestamp' in jsonObject)
356
227
  {
357
- model._updateTimestamp = (function(){
228
+ model.updateTimestamp = (function(){
358
229
  if(typeof jsonObject['updateTimestamp'] !== 'string')
359
230
  {
360
231
  return new Date(String(jsonObject['updateTimestamp']));
@@ -28,133 +28,49 @@ class RTUModel extends BaseModel
28
28
  * The RTU ID
29
29
  *
30
30
  * @type {number}
31
- * @private
31
+ * @public
32
32
  */
33
- this._id = undefined;
33
+ this.id = undefined;
34
34
 
35
35
  /**
36
36
  * The Site this RTU belongs to
37
37
  *
38
38
  * @type {number}
39
- * @private
39
+ * @public
40
40
  */
41
- this._siteId = undefined;
41
+ this.siteId = undefined;
42
42
 
43
43
  /**
44
44
  * The RTU Name
45
45
  *
46
46
  * @type {string}
47
- * @private
47
+ * @public
48
48
  */
49
- this._name = undefined;
49
+ this.name = undefined;
50
50
 
51
51
  /**
52
52
  * Whether the RTU is Enabled
53
53
  *
54
54
  * @type {boolean}
55
- * @private
55
+ * @public
56
56
  */
57
- this._enabled = undefined;
57
+ this.enabled = undefined;
58
58
 
59
59
  /**
60
60
  * Whether the RTU has been deleted
61
61
  *
62
62
  * @type {boolean}
63
- * @private
63
+ * @public
64
64
  */
65
- this._deleted = undefined;
65
+ this.deleted = undefined;
66
66
 
67
67
  /**
68
68
  * When the RTU was last updated
69
69
  *
70
70
  * @type {Date}
71
- * @private
71
+ * @public
72
72
  */
73
- this._updateTimestamp = undefined;
74
- }
75
-
76
- /**
77
- * The RTU ID
78
- *
79
- * @public
80
- * @type {number}
81
- */
82
- get id()
83
- {
84
- return this._id;
85
- }
86
-
87
- /**
88
- * The Site this RTU belongs to
89
- *
90
- * @public
91
- * @type {number}
92
- */
93
- get siteId()
94
- {
95
- return this._siteId;
96
- }
97
-
98
- /**
99
- * The RTU Name
100
- *
101
- * @public
102
- * @type {string}
103
- */
104
- get name()
105
- {
106
- return this._name;
107
- }
108
-
109
- /**
110
- * Whether the RTU is Enabled
111
- *
112
- * @public
113
- * @type {boolean}
114
- */
115
- get enabled()
116
- {
117
- return this._enabled;
118
- }
119
-
120
- /**
121
- * Whether the RTU has been deleted
122
- *
123
- * @public
124
- * @type {boolean}
125
- */
126
- get deleted()
127
- {
128
- return this._deleted;
129
- }
130
-
131
- /**
132
- * When the RTU was last updated
133
- *
134
- * @public
135
- * @type {Date}
136
- */
137
- get updateTimestamp()
138
- {
139
- return this._updateTimestamp;
140
- }
141
-
142
- /**
143
- * Convert this **RTUModel** to a JSON Object
144
- *
145
- * @public
146
- * @return {Object<string, any>}
147
- */
148
- toJSON()
149
- {
150
- return {
151
- id: this._id,
152
- siteId: this._siteId,
153
- name: this._name,
154
- enabled: this._enabled,
155
- deleted: this._deleted,
156
- updateTimestamp: this._updateTimestamp
157
- };
73
+ this.updateTimestamp = undefined;
158
74
  }
159
75
 
160
76
  /**
@@ -187,7 +103,7 @@ class RTUModel extends BaseModel
187
103
 
188
104
  if('id' in jsonObject)
189
105
  {
190
- model._id = (function(){
106
+ model.id = (function(){
191
107
  if(typeof jsonObject['id'] !== 'number')
192
108
  {
193
109
  return Number.isInteger(Number(jsonObject['id'])) ? Number(jsonObject['id']) : Math.floor(Number(jsonObject['id']));
@@ -199,7 +115,7 @@ class RTUModel extends BaseModel
199
115
 
200
116
  if('siteId' in jsonObject)
201
117
  {
202
- model._siteId = (function(){
118
+ model.siteId = (function(){
203
119
  if(typeof jsonObject['siteId'] !== 'number')
204
120
  {
205
121
  return Number.isInteger(Number(jsonObject['siteId'])) ? Number(jsonObject['siteId']) : Math.floor(Number(jsonObject['siteId']));
@@ -211,7 +127,7 @@ class RTUModel extends BaseModel
211
127
 
212
128
  if('name' in jsonObject)
213
129
  {
214
- model._name = (function(){
130
+ model.name = (function(){
215
131
  if(typeof jsonObject['name'] !== 'string')
216
132
  {
217
133
  return String(jsonObject['name']);
@@ -223,7 +139,7 @@ class RTUModel extends BaseModel
223
139
 
224
140
  if('enabled' in jsonObject)
225
141
  {
226
- model._enabled = (function(){
142
+ model.enabled = (function(){
227
143
  if(typeof jsonObject['enabled'] !== 'boolean')
228
144
  {
229
145
  return Boolean(jsonObject['enabled']);
@@ -235,7 +151,7 @@ class RTUModel extends BaseModel
235
151
 
236
152
  if('deleted' in jsonObject)
237
153
  {
238
- model._deleted = (function(){
154
+ model.deleted = (function(){
239
155
  if(typeof jsonObject['deleted'] !== 'boolean')
240
156
  {
241
157
  return Boolean(jsonObject['deleted']);
@@ -247,7 +163,7 @@ class RTUModel extends BaseModel
247
163
 
248
164
  if('updateTimestamp' in jsonObject)
249
165
  {
250
- model._updateTimestamp = (function(){
166
+ model.updateTimestamp = (function(){
251
167
  if(typeof jsonObject['updateTimestamp'] !== 'string')
252
168
  {
253
169
  return new Date(String(jsonObject['updateTimestamp']));
@@ -28,113 +28,41 @@ class RTUPluginModel extends BaseModel
28
28
  * The RTU Plugin ID
29
29
  *
30
30
  * @type {number}
31
- * @private
31
+ * @public
32
32
  */
33
- this._id = undefined;
33
+ this.id = undefined;
34
34
 
35
35
  /**
36
36
  * The Plugin Name
37
37
  *
38
38
  * @type {string}
39
- * @private
39
+ * @public
40
40
  */
41
- this._name = undefined;
41
+ this.name = undefined;
42
42
 
43
43
  /**
44
44
  * The Company this RTU Plugin belongs to
45
45
  *
46
46
  * @type {string}
47
- * @private
47
+ * @public
48
48
  */
49
- this._companyId = undefined;
49
+ this.companyId = undefined;
50
50
 
51
51
  /**
52
52
  * Whether the RTU Plugin has been deleted
53
53
  *
54
54
  * @type {boolean}
55
- * @private
55
+ * @public
56
56
  */
57
- this._deleted = undefined;
57
+ this.deleted = undefined;
58
58
 
59
59
  /**
60
60
  * When the RTU Plugin was last updated
61
61
  *
62
62
  * @type {Date}
63
- * @private
63
+ * @public
64
64
  */
65
- this._updateTimestamp = undefined;
66
- }
67
-
68
- /**
69
- * The RTU Plugin ID
70
- *
71
- * @public
72
- * @type {number}
73
- */
74
- get id()
75
- {
76
- return this._id;
77
- }
78
-
79
- /**
80
- * The Plugin Name
81
- *
82
- * @public
83
- * @type {string}
84
- */
85
- get name()
86
- {
87
- return this._name;
88
- }
89
-
90
- /**
91
- * The Company this RTU Plugin belongs to
92
- *
93
- * @public
94
- * @type {string}
95
- */
96
- get companyId()
97
- {
98
- return this._companyId;
99
- }
100
-
101
- /**
102
- * Whether the RTU Plugin has been deleted
103
- *
104
- * @public
105
- * @type {boolean}
106
- */
107
- get deleted()
108
- {
109
- return this._deleted;
110
- }
111
-
112
- /**
113
- * When the RTU Plugin was last updated
114
- *
115
- * @public
116
- * @type {Date}
117
- */
118
- get updateTimestamp()
119
- {
120
- return this._updateTimestamp;
121
- }
122
-
123
- /**
124
- * Convert this **RTUPluginModel** to a JSON Object
125
- *
126
- * @public
127
- * @return {Object<string, any>}
128
- */
129
- toJSON()
130
- {
131
- return {
132
- id: this._id,
133
- name: this._name,
134
- companyId: this._companyId,
135
- deleted: this._deleted,
136
- updateTimestamp: this._updateTimestamp
137
- };
65
+ this.updateTimestamp = undefined;
138
66
  }
139
67
 
140
68
  /**
@@ -167,7 +95,7 @@ class RTUPluginModel extends BaseModel
167
95
 
168
96
  if('id' in jsonObject)
169
97
  {
170
- model._id = (function(){
98
+ model.id = (function(){
171
99
  if(typeof jsonObject['id'] !== 'number')
172
100
  {
173
101
  return Number.isInteger(Number(jsonObject['id'])) ? Number(jsonObject['id']) : Math.floor(Number(jsonObject['id']));
@@ -179,7 +107,7 @@ class RTUPluginModel extends BaseModel
179
107
 
180
108
  if('name' in jsonObject)
181
109
  {
182
- model._name = (function(){
110
+ model.name = (function(){
183
111
  if(typeof jsonObject['name'] !== 'string')
184
112
  {
185
113
  return String(jsonObject['name']);
@@ -191,7 +119,7 @@ class RTUPluginModel extends BaseModel
191
119
 
192
120
  if('companyId' in jsonObject)
193
121
  {
194
- model._companyId = (function(){
122
+ model.companyId = (function(){
195
123
  if(typeof jsonObject['companyId'] !== 'string')
196
124
  {
197
125
  return String(jsonObject['companyId']);
@@ -203,7 +131,7 @@ class RTUPluginModel extends BaseModel
203
131
 
204
132
  if('deleted' in jsonObject)
205
133
  {
206
- model._deleted = (function(){
134
+ model.deleted = (function(){
207
135
  if(typeof jsonObject['deleted'] !== 'boolean')
208
136
  {
209
137
  return Boolean(jsonObject['deleted']);
@@ -215,7 +143,7 @@ class RTUPluginModel extends BaseModel
215
143
 
216
144
  if('updateTimestamp' in jsonObject)
217
145
  {
218
- model._updateTimestamp = (function(){
146
+ model.updateTimestamp = (function(){
219
147
  if(typeof jsonObject['updateTimestamp'] !== 'string')
220
148
  {
221
149
  return new Date(String(jsonObject['updateTimestamp']));