@ricado/api-client 2.3.27 → 2.4.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 (59) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Lab/Site/DehydratorController.js +198 -0
  3. package/lib/Controllers/Lab/Site/FruitProfileController.js +204 -0
  4. package/lib/Controllers/Lab/Site/LabController.js +222 -0
  5. package/lib/Controllers/Lab/Site/RackController.js +222 -0
  6. package/lib/Controllers/Lab/Site/RackPositionController.js +207 -0
  7. package/lib/Controllers/Lab/Site/SampleController.js +927 -0
  8. package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +192 -0
  9. package/lib/Controllers/Lab/Site/SampleResultController.js +905 -0
  10. package/lib/Controllers/Lab/Site/index.js +46 -0
  11. package/lib/Controllers/Lab/index.js +25 -0
  12. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
  13. package/lib/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
  14. package/lib/Controllers/Packhouse/Site/ShiftController.js +304 -0
  15. package/lib/Controllers/index.js +9 -6
  16. package/lib/Models/Lab/Site/DehydratorModel.js +250 -0
  17. package/lib/Models/Lab/Site/FruitProfileModel.js +303 -0
  18. package/lib/Models/Lab/Site/LabModel.js +365 -0
  19. package/lib/Models/Lab/Site/RackModel.js +358 -0
  20. package/lib/Models/Lab/Site/RackPositionModel.js +525 -0
  21. package/lib/Models/Lab/Site/SampleFailureReasonModel.js +195 -0
  22. package/lib/Models/Lab/Site/SampleModel.js +545 -0
  23. package/lib/Models/Lab/Site/SampleResultModel.js +545 -0
  24. package/lib/Models/Lab/Site/index.js +46 -0
  25. package/lib/Models/Lab/index.js +25 -0
  26. package/lib/Models/Packhouse/Site/CompacSizerModel.js +18 -1
  27. package/lib/Models/Packhouse/Site/MAFSizerModel.js +18 -1
  28. package/lib/Models/index.js +7 -4
  29. package/lib/PackageVersion.js +1 -1
  30. package/lib/index.d.ts +10491 -7674
  31. package/package.json +1 -1
  32. package/src/Controllers/Lab/Site/DehydratorController.js +175 -0
  33. package/src/Controllers/Lab/Site/FruitProfileController.js +181 -0
  34. package/src/Controllers/Lab/Site/LabController.js +199 -0
  35. package/src/Controllers/Lab/Site/RackController.js +199 -0
  36. package/src/Controllers/Lab/Site/RackPositionController.js +184 -0
  37. package/src/Controllers/Lab/Site/SampleController.js +1067 -0
  38. package/src/Controllers/Lab/Site/SampleFailureReasonController.js +169 -0
  39. package/src/Controllers/Lab/Site/SampleResultController.js +1036 -0
  40. package/src/Controllers/Lab/Site/index.js +30 -0
  41. package/src/Controllers/Lab/index.js +16 -0
  42. package/src/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
  43. package/src/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
  44. package/src/Controllers/Packhouse/Site/ShiftController.js +367 -0
  45. package/src/Controllers/index.js +2 -0
  46. package/src/Models/Lab/Site/DehydratorModel.js +234 -0
  47. package/src/Models/Lab/Site/FruitProfileModel.js +290 -0
  48. package/src/Models/Lab/Site/LabModel.js +372 -0
  49. package/src/Models/Lab/Site/RackModel.js +358 -0
  50. package/src/Models/Lab/Site/RackPositionModel.js +600 -0
  51. package/src/Models/Lab/Site/SampleFailureReasonModel.js +170 -0
  52. package/src/Models/Lab/Site/SampleModel.js +565 -0
  53. package/src/Models/Lab/Site/SampleResultModel.js +565 -0
  54. package/src/Models/Lab/Site/index.js +30 -0
  55. package/src/Models/Lab/index.js +16 -0
  56. package/src/Models/Packhouse/Site/CompacSizerModel.js +24 -1
  57. package/src/Models/Packhouse/Site/MAFSizerModel.js +24 -1
  58. package/src/Models/index.js +2 -0
  59. package/src/PackageVersion.js +1 -1
