@ricado/api-client 1.3.0 → 2.0.1

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 (139) 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 +6 -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 +841 -1588
  69. package/lib/index.js +67 -38
  70. package/package.json +3 -3
  71. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  72. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  73. package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
  74. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  75. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  76. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  77. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  78. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  79. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  80. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  81. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  82. package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
  83. package/src/Controllers/Packhouse/Site/PackrunController.js +4 -4
  84. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  85. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
  86. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  87. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  88. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  89. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
  90. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  91. package/src/Controllers/Site/AlarmController.js +4 -4
  92. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  93. package/src/Controllers/Site/DefinitionController.js +4 -4
  94. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  95. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  96. package/src/Controllers/Site/PointController.js +6 -4
  97. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  98. package/src/Models/AccountPolicyModel.js +21 -117
  99. package/src/Models/ApiAccountModel.js +21 -117
  100. package/src/Models/CompanyModel.js +15 -87
  101. package/src/Models/FirebaseTokenModel.js +24 -132
  102. package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
  103. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
  104. package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
  105. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
  106. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
  107. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
  108. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
  109. package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
  110. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
  111. package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
  112. package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
  113. package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
  114. package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
  115. package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
  116. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
  117. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
  118. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
  119. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
  120. package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
  121. package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
  122. package/src/Models/RTUModel.js +18 -102
  123. package/src/Models/RTUPluginModel.js +15 -87
  124. package/src/Models/Site/AlarmGroupModel.js +27 -144
  125. package/src/Models/Site/AlarmModel.js +57 -294
  126. package/src/Models/Site/DefinitionModel.js +24 -129
  127. package/src/Models/Site/PermanentObjectDataModel.js +30 -159
  128. package/src/Models/Site/PermanentObjectModel.js +27 -144
  129. package/src/Models/Site/PointModel.js +39 -204
  130. package/src/Models/Site/TemporaryObjectModel.js +24 -129
  131. package/src/Models/Site/index.js +0 -2
  132. package/src/Models/SiteModel.js +18 -102
  133. package/src/Models/TokenModel.js +30 -162
  134. package/src/Models/UserAccountActionTokenModel.js +33 -177
  135. package/src/Models/UserAccountModel.js +30 -162
  136. package/src/PackageVersion.js +1 -1
  137. package/src/index.js +35 -3
  138. package/lib/Models/Site/BaseSiteModel.js +0 -58
  139. package/src/Models/Site/BaseSiteModel.js +0 -30
@@ -58,133 +58,55 @@ var RTUPluginModel = /*#__PURE__*/function (_BaseModel) {
58
58
  * The RTU Plugin ID
59
59
  *
60
60
  * @type {number}
61
- * @private
61
+ * @public
62
62
  */
63
63
 
64
- _this._id = undefined;
64
+ _this.id = undefined;
65
65
  /**
66
66
  * The Plugin Name
67
67
  *
68
68
  * @type {string}
69
- * @private
69
+ * @public
70
70
  */
71
71
 
72
- _this._name = undefined;
72
+ _this.name = undefined;
73
73
  /**
74
74
  * The Company this RTU Plugin belongs to
75
75
  *
76
76
  * @type {string}
77
- * @private
77
+ * @public
78
78
  */
79
79
 
80
- _this._companyId = undefined;
80
+ _this.companyId = undefined;
81
81
  /**
82
82
  * Whether the RTU Plugin has been deleted
83
83
  *
84
84
  * @type {boolean}
85
- * @private
85
+ * @public
86
86
  */
87
87
 
88
- _this._deleted = undefined;
88
+ _this.deleted = undefined;
89
89
  /**
90
90
  * When the RTU Plugin was last updated
91
91
  *
92
92
  * @type {Date}
93
- * @private
93
+ * @public
94
94
  */
95
95
 
96
- _this._updateTimestamp = undefined;
96
+ _this.updateTimestamp = undefined;
97
97
  return _this;
98
98
  }
99
99
  /**
100
- * The RTU Plugin ID
100
+ * Create a new **RTUPluginModel** from a JSON Object or JSON String
101
101
  *
102
+ * @static
102
103
  * @public
103
- * @type {number}
104
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
105
+ * @return {RTUPluginModel}
104
106
  */
105
107
 
106
108
 
