@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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Lab/Site/DehydratorController.js +198 -0
- package/lib/Controllers/Lab/Site/FruitProfileController.js +204 -0
- package/lib/Controllers/Lab/Site/LabController.js +222 -0
- package/lib/Controllers/Lab/Site/RackController.js +222 -0
- package/lib/Controllers/Lab/Site/RackPositionController.js +207 -0
- package/lib/Controllers/Lab/Site/SampleController.js +927 -0
- package/lib/Controllers/Lab/Site/SampleFailureReasonController.js +192 -0
- package/lib/Controllers/Lab/Site/SampleResultController.js +905 -0
- package/lib/Controllers/Lab/Site/index.js +46 -0
- package/lib/Controllers/Lab/index.js +25 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
- package/lib/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftController.js +304 -0
- package/lib/Controllers/index.js +9 -6
- package/lib/Models/Lab/Site/DehydratorModel.js +250 -0
- package/lib/Models/Lab/Site/FruitProfileModel.js +303 -0
- package/lib/Models/Lab/Site/LabModel.js +365 -0
- package/lib/Models/Lab/Site/RackModel.js +358 -0
- package/lib/Models/Lab/Site/RackPositionModel.js +525 -0
- package/lib/Models/Lab/Site/SampleFailureReasonModel.js +195 -0
- package/lib/Models/Lab/Site/SampleModel.js +545 -0
- package/lib/Models/Lab/Site/SampleResultModel.js +545 -0
- package/lib/Models/Lab/Site/index.js +46 -0
- package/lib/Models/Lab/index.js +25 -0
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +18 -1
- package/lib/Models/Packhouse/Site/MAFSizerModel.js +18 -1
- package/lib/Models/index.js +7 -4
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +10491 -7674
- package/package.json +1 -1
- package/src/Controllers/Lab/Site/DehydratorController.js +175 -0
- package/src/Controllers/Lab/Site/FruitProfileController.js +181 -0
- package/src/Controllers/Lab/Site/LabController.js +199 -0
- package/src/Controllers/Lab/Site/RackController.js +199 -0
- package/src/Controllers/Lab/Site/RackPositionController.js +184 -0
- package/src/Controllers/Lab/Site/SampleController.js +1067 -0
- package/src/Controllers/Lab/Site/SampleFailureReasonController.js +169 -0
- package/src/Controllers/Lab/Site/SampleResultController.js +1036 -0
- package/src/Controllers/Lab/Site/index.js +30 -0
- package/src/Controllers/Lab/index.js +16 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +2 -2
- package/src/Controllers/Packhouse/Site/MAFSizerController.js +2 -2
- package/src/Controllers/Packhouse/Site/ShiftController.js +367 -0
- package/src/Controllers/index.js +2 -0
- package/src/Models/Lab/Site/DehydratorModel.js +234 -0
- package/src/Models/Lab/Site/FruitProfileModel.js +290 -0
- package/src/Models/Lab/Site/LabModel.js +372 -0
- package/src/Models/Lab/Site/RackModel.js +358 -0
- package/src/Models/Lab/Site/RackPositionModel.js +600 -0
- package/src/Models/Lab/Site/SampleFailureReasonModel.js +170 -0
- package/src/Models/Lab/Site/SampleModel.js +565 -0
- package/src/Models/Lab/Site/SampleResultModel.js +565 -0
- package/src/Models/Lab/Site/index.js +30 -0
- package/src/Models/Lab/index.js +16 -0
- package/src/Models/Packhouse/Site/CompacSizerModel.js +24 -1
- package/src/Models/Packhouse/Site/MAFSizerModel.js +24 -1
- package/src/Models/index.js +2 -0
- package/src/PackageVersion.js +1 -1
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Auto-Generated by the RICADO Gen 4 PHP API Project
|
|
3
|
+
*
|
|
4
|
+
* Do Not Edit this File Manually!
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import BaseModel from '../../../Models/BaseModel';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Model Class for a Rack Position
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class RackPositionModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* RackPositionModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Rack Position
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Rack Position ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The RTU this Rack Position belongs to
|
|
38
|
+
*
|
|
39
|
+
* @type {?number}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.rtuId = null;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Name of this Rack Position
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.name = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The Points used by this Rack Position
|
|
54
|
+
*
|
|
55
|
+
* @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}}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.points = (function(){
|
|
59
|
+
let pointsDefaultValue = {};
|
|
60
|
+
|
|
61
|
+
pointsDefaultValue.pushButton = 0;
|
|
62
|
+
|
|
63
|
+
pointsDefaultValue.indicatorLight = 0;
|
|
64
|
+
|
|
65
|
+
pointsDefaultValue.temperature = 0;
|
|
66
|
+
|
|
67
|
+
pointsDefaultValue.calibrationOffset = 0;
|
|
68
|
+
|
|
69
|
+
pointsDefaultValue.disabled = 0;
|
|
70
|
+
|
|
71
|
+
pointsDefaultValue.currentSampleId = 0;
|
|
72
|
+
|
|
73
|
+
pointsDefaultValue.currentSampleStatus = 0;
|
|
74
|
+
|
|
75
|
+
pointsDefaultValue.nextSampleId = 0;
|
|
76
|
+
|
|
77
|
+
pointsDefaultValue.startCurrentSampleRequest = 0;
|
|
78
|
+
|
|
79
|
+
pointsDefaultValue.finishCurrentSampleRequest = 0;
|
|
80
|
+
|
|
81
|
+
pointsDefaultValue.currentSampleTotalDuration = 0;
|
|
82
|
+
|
|
83
|
+
pointsDefaultValue.currentSampleWarmUpDuration = 0;
|
|
84
|
+
|
|
85
|
+
pointsDefaultValue.currentSampleWarmUpCompleted = 0;
|
|
86
|
+
|
|
87
|
+
pointsDefaultValue.currentSampleBelowTargetDuration = 0;
|
|
88
|
+
|
|
89
|
+
pointsDefaultValue.currentSampleAboveTargetDuration = 0;
|
|
90
|
+
|
|
91
|
+
pointsDefaultValue.currentSampleWithinTargetDuration = 0;
|
|
92
|
+
|
|
93
|
+
pointsDefaultValue.currentSampleSuccessCriteriaMet = 0;
|
|
94
|
+
|
|
95
|
+
pointsDefaultValue.currentSampleFailureCriteriaMet = 0;
|
|
96
|
+
|
|
97
|
+
return pointsDefaultValue;
|
|
98
|
+
}());
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The Lab that owns this Rack Position
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.labId = "";
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The Rack associated with this Rack Position
|
|
110
|
+
*
|
|
111
|
+
* @type {string}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.rackId = "";
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The Index of the Vertical Level in the Rack where this Position resides
|
|
118
|
+
*
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
this.verticalLevelIndex = 0;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The Index of the Horizontal Position in the Rack where this Position resides
|
|
126
|
+
*
|
|
127
|
+
* @type {number}
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
this.horizontalPositionIndex = 0;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Whether the Rack Position has been deleted
|
|
134
|
+
*
|
|
135
|
+
* @type {boolean}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.deleted = false;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* When the Rack Position was last updated
|
|
142
|
+
*
|
|
143
|
+
* @type {Date}
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
this.updateTimestamp = new Date();
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The Site ID associated with this Rack Position
|
|
150
|
+
*
|
|
151
|
+
* @type {number}
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
this.siteId = siteId;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Create a new **RackPositionModel** from a JSON Object or JSON String
|
|
159
|
+
*
|
|
160
|
+
* @static
|
|
161
|
+
* @public
|
|
162
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
163
|
+
* @param {number} siteId The Site ID associated with this Rack Position
|
|
164
|
+
* @return {RackPositionModel}
|
|
165
|
+
*/
|
|
166
|
+
static fromJSON(json, siteId)
|
|
167
|
+
{
|
|
168
|
+
let model = new RackPositionModel(siteId);
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The JSON Object
|
|
172
|
+
*
|
|
173
|
+
* @type {Object<string, any>}
|
|
174
|
+
*/
|
|
175
|
+
let jsonObject = {};
|
|
176
|
+
|
|
177
|
+
if(typeof json === 'string')
|
|
178
|
+
{
|
|
179
|
+
jsonObject = JSON.parse(json);
|
|
180
|
+
}
|
|
181
|
+
else if(typeof json === 'object')
|
|
182
|
+
{
|
|
183
|
+
jsonObject = json;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if('id' in jsonObject)
|
|
187
|
+
{
|
|
188
|
+
model.id = (function(){
|
|
189
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
190
|
+
{
|
|
191
|
+
return String(jsonObject['id']);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return jsonObject['id'];
|
|
195
|
+
}());
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if('rtuId' in jsonObject)
|
|
199
|
+
{
|
|
200
|
+
model.rtuId = (function(){
|
|
201
|
+
if(jsonObject['rtuId'] === null)
|
|
202
|
+
{
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if(typeof jsonObject['rtuId'] !== 'number')
|
|
207
|
+
{
|
|
208
|
+
return Number.isInteger(Number(jsonObject['rtuId'])) ? Number(jsonObject['rtuId']) : Math.floor(Number(jsonObject['rtuId']));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return Number.isInteger(jsonObject['rtuId']) ? jsonObject['rtuId'] : Math.floor(jsonObject['rtuId']);
|
|
212
|
+
}());
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if('name' in jsonObject)
|
|
216
|
+
{
|
|
217
|
+
model.name = (function(){
|
|
218
|
+
if(typeof jsonObject['name'] !== 'string')
|
|
219
|
+
{
|
|
220
|
+
return String(jsonObject['name']);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return jsonObject['name'];
|
|
224
|
+
}());
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if('points' in jsonObject)
|
|
228
|
+
{
|
|
229
|
+
model.points = (function(){
|
|
230
|
+
let pointsObject = {};
|
|
231
|
+
|
|
232
|
+
if(typeof jsonObject['points'] === 'object' && 'pushButton' in jsonObject['points'])
|
|
233
|
+
{
|
|
234
|
+
pointsObject.pushButton = (function(){
|
|
235
|
+
if(typeof jsonObject['points'].pushButton !== 'number')
|
|
236
|
+
{
|
|
237
|
+
return Number.isInteger(Number(jsonObject['points'].pushButton)) ? Number(jsonObject['points'].pushButton) : Math.floor(Number(jsonObject['points'].pushButton));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return Number.isInteger(jsonObject['points'].pushButton) ? jsonObject['points'].pushButton : Math.floor(jsonObject['points'].pushButton);
|
|
241
|
+
}());
|
|
242
|
+
}
|
|
243
|
+
else
|
|
244
|
+
{
|
|
245
|
+
pointsObject.pushButton = 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if(typeof jsonObject['points'] === 'object' && 'indicatorLight' in jsonObject['points'])
|
|
249
|
+
{
|
|
250
|
+
pointsObject.indicatorLight = (function(){
|
|
251
|
+
if(typeof jsonObject['points'].indicatorLight !== 'number')
|
|
252
|
+
{
|
|
253
|
+
return Number.isInteger(Number(jsonObject['points'].indicatorLight)) ? Number(jsonObject['points'].indicatorLight) : Math.floor(Number(jsonObject['points'].indicatorLight));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return Number.isInteger(jsonObject['points'].indicatorLight) ? jsonObject['points'].indicatorLight : Math.floor(jsonObject['points'].indicatorLight);
|
|
257
|
+
}());
|
|
258
|
+
}
|
|
259
|
+
else
|
|
260
|
+
{
|
|
261
|
+
pointsObject.indicatorLight = 0;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if(typeof jsonObject['points'] === 'object' && 'temperature' in jsonObject['points'])
|
|
265
|
+
{
|
|
266
|
+
pointsObject.temperature = (function(){
|
|
267
|
+
if(typeof jsonObject['points'].temperature !== 'number')
|
|
268
|
+
{
|
|
269
|
+
return Number.isInteger(Number(jsonObject['points'].temperature)) ? Number(jsonObject['points'].temperature) : Math.floor(Number(jsonObject['points'].temperature));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return Number.isInteger(jsonObject['points'].temperature) ? jsonObject['points'].temperature : Math.floor(jsonObject['points'].temperature);
|
|
273
|
+
}());
|
|
274
|
+
}
|
|
275
|
+
else
|
|
276
|
+
{
|
|
277
|
+
pointsObject.temperature = 0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if(typeof jsonObject['points'] === 'object' && 'calibrationOffset' in jsonObject['points'])
|
|
281
|
+
{
|
|
282
|
+
pointsObject.calibrationOffset = (function(){
|
|
283
|
+
if(typeof jsonObject['points'].calibrationOffset !== 'number')
|
|
284
|
+
{
|
|
285
|
+
return Number.isInteger(Number(jsonObject['points'].calibrationOffset)) ? Number(jsonObject['points'].calibrationOffset) : Math.floor(Number(jsonObject['points'].calibrationOffset));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return Number.isInteger(jsonObject['points'].calibrationOffset) ? jsonObject['points'].calibrationOffset : Math.floor(jsonObject['points'].calibrationOffset);
|
|
289
|
+
}());
|
|
290
|
+
}
|
|
291
|
+
else
|
|
292
|
+
{
|
|
293
|
+
pointsObject.calibrationOffset = 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if(typeof jsonObject['points'] === 'object' && 'disabled' in jsonObject['points'])
|
|
297
|
+
{
|
|
298
|
+
pointsObject.disabled = (function(){
|
|
299
|
+
if(typeof jsonObject['points'].disabled !== 'number')
|
|
300
|
+
{
|
|
301
|
+
return Number.isInteger(Number(jsonObject['points'].disabled)) ? Number(jsonObject['points'].disabled) : Math.floor(Number(jsonObject['points'].disabled));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
return Number.isInteger(jsonObject['points'].disabled) ? jsonObject['points'].disabled : Math.floor(jsonObject['points'].disabled);
|
|
305
|
+
}());
|
|
306
|
+
}
|
|
307
|
+
else
|
|
308
|
+
{
|
|
309
|
+
pointsObject.disabled = 0;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleId' in jsonObject['points'])
|
|
313
|
+
{
|
|
314
|
+
pointsObject.currentSampleId = (function(){
|
|
315
|
+
if(typeof jsonObject['points'].currentSampleId !== 'number')
|
|
316
|
+
{
|
|
317
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleId)) ? Number(jsonObject['points'].currentSampleId) : Math.floor(Number(jsonObject['points'].currentSampleId));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return Number.isInteger(jsonObject['points'].currentSampleId) ? jsonObject['points'].currentSampleId : Math.floor(jsonObject['points'].currentSampleId);
|
|
321
|
+
}());
|
|
322
|
+
}
|
|
323
|
+
else
|
|
324
|
+
{
|
|
325
|
+
pointsObject.currentSampleId = 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleStatus' in jsonObject['points'])
|
|
329
|
+
{
|
|
330
|
+
pointsObject.currentSampleStatus = (function(){
|
|
331
|
+
if(typeof jsonObject['points'].currentSampleStatus !== 'number')
|
|
332
|
+
{
|
|
333
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleStatus)) ? Number(jsonObject['points'].currentSampleStatus) : Math.floor(Number(jsonObject['points'].currentSampleStatus));
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
return Number.isInteger(jsonObject['points'].currentSampleStatus) ? jsonObject['points'].currentSampleStatus : Math.floor(jsonObject['points'].currentSampleStatus);
|
|
337
|
+
}());
|
|
338
|
+
}
|
|
339
|
+
else
|
|
340
|
+
{
|
|
341
|
+
pointsObject.currentSampleStatus = 0;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if(typeof jsonObject['points'] === 'object' && 'nextSampleId' in jsonObject['points'])
|
|
345
|
+
{
|
|
346
|
+
pointsObject.nextSampleId = (function(){
|
|
347
|
+
if(typeof jsonObject['points'].nextSampleId !== 'number')
|
|
348
|
+
{
|
|
349
|
+
return Number.isInteger(Number(jsonObject['points'].nextSampleId)) ? Number(jsonObject['points'].nextSampleId) : Math.floor(Number(jsonObject['points'].nextSampleId));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return Number.isInteger(jsonObject['points'].nextSampleId) ? jsonObject['points'].nextSampleId : Math.floor(jsonObject['points'].nextSampleId);
|
|
353
|
+
}());
|
|
354
|
+
}
|
|
355
|
+
else
|
|
356
|
+
{
|
|
357
|
+
pointsObject.nextSampleId = 0;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if(typeof jsonObject['points'] === 'object' && 'startCurrentSampleRequest' in jsonObject['points'])
|
|
361
|
+
{
|
|
362
|
+
pointsObject.startCurrentSampleRequest = (function(){
|
|
363
|
+
if(typeof jsonObject['points'].startCurrentSampleRequest !== 'number')
|
|
364
|
+
{
|
|
365
|
+
return Number.isInteger(Number(jsonObject['points'].startCurrentSampleRequest)) ? Number(jsonObject['points'].startCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].startCurrentSampleRequest));
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return Number.isInteger(jsonObject['points'].startCurrentSampleRequest) ? jsonObject['points'].startCurrentSampleRequest : Math.floor(jsonObject['points'].startCurrentSampleRequest);
|
|
369
|
+
}());
|
|
370
|
+
}
|
|
371
|
+
else
|
|
372
|
+
{
|
|
373
|
+
pointsObject.startCurrentSampleRequest = 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if(typeof jsonObject['points'] === 'object' && 'finishCurrentSampleRequest' in jsonObject['points'])
|
|
377
|
+
{
|
|
378
|
+
pointsObject.finishCurrentSampleRequest = (function(){
|
|
379
|
+
if(typeof jsonObject['points'].finishCurrentSampleRequest !== 'number')
|
|
380
|
+
{
|
|
381
|
+
return Number.isInteger(Number(jsonObject['points'].finishCurrentSampleRequest)) ? Number(jsonObject['points'].finishCurrentSampleRequest) : Math.floor(Number(jsonObject['points'].finishCurrentSampleRequest));
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return Number.isInteger(jsonObject['points'].finishCurrentSampleRequest) ? jsonObject['points'].finishCurrentSampleRequest : Math.floor(jsonObject['points'].finishCurrentSampleRequest);
|
|
385
|
+
}());
|
|
386
|
+
}
|
|
387
|
+
else
|
|
388
|
+
{
|
|
389
|
+
pointsObject.finishCurrentSampleRequest = 0;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleTotalDuration' in jsonObject['points'])
|
|
393
|
+
{
|
|
394
|
+
pointsObject.currentSampleTotalDuration = (function(){
|
|
395
|
+
if(typeof jsonObject['points'].currentSampleTotalDuration !== 'number')
|
|
396
|
+
{
|
|
397
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleTotalDuration)) ? Number(jsonObject['points'].currentSampleTotalDuration) : Math.floor(Number(jsonObject['points'].currentSampleTotalDuration));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
return Number.isInteger(jsonObject['points'].currentSampleTotalDuration) ? jsonObject['points'].currentSampleTotalDuration : Math.floor(jsonObject['points'].currentSampleTotalDuration);
|
|
401
|
+
}());
|
|
402
|
+
}
|
|
403
|
+
else
|
|
404
|
+
{
|
|
405
|
+
pointsObject.currentSampleTotalDuration = 0;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleWarmUpDuration' in jsonObject['points'])
|
|
409
|
+
{
|
|
410
|
+
pointsObject.currentSampleWarmUpDuration = (function(){
|
|
411
|
+
if(typeof jsonObject['points'].currentSampleWarmUpDuration !== 'number')
|
|
412
|
+
{
|
|
413
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpDuration)) ? Number(jsonObject['points'].currentSampleWarmUpDuration) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpDuration));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
return Number.isInteger(jsonObject['points'].currentSampleWarmUpDuration) ? jsonObject['points'].currentSampleWarmUpDuration : Math.floor(jsonObject['points'].currentSampleWarmUpDuration);
|
|
417
|
+
}());
|
|
418
|
+
}
|
|
419
|
+
else
|
|
420
|
+
{
|
|
421
|
+
pointsObject.currentSampleWarmUpDuration = 0;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleWarmUpCompleted' in jsonObject['points'])
|
|
425
|
+
{
|
|
426
|
+
pointsObject.currentSampleWarmUpCompleted = (function(){
|
|
427
|
+
if(typeof jsonObject['points'].currentSampleWarmUpCompleted !== 'number')
|
|
428
|
+
{
|
|
429
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWarmUpCompleted)) ? Number(jsonObject['points'].currentSampleWarmUpCompleted) : Math.floor(Number(jsonObject['points'].currentSampleWarmUpCompleted));
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return Number.isInteger(jsonObject['points'].currentSampleWarmUpCompleted) ? jsonObject['points'].currentSampleWarmUpCompleted : Math.floor(jsonObject['points'].currentSampleWarmUpCompleted);
|
|
433
|
+
}());
|
|
434
|
+
}
|
|
435
|
+
else
|
|
436
|
+
{
|
|
437
|
+
pointsObject.currentSampleWarmUpCompleted = 0;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleBelowTargetDuration' in jsonObject['points'])
|
|
441
|
+
{
|
|
442
|
+
pointsObject.currentSampleBelowTargetDuration = (function(){
|
|
443
|
+
if(typeof jsonObject['points'].currentSampleBelowTargetDuration !== 'number')
|
|
444
|
+
{
|
|
445
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleBelowTargetDuration)) ? Number(jsonObject['points'].currentSampleBelowTargetDuration) : Math.floor(Number(jsonObject['points'].currentSampleBelowTargetDuration));
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return Number.isInteger(jsonObject['points'].currentSampleBelowTargetDuration) ? jsonObject['points'].currentSampleBelowTargetDuration : Math.floor(jsonObject['points'].currentSampleBelowTargetDuration);
|
|
449
|
+
}());
|
|
450
|
+
}
|
|
451
|
+
else
|
|
452
|
+
{
|
|
453
|
+
pointsObject.currentSampleBelowTargetDuration = 0;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleAboveTargetDuration' in jsonObject['points'])
|
|
457
|
+
{
|
|
458
|
+
pointsObject.currentSampleAboveTargetDuration = (function(){
|
|
459
|
+
if(typeof jsonObject['points'].currentSampleAboveTargetDuration !== 'number')
|
|
460
|
+
{
|
|
461
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleAboveTargetDuration)) ? Number(jsonObject['points'].currentSampleAboveTargetDuration) : Math.floor(Number(jsonObject['points'].currentSampleAboveTargetDuration));
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
return Number.isInteger(jsonObject['points'].currentSampleAboveTargetDuration) ? jsonObject['points'].currentSampleAboveTargetDuration : Math.floor(jsonObject['points'].currentSampleAboveTargetDuration);
|
|
465
|
+
}());
|
|
466
|
+
}
|
|
467
|
+
else
|
|
468
|
+
{
|
|
469
|
+
pointsObject.currentSampleAboveTargetDuration = 0;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleWithinTargetDuration' in jsonObject['points'])
|
|
473
|
+
{
|
|
474
|
+
pointsObject.currentSampleWithinTargetDuration = (function(){
|
|
475
|
+
if(typeof jsonObject['points'].currentSampleWithinTargetDuration !== 'number')
|
|
476
|
+
{
|
|
477
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleWithinTargetDuration)) ? Number(jsonObject['points'].currentSampleWithinTargetDuration) : Math.floor(Number(jsonObject['points'].currentSampleWithinTargetDuration));
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
return Number.isInteger(jsonObject['points'].currentSampleWithinTargetDuration) ? jsonObject['points'].currentSampleWithinTargetDuration : Math.floor(jsonObject['points'].currentSampleWithinTargetDuration);
|
|
481
|
+
}());
|
|
482
|
+
}
|
|
483
|
+
else
|
|
484
|
+
{
|
|
485
|
+
pointsObject.currentSampleWithinTargetDuration = 0;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleSuccessCriteriaMet' in jsonObject['points'])
|
|
489
|
+
{
|
|
490
|
+
pointsObject.currentSampleSuccessCriteriaMet = (function(){
|
|
491
|
+
if(typeof jsonObject['points'].currentSampleSuccessCriteriaMet !== 'number')
|
|
492
|
+
{
|
|
493
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleSuccessCriteriaMet)) ? Number(jsonObject['points'].currentSampleSuccessCriteriaMet) : Math.floor(Number(jsonObject['points'].currentSampleSuccessCriteriaMet));
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return Number.isInteger(jsonObject['points'].currentSampleSuccessCriteriaMet) ? jsonObject['points'].currentSampleSuccessCriteriaMet : Math.floor(jsonObject['points'].currentSampleSuccessCriteriaMet);
|
|
497
|
+
}());
|
|
498
|
+
}
|
|
499
|
+
else
|
|
500
|
+
{
|
|
501
|
+
pointsObject.currentSampleSuccessCriteriaMet = 0;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
if(typeof jsonObject['points'] === 'object' && 'currentSampleFailureCriteriaMet' in jsonObject['points'])
|
|
505
|
+
{
|
|
506
|
+
pointsObject.currentSampleFailureCriteriaMet = (function(){
|
|
507
|
+
if(typeof jsonObject['points'].currentSampleFailureCriteriaMet !== 'number')
|
|
508
|
+
{
|
|
509
|
+
return Number.isInteger(Number(jsonObject['points'].currentSampleFailureCriteriaMet)) ? Number(jsonObject['points'].currentSampleFailureCriteriaMet) : Math.floor(Number(jsonObject['points'].currentSampleFailureCriteriaMet));
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
return Number.isInteger(jsonObject['points'].currentSampleFailureCriteriaMet) ? jsonObject['points'].currentSampleFailureCriteriaMet : Math.floor(jsonObject['points'].currentSampleFailureCriteriaMet);
|
|
513
|
+
}());
|
|
514
|
+
}
|
|
515
|
+
else
|
|
516
|
+
{
|
|
517
|
+
pointsObject.currentSampleFailureCriteriaMet = 0;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return pointsObject;
|
|
521
|
+
}());
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if('labId' in jsonObject)
|
|
525
|
+
{
|
|
526
|
+
model.labId = (function(){
|
|
527
|
+
if(typeof jsonObject['labId'] !== 'string')
|
|
528
|
+
{
|
|
529
|
+
return String(jsonObject['labId']);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
return jsonObject['labId'];
|
|
533
|
+
}());
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
if('rackId' in jsonObject)
|
|
537
|
+
{
|
|
538
|
+
model.rackId = (function(){
|
|
539
|
+
if(typeof jsonObject['rackId'] !== 'string')
|
|
540
|
+
{
|
|
541
|
+
return String(jsonObject['rackId']);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
return jsonObject['rackId'];
|
|
545
|
+
}());
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if('verticalLevelIndex' in jsonObject)
|
|
549
|
+
{
|
|
550
|
+
model.verticalLevelIndex = (function(){
|
|
551
|
+
if(typeof jsonObject['verticalLevelIndex'] !== 'number')
|
|
552
|
+
{
|
|
553
|
+
return Number.isInteger(Number(jsonObject['verticalLevelIndex'])) ? Number(jsonObject['verticalLevelIndex']) : Math.floor(Number(jsonObject['verticalLevelIndex']));
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
return Number.isInteger(jsonObject['verticalLevelIndex']) ? jsonObject['verticalLevelIndex'] : Math.floor(jsonObject['verticalLevelIndex']);
|
|
557
|
+
}());
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if('horizontalPositionIndex' in jsonObject)
|
|
561
|
+
{
|
|
562
|
+
model.horizontalPositionIndex = (function(){
|
|
563
|
+
if(typeof jsonObject['horizontalPositionIndex'] !== 'number')
|
|
564
|
+
{
|
|
565
|
+
return Number.isInteger(Number(jsonObject['horizontalPositionIndex'])) ? Number(jsonObject['horizontalPositionIndex']) : Math.floor(Number(jsonObject['horizontalPositionIndex']));
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
return Number.isInteger(jsonObject['horizontalPositionIndex']) ? jsonObject['horizontalPositionIndex'] : Math.floor(jsonObject['horizontalPositionIndex']);
|
|
569
|
+
}());
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
if('deleted' in jsonObject)
|
|
573
|
+
{
|
|
574
|
+
model.deleted = (function(){
|
|
575
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
576
|
+
{
|
|
577
|
+
return Boolean(jsonObject['deleted']);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
return jsonObject['deleted'];
|
|
581
|
+
}());
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
if('updateTimestamp' in jsonObject)
|
|
585
|
+
{
|
|
586
|
+
model.updateTimestamp = (function(){
|
|
587
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
588
|
+
{
|
|
589
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
593
|
+
}());
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
return model;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export default RackPositionModel;
|