@blues-inc/notehub-js 1.0.9 → 1.0.11

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 (82) hide show
  1. package/README.md +181 -178
  2. package/dist/ApiClient.js +157 -154
  3. package/dist/api/AuthorizationApi.js +63 -18
  4. package/dist/api/BillingAccountApi.js +15 -15
  5. package/dist/api/DeviceApi.js +159 -159
  6. package/dist/api/DevicesApi.js +58 -58
  7. package/dist/api/EnvironmentVariablesApi.js +110 -110
  8. package/dist/api/EventApi.js +94 -94
  9. package/dist/api/FilesApi.js +42 -42
  10. package/dist/api/FleetApi.js +160 -160
  11. package/dist/api/NotesApi.js +105 -105
  12. package/dist/api/ProductApi.js +29 -29
  13. package/dist/api/ProjectApi.js +139 -139
  14. package/dist/api/RouteApi.js +51 -51
  15. package/dist/index.js +7 -0
  16. package/dist/model/Aws.js +65 -64
  17. package/dist/model/Azure.js +51 -37
  18. package/dist/model/BillingAccount.js +20 -20
  19. package/dist/model/Body.js +4 -4
  20. package/dist/model/Contact.js +21 -21
  21. package/dist/model/CreateFleetRequest.js +6 -6
  22. package/dist/model/CreateProductRequest.js +21 -21
  23. package/dist/model/CreateProjectRequest.js +13 -13
  24. package/dist/model/DFUEnv.js +11 -11
  25. package/dist/model/DFUState.js +64 -64
  26. package/dist/model/DeleteDeviceFleetsRequest.js +7 -7
  27. package/dist/model/Device.js +82 -82
  28. package/dist/model/DeviceSession.js +181 -181
  29. package/dist/model/DeviceTowerInfo.js +13 -13
  30. package/dist/model/DeviceUsage.js +31 -31
  31. package/dist/model/EnvironmentVariables.js +7 -7
  32. package/dist/model/Error.js +30 -30
  33. package/dist/model/Event.js +222 -222
  34. package/dist/model/Fleet.js +20 -20
  35. package/dist/model/GenerateAuthToken200Response.js +114 -0
  36. package/dist/model/GetBillingAccounts200Response.js +8 -9
  37. package/dist/model/GetDeviceEnvironmentVariables200Response.js +11 -11
  38. package/dist/model/GetDeviceHealthLog200Response.js +10 -11
  39. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +18 -18
  40. package/dist/model/GetDeviceLatest200Response.js +8 -9
  41. package/dist/model/GetDevicePublicKey200Response.js +15 -15
  42. package/dist/model/GetDeviceSessions200Response.js +15 -16
  43. package/dist/model/GetProjectDevicePublicKeys200Response.js +15 -16
  44. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +11 -11
  45. package/dist/model/GetProjectDevices200Response.js +15 -16
  46. package/dist/model/GetProjectEvents200Response.js +20 -21
  47. package/dist/model/GetProjectEventsByCursor200Response.js +22 -23
  48. package/dist/model/GetProjectFleets200Response.js +10 -11
  49. package/dist/model/GetProjectMembers200Response.js +10 -11
  50. package/dist/model/GetProjectProducts200Response.js +8 -9
  51. package/dist/model/GetProjects200Response.js +8 -9
  52. package/dist/model/Google.js +27 -27
  53. package/dist/model/HandleNoteChanges200Response.js +10 -10
  54. package/dist/model/HandleNoteGet200Response.js +12 -12
  55. package/dist/model/HandleNoteSignal200Response.js +4 -4
  56. package/dist/model/HandleNotefileChanges200Response.js +10 -10
  57. package/dist/model/HandleNotefileChangesPending200Response.js +13 -13
  58. package/dist/model/HandleNotefileDeleteRequest.js +6 -6
  59. package/dist/model/Http.js +34 -34
  60. package/dist/model/HttpFilter.js +18 -18
  61. package/dist/model/HttpTransform.js +19 -19
  62. package/dist/model/Location.js +39 -39
  63. package/dist/model/Login200Response.js +6 -6
  64. package/dist/model/LoginRequest.js +11 -11
  65. package/dist/model/Mqtt.js +70 -71
  66. package/dist/model/Note.js +9 -9
  67. package/dist/model/Product.js +25 -25
  68. package/dist/model/Project.js +33 -33
  69. package/dist/model/ProjectMember.js +21 -21
  70. package/dist/model/Proxy.js +23 -23
  71. package/dist/model/PutDeviceFleetsRequest.js +7 -7
  72. package/dist/model/Radresponder.js +25 -25
  73. package/dist/model/Route.js +35 -35
  74. package/dist/model/RouteSchema.js +53 -43
  75. package/dist/model/Snowflake.js +45 -45
  76. package/dist/model/SnowflakeTransform.js +11 -11
  77. package/dist/model/Thingworx.js +33 -32
  78. package/dist/model/TowerLocation.js +51 -51
  79. package/dist/model/Twilio.js +43 -43
  80. package/dist/model/UpdateFleetRequest.js +16 -16
  81. package/dist/model/UserDbRoute.js +24 -24
  82. package/package.json +3 -3
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
15
15
  /**
16
16
  * The DFUState model module.
17
17
  * @module model/DFUState
18
- * @version 1.0.9
18
+ * @version 1.0.11
19
19
  */
