@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,234 @@
|
|
|
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 Dehydrator
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class DehydratorModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* DehydratorModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Dehydrator
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Dehydrator ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The RTU this Dehydrator belongs to
|
|
38
|
+
*
|
|
39
|
+
* @type {?number}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.rtuId = null;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Name of this Dehydrator
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.name = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The Points used by this Dehydrator
|
|
54
|
+
*
|
|
55
|
+
* @type {{rackPositionId: number}}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.points = (function(){
|
|
59
|
+
let pointsDefaultValue = {};
|
|
60
|
+
|
|
61
|
+
pointsDefaultValue.rackPositionId = 0;
|
|
62
|
+
|
|
63
|
+
return pointsDefaultValue;
|
|
64
|
+
}());
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The Lab that owns this Dehydrator
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
this.labId = "";
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Whether the Dehydrator has been deleted
|
|
76
|
+
*
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
this.deleted = false;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* When the Dehydrator was last updated
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
this.updateTimestamp = new Date();
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The Site ID associated with this Dehydrator
|
|
92
|
+
*
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
this.siteId = siteId;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Create a new **DehydratorModel** from a JSON Object or JSON String
|
|
101
|
+
*
|
|
102
|
+
* @static
|
|
103
|
+
* @public
|
|
104
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
105
|
+
* @param {number} siteId The Site ID associated with this Dehydrator
|
|
106
|
+
* @return {DehydratorModel}
|
|
107
|
+
*/
|
|
108
|
+
static fromJSON(json, siteId)
|
|
109
|
+
{
|
|
110
|
+
let model = new DehydratorModel(siteId);
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The JSON Object
|
|
114
|
+
*
|
|
115
|
+
* @type {Object<string, any>}
|
|
116
|
+
*/
|
|
117
|
+
let jsonObject = {};
|
|
118
|
+
|
|
119
|
+
if(typeof json === 'string')
|
|
120
|
+
{
|
|
121
|
+
jsonObject = JSON.parse(json);
|
|
122
|
+
}
|
|
123
|
+
else if(typeof json === 'object')
|
|
124
|
+
{
|
|
125
|
+
jsonObject = json;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if('id' in jsonObject)
|
|
129
|
+
{
|
|
130
|
+
model.id = (function(){
|
|
131
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
132
|
+
{
|
|
133
|
+
return String(jsonObject['id']);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return jsonObject['id'];
|
|
137
|
+
}());
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if('rtuId' in jsonObject)
|
|
141
|
+
{
|
|
142
|
+
model.rtuId = (function(){
|
|
143
|
+
if(jsonObject['rtuId'] === null)
|
|
144
|
+
{
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if(typeof jsonObject['rtuId'] !== 'number')
|
|
149
|
+
{
|
|
150
|
+
return Number.isInteger(Number(jsonObject['rtuId'])) ? Number(jsonObject['rtuId']) : Math.floor(Number(jsonObject['rtuId']));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return Number.isInteger(jsonObject['rtuId']) ? jsonObject['rtuId'] : Math.floor(jsonObject['rtuId']);
|
|
154
|
+
}());
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if('name' in jsonObject)
|
|
158
|
+
{
|
|
159
|
+
model.name = (function(){
|
|
160
|
+
if(typeof jsonObject['name'] !== 'string')
|
|
161
|
+
{
|
|
162
|
+
return String(jsonObject['name']);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return jsonObject['name'];
|
|
166
|
+
}());
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if('points' in jsonObject)
|
|
170
|
+
{
|
|
171
|
+
model.points = (function(){
|
|
172
|
+
let pointsObject = {};
|
|
173
|
+
|
|
174
|
+
if(typeof jsonObject['points'] === 'object' && 'rackPositionId' in jsonObject['points'])
|
|
175
|
+
{
|
|
176
|
+
pointsObject.rackPositionId = (function(){
|
|
177
|
+
if(typeof jsonObject['points'].rackPositionId !== 'number')
|
|
178
|
+
{
|
|
179
|
+
return Number.isInteger(Number(jsonObject['points'].rackPositionId)) ? Number(jsonObject['points'].rackPositionId) : Math.floor(Number(jsonObject['points'].rackPositionId));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return Number.isInteger(jsonObject['points'].rackPositionId) ? jsonObject['points'].rackPositionId : Math.floor(jsonObject['points'].rackPositionId);
|
|
183
|
+
}());
|
|
184
|
+
}
|
|
185
|
+
else
|
|
186
|
+
{
|
|
187
|
+
pointsObject.rackPositionId = 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return pointsObject;
|
|
191
|
+
}());
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if('labId' in jsonObject)
|
|
195
|
+
{
|
|
196
|
+
model.labId = (function(){
|
|
197
|
+
if(typeof jsonObject['labId'] !== 'string')
|
|
198
|
+
{
|
|
199
|
+
return String(jsonObject['labId']);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return jsonObject['labId'];
|
|
203
|
+
}());
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if('deleted' in jsonObject)
|
|
207
|
+
{
|
|
208
|
+
model.deleted = (function(){
|
|
209
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
210
|
+
{
|
|
211
|
+
return Boolean(jsonObject['deleted']);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return jsonObject['deleted'];
|
|
215
|
+
}());
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if('updateTimestamp' in jsonObject)
|
|
219
|
+
{
|
|
220
|
+
model.updateTimestamp = (function(){
|
|
221
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
222
|
+
{
|
|
223
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
227
|
+
}());
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return model;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export default DehydratorModel;
|
|
@@ -0,0 +1,290 @@
|
|
|
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 Fruit Profile
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class FruitProfileModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* FruitProfileModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Fruit Profile
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Fruit Profile ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The Fruit Profile Name
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.name = "";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Fruit Profile Description
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.description = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The Fruit Profile Image Source
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.image = "";
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The Typical Warm Up Duration (in seconds) for a Sample to reach the Minimum Target Temperature
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
this.nominalWarmUpDuration = 0;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The Minimum Duration (in seconds) that a Sample should be within the Min and Max Target Temperatures be Successful
|
|
70
|
+
*
|
|
71
|
+
* @type {number}
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
this.minimumWithinTargetDuration = 0;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The Maximum Duration (in seconds) that a Sample should be Dehydrated for before it Fails
|
|
78
|
+
*
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.maximumTotalDuration = 0;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The Minimum Target Temperature for a Sample to be Successful
|
|
86
|
+
*
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
this.minimumTargetTemperature = 0;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The Maximum Target Temperature for a Sample to be Successful
|
|
94
|
+
*
|
|
95
|
+
* @type {number}
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
this.maximumTargetTemperature = 0;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Whether the Fruit Profile has been deleted
|
|
102
|
+
*
|
|
103
|
+
* @type {boolean}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.deleted = false;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* When the Fruit Profile was last updated
|
|
110
|
+
*
|
|
111
|
+
* @type {Date}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.updateTimestamp = new Date();
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The Site ID associated with this Fruit Profile
|
|
118
|
+
*
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
this.siteId = siteId;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Create a new **FruitProfileModel** from a JSON Object or JSON String
|
|
127
|
+
*
|
|
128
|
+
* @static
|
|
129
|
+
* @public
|
|
130
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
131
|
+
* @param {number} siteId The Site ID associated with this Fruit Profile
|
|
132
|
+
* @return {FruitProfileModel}
|
|
133
|
+
*/
|
|
134
|
+
static fromJSON(json, siteId)
|
|
135
|
+
{
|
|
136
|
+
let model = new FruitProfileModel(siteId);
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The JSON Object
|
|
140
|
+
*
|
|
141
|
+
* @type {Object<string, any>}
|
|
142
|
+
*/
|
|
143
|
+
let jsonObject = {};
|
|
144
|
+
|
|
145
|
+
if(typeof json === 'string')
|
|
146
|
+
{
|
|
147
|
+
jsonObject = JSON.parse(json);
|
|
148
|
+
}
|
|
149
|
+
else if(typeof json === 'object')
|
|
150
|
+
{
|
|
151
|
+
jsonObject = json;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if('id' in jsonObject)
|
|
155
|
+
{
|
|
156
|
+
model.id = (function(){
|
|
157
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
158
|
+
{
|
|
159
|
+
return String(jsonObject['id']);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return jsonObject['id'];
|
|
163
|
+
}());
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if('name' in jsonObject)
|
|
167
|
+
{
|
|
168
|
+
model.name = (function(){
|
|
169
|
+
if(typeof jsonObject['name'] !== 'string')
|
|
170
|
+
{
|
|
171
|
+
return String(jsonObject['name']);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return jsonObject['name'];
|
|
175
|
+
}());
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if('description' in jsonObject)
|
|
179
|
+
{
|
|
180
|
+
model.description = (function(){
|
|
181
|
+
if(typeof jsonObject['description'] !== 'string')
|
|
182
|
+
{
|
|
183
|
+
return String(jsonObject['description']);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return jsonObject['description'];
|
|
187
|
+
}());
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if('image' in jsonObject)
|
|
191
|
+
{
|
|
192
|
+
model.image = (function(){
|
|
193
|
+
if(typeof jsonObject['image'] !== 'string')
|
|
194
|
+
{
|
|
195
|
+
return String(jsonObject['image']);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return jsonObject['image'];
|
|
199
|
+
}());
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if('nominalWarmUpDuration' in jsonObject)
|
|
203
|
+
{
|
|
204
|
+
model.nominalWarmUpDuration = (function(){
|
|
205
|
+
if(typeof jsonObject['nominalWarmUpDuration'] !== 'number')
|
|
206
|
+
{
|
|
207
|
+
return Number.isInteger(Number(jsonObject['nominalWarmUpDuration'])) ? Number(jsonObject['nominalWarmUpDuration']) : Math.floor(Number(jsonObject['nominalWarmUpDuration']));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return Number.isInteger(jsonObject['nominalWarmUpDuration']) ? jsonObject['nominalWarmUpDuration'] : Math.floor(jsonObject['nominalWarmUpDuration']);
|
|
211
|
+
}());
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if('minimumWithinTargetDuration' in jsonObject)
|
|
215
|
+
{
|
|
216
|
+
model.minimumWithinTargetDuration = (function(){
|
|
217
|
+
if(typeof jsonObject['minimumWithinTargetDuration'] !== 'number')
|
|
218
|
+
{
|
|
219
|
+
return Number.isInteger(Number(jsonObject['minimumWithinTargetDuration'])) ? Number(jsonObject['minimumWithinTargetDuration']) : Math.floor(Number(jsonObject['minimumWithinTargetDuration']));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return Number.isInteger(jsonObject['minimumWithinTargetDuration']) ? jsonObject['minimumWithinTargetDuration'] : Math.floor(jsonObject['minimumWithinTargetDuration']);
|
|
223
|
+
}());
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if('maximumTotalDuration' in jsonObject)
|
|
227
|
+
{
|
|
228
|
+
model.maximumTotalDuration = (function(){
|
|
229
|
+
if(typeof jsonObject['maximumTotalDuration'] !== 'number')
|
|
230
|
+
{
|
|
231
|
+
return Number.isInteger(Number(jsonObject['maximumTotalDuration'])) ? Number(jsonObject['maximumTotalDuration']) : Math.floor(Number(jsonObject['maximumTotalDuration']));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return Number.isInteger(jsonObject['maximumTotalDuration']) ? jsonObject['maximumTotalDuration'] : Math.floor(jsonObject['maximumTotalDuration']);
|
|
235
|
+
}());
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if('minimumTargetTemperature' in jsonObject)
|
|
239
|
+
{
|
|
240
|
+
model.minimumTargetTemperature = (function(){
|
|
241
|
+
if(typeof jsonObject['minimumTargetTemperature'] !== 'number')
|
|
242
|
+
{
|
|
243
|
+
return Number(jsonObject['minimumTargetTemperature']);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return jsonObject['minimumTargetTemperature'];
|
|
247
|
+
}());
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if('maximumTargetTemperature' in jsonObject)
|
|
251
|
+
{
|
|
252
|
+
model.maximumTargetTemperature = (function(){
|
|
253
|
+
if(typeof jsonObject['maximumTargetTemperature'] !== 'number')
|
|
254
|
+
{
|
|
255
|
+
return Number(jsonObject['maximumTargetTemperature']);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return jsonObject['maximumTargetTemperature'];
|
|
259
|
+
}());
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if('deleted' in jsonObject)
|
|
263
|
+
{
|
|
264
|
+
model.deleted = (function(){
|
|
265
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
266
|
+
{
|
|
267
|
+
return Boolean(jsonObject['deleted']);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return jsonObject['deleted'];
|
|
271
|
+
}());
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if('updateTimestamp' in jsonObject)
|
|
275
|
+
{
|
|
276
|
+
model.updateTimestamp = (function(){
|
|
277
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
278
|
+
{
|
|
279
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
283
|
+
}());
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return model;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export default FruitProfileModel;
|