@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,565 @@
|
|
|
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 Sample
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class SampleModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* SampleModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Sample
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Sample ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The Lab ID this Sample is associated with
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.labId = "";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Numeric Sample Number
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.sampleNumber = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* When this Sample was Created
|
|
54
|
+
*
|
|
55
|
+
* @type {Date}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.createdTimestamp = new Date();
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The Source that Created this Sample
|
|
62
|
+
*
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
this.createdSource = "";
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* ID of the User who Created this Sample. Only applies if the `createdSource` is 'System'
|
|
70
|
+
*
|
|
71
|
+
* @type {?string}
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
this.createdUserId = null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Name of the User who Created this Sample. Only applies if the `createdSource` is 'System'
|
|
78
|
+
*
|
|
79
|
+
* @type {?string}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.createdUserName = null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Optional Scheduled Timestamp when this Sample should Begin
|
|
86
|
+
*
|
|
87
|
+
* @type {?Date}
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
this.scheduledTimestamp = null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* When this Sample was Started
|
|
94
|
+
*
|
|
95
|
+
* @type {?Date}
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
this.startTimestamp = null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* When this Sample was Finished
|
|
102
|
+
*
|
|
103
|
+
* @type {?Date}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.finishTimestamp = null;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* When this Sample was Published
|
|
110
|
+
*
|
|
111
|
+
* @type {?Date}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.publishTimestamp = null;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* ID of the User who Published this Sample
|
|
118
|
+
*
|
|
119
|
+
* @type {?string}
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
this.publishUserId = null;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Name of the User who Published this Sample
|
|
126
|
+
*
|
|
127
|
+
* @type {?string}
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
this.publishUserName = null;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The Fruit Profile for this Sample
|
|
134
|
+
*
|
|
135
|
+
* @type {string}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.fruitProfileId = "";
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The Rack Position used for this Sample
|
|
142
|
+
*
|
|
143
|
+
* @type {string}
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
this.rackPositionId = "";
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The Dehydrator used for this Sample
|
|
150
|
+
*
|
|
151
|
+
* @type {string}
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
this.dehydratorId = "";
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The Outcome of this Sample
|
|
158
|
+
*
|
|
159
|
+
* @type {?string}
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
this.outcome = null;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* A Sample Failure Reason ID if this Sample Failed
|
|
166
|
+
*
|
|
167
|
+
* @type {?string}
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
this.failureReasonId = null;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The Sample Result ID asociated with this Sample
|
|
174
|
+
*
|
|
175
|
+
* @type {?string}
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
this.resultId = null;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The Status of this Sample
|
|
182
|
+
*
|
|
183
|
+
* @type {string}
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
this.status = "";
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Whether the Sample has been deleted
|
|
190
|
+
*
|
|
191
|
+
* @type {boolean}
|
|
192
|
+
* @public
|
|
193
|
+
*/
|
|
194
|
+
this.deleted = false;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* When the Sample was last updated
|
|
198
|
+
*
|
|
199
|
+
* @type {Date}
|
|
200
|
+
* @public
|
|
201
|
+
*/
|
|
202
|
+
this.updateTimestamp = new Date();
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The Site ID associated with this Sample
|
|
206
|
+
*
|
|
207
|
+
* @type {number}
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
210
|
+
this.siteId = siteId;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Create a new **SampleModel** from a JSON Object or JSON String
|
|
215
|
+
*
|
|
216
|
+
* @static
|
|
217
|
+
* @public
|
|
218
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
219
|
+
* @param {number} siteId The Site ID associated with this Sample
|
|
220
|
+
* @return {SampleModel}
|
|
221
|
+
*/
|
|
222
|
+
static fromJSON(json, siteId)
|
|
223
|
+
{
|
|
224
|
+
let model = new SampleModel(siteId);
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The JSON Object
|
|
228
|
+
*
|
|
229
|
+
* @type {Object<string, any>}
|
|
230
|
+
*/
|
|
231
|
+
let jsonObject = {};
|
|
232
|
+
|
|
233
|
+
if(typeof json === 'string')
|
|
234
|
+
{
|
|
235
|
+
jsonObject = JSON.parse(json);
|
|
236
|
+
}
|
|
237
|
+
else if(typeof json === 'object')
|
|
238
|
+
{
|
|
239
|
+
jsonObject = json;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if('id' in jsonObject)
|
|
243
|
+
{
|
|
244
|
+
model.id = (function(){
|
|
245
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
246
|
+
{
|
|
247
|
+
return String(jsonObject['id']);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return jsonObject['id'];
|
|
251
|
+
}());
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if('labId' in jsonObject)
|
|
255
|
+
{
|
|
256
|
+
model.labId = (function(){
|
|
257
|
+
if(typeof jsonObject['labId'] !== 'string')
|
|
258
|
+
{
|
|
259
|
+
return String(jsonObject['labId']);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return jsonObject['labId'];
|
|
263
|
+
}());
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if('sampleNumber' in jsonObject)
|
|
267
|
+
{
|
|
268
|
+
model.sampleNumber = (function(){
|
|
269
|
+
if(typeof jsonObject['sampleNumber'] !== 'string')
|
|
270
|
+
{
|
|
271
|
+
return String(jsonObject['sampleNumber']);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return jsonObject['sampleNumber'];
|
|
275
|
+
}());
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if('createdTimestamp' in jsonObject)
|
|
279
|
+
{
|
|
280
|
+
model.createdTimestamp = (function(){
|
|
281
|
+
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
282
|
+
{
|
|
283
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
287
|
+
}());
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if('createdSource' in jsonObject)
|
|
291
|
+
{
|
|
292
|
+
model.createdSource = (function(){
|
|
293
|
+
if(typeof jsonObject['createdSource'] !== 'string')
|
|
294
|
+
{
|
|
295
|
+
return String(jsonObject['createdSource']);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return jsonObject['createdSource'];
|
|
299
|
+
}());
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if('createdUserId' in jsonObject)
|
|
303
|
+
{
|
|
304
|
+
model.createdUserId = (function(){
|
|
305
|
+
if(jsonObject['createdUserId'] === null)
|
|
306
|
+
{
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if(typeof jsonObject['createdUserId'] !== 'string')
|
|
311
|
+
{
|
|
312
|
+
return String(jsonObject['createdUserId']);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return jsonObject['createdUserId'];
|
|
316
|
+
}());
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if('createdUserName' in jsonObject)
|
|
320
|
+
{
|
|
321
|
+
model.createdUserName = (function(){
|
|
322
|
+
if(jsonObject['createdUserName'] === null)
|
|
323
|
+
{
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if(typeof jsonObject['createdUserName'] !== 'string')
|
|
328
|
+
{
|
|
329
|
+
return String(jsonObject['createdUserName']);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
return jsonObject['createdUserName'];
|
|
333
|
+
}());
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if('scheduledTimestamp' in jsonObject)
|
|
337
|
+
{
|
|
338
|
+
model.scheduledTimestamp = (function(){
|
|
339
|
+
if(jsonObject['scheduledTimestamp'] === null)
|
|
340
|
+
{
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if(typeof jsonObject['scheduledTimestamp'] !== 'string')
|
|
345
|
+
{
|
|
346
|
+
return new Date(String(jsonObject['scheduledTimestamp']));
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
return new Date(jsonObject['scheduledTimestamp']);
|
|
350
|
+
}());
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if('startTimestamp' in jsonObject)
|
|
354
|
+
{
|
|
355
|
+
model.startTimestamp = (function(){
|
|
356
|
+
if(jsonObject['startTimestamp'] === null)
|
|
357
|
+
{
|
|
358
|
+
return null;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if(typeof jsonObject['startTimestamp'] !== 'string')
|
|
362
|
+
{
|
|
363
|
+
return new Date(String(jsonObject['startTimestamp']));
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
return new Date(jsonObject['startTimestamp']);
|
|
367
|
+
}());
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if('finishTimestamp' in jsonObject)
|
|
371
|
+
{
|
|
372
|
+
model.finishTimestamp = (function(){
|
|
373
|
+
if(jsonObject['finishTimestamp'] === null)
|
|
374
|
+
{
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if(typeof jsonObject['finishTimestamp'] !== 'string')
|
|
379
|
+
{
|
|
380
|
+
return new Date(String(jsonObject['finishTimestamp']));
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return new Date(jsonObject['finishTimestamp']);
|
|
384
|
+
}());
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if('publishTimestamp' in jsonObject)
|
|
388
|
+
{
|
|
389
|
+
model.publishTimestamp = (function(){
|
|
390
|
+
if(jsonObject['publishTimestamp'] === null)
|
|
391
|
+
{
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if(typeof jsonObject['publishTimestamp'] !== 'string')
|
|
396
|
+
{
|
|
397
|
+
return new Date(String(jsonObject['publishTimestamp']));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
return new Date(jsonObject['publishTimestamp']);
|
|
401
|
+
}());
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
if('publishUserId' in jsonObject)
|
|
405
|
+
{
|
|
406
|
+
model.publishUserId = (function(){
|
|
407
|
+
if(jsonObject['publishUserId'] === null)
|
|
408
|
+
{
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if(typeof jsonObject['publishUserId'] !== 'string')
|
|
413
|
+
{
|
|
414
|
+
return String(jsonObject['publishUserId']);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return jsonObject['publishUserId'];
|
|
418
|
+
}());
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if('publishUserName' in jsonObject)
|
|
422
|
+
{
|
|
423
|
+
model.publishUserName = (function(){
|
|
424
|
+
if(jsonObject['publishUserName'] === null)
|
|
425
|
+
{
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if(typeof jsonObject['publishUserName'] !== 'string')
|
|
430
|
+
{
|
|
431
|
+
return String(jsonObject['publishUserName']);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
return jsonObject['publishUserName'];
|
|
435
|
+
}());
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if('fruitProfileId' in jsonObject)
|
|
439
|
+
{
|
|
440
|
+
model.fruitProfileId = (function(){
|
|
441
|
+
if(typeof jsonObject['fruitProfileId'] !== 'string')
|
|
442
|
+
{
|
|
443
|
+
return String(jsonObject['fruitProfileId']);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
return jsonObject['fruitProfileId'];
|
|
447
|
+
}());
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if('rackPositionId' in jsonObject)
|
|
451
|
+
{
|
|
452
|
+
model.rackPositionId = (function(){
|
|
453
|
+
if(typeof jsonObject['rackPositionId'] !== 'string')
|
|
454
|
+
{
|
|
455
|
+
return String(jsonObject['rackPositionId']);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return jsonObject['rackPositionId'];
|
|
459
|
+
}());
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if('dehydratorId' in jsonObject)
|
|
463
|
+
{
|
|
464
|
+
model.dehydratorId = (function(){
|
|
465
|
+
if(typeof jsonObject['dehydratorId'] !== 'string')
|
|
466
|
+
{
|
|
467
|
+
return String(jsonObject['dehydratorId']);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
return jsonObject['dehydratorId'];
|
|
471
|
+
}());
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if('outcome' in jsonObject)
|
|
475
|
+
{
|
|
476
|
+
model.outcome = (function(){
|
|
477
|
+
if(jsonObject['outcome'] === null)
|
|
478
|
+
{
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if(typeof jsonObject['outcome'] !== 'string')
|
|
483
|
+
{
|
|
484
|
+
return String(jsonObject['outcome']);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return jsonObject['outcome'];
|
|
488
|
+
}());
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if('failureReasonId' in jsonObject)
|
|
492
|
+
{
|
|
493
|
+
model.failureReasonId = (function(){
|
|
494
|
+
if(jsonObject['failureReasonId'] === null)
|
|
495
|
+
{
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if(typeof jsonObject['failureReasonId'] !== 'string')
|
|
500
|
+
{
|
|
501
|
+
return String(jsonObject['failureReasonId']);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
return jsonObject['failureReasonId'];
|
|
505
|
+
}());
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
if('resultId' in jsonObject)
|
|
509
|
+
{
|
|
510
|
+
model.resultId = (function(){
|
|
511
|
+
if(jsonObject['resultId'] === null)
|
|
512
|
+
{
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
if(typeof jsonObject['resultId'] !== 'string')
|
|
517
|
+
{
|
|
518
|
+
return String(jsonObject['resultId']);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return jsonObject['resultId'];
|
|
522
|
+
}());
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if('status' in jsonObject)
|
|
526
|
+
{
|
|
527
|
+
model.status = (function(){
|
|
528
|
+
if(typeof jsonObject['status'] !== 'string')
|
|
529
|
+
{
|
|
530
|
+
return String(jsonObject['status']);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return jsonObject['status'];
|
|
534
|
+
}());
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if('deleted' in jsonObject)
|
|
538
|
+
{
|
|
539
|
+
model.deleted = (function(){
|
|
540
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
541
|
+
{
|
|
542
|
+
return Boolean(jsonObject['deleted']);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return jsonObject['deleted'];
|
|
546
|
+
}());
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if('updateTimestamp' in jsonObject)
|
|
550
|
+
{
|
|
551
|
+
model.updateTimestamp = (function(){
|
|
552
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
553
|
+
{
|
|
554
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
558
|
+
}());
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
return model;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export default SampleModel;
|