107
- _createClass(RTUPluginModel, [{
108
- key: "id",
109
- get: function get() {
110
- return this._id;
111
- }
112
- /**
113
- * The Plugin Name
114
- *
115
- * @public
116
- * @type {string}
117
- */
118
-
119
- }, {
120
- key: "name",
121
- get: function get() {
122
- return this._name;
123
- }
124
- /**
125
- * The Company this RTU Plugin belongs to
126
- *
127
- * @public
128
- * @type {string}
129
- */
130
-
131
- }, {
132
- key: "companyId",
133
- get: function get() {
134
- return this._companyId;
135
- }
136
- /**
137
- * Whether the RTU Plugin has been deleted
138
- *
139
- * @public
140
- * @type {boolean}
141
- */
142
-
143
- }, {
144
- key: "deleted",
145
- get: function get() {
146
- return this._deleted;
147
- }
148
- /**
149
- * When the RTU Plugin was last updated
150
- *
151
- * @public
152
- * @type {Date}
153
- */
154
-
155
- }, {
156
- key: "updateTimestamp",
157
- get: function get() {
158
- return this._updateTimestamp;
159
- }
160
- /**
161
- * Convert this **RTUPluginModel** to a JSON Object
162
- *
163
- * @public
164
- * @return {Object<string, any>}
165
- */
166
-
167
- }, {
168
- key: "toJSON",
169
- value: function toJSON() {
170
- return {
171
- id: this._id,
172
- name: this._name,
173
- companyId: this._companyId,
174
- deleted: this._deleted,
175
- updateTimestamp: this._updateTimestamp
176
- };
177
- }
178
- /**
179
- * Create a new **RTUPluginModel** from a JSON Object or JSON String
180
- *
181
- * @static
182
- * @public
183
- * @param {Object<string, any>|string} json A JSON Object or JSON String
184
- * @return {RTUPluginModel}
185
- */
186
-
187
- }], [{
109
+ _createClass(RTUPluginModel, null, [{
188
110
  key: "fromJSON",
189
111
  value: function fromJSON(json) {
190
112
  var model = new RTUPluginModel();
@@ -203,7 +125,7 @@ var RTUPluginModel = /*#__PURE__*/function (_BaseModel) {
203
125
  }
204
126
 
205
127
  if ('id' in jsonObject) {
206
- model._id = function () {
128
+ model.id = function () {
207
129
  if (typeof jsonObject['id'] !== 'number') {
208
130
  return Number.isInteger(Number(jsonObject['id'])) ? Number(jsonObject['id']) : Math.floor(Number(jsonObject['id']));
209
131
  }
@@ -213,7 +135,7 @@ var RTUPluginModel = /*#__PURE__*/function (_BaseModel) {
213
135
  }
214
136
 
215
137
  if ('name' in jsonObject) {
216
- model._name = function () {
138
+ model.name = function () {
217
139
  if (typeof jsonObject['name'] !== 'string') {
218
140
  return String(jsonObject['name']);
219
141
  }
@@ -223,7 +145,7 @@ var RTUPluginModel = /*#__PURE__*/function (_BaseModel) {
223
145
  }
224
146
 
225
147
  if ('companyId' in jsonObject) {
226
- model._companyId = function () {
148
+ model.companyId = function () {
227
149
  if (typeof jsonObject['companyId'] !== 'string') {
228
150
  return String(jsonObject['companyId']);
229
151
  }
@@ -233,7 +155,7 @@ var RTUPluginModel = /*#__PURE__*/function (_BaseModel) {
233
155
  }
234
156
 
235
157
  if ('deleted' in jsonObject) {
236
- model._deleted = function () {
158
+ model.deleted = function () {
237
159
  if (typeof jsonObject['deleted'] !== 'boolean') {
238
160
  return Boolean(jsonObject['deleted']);
239
161
  }
@@ -243,7 +165,7 @@ var RTUPluginModel = /*#__PURE__*/function (_BaseModel) {
243
165
  }
244
166
 
245
167
  if ('updateTimestamp' in jsonObject) {
246
- model._updateTimestamp = function () {
168
+ model.updateTimestamp = function () {
247
169
  if (typeof jsonObject['updateTimestamp'] !== 'string') {
248
170
  return new Date(String(jsonObject['updateTimestamp']));
249
171
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _BaseSiteModel2 = _interopRequireDefault(require("../../Models/Site/BaseSiteModel"));
8
+ var _BaseModel2 = _interopRequireDefault(require("../../Models/BaseModel"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
@@ -36,10 +36,10 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
36
36
  *
37
37
  * @class
38
38
  * @hideconstructor
39
- * @extends BaseSiteModel
39
+ * @extends BaseModel
40
40
  */
41
- var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
42
- _inherits(AlarmGroupModel, _BaseSiteModel);
41
+ var AlarmGroupModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(AlarmGroupModel, _BaseModel);
43
43
 
44
44
  var _super = _createSuper(AlarmGroupModel);
45
45
 
@@ -47,9 +47,8 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
47
47
  * AlarmGroupModel Constructor
48
48
  *
49
49
  * @protected
50
- * @param {number} siteId The Site ID associated with this Alarm Group
51
50
  */
52
- function AlarmGroupModel(siteId) {
51
+ function AlarmGroupModel() {
53
52
  var _this;
54
53
 
55
54
  _classCallCheck(this, AlarmGroupModel);
@@ -59,199 +58,74 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
59
58
  * The Alarm Group ID
60
59
  *
61
60
  * @type {string}
62
- * @private
61
+ * @public
63
62
  */
64
63
 
65
- _this._id = undefined;
64
+ _this.id = undefined;
66
65
  /**
67
66
  * The RTU this Alarm Group belongs to
68
67
  *
69
68
  * @type {?number}
70
- * @private
69
+ * @public
71
70
  */
72
71
 
73
- _this._rtuId = undefined;
72
+ _this.rtuId = undefined;
74
73
  /**
75
74
  * The Alarm Group Name
76
75
  *
77
76
  * @type {string}
78
- * @private
77
+ * @public
79
78
  */
80
79
 
81
- _this._name = undefined;
80
+ _this.name = undefined;
82
81
  /**
83
82
  * The Boolean Point used to Reset this Alarm Group
84
83
  *
85
84
  * @type {number}
86
- * @private
85
+ * @public
87
86
  */
88
87
 
89
- _this._resetPoint = undefined;
88
+ _this.resetPoint = undefined;
90
89
  /**
91
90
  * An Array of Points and the States to be Written when this Alarm Group is Reset
92
91
  *
93
92
  * @type {Array<{point: number, value: boolean}>}
94
- * @private
93
+ * @public
95
94
  */
96
95
 
97
- _this._externalResetPoints = undefined;
96
+ _this.externalResetPoints = undefined;
98
97
  /**
99
98
  * Whether the Alarm Group has been deleted
100
99
  *
101
100
  * @type {boolean}
102
- * @private
101
+ * @public
103
102
  */
104
103
 
105
- _this._deleted = undefined;
104
+ _this.deleted = undefined;
106
105
  /**
107
106
  * When the Alarm Group was last updated
108
107
  *
109
108
  * @type {Date}
110
- * @private
111
- */
112
-
113
- _this._updateTimestamp = undefined;
114
- /**
115
- * The Site ID associated with this Alarm Group
116
- *
117
- * @type {number}
118
- * @private
109
+ * @public
119
110
  */
120
111
 
121
- _this._siteId = siteId;
112
+ _this.updateTimestamp = undefined;
122
113
  return _this;
123
114
  }
124
115
  /**
125
- * The Alarm Group ID
116
+ * Create a new **AlarmGroupModel** from a JSON Object or JSON String
126
117
  *
118
+ * @static
127
119
  * @public
128
- * @type {string}
120
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
121
+ * @return {AlarmGroupModel}
129
122
  */
130
123
 
131
124
 
132
- _createClass(AlarmGroupModel, [{
133
- key: "id",
134
- get: function get() {
135
- return this._id;
136
- }
137
- /**
138
- * The RTU this Alarm Group belongs to
139
- *
140
- * @public
141
- * @type {?number}
142
- */
143
-
144
- }, {
145
- key: "rtuId",
146
- get: function get() {
147
- return this._rtuId;
148
- }
149
- /**
150
- * The Alarm Group Name
151
- *
152
- * @public
153
- * @type {string}
154
- */
155
-
156
- }, {
157
- key: "name",
158
- get: function get() {
159
- return this._name;
160
- }
161
- /**
162
- * The Boolean Point used to Reset this Alarm Group
163
- *
164
- * @public
165
- * @type {number}
166
- */
167
-
168
- }, {
169
- key: "resetPoint",
170
- get: function get() {
171
- return this._resetPoint;
172
- }
173
- /**
174
- * An Array of Points and the States to be Written when this Alarm Group is Reset
175
- *
176
- * @public
177
- * @type {Array<{point: number, value: boolean}>}
178
- */
179
-
180
- }, {
181
- key: "externalResetPoints",
182
- get: function get() {
183
- return this._externalResetPoints;
184
- }
185
- /**
186
- * Whether the Alarm Group has been deleted
187
- *
188
- * @public
189
- * @type {boolean}
190
- */
191
-
192
- }, {
193
- key: "deleted",
194
- get: function get() {
195
- return this._deleted;
196
- }
197
- /**
198
- * When the Alarm Group was last updated
199
- *
200
- * @public
201
- * @type {Date}
202
- */
203
-
204
- }, {
205
- key: "updateTimestamp",
206
- get: function get() {
207
- return this._updateTimestamp;
208
- }
209
- /**
210
- * The Site ID associated with this Alarm Group
211
- *
212
- * @public
213
- * @type {number}
214
- */
215
-
216
- }, {
217
- key: "siteId",
218
- get: function get() {
219
- return this._siteId;
220
- }
221
- /**
222
- * Convert this **AlarmGroupModel** to a JSON Object
223
- *
224
- * @public
225
- * @return {Object<string, any>}
226
- */
227
-
228
- }, {
229
- key: "toJSON",
230
- value: function toJSON() {
231
- return {
232
- id: this._id,
233
- rtuId: this._rtuId,
234
- name: this._name,
235
- resetPoint: this._resetPoint,
236
- externalResetPoints: this._externalResetPoints,
237
- deleted: this._deleted,
238
- updateTimestamp: this._updateTimestamp
239
- };
240
- }
241
- /**
242
- * Create a new **AlarmGroupModel** from a JSON Object or JSON String
243
- *
244
- * @static
245
- * @public
246
- * @param {Object<string, any>|string} json A JSON Object or JSON String
247
- * @param {number} siteId The Site ID associated with this Alarm Group
248
- * @return {AlarmGroupModel}
249
- */
250
-
251
- }], [{
125
+ _createClass(AlarmGroupModel, null, [{
252
126
  key: "fromJSON",
253
- value: function fromJSON(json, siteId) {
254
- var model = new AlarmGroupModel(siteId);
127
+ value: function fromJSON(json) {
128
+ var model = new AlarmGroupModel();
255
129
  /**
256
130
  * The JSON Object
257
131
  *
@@ -267,7 +141,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
267
141
  }
268
142
 
269
143
  if ('id' in jsonObject) {
270
- model._id = function () {
144
+ model.id = function () {
271
145
  if (typeof jsonObject['id'] !== 'string') {
272
146
  return String(jsonObject['id']);
273
147
  }
@@ -277,7 +151,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
277
151
  }
278
152
 
279
153
  if ('rtuId' in jsonObject) {
280
- model._rtuId = function () {
154
+ model.rtuId = function () {
281
155
  if (jsonObject['rtuId'] === null) {
282
156
  return null;
283
157
  }
@@ -291,7 +165,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
291
165
  }
292
166
 
293
167
  if ('name' in jsonObject) {
294
- model._name = function () {
168
+ model.name = function () {
295
169
  if (typeof jsonObject['name'] !== 'string') {
296
170
  return String(jsonObject['name']);
297
171
  }
@@ -301,7 +175,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
301
175
  }
302
176
 
303
177
  if ('resetPoint' in jsonObject) {
304
- model._resetPoint = function () {
178
+ model.resetPoint = function () {
305
179
  if (typeof jsonObject['resetPoint'] !== 'number') {
306
180
  return Number.isInteger(Number(jsonObject['resetPoint'])) ? Number(jsonObject['resetPoint']) : Math.floor(Number(jsonObject['resetPoint']));
307
181
  }
@@ -311,7 +185,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
311
185
  }
312
186
 
313
187
  if ('externalResetPoints' in jsonObject) {
314
- model._externalResetPoints = function () {
188
+ model.externalResetPoints = function () {
315
189
  if (Array.isArray(jsonObject['externalResetPoints']) !== true) {
316
190
  return [];
317
191
  }
@@ -351,7 +225,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
351
225
  }
352
226
 
353
227
  if ('deleted' in jsonObject) {
354
- model._deleted = function () {
228
+ model.deleted = function () {
355
229
  if (typeof jsonObject['deleted'] !== 'boolean') {
356
230
  return Boolean(jsonObject['deleted']);
357
231
  }
@@ -361,7 +235,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
361
235
  }
362
236
 
363
237
  if ('updateTimestamp' in jsonObject) {
364
- model._updateTimestamp = function () {
238
+ model.updateTimestamp = function () {
365
239
  if (typeof jsonObject['updateTimestamp'] !== 'string') {
366
240
  return new Date(String(jsonObject['updateTimestamp']));
367
241
  }
@@ -375,7 +249,7 @@ var AlarmGroupModel = /*#__PURE__*/function (_BaseSiteModel) {
375
249
  }]);
376
250
 
377
251
  return AlarmGroupModel;
378
- }(_BaseSiteModel2.default);
252
+ }(_BaseModel2.default);
379
253
 
380
254
  var _default = AlarmGroupModel;
381
255
  exports.default = _default;