@blues-inc/notehub-js 1.0.15 → 1.0.16
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/README.md +3 -3
- package/dist/ApiClient.js +2 -2
- package/dist/api/AuthorizationApi.js +1 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +1 -1
- package/dist/api/DevicesApi.js +1 -1
- package/dist/api/EnvironmentVariablesApi.js +1 -1
- package/dist/api/EventApi.js +1 -1
- package/dist/api/FilesApi.js +1 -1
- package/dist/api/FleetApi.js +1 -1
- package/dist/api/NotesApi.js +1 -1
- package/dist/api/ProductApi.js +1 -1
- package/dist/api/ProjectApi.js +51 -5
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/RouteLogsApi.js +1 -1
- package/dist/index.js +7 -14
- package/dist/model/Aws.js +1 -1
- package/dist/model/Azure.js +1 -1
- package/dist/model/BillingAccount.js +1 -1
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +139 -0
- package/dist/model/Contact.js +1 -1
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateProductRequest.js +1 -1
- package/dist/model/CreateProjectRequest.js +7 -5
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +1 -1
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +1 -1
- package/dist/model/DeviceSession.js +1 -1
- package/dist/model/DeviceTowerInfo.js +1 -1
- package/dist/model/DeviceUsage.js +1 -1
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +1 -1
- package/dist/model/Event.js +1 -1
- package/dist/model/Fleet.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +1 -1
- package/dist/model/GetDeviceSessions200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
- package/dist/model/GetProjectFleets200Response.js +1 -1
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +1 -1
- package/dist/model/Google.js +1 -1
- package/dist/model/HandleNoteChanges200Response.js +1 -1
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +1 -1
- package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +1 -1
- package/dist/model/HttpFilter.js +1 -1
- package/dist/model/HttpTransform.js +1 -1
- package/dist/model/Location.js +1 -1
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/Mqtt.js +1 -1
- package/dist/model/Note.js +1 -1
- package/dist/model/Product.js +1 -1
- package/dist/model/Project.js +1 -1
- package/dist/model/ProjectMember.js +1 -1
- package/dist/model/Proxy.js +1 -1
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/Radresponder.js +1 -1
- package/dist/model/Route.js +2 -7
- package/dist/model/RouteSchema.js +1 -1
- package/dist/model/Snowflake.js +1 -1
- package/dist/model/SnowflakeTransform.js +1 -1
- package/dist/model/Thingworx.js +1 -1
- package/dist/model/TowerLocation.js +1 -1
- package/dist/model/Twilio.js +1 -1
- package/dist/model/UpdateFleetRequest.js +1 -1
- package/dist/model/UserDbRoute.js +1 -1
- package/package.json +1 -1
- package/dist/model/Edgeimpulse.js +0 -214
- package/dist/model/EdgeimpulseSensorsInner.js +0 -106
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _EdgeimpulseSensorsInner = _interopRequireDefault(require("./EdgeimpulseSensorsInner"));
|
|
9
|
-
var _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
12
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
-
/**
|
|
21
|
-
* The Edgeimpulse model module.
|
|
22
|
-
* @module model/Edgeimpulse
|
|
23
|
-
* @version 1.0.15
|
|
24
|
-
*/
|
|
25
|
-
var Edgeimpulse = /*#__PURE__*/function () {
|
|
26
|
-
/**
|
|
27
|
-
* Constructs a new <code>Edgeimpulse</code>.
|
|
28
|
-
* Route settings specific to edgeimpulse routes. Only used for edgeimpulse route types
|
|
29
|
-
* @alias module:model/Edgeimpulse
|
|
30
|
-
*/
|
|
31
|
-
function Edgeimpulse() {
|
|
32
|
-
_classCallCheck(this, Edgeimpulse);
|
|
33
|
-
Edgeimpulse.initialize(this);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Initializes the fields of this object.
|
|
38
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
39
|
-
* Only for internal use.
|
|
40
|
-
*/
|
|
41
|
-
_createClass(Edgeimpulse, null, [{
|
|
42
|
-
key: "initialize",
|
|
43
|
-
value: function initialize(obj) {}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Constructs a <code>Edgeimpulse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
47
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
48
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
49
|
-
* @param {module:model/Edgeimpulse} obj Optional instance to populate.
|
|
50
|
-
* @return {module:model/Edgeimpulse} The populated <code>Edgeimpulse</code> instance.
|
|
51
|
-
*/
|
|
52
|
-
}, {
|
|
53
|
-
key: "constructFromObject",
|
|
54
|
-
value: function constructFromObject(data, obj) {
|
|
55
|
-
if (data) {
|
|
56
|
-
obj = obj || new Edgeimpulse();
|
|
57
|
-
if (data.hasOwnProperty("fleets")) {
|
|
58
|
-
obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
|
|
59
|
-
}
|
|
60
|
-
if (data.hasOwnProperty("filter")) {
|
|
61
|
-
obj["filter"] = _HttpFilter["default"].constructFromObject(data["filter"]);
|
|
62
|
-
}
|
|
63
|
-
if (data.hasOwnProperty("timeout")) {
|
|
64
|
-
obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
|
|
65
|
-
}
|
|
66
|
-
if (data.hasOwnProperty("api_key")) {
|
|
67
|
-
obj["api_key"] = _ApiClient["default"].convertToType(data["api_key"], "String");
|
|
68
|
-
}
|
|
69
|
-
if (data.hasOwnProperty("filename")) {
|
|
70
|
-
obj["filename"] = _ApiClient["default"].convertToType(data["filename"], "String");
|
|
71
|
-
}
|
|
72
|
-
if (data.hasOwnProperty("device_type")) {
|
|
73
|
-
obj["device_type"] = _ApiClient["default"].convertToType(data["device_type"], "String");
|
|
74
|
-
}
|
|
75
|
-
if (data.hasOwnProperty("interval_ms")) {
|
|
76
|
-
obj["interval_ms"] = _ApiClient["default"].convertToType(data["interval_ms"], "Number");
|
|
77
|
-
}
|
|
78
|
-
if (data.hasOwnProperty("device_name")) {
|
|
79
|
-
obj["device_name"] = _ApiClient["default"].convertToType(data["device_name"], "String");
|
|
80
|
-
}
|
|
81
|
-
if (data.hasOwnProperty("label")) {
|
|
82
|
-
obj["label"] = _ApiClient["default"].convertToType(data["label"], "String");
|
|
83
|
-
}
|
|
84
|
-
if (data.hasOwnProperty("sensors")) {
|
|
85
|
-
obj["sensors"] = _ApiClient["default"].convertToType(data["sensors"], [_EdgeimpulseSensorsInner["default"]]);
|
|
86
|
-
}
|
|
87
|
-
} else if (data === null) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
return obj;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Validates the JSON data with respect to <code>Edgeimpulse</code>.
|
|
95
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
96
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Edgeimpulse</code>.
|
|
97
|
-
*/
|
|
98
|
-
}, {
|
|
99
|
-
key: "validateJSON",
|
|
100
|
-
value: function validateJSON(data) {
|
|
101
|
-
// ensure the json data is an array
|
|
102
|
-
if (!Array.isArray(data["fleets"])) {
|
|
103
|
-
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
|
|
104
|
-
}
|
|
105
|
-
// validate the optional field `filter`
|
|
106
|
-
if (data["filter"]) {
|
|
107
|
-
// data not null
|
|
108
|
-
_HttpFilter["default"].validateJSON(data["filter"]);
|
|
109
|
-
}
|
|
110
|
-
// ensure the json data is a string
|
|
111
|
-
if (data["api_key"] && !(typeof data["api_key"] === "string" || data["api_key"] instanceof String)) {
|
|
112
|
-
throw new Error("Expected the field `api_key` to be a primitive type in the JSON string but got " + data["api_key"]);
|
|
113
|
-
}
|
|
114
|
-
// ensure the json data is a string
|
|
115
|
-
if (data["filename"] && !(typeof data["filename"] === "string" || data["filename"] instanceof String)) {
|
|
116
|
-
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data["filename"]);
|
|
117
|
-
}
|
|
118
|
-
// ensure the json data is a string
|
|
119
|
-
if (data["device_type"] && !(typeof data["device_type"] === "string" || data["device_type"] instanceof String)) {
|
|
120
|
-
throw new Error("Expected the field `device_type` to be a primitive type in the JSON string but got " + data["device_type"]);
|
|
121
|
-
}
|
|
122
|
-
// ensure the json data is a string
|
|
123
|
-
if (data["device_name"] && !(typeof data["device_name"] === "string" || data["device_name"] instanceof String)) {
|
|
124
|
-
throw new Error("Expected the field `device_name` to be a primitive type in the JSON string but got " + data["device_name"]);
|
|
125
|
-
}
|
|
126
|
-
// ensure the json data is a string
|
|
127
|
-
if (data["label"] && !(typeof data["label"] === "string" || data["label"] instanceof String)) {
|
|
128
|
-
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data["label"]);
|
|
129
|
-
}
|
|
130
|
-
if (data["sensors"]) {
|
|
131
|
-
// data not null
|
|
132
|
-
// ensure the json data is an array
|
|
133
|
-
if (!Array.isArray(data["sensors"])) {
|
|
134
|
-
throw new Error("Expected the field `sensors` to be an array in the JSON data but got " + data["sensors"]);
|
|
135
|
-
}
|
|
136
|
-
// validate the optional field `sensors` (array)
|
|
137
|
-
var _iterator = _createForOfIteratorHelper(data["sensors"]),
|
|
138
|
-
_step;
|
|
139
|
-
try {
|
|
140
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
141
|
-
var item = _step.value;
|
|
142
|
-
_EdgeimpulseSensorsInner["default"].validateJsonObject(item);
|
|
143
|
-
}
|
|
144
|
-
} catch (err) {
|
|
145
|
-
_iterator.e(err);
|
|
146
|
-
} finally {
|
|
147
|
-
_iterator.f();
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
}]);
|
|
153
|
-
return Edgeimpulse;
|
|
154
|
-
}();
|
|
155
|
-
/**
|
|
156
|
-
* list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
|
|
157
|
-
* @member {Array.<String>} fleets
|
|
158
|
-
*/
|
|
159
|
-
Edgeimpulse.prototype["fleets"] = undefined;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* @member {module:model/HttpFilter} filter
|
|
163
|
-
*/
|
|
164
|
-
Edgeimpulse.prototype["filter"] = undefined;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Timeout in seconds for each request
|
|
168
|
-
* @member {Number} timeout
|
|
169
|
-
* @default 15
|
|
170
|
-
*/
|
|
171
|
-
Edgeimpulse.prototype["timeout"] = 15;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* EdgeImpulse API Key
|
|
175
|
-
* @member {String} api_key
|
|
176
|
-
*/
|
|
177
|
-
Edgeimpulse.prototype["api_key"] = undefined;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* An identifier the collection of data points
|
|
181
|
-
* @member {String} filename
|
|
182
|
-
*/
|
|
183
|
-
Edgeimpulse.prototype["filename"] = undefined;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* An identifier for the type of device generating the data
|
|
187
|
-
* @member {String} device_type
|
|
188
|
-
*/
|
|
189
|
-
Edgeimpulse.prototype["device_type"] = undefined;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Frequency of data in miliseconds
|
|
193
|
-
* @member {Number} interval_ms
|
|
194
|
-
*/
|
|
195
|
-
Edgeimpulse.prototype["interval_ms"] = undefined;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* An identifier for the device generating the data
|
|
199
|
-
* @member {String} device_name
|
|
200
|
-
*/
|
|
201
|
-
Edgeimpulse.prototype["device_name"] = undefined;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* A label for the data point
|
|
205
|
-
* @member {String} label
|
|
206
|
-
*/
|
|
207
|
-
Edgeimpulse.prototype["label"] = undefined;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* @member {Array.<module:model/EdgeimpulseSensorsInner>} sensors
|
|
211
|
-
*/
|
|
212
|
-
Edgeimpulse.prototype["sensors"] = undefined;
|
|
213
|
-
var _default = Edgeimpulse;
|
|
214
|
-
exports["default"] = _default;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
-
/**
|
|
16
|
-
* The EdgeimpulseSensorsInner model module.
|
|
17
|
-
* @module model/EdgeimpulseSensorsInner
|
|
18
|
-
* @version 1.0.15
|
|
19
|
-
*/
|
|
20
|
-
var EdgeimpulseSensorsInner = /*#__PURE__*/function () {
|
|
21
|
-
/**
|
|
22
|
-
* Constructs a new <code>EdgeimpulseSensorsInner</code>.
|
|
23
|
-
* @alias module:model/EdgeimpulseSensorsInner
|
|
24
|
-
*/
|
|
25
|
-
function EdgeimpulseSensorsInner() {
|
|
26
|
-
_classCallCheck(this, EdgeimpulseSensorsInner);
|
|
27
|
-
EdgeimpulseSensorsInner.initialize(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Initializes the fields of this object.
|
|
32
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
-
* Only for internal use.
|
|
34
|
-
*/
|
|
35
|
-
_createClass(EdgeimpulseSensorsInner, null, [{
|
|
36
|
-
key: "initialize",
|
|
37
|
-
value: function initialize(obj) {}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Constructs a <code>EdgeimpulseSensorsInner</code> from a plain JavaScript object, optionally creating a new instance.
|
|
41
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
42
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
43
|
-
* @param {module:model/EdgeimpulseSensorsInner} obj Optional instance to populate.
|
|
44
|
-
* @return {module:model/EdgeimpulseSensorsInner} The populated <code>EdgeimpulseSensorsInner</code> instance.
|
|
45
|
-
*/
|
|
46
|
-
}, {
|
|
47
|
-
key: "constructFromObject",
|
|
48
|
-
value: function constructFromObject(data, obj) {
|
|
49
|
-
if (data) {
|
|
50
|
-
obj = obj || new EdgeimpulseSensorsInner();
|
|
51
|
-
if (data.hasOwnProperty("name")) {
|
|
52
|
-
obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
|
|
53
|
-
}
|
|
54
|
-
if (data.hasOwnProperty("units")) {
|
|
55
|
-
obj["units"] = _ApiClient["default"].convertToType(data["units"], "String");
|
|
56
|
-
}
|
|
57
|
-
if (data.hasOwnProperty("value")) {
|
|
58
|
-
obj["value"] = _ApiClient["default"].convertToType(data["value"], "String");
|
|
59
|
-
}
|
|
60
|
-
} else if (data === null) {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
return obj;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Validates the JSON data with respect to <code>EdgeimpulseSensorsInner</code>.
|
|
68
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>EdgeimpulseSensorsInner</code>.
|
|
70
|
-
*/
|
|
71
|
-
}, {
|
|
72
|
-
key: "validateJSON",
|
|
73
|
-
value: function validateJSON(data) {
|
|
74
|
-
// ensure the json data is a string
|
|
75
|
-
if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
|
|
76
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
|
|
77
|
-
}
|
|
78
|
-
// ensure the json data is a string
|
|
79
|
-
if (data["units"] && !(typeof data["units"] === "string" || data["units"] instanceof String)) {
|
|
80
|
-
throw new Error("Expected the field `units` to be a primitive type in the JSON string but got " + data["units"]);
|
|
81
|
-
}
|
|
82
|
-
// ensure the json data is a string
|
|
83
|
-
if (data["value"] && !(typeof data["value"] === "string" || data["value"] instanceof String)) {
|
|
84
|
-
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data["value"]);
|
|
85
|
-
}
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}]);
|
|
89
|
-
return EdgeimpulseSensorsInner;
|
|
90
|
-
}();
|
|
91
|
-
/**
|
|
92
|
-
* @member {String} name
|
|
93
|
-
*/
|
|
94
|
-
EdgeimpulseSensorsInner.prototype["name"] = undefined;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @member {String} units
|
|
98
|
-
*/
|
|
99
|
-
EdgeimpulseSensorsInner.prototype["units"] = undefined;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @member {String} value
|
|
103
|
-
*/
|
|
104
|
-
EdgeimpulseSensorsInner.prototype["value"] = undefined;
|
|
105
|
-
var _default = EdgeimpulseSensorsInner;
|
|
106
|
-
exports["default"] = _default;
|