@@ -0,0 +1,525 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13
+
14
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
+
16
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
17
+
18
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
+
20
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
+
22
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
+
24
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
+
26
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
27
+
28
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
29
+
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+
32
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
+
34
+ /**
35
+ * Model Class for a Rack Position
36
+ *
37
+ * @class
38
+ * @hideconstructor
39
+ * @extends BaseModel
40
+ */
41
+ var RackPositionModel = /*#__PURE__*/function (_BaseModel) {
42
+ _inherits(RackPositionModel, _BaseModel);
43
+
44
+ var _super = _createSuper(RackPositionModel);
45
+
46
+ /**
47
+ * RackPositionModel Constructor
48
+ *
49
+ * @protected
50
+ * @param {number} siteId The Site ID associated with this Rack Position
51
+ */
52
+ function RackPositionModel(siteId) {
53
+ var _this;
54
+
55
+ _classCallCheck(this, RackPositionModel);
56
+
57
+ _this = _super.call(this);
58
+ /**
59
+ * The Rack Position ID
60
+ *
61
+ * @type {string}
62
+ * @public
63
+ */
64
+
65
+ _this.id = "";
66
+ /**
67
+ * The RTU this Rack Position belongs to
68
+ *
69
+ * @type {?number}
70
+ * @public
71
+ */
72
+
73
+ _this.rtuId = null;
74
+ /**
75
+ * The Name of this Rack Position
76
+ *
77
+ * @type {string}
78
+ * @public
79
+ */
80
+
81
+ _this.name = "";
82
+ /**
83
+ * The Points used by this Rack Position
84
+ *
85
+ * @type {{pushButton: number, indicatorLight: number, temperature: number, calibrationOffset: number, disabled: number, currentSampleId: number, currentSampleStatus: number, nextSampleId: number, startCurrentSampleRequest: number, finishCurrentSampleRequest: number, currentSampleTotalDuration: number, currentSampleWarmUpDuration: number, currentSampleWarmUpCompleted: number, currentSampleBelowTargetDuration: number, currentSampleAboveTargetDuration: number, currentSampleWithinTargetDuration: number, currentSampleSuccessCriteriaMet: number, currentSampleFailureCriteriaMet: number}}
86
+ * @public
87
+ */
88
+
89
+ _this.points = function () {
90
+ var pointsDefaultValue = {};
91
+ pointsDefaultValue.pushButton = 0;
92
+ pointsDefaultValue.indicatorLight = 0;
93
+ pointsDefaultValue.temperature = 0;
94
+ pointsDefaultValue.calibrationOffset = 0;
95
+ pointsDefaultValue.disabled = 0;
96
+ pointsDefaultValue.currentSampleId = 0;
97
+ pointsDefaultValue.currentSampleStatus = 0;
98
+ pointsDefaultValue.nextSampleId = 0;
99
+ pointsDefaultValue.startCurrentSampleRequest = 0;
100
+ pointsDefaultValue.finishCurrentSampleRequest = 0;
101
+ pointsDefaultValue.currentSampleTotalDuration = 0;
102
+ pointsDefaultValue.currentSampleWarmUpDuration = 0;
103
+ pointsDefaultValue.currentSampleWarmUpCompleted = 0;
104
+ pointsDefaultValue.currentSampleBelowTargetDuration = 0;
105
+ pointsDefaultValue.currentSampleAboveTargetDuration = 0;
106
+ pointsDefaultValue.currentSampleWithinTargetDuration = 0;
107
+ pointsDefaultValue.currentSampleSuccessCriteriaMet = 0;
108
+ pointsDefaultValue.currentSampleFailureCriteriaMet = 0;
109
+ return pointsDefaultValue;
110
+ }();
111
+ /**
112
+ * The Lab that owns this Rack Position
113
+ *
114
+ * @type {string}
115
+ * @public
116
+ */
117
+
118
+
119
+ _this.labId = "";
120
+ /**
121
+ * The Rack associated with this Rack Position
122
+ *
123
+ * @type {string}
124
+ * @public
125
+ */
126
+
127
+ _this.rackId = "";
128
+ /**
129
+ * The Index of the Vertical Level in the Rack where this Position resides
130
+ *
131
+ * @type {number}
132
+ * @public
133
+ */
134
+
135
+ _this.verticalLevelIndex = 0;
136
+ /**
137
+ * The Index of the Horizontal Position in the Rack where this Position resides
138
+ *
139
+ * @type {number}
140
+ * @public
141
+ */
142
+
143
+ _this.horizontalPositionIndex = 0;
144
+ /**
145
+ * Whether the Rack Position has been deleted
146
+ *
147
+ * @type {boolean}
148
+ * @public
149
+ */
150
+
151
+ _this.deleted = false;
152
+ /**
153
+ * When the Rack Position was last updated
154
+ *
155
+ * @type {Date}
156
+ * @public
157
+ */
158
+
159
+ _this.updateTimestamp = new Date();
160
+ /**
161
+ * The Site ID associated with this Rack Position
162
+ *
163
+ * @type {number}
164
+ * @public
165
+ */
166
+
167
+ _this.siteId = siteId;
168
+ return _this;
169
+ }
170
+ /**
171
+ * Create a new **RackPositionModel** from a JSON Object or JSON String
172
+ *
173
+ * @static
174
+ * @public
175
+ * @param {Object<string, any>|string} json A JSON Object or JSON String
176
+ * @param {number} siteId The Site ID associated with this Rack Position
177
+ * @return {RackPositionModel}
178
+ */
179
+
180
+
181
+ _createClass(RackPositionModel, null, [{
182
+ key: "fromJSON",
183
+ value: function fromJSON(json, siteId) {
184
+ var model = new RackPositionModel(siteId);
185
+ /**
186
+ * The JSON Object
187
+ *
188
+ * @type {Object<string, any>}
189
+ */
190
+
191
+ var jsonObject = {};
192
+
193
+ if (typeof json === 'string') {
194
+ jsonObject = JSON.parse(json);
195
+ } else if (_typeof(json) === 'object') {
196
+ jsonObject = json;
197
+ }
198
+
199
+ if ('id' in jsonObject) {
200
+ model.id = function () {
201
+ if (typeof jsonObject['id'] !== 'string') {
202
+ return String(jsonObject['id']);
203
+ }
204
+
205
+ return jsonObject['id'];
206
+ }();
207
+ }
208
+
209
+ if ('rtuId' in jsonObject) {
210
+ model.rtuId = function () {
211
+ if (jsonObject['rtuId'] === null) {
212
+ return null;
213
+ }
214
+
215
+ if (typeof jsonObject['rtuId'] !== 'number') {
216
+ return Number.isInteger(Number(jsonObject['rtuId'])) ? Number(jsonObject['rtuId']) : Math.floor(Number(jsonObject['rtuId']));
217
+ }
218
+
219
+ return Number.isInteger(jsonObject['rtuId']) ? jsonObject['rtuId'] : Math.floor(jsonObject['rtuId']);
220
+ }();
221
+ }
222
+
223
+ if ('name' in jsonObject) {
224
+ model.name = function () {
225
+ if (typeof jsonObject['name'] !== 'string') {
226
+ return String(jsonObject['name']);
227
+ }
228
+
229
+ return jsonObject['name'];
230
+ }();
231
+ }
232
+
233
+ if ('points' in jsonObject) {
234
+ model.points = function () {
235
+ var pointsObject = {};
236
+
237
+ if (_typeof(jsonObject['points']) === 'object' && 'pushButton' in jsonObject['points']) {
238
+ pointsObject.pushButton = function () {
239
+ if (typeof jsonObject['points'].pushButton !== 'number') {
240
+ return Number.isInteger(Number(jsonObject['points'].pushButton)) ? Number(jsonObject['points'].pushButton) : Math.floor(Number(jsonObject['points'].pushButton));
241
+ }
242
+
243
+ return Number.isInteger(jsonObject['points'].pushButton) ? jsonObject['points'].pushButton : Math.floor(jsonObject['points'].pushButton);
244
+ }();
245
+ } else {
246
+ pointsObject.pushButton = 0;
247
+ }
248
+
249
+ if (_typeof(jsonObject['points']) === 'object' && 'indicatorLight' in jsonObject['points']) {
250
+ pointsObject.indicatorLight = function () {
251
+ if (typeof jsonObject['points'].indicatorLight !== 'number') {
252
+ return Number.isInteger(Number(jsonObject['points'].indicatorLight)) ? Number(jsonObject['points'].indicatorLight) : Math.floor(Number(jsonObject['points'].indicatorLight));
253
+ }
254
+
255
+ return Number.isInteger(jsonObject['points'].indicatorLight) ? jsonObject['points'].indicatorLight : Math.floor(jsonObject['points'].indicatorLight);
256
+ }();
257
+ } else {
258
+ pointsObject.indicatorLight = 0;
259
+ }
260
+
261
+ if (_typeof(jsonObject['points']) === 'object' && 'temperature' in jsonObject['points']) {
262
+ pointsObject.temperature = function () {
263
+ if (typeof jsonObject['points'].temperature !== 'number') {
264
+ return Number.isInteger(Number(jsonObject['points'].temperature)) ? Number(jsonObject['points'].temperature) : Math.floor(Number(jsonObject['points'].temperature));
265
+ }
266
+
267
+ return Number.isInteger(jsonObject['points'].temperature) ? jsonObject['points'].temperature : Math.floor(jsonObject['points'].temperature);
268
+ }();
269
+ } else {
270
+ pointsObject.temperature = 0;
271
+ }
272
+
273
+ if (_typeof(jsonObject['points']) === 'object' && 'calibrationOffset' in jsonObject['points']) {
274
+ pointsObject.calibrationOffset = function () {
275
+ if (typeof jsonObject['points'].calibrationOffset !== 'number') {
276
+ return Number.isInteger(Number(jsonObject['points'].calibrationOffset)) ? Number(jsonObject['points'].calibrationOffset) : Math.floor(Number(jsonObject['points'].calibrationOffset));
277
+ }
278
+
279
+ return Number.isInteger(jsonObject['points'].calibrationOffset) ? jsonObject['points'].calibrationOffset : Math.floor(jsonObject['points'].calibrationOffset);
280
+ }();
281
+ } else {
282
+ pointsObject.calibrationOffset = 0;
283
+ }
284
+
285
+ if (_typeof(jsonObject['points']) === 'object' && 'disabled' in jsonObject['points']) {
286
+ pointsObject.disabled = function () {
287
+ if (typeof jsonObject['points'].disabled !== 'number') {
288
+ return Number.isInteger(Number(jsonObject['points'].disabled)) ? Number(jsonObject['points'].disabled) : Math.floor(Number(jsonObject['points'].disabled));
289
+ }
290
+
291
+ return Number.isInteger(jsonObject['points'].disabled) ? jsonObject['points'].disabled : Math.floor(jsonObject['points'].disabled);
292
+ }();
293
+ } else {
294
+ pointsObject.disabled = 0;
295
+ }
296
+
297
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleId' in jsonObject['points']) {
298
+ pointsObject.currentSampleId = function () {
299
+ if (typeof jsonObject['points'].currentSampleId !== 'number') {
300
+ return Number.isInteger(Number(jsonObject['points'].currentSampleId)) ? Number(jsonObject['points'].currentSampleId) : Math.floor(Number(jsonObject['points'].currentSampleId));
301
+ }
302
+
303
+ return Number.isInteger(jsonObject['points'].currentSampleId) ? jsonObject['points'].currentSampleId : Math.floor(jsonObject['points'].currentSampleId);
304
+ }();
305
+ } else {
306
+ pointsObject.currentSampleId = 0;
307
+ }
308
+
309
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleStatus' in jsonObject['points']) {
310
+ pointsObject.currentSampleStatus = function () {
311
+ if (typeof jsonObject['points'].currentSampleStatus !== 'number') {
312
+ return Number.isInteger(Number(jsonObject['points'].currentSampleStatus)) ? Number(jsonObject['points'].currentSampleStatus) : Math.floor(Number(jsonObject['points'].currentSampleStatus));
313
+ }
314
+
315
+ return Number.isInteger(jsonObject['points'].currentSampleStatus) ? jsonObject['points'].currentSampleStatus : Math.floor(jsonObject['points'].currentSampleStatus);
316
+ }();
317
+ } else {
318
+ pointsObject.currentSampleStatus = 0;
319
+ }
320
+
321
+ if (_typeof(jsonObject['points']) === 'object' && 'nextSampleId' in jsonObject['points']) {
322
+ pointsObject.nextSampleId = function () {
323
+ if (typeof jsonObject['points'].nextSampleId !== 'number') {
324
+ return Number.isInteger(Number(jsonObject['points'].nextSampleId)) ? Number(jsonObject['points'].nextSampleId) : Math.floor(Number(jsonObject['points'].nextSampleId));
325
+ }
326
+
327
+ return Number.isInteger(jsonObject['points'].nextSampleId) ? jsonObject['points'].nextSampleId : Math.floor(jsonObject['points'].nextSampleId);
328
+ }();
329
+ } else {
330
+ pointsObject.nextSampleId = 0;
331
+ }
332
+
333
+ if (_typeof(jsonObject['points']) === 'object' && 'startCurrentSampleRequest' in jsonObject['points']) {
334
+ pointsObject.startCurrentSampleRequest = function () {
335
+ if (typeof jsonObject['points'].startCurrentSampleRequest !== 'number') {
336
+ return Number.isInteger(Number(jsonObject['points'].startCurrentSampleRequest)) ? Number(jsonObject['points'].startCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].startCurrentSampleRequest));
337
+ }
338
+
339
+ return Number.isInteger(jsonObject['points'].startCurrentSampleRequest) ? jsonObject['points'].startCurrentSampleRequest : Math.floor(jsonObject['points'].startCurrentSampleRequest);
340
+ }();
341
+ } else {
342
+ pointsObject.startCurrentSampleRequest = 0;
343
+ }
344
+
345
+ if (_typeof(jsonObject['points']) === 'object' && 'finishCurrentSampleRequest' in jsonObject['points']) {
346
+ pointsObject.finishCurrentSampleRequest = function () {
347
+ if (typeof jsonObject['points'].finishCurrentSampleRequest !== 'number') {
348
+ return Number.isInteger(Number(jsonObject['points'].finishCurrentSampleRequest)) ? Number(jsonObject['points'].finishCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].finishCurrentSampleRequest));
349
+ }
350
+
351
+ return Number.isInteger(jsonObject['points'].finishCurrentSampleRequest) ? jsonObject['points'].finishCurrentSampleRequest : Math.floor(jsonObject['points'].finishCurrentSampleRequest);
352
+ }();
353
+ } else {
354
+ pointsObject.finishCurrentSampleRequest = 0;
355
+ }
356
+
357
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleTotalDuration' in jsonObject['points']) {
358
+ pointsObject.currentSampleTotalDuration = function () {
359
+ if (typeof jsonObject['points'].currentSampleTotalDuration !== 'number') {
360
+ return Number.isInteger(Number(jsonObject['points'].currentSampleTotalDuration)) ? Number(jsonObject['points'].currentSampleTotalDuration) : Math.floor(Number(jsonObject['points'].currentSampleTotalDuration));
361
+ }
362
+
363
+ return Number.isInteger(jsonObject['points'].currentSampleTotalDuration) ? jsonObject['points'].currentSampleTotalDuration : Math.floor(jsonObject['points'].currentSampleTotalDuration);
364
+ }();
365
+ } else {
366
+ pointsObject.currentSampleTotalDuration = 0;
367
+ }
368
+
369
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleWarmUpDuration' in jsonObject['points']) {
370
+ pointsObject.currentSampleWarmUpDuration = function () {
371
+ if (typeof jsonObject['points'].currentSampleWarmUpDuration !== 'number') {
372
+ return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpDuration)) ? Number(jsonObject['points'].currentSampleWarmUpDuration) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpDuration));
373
+ }
374
+
375
+ return Number.isInteger(jsonObject['points'].currentSampleWarmUpDuration) ? jsonObject['points'].currentSampleWarmUpDuration : Math.floor(jsonObject['points'].currentSampleWarmUpDuration);
376
+ }();
377
+ } else {
378
+ pointsObject.currentSampleWarmUpDuration = 0;
379
+ }
380
+
381
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleWarmUpCompleted' in jsonObject['points']) {
382
+ pointsObject.currentSampleWarmUpCompleted = function () {
383
+ if (typeof jsonObject['points'].currentSampleWarmUpCompleted !== 'number') {
384
+ return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpCompleted)) ? Number(jsonObject['points'].currentSampleWarmUpCompleted) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpCompleted));
385
+ }
386
+
387
+ return Number.isInteger(jsonObject['points'].currentSampleWarmUpCompleted) ? jsonObject['points'].currentSampleWarmUpCompleted : Math.floor(jsonObject['points'].currentSampleWarmUpCompleted);
388
+ }();
389
+ } else {
390
+ pointsObject.currentSampleWarmUpCompleted = 0;
391
+ }
392
+
393
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleBelowTargetDuration' in jsonObject['points']) {
394
+ pointsObject.currentSampleBelowTargetDuration = function () {
395
+ if (typeof jsonObject['points'].currentSampleBelowTargetDuration !== 'number') {
396
+ return Number.isInteger(Number(jsonObject['points'].currentSampleBelowTargetDuration)) ? Number(jsonObject['points'].currentSampleBelowTargetDuration) : Math.floor(Number(jsonObject['points'].currentSampleBelowTargetDuration));
397
+ }
398
+
399
+ return Number.isInteger(jsonObject['points'].currentSampleBelowTargetDuration) ? jsonObject['points'].currentSampleBelowTargetDuration : Math.floor(jsonObject['points'].currentSampleBelowTargetDuration);
400
+ }();
401
+ } else {
402
+ pointsObject.currentSampleBelowTargetDuration = 0;
403
+ }
404
+
405
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleAboveTargetDuration' in jsonObject['points']) {
406
+ pointsObject.currentSampleAboveTargetDuration = function () {
407
+ if (typeof jsonObject['points'].currentSampleAboveTargetDuration !== 'number') {
408
+ return Number.isInteger(Number(jsonObject['points'].currentSampleAboveTargetDuration)) ? Number(jsonObject['points'].currentSampleAboveTargetDuration) : Math.floor(Number(jsonObject['points'].currentSampleAboveTargetDuration));
409
+ }
410
+
411
+ return Number.isInteger(jsonObject['points'].currentSampleAboveTargetDuration) ? jsonObject['points'].currentSampleAboveTargetDuration : Math.floor(jsonObject['points'].currentSampleAboveTargetDuration);
412
+ }();
413
+ } else {
414
+ pointsObject.currentSampleAboveTargetDuration = 0;
415
+ }
416
+
417
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleWithinTargetDuration' in jsonObject['points']) {
418
+ pointsObject.currentSampleWithinTargetDuration = function () {
419
+ if (typeof jsonObject['points'].currentSampleWithinTargetDuration !== 'number') {
420
+ return Number.isInteger(Number(jsonObject['points'].currentSampleWithinTargetDuration)) ? Number(jsonObject['points'].currentSampleWithinTargetDuration) : Math.floor(Number(jsonObject['points'].currentSampleWithinTargetDuration));
421
+ }
422
+
423
+ return Number.isInteger(jsonObject['points'].currentSampleWithinTargetDuration) ? jsonObject['points'].currentSampleWithinTargetDuration : Math.floor(jsonObject['points'].currentSampleWithinTargetDuration);
424
+ }();
425
+ } else {
426
+ pointsObject.currentSampleWithinTargetDuration = 0;
427
+ }
428
+
429
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleSuccessCriteriaMet' in jsonObject['points']) {
430
+ pointsObject.currentSampleSuccessCriteriaMet = function () {
431
+ if (typeof jsonObject['points'].currentSampleSuccessCriteriaMet !== 'number') {
432
+ return Number.isInteger(Number(jsonObject['points'].currentSampleSuccessCriteriaMet)) ? Number(jsonObject['points'].currentSampleSuccessCriteriaMet) : Math.floor(Number(jsonObject['points'].currentSampleSuccessCriteriaMet));
433
+ }
434
+
435
+ return Number.isInteger(jsonObject['points'].currentSampleSuccessCriteriaMet) ? jsonObject['points'].currentSampleSuccessCriteriaMet : Math.floor(jsonObject['points'].currentSampleSuccessCriteriaMet);
436
+ }();
437
+ } else {
438
+ pointsObject.currentSampleSuccessCriteriaMet = 0;
439
+ }
440
+
441
+ if (_typeof(jsonObject['points']) === 'object' && 'currentSampleFailureCriteriaMet' in jsonObject['points']) {
442
+ pointsObject.currentSampleFailureCriteriaMet = function () {
443
+ if (typeof jsonObject['points'].currentSampleFailureCriteriaMet !== 'number') {
444
+ return Number.isInteger(Number(jsonObject['points'].currentSampleFailureCriteriaMet)) ? Number(jsonObject['points'].currentSampleFailureCriteriaMet) : Math.floor(Number(jsonObject['points'].currentSampleFailureCriteriaMet));
445
+ }
446
+
447
+ return Number.isInteger(jsonObject['points'].currentSampleFailureCriteriaMet) ? jsonObject['points'].currentSampleFailureCriteriaMet : Math.floor(jsonObject['points'].currentSampleFailureCriteriaMet);
448
+ }();
449
+ } else {
450
+ pointsObject.currentSampleFailureCriteriaMet = 0;
451
+ }
452
+
453
+ return pointsObject;
454
+ }();
455
+ }
456
+
457
+ if ('labId' in jsonObject) {
458
+ model.labId = function () {
459
+ if (typeof jsonObject['labId'] !== 'string') {
460
+ return String(jsonObject['labId']);
461
+ }
462
+
463
+ return jsonObject['labId'];
464
+ }();
465
+ }
466
+
467
+ if ('rackId' in jsonObject) {
468
+ model.rackId = function () {
469
+ if (typeof jsonObject['rackId'] !== 'string') {
470
+ return String(jsonObject['rackId']);
471
+ }
472
+
473
+ return jsonObject['rackId'];
474
+ }();
475
+ }
476
+
477
+ if ('verticalLevelIndex' in jsonObject) {
478
+ model.verticalLevelIndex = function () {
479
+ if (typeof jsonObject['verticalLevelIndex'] !== 'number') {
480
+ return Number.isInteger(Number(jsonObject['verticalLevelIndex'])) ? Number(jsonObject['verticalLevelIndex']) : Math.floor(Number(jsonObject['verticalLevelIndex']));
481
+ }
482
+
483
+ return Number.isInteger(jsonObject['verticalLevelIndex']) ? jsonObject['verticalLevelIndex'] : Math.floor(jsonObject['verticalLevelIndex']);
484
+ }();
485
+ }
486
+
487
+ if ('horizontalPositionIndex' in jsonObject) {
488
+ model.horizontalPositionIndex = function () {
489
+ if (typeof jsonObject['horizontalPositionIndex'] !== 'number') {
490
+ return Number.isInteger(Number(jsonObject['horizontalPositionIndex'])) ? Number(jsonObject['horizontalPositionIndex']) : Math.floor(Number(jsonObject['horizontalPositionIndex']));
491
+ }
492
+
493
+ return Number.isInteger(jsonObject['horizontalPositionIndex']) ? jsonObject['horizontalPositionIndex'] : Math.floor(jsonObject['horizontalPositionIndex']);
494
+ }();
495
+ }
496
+
497
+ if ('deleted' in jsonObject) {
498
+ model.deleted = function () {
499
+ if (typeof jsonObject['deleted'] !== 'boolean') {
500
+ return Boolean(jsonObject['deleted']);
501
+ }
502
+
503
+ return jsonObject['deleted'];
504
+ }();
505
+ }
506
+
507
+ if ('updateTimestamp' in jsonObject) {
508
+ model.updateTimestamp = function () {
509
+ if (typeof jsonObject['updateTimestamp'] !== 'string') {
510
+ return new Date(String(jsonObject['updateTimestamp']));
511
+ }
512
+
513
+ return new Date(jsonObject['updateTimestamp']);
514
+ }();
515
+ }
516
+
517
+ return model;
518
+ }
519
+ }]);
520
+
521
+ return RackPositionModel;
522
+ }(_BaseModel2.default);
523
+
524
+ var _default = RackPositionModel;
525
+ exports.default = _default;