20
20
  var DFUState = /*#__PURE__*/function () {
21
21
  /**
@@ -48,44 +48,44 @@ var DFUState = /*#__PURE__*/function () {
48
48
  value: function constructFromObject(data, obj) {
49
49
  if (data) {
50
50
  obj = obj || new DFUState();
51
- if (data.hasOwnProperty('type')) {
52
- obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
51
+ if (data.hasOwnProperty("type")) {
52
+ obj["type"] = _ApiClient["default"].convertToType(data["type"], "String");
53
53
  }
54
- if (data.hasOwnProperty('file')) {
55
- obj['file'] = _ApiClient["default"].convertToType(data['file'], 'String');
54
+ if (data.hasOwnProperty("file")) {
55
+ obj["file"] = _ApiClient["default"].convertToType(data["file"], "String");
56
56
  }
57
- if (data.hasOwnProperty('length')) {
58
- obj['length'] = _ApiClient["default"].convertToType(data['length'], 'Number');
57
+ if (data.hasOwnProperty("length")) {
58
+ obj["length"] = _ApiClient["default"].convertToType(data["length"], "Number");
59
59
  }
60
- if (data.hasOwnProperty('crc32')) {
61
- obj['crc32'] = _ApiClient["default"].convertToType(data['crc32'], 'Number');
60
+ if (data.hasOwnProperty("crc32")) {
61
+ obj["crc32"] = _ApiClient["default"].convertToType(data["crc32"], "Number");
62
62
  }
63
- if (data.hasOwnProperty('md5')) {
64
- obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
63
+ if (data.hasOwnProperty("md5")) {
64
+ obj["md5"] = _ApiClient["default"].convertToType(data["md5"], "String");
65
65
  }
66
- if (data.hasOwnProperty('mode')) {
67
- obj['mode'] = _ApiClient["default"].convertToType(data['mode'], 'String');
66
+ if (data.hasOwnProperty("mode")) {
67
+ obj["mode"] = _ApiClient["default"].convertToType(data["mode"], "String");
68
68
  }
69
- if (data.hasOwnProperty('status')) {
70
- obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
69
+ if (data.hasOwnProperty("status")) {
70
+ obj["status"] = _ApiClient["default"].convertToType(data["status"], "String");
71
71
  }
72
- if (data.hasOwnProperty('began')) {
73
- obj['began'] = _ApiClient["default"].convertToType(data['began'], 'Number');
72
+ if (data.hasOwnProperty("began")) {
73
+ obj["began"] = _ApiClient["default"].convertToType(data["began"], "Number");
74
74
  }
75
- if (data.hasOwnProperty('retry')) {
76
- obj['retry'] = _ApiClient["default"].convertToType(data['retry'], 'Number');
75
+ if (data.hasOwnProperty("retry")) {
76
+ obj["retry"] = _ApiClient["default"].convertToType(data["retry"], "Number");
77
77
  }
78
- if (data.hasOwnProperty('errors')) {
79
- obj['errors'] = _ApiClient["default"].convertToType(data['errors'], 'Number');
78
+ if (data.hasOwnProperty("errors")) {
79
+ obj["errors"] = _ApiClient["default"].convertToType(data["errors"], "Number");
80
80
  }
81
- if (data.hasOwnProperty('read')) {
82
- obj['read'] = _ApiClient["default"].convertToType(data['read'], 'Number');
81
+ if (data.hasOwnProperty("read")) {
82
+ obj["read"] = _ApiClient["default"].convertToType(data["read"], "Number");
83
83
  }
84
- if (data.hasOwnProperty('updated')) {
85
- obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'Number');
84
+ if (data.hasOwnProperty("updated")) {
85
+ obj["updated"] = _ApiClient["default"].convertToType(data["updated"], "Number");
86
86
  }
87
- if (data.hasOwnProperty('version')) {
88
- obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
87
+ if (data.hasOwnProperty("version")) {
88
+ obj["version"] = _ApiClient["default"].convertToType(data["version"], "String");
89
89
  }
90
90
  } else if (data === null) {
91
91
  return null;
@@ -102,28 +102,28 @@ var DFUState = /*#__PURE__*/function () {
102
102
  key: "validateJSON",
103
103
  value: function validateJSON(data) {
104
104
  // ensure the json data is a string
105
- if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
106
- throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
105
+ if (data["type"] && !(typeof data["type"] === "string" || data["type"] instanceof String)) {
106
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data["type"]);
107
107
  }
108
108
  // ensure the json data is a string
109
- if (data['file'] && !(typeof data['file'] === 'string' || data['file'] instanceof String)) {
110
- throw new Error("Expected the field `file` to be a primitive type in the JSON string but got " + data['file']);
109
+ if (data["file"] && !(typeof data["file"] === "string" || data["file"] instanceof String)) {
110
+ throw new Error("Expected the field `file` to be a primitive type in the JSON string but got " + data["file"]);
111
111
  }
112
112
  // ensure the json data is a string
113
- if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
114
- throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
113
+ if (data["md5"] && !(typeof data["md5"] === "string" || data["md5"] instanceof String)) {
114
+ throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data["md5"]);
115
115
  }
116
116
  // ensure the json data is a string
117
- if (data['mode'] && !(typeof data['mode'] === 'string' || data['mode'] instanceof String)) {
118
- throw new Error("Expected the field `mode` to be a primitive type in the JSON string but got " + data['mode']);
117
+ if (data["mode"] && !(typeof data["mode"] === "string" || data["mode"] instanceof String)) {
118
+ throw new Error("Expected the field `mode` to be a primitive type in the JSON string but got " + data["mode"]);
119
119
  }
120
120
  // ensure the json data is a string
121
- if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
122
- throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
121
+ if (data["status"] && !(typeof data["status"] === "string" || data["status"] instanceof String)) {
122
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data["status"]);
123
123
  }
124
124
  // ensure the json data is a string
125
- if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
126
- throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
125
+ if (data["version"] && !(typeof data["version"] === "string" || data["version"] instanceof String)) {
126
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data["version"]);
127
127
  }
128
128
  return true;
129
129
  }
@@ -133,96 +133,96 @@ var DFUState = /*#__PURE__*/function () {
133
133
  /**
134
134
  * @member {module:model/DFUState.TypeEnum} type
135
135
  */
136
- DFUState.prototype['type'] = undefined;
136
+ DFUState.prototype["type"] = undefined;
137
137
 
138
138
  /**
139
139
  * Firmware filename
140
140
  * @member {String} file
141
141
  */
142
- DFUState.prototype['file'] = undefined;
142
+ DFUState.prototype["file"] = undefined;
143
143
 
144
144
  /**
145
145
  * Length of firmware file
146
146
  * @member {Number} length
147
147
  */
148
- DFUState.prototype['length'] = undefined;
148
+ DFUState.prototype["length"] = undefined;
149
149
 
150
150
  /**
151
151
  * Used for image verification
152
152
  * @member {Number} crc32
153
153
  */
154
- DFUState.prototype['crc32'] = undefined;
154
+ DFUState.prototype["crc32"] = undefined;
155
155
 
156
156
  /**
157
157
  * Used for image verification
158
158
  * @member {String} md5
159
159
  */
160
- DFUState.prototype['md5'] = undefined;
160
+ DFUState.prototype["md5"] = undefined;
161
161
 
162
162
  /**
163
- * * \"idle\" - nothing downloading or downloaded * \"error\" - halted and in the error state * \"downloading\" - transferring data from cloud to module * \"sideloading\" - transferring data via request to module * \"ready\" - DFU data is ready/verified and waiting on external storage * \"ready-retry\" - DFU data is ready/verified and retrying * \"updating\" - currently updating * \"completed\" - DFU is done successfully
163
+ * * \"idle\" - nothing downloading or downloaded * \"error\" - halted and in the error state * \"downloading\" - transferring data from cloud to module * \"sideloading\" - transferring data via request to module * \"ready\" - DFU data is ready/verified and waiting on external storage * \"ready-retry\" - DFU data is ready/verified and retrying * \"updating\" - currently updating * \"completed\" - DFU is done successfully
164
164
  * @member {module:model/DFUState.ModeEnum} mode
165
165
  */
166
- DFUState.prototype['mode'] = undefined;
166
+ DFUState.prototype["mode"] = undefined;
167
167
 
168
168
  /**
169
169
  * Status message
170
170
  * @member {String} status
171
171
  */
172
- DFUState.prototype['status'] = undefined;
172
+ DFUState.prototype["status"] = undefined;
173
173
 
174
174
  /**
175
175
  * The time when the DFU began
176
176
  * @member {Number} began
177
177
  */
178
- DFUState.prototype['began'] = undefined;
178
+ DFUState.prototype["began"] = undefined;
179
179
 
180
180
  /**
181
181
  * Value of _fw_retry environment var at time of DFU initialization
182
182
  * @member {Number} retry
183
183
  */
184
- DFUState.prototype['retry'] = undefined;
184
+ DFUState.prototype["retry"] = undefined;
185
185
 
186
186
  /**
187
187
  * The number of consecutive errors the DFU process has encountered
188
188
  * @member {Number} errors
189
189
  */
190
- DFUState.prototype['errors'] = undefined;
190
+ DFUState.prototype["errors"] = undefined;
191
191
 
192
192
  /**
193
193
  * The amount the notecard has read of the image from notehub
194
194
  * @member {Number} read
195
195
  */
196
- DFUState.prototype['read'] = undefined;
196
+ DFUState.prototype["read"] = undefined;
197
197
 
198
198
  /**
199
199
  * Last updated timestamp
200
200
  * @member {Number} updated
201
201
  */
202
- DFUState.prototype['updated'] = undefined;
202
+ DFUState.prototype["updated"] = undefined;
203
203
 
204
204
  /**
205
205
  * Last known version, which is generally a JSON object contained within the firmware image
206
206
  * @member {String} version
207
207
  */
208
- DFUState.prototype['version'] = undefined;
208
+ DFUState.prototype["version"] = undefined;
209
209
 
210
210
  /**
211
211
  * Allowed values for the <code>type</code> property.
212
212
  * @enum {String}
213
213
  * @readonly
214
214
  */
215
- DFUState['TypeEnum'] = {
215
+ DFUState["TypeEnum"] = {
216
216
  /**
217
217
  * value: "card"
218
218
  * @const
219
219
  */
220
- "card": "card",
220
+ card: "card",
221
221
  /**
222
222
  * value: "user"
223
223
  * @const
224
224
  */
225
- "user": "user"
225
+ user: "user"
226
226
  };
227
227
 
228
228
  /**
@@ -230,32 +230,32 @@ DFUState['TypeEnum'] = {
230
230
  * @enum {String}
231
231
  * @readonly
232
232
  */
233
- DFUState['ModeEnum'] = {
233
+ DFUState["ModeEnum"] = {
234
234
  /**
235
235
  * value: "idle"
236
236
  * @const
237
237
  */
238
- "idle": "idle",
238
+ idle: "idle",
239
239
  /**
240
240
  * value: "error"
241
241
  * @const
242
242
  */
243
- "error": "error",
243
+ error: "error",
244
244
  /**
245
245
  * value: "downloading"
246
246
  * @const
247
247
  */
248
- "downloading": "downloading",
248
+ downloading: "downloading",
249
249
  /**
250
250
  * value: "sideloading"
251
251
  * @const
252
252
  */
253
- "sideloading": "sideloading",
253
+ sideloading: "sideloading",
254
254
  /**
255
255
  * value: "ready"
256
256
  * @const
257
257
  */
258
- "ready": "ready",
258
+ ready: "ready",
259
259
  /**
260
260
  * value: "ready-retry"
261
261
  * @const
@@ -265,12 +265,12 @@ DFUState['ModeEnum'] = {
265
265
  * value: "updating"
266
266
  * @const
267
267
  */
268
- "updating": "updating",
268
+ updating: "updating",
269
269
  /**
270
270
  * value: "completed"
271
271
  * @const
272
272
  */
273
- "completed": "completed"
273
+ completed: "completed"
274
274
  };
275
275
  var _default = DFUState;
276
276
  exports["default"] = _default;
@@ -18,7 +18,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
18
18
  /**
19
19
  * The DeleteDeviceFleetsRequest model module.
20
20
  * @module model/DeleteDeviceFleetsRequest
21
- * @version 1.0.9
21
+ * @version 1.0.11
22
22
  */
23
23
  var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
24
24
  /**
@@ -39,7 +39,7 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
39
39
  _createClass(DeleteDeviceFleetsRequest, null, [{
40
40
  key: "initialize",
41
41
  value: function initialize(obj, fleetUids) {
42
- obj['fleet_uids'] = fleetUids;
42
+ obj["fleet_uids"] = fleetUids;
43
43
  }
44
44
 
45
45
  /**
@@ -54,8 +54,8 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
54
54
  value: function constructFromObject(data, obj) {
55
55
  if (data) {
56
56
  obj = obj || new DeleteDeviceFleetsRequest();
57
- if (data.hasOwnProperty('fleet_uids')) {
58
- obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
57
+ if (data.hasOwnProperty("fleet_uids")) {
58
+ obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
59
59
  }
60
60
  } else if (data === null) {
61
61
  return null;
@@ -87,8 +87,8 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
87
87
  } finally {
88
88
  _iterator.f();
89
89
  }
90
- if (!Array.isArray(data['fleet_uids'])) {
91
- throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
90
+ if (!Array.isArray(data["fleet_uids"])) {
91
+ throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
92
92
  }
93
93
  return true;
94
94
  }
@@ -101,6 +101,6 @@ DeleteDeviceFleetsRequest.RequiredProperties = ["fleet_uids"];
101
101
  * The fleetUIDs to remove from the device.
102
102
  * @member {Array.<String>} fleet_uids
103
103
  */
104
- DeleteDeviceFleetsRequest.prototype['fleet_uids'] = undefined;
104
+ DeleteDeviceFleetsRequest.prototype["fleet_uids"] = undefined;
105
105
  var _default = DeleteDeviceFleetsRequest;
106
106
  exports["default"] = _default;
@@ -22,19 +22,19 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
22
22
  /**
23
23
  * The Device model module.
24
24
  * @module model/Device
25
- * @version 1.0.9
25
+ * @version 1.0.11
26
26
  */
27
27
  var Device = /*#__PURE__*/function () {
28
28
  /**
29
29
  * Constructs a new <code>Device</code>.
30
30
  * @alias module:model/Device
31
- * @param uid {String}
32
- * @param serialNumber {String}
33
- * @param provisioned {Date}
34
- * @param productUid {String}
35
- * @param fleetUids {Array.<String>}
36
- * @param voltage {Number}
37
- * @param temperature {Number}
31
+ * @param uid {String}
32
+ * @param serialNumber {String}
33
+ * @param provisioned {Date}
34
+ * @param productUid {String}
35
+ * @param fleetUids {Array.<String>}
36
+ * @param voltage {Number}
37
+ * @param temperature {Number}
38
38
  */
39
39
  function Device(uid, serialNumber, provisioned, productUid, fleetUids, voltage, temperature) {
40
40
  _classCallCheck(this, Device);
@@ -49,13 +49,13 @@ var Device = /*#__PURE__*/function () {
49
49
  _createClass(Device, null, [{
50
50
  key: "initialize",
51
51
  value: function initialize(obj, uid, serialNumber, provisioned, productUid, fleetUids, voltage, temperature) {
52
- obj['uid'] = uid;
53
- obj['serial_number'] = serialNumber;
54
- obj['provisioned'] = provisioned;
55
- obj['product_uid'] = productUid;
56
- obj['fleet_uids'] = fleetUids;
57
- obj['voltage'] = voltage;
58
- obj['temperature'] = temperature;
52
+ obj["uid"] = uid;
53
+ obj["serial_number"] = serialNumber;
54
+ obj["provisioned"] = provisioned;
55
+ obj["product_uid"] = productUid;
56
+ obj["fleet_uids"] = fleetUids;
57
+ obj["voltage"] = voltage;
58
+ obj["temperature"] = temperature;
59
59
  }
60
60
 
61
61
  /**
@@ -70,50 +70,50 @@ var Device = /*#__PURE__*/function () {
70
70
  value: function constructFromObject(data, obj) {
71
71
  if (data) {
72
72
  obj = obj || new Device();
73
- if (data.hasOwnProperty('uid')) {
74
- obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
73
+ if (data.hasOwnProperty("uid")) {
74
+ obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
75
75
  }
76
- if (data.hasOwnProperty('serial_number')) {
77
- obj['serial_number'] = _ApiClient["default"].convertToType(data['serial_number'], 'String');
76
+ if (data.hasOwnProperty("serial_number")) {
77
+ obj["serial_number"] = _ApiClient["default"].convertToType(data["serial_number"], "String");
78
78
  }
79
- if (data.hasOwnProperty('provisioned')) {
80
- obj['provisioned'] = _ApiClient["default"].convertToType(data['provisioned'], 'Date');
79
+ if (data.hasOwnProperty("provisioned")) {
80
+ obj["provisioned"] = _ApiClient["default"].convertToType(data["provisioned"], "Date");
81
81
  }
82
- if (data.hasOwnProperty('last_activity')) {
83
- obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], 'Date');
82
+ if (data.hasOwnProperty("last_activity")) {
83
+ obj["last_activity"] = _ApiClient["default"].convertToType(data["last_activity"], "Date");
84
84
  }
85
- if (data.hasOwnProperty('contact')) {
86
- obj['contact'] = _Contact["default"].constructFromObject(data['contact']);
85
+ if (data.hasOwnProperty("contact")) {
86
+ obj["contact"] = _Contact["default"].constructFromObject(data["contact"]);
87
87
  }
88
- if (data.hasOwnProperty('product_uid')) {
89
- obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
88
+ if (data.hasOwnProperty("product_uid")) {
89
+ obj["product_uid"] = _ApiClient["default"].convertToType(data["product_uid"], "String");
90
90
  }
91
- if (data.hasOwnProperty('fleet_uids')) {
92
- obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
91
+ if (data.hasOwnProperty("fleet_uids")) {
92
+ obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
93
93
  }
94
- if (data.hasOwnProperty('tower_info')) {
95
- obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
94
+ if (data.hasOwnProperty("tower_info")) {
95
+ obj["tower_info"] = _DeviceTowerInfo["default"].constructFromObject(data["tower_info"]);
96
96
  }
97
- if (data.hasOwnProperty('tower_location')) {
98
- obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
97
+ if (data.hasOwnProperty("tower_location")) {
98
+ obj["tower_location"] = _Location["default"].constructFromObject(data["tower_location"]);
99
99
  }
100
- if (data.hasOwnProperty('gps_location')) {
101
- obj['gps_location'] = _Location["default"].constructFromObject(data['gps_location']);
100
+ if (data.hasOwnProperty("gps_location")) {
101
+ obj["gps_location"] = _Location["default"].constructFromObject(data["gps_location"]);
102
102
  }
103
- if (data.hasOwnProperty('triangulated_location')) {
104
- obj['triangulated_location'] = _Location["default"].constructFromObject(data['triangulated_location']);
103
+ if (data.hasOwnProperty("triangulated_location")) {
104
+ obj["triangulated_location"] = _Location["default"].constructFromObject(data["triangulated_location"]);
105
105
  }
106
- if (data.hasOwnProperty('voltage')) {
107
- obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
106
+ if (data.hasOwnProperty("voltage")) {
107
+ obj["voltage"] = _ApiClient["default"].convertToType(data["voltage"], "Number");
108
108
  }
109
- if (data.hasOwnProperty('temperature')) {
110
- obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'Number');
109
+ if (data.hasOwnProperty("temperature")) {
110
+ obj["temperature"] = _ApiClient["default"].convertToType(data["temperature"], "Number");
111
111
  }
112
- if (data.hasOwnProperty('dfu')) {
113
- obj['dfu'] = _DFUEnv["default"].constructFromObject(data['dfu']);
112
+ if (data.hasOwnProperty("dfu")) {
113
+ obj["dfu"] = _DFUEnv["default"].constructFromObject(data["dfu"]);
114
114
  }
115
- if (data.hasOwnProperty('sku')) {
116
- obj['sku'] = _ApiClient["default"].convertToType(data['sku'], 'String');
115
+ if (data.hasOwnProperty("sku")) {
116
+ obj["sku"] = _ApiClient["default"].convertToType(data["sku"], "String");
117
117
  }
118
118
  } else if (data === null) {
119
119
  return null;
@@ -145,54 +145,54 @@ var Device = /*#__PURE__*/function () {
145
145
  } finally {
146
146
  _iterator.f();
147
147
  }
148
- if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
149
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
148
+ if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
149
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
150
150
  }
151
151
  // ensure the json data is a string
152
- if (data['serial_number'] && !(typeof data['serial_number'] === 'string' || data['serial_number'] instanceof String)) {
153
- throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data['serial_number']);
152
+ if (data["serial_number"] && !(typeof data["serial_number"] === "string" || data["serial_number"] instanceof String)) {
153
+ throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data["serial_number"]);
154
154
  }
155
155
  // validate the optional field `contact`
156
- if (data['contact']) {
156
+ if (data["contact"]) {
157
157
  // data not null
158
- _Contact["default"].validateJSON(data['contact']);
158
+ _Contact["default"].validateJSON(data["contact"]);
159
159
  }
160
160
  // ensure the json data is a string
161
- if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
162
- throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
161
+ if (data["product_uid"] && !(typeof data["product_uid"] === "string" || data["product_uid"] instanceof String)) {
162
+ throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data["product_uid"]);
163
163
  }
164
164
  // ensure the json data is an array
165
- if (!Array.isArray(data['fleet_uids'])) {
166
- throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
165
+ if (!Array.isArray(data["fleet_uids"])) {
166
+ throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
167
167
  }
168
168
  // validate the optional field `tower_info`
169
- if (data['tower_info']) {
169
+ if (data["tower_info"]) {
170
170
  // data not null
171
- _DeviceTowerInfo["default"].validateJSON(data['tower_info']);
171
+ _DeviceTowerInfo["default"].validateJSON(data["tower_info"]);
172
172
  }
173
173
  // validate the optional field `tower_location`
174
- if (data['tower_location']) {
174
+ if (data["tower_location"]) {
175
175
  // data not null
176
- _Location["default"].validateJSON(data['tower_location']);
176
+ _Location["default"].validateJSON(data["tower_location"]);
177
177
  }
178
178
  // validate the optional field `gps_location`
179
- if (data['gps_location']) {
179
+ if (data["gps_location"]) {
180
180
  // data not null
181
- _Location["default"].validateJSON(data['gps_location']);
181
+ _Location["default"].validateJSON(data["gps_location"]);
182
182
  }
183
183
  // validate the optional field `triangulated_location`
184
- if (data['triangulated_location']) {
184
+ if (data["triangulated_location"]) {
185
185
  // data not null
186
- _Location["default"].validateJSON(data['triangulated_location']);
186
+ _Location["default"].validateJSON(data["triangulated_location"]);
187
187
  }
188
188
  // validate the optional field `dfu`
189
- if (data['dfu']) {
189
+ if (data["dfu"]) {
190
190
  // data not null
191
- _DFUEnv["default"].validateJSON(data['dfu']);
191
+ _DFUEnv["default"].validateJSON(data["dfu"]);
192
192
  }
193
193
  // ensure the json data is a string
194
- if (data['sku'] && !(typeof data['sku'] === 'string' || data['sku'] instanceof String)) {
195
- throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data['sku']);
194
+ if (data["sku"] && !(typeof data["sku"] === "string" || data["sku"] instanceof String)) {
195
+ throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data["sku"]);
196
196
  }
197
197
  return true;
198
198
  }
@@ -204,76 +204,76 @@ Device.RequiredProperties = ["uid", "serial_number", "provisioned", "product_uid
204
204
  /**
205
205
  * @member {String} uid
206
206
  */
207
- Device.prototype['uid'] = undefined;
207
+ Device.prototype["uid"] = undefined;
208
208
 
209
209
  /**
210
210
  * @member {String} serial_number
211
211
  */
212
- Device.prototype['serial_number'] = undefined;
212
+ Device.prototype["serial_number"] = undefined;
213
213
 
214
214
  /**
215
215
  * @member {Date} provisioned
216
216
  */
217
- Device.prototype['provisioned'] = undefined;
217
+ Device.prototype["provisioned"] = undefined;
218
218
 
219
219
  /**
220
220
  * @member {Date} last_activity
221
221
  */
222
- Device.prototype['last_activity'] = undefined;
222
+ Device.prototype["last_activity"] = undefined;
223
223
 
224
224
  /**
225
225
  * @member {module:model/Contact} contact
226
226
  */
227
- Device.prototype['contact'] = undefined;
227
+ Device.prototype["contact"] = undefined;
228
228
 
229
229
  /**
230
230
  * @member {String} product_uid
231
231
  */
232
- Device.prototype['product_uid'] = undefined;
232
+ Device.prototype["product_uid"] = undefined;
233
233
 
234
234
  /**
235
235
  * @member {Array.<String>} fleet_uids
236
236
  */
237
- Device.prototype['fleet_uids'] = undefined;
237
+ Device.prototype["fleet_uids"] = undefined;
238
238
 
239
239
  /**
240
240
  * @member {module:model/DeviceTowerInfo} tower_info
241
241
  */
242
- Device.prototype['tower_info'] = undefined;
242
+ Device.prototype["tower_info"] = undefined;
243
243
 
244
244
  /**
245
245
  * @member {module:model/Location} tower_location
246
246
  */
247
- Device.prototype['tower_location'] = undefined;
247
+ Device.prototype["tower_location"] = undefined;
248
248
 
249
249
  /**
250
250
  * @member {module:model/Location} gps_location
251
251
  */
252
- Device.prototype['gps_location'] = undefined;
252
+ Device.prototype["gps_location"] = undefined;
253
253
 
254
254
  /**
255
255
  * @member {module:model/Location} triangulated_location
256
256
  */
257
- Device.prototype['triangulated_location'] = undefined;
257
+ Device.prototype["triangulated_location"] = undefined;
258
258
 
259
259
  /**
260
260
  * @member {Number} voltage
261
261
  */
262
- Device.prototype['voltage'] = undefined;
262
+ Device.prototype["voltage"] = undefined;
263
263
 
264
264
  /**
265
265
  * @member {Number} temperature
266
266
  */
267
- Device.prototype['temperature'] = undefined;
267
+ Device.prototype["temperature"] = undefined;
268
268
 
269
269
  /**
270
270
  * @member {module:model/DFUEnv} dfu
271
271
  */
272
- Device.prototype['dfu'] = undefined;
272
+ Device.prototype["dfu"] = undefined;
273
273
 
274
274
  /**
275
275
  * @member {String} sku
276
276
  */
277
- Device.prototype['sku'] = undefined;
277
+ Device.prototype["sku"] = undefined;
278
278
  var _default = Device;
279
279
  exports["default"] = _default;