@blues-inc/notehub-js 1.0.4
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 +297 -0
- package/dist/ApiClient.js +699 -0
- package/dist/api/AuthorizationApi.js +74 -0
- package/dist/api/BillingAccountApi.js +68 -0
- package/dist/api/DeviceApi.js +784 -0
- package/dist/api/DevicesApi.js +293 -0
- package/dist/api/EnvironmentVariablesApi.js +567 -0
- package/dist/api/EventApi.js +284 -0
- package/dist/api/FilesApi.js +193 -0
- package/dist/api/FleetApi.js +715 -0
- package/dist/api/NotesApi.js +435 -0
- package/dist/api/ProductApi.js +163 -0
- package/dist/api/ProjectApi.js +716 -0
- package/dist/api/RouteApi.js +266 -0
- package/dist/index.js +566 -0
- package/dist/model/Aws.js +233 -0
- package/dist/model/Azure.js +166 -0
- package/dist/model/BillingAccount.js +130 -0
- package/dist/model/BillingAccountRole.js +42 -0
- package/dist/model/Body.js +78 -0
- package/dist/model/Contact.js +118 -0
- package/dist/model/CreateFleetRequest.js +83 -0
- package/dist/model/CreateProductRequest.js +142 -0
- package/dist/model/CreateProjectRequest.js +119 -0
- package/dist/model/DFUEnv.js +97 -0
- package/dist/model/DFUState.js +276 -0
- package/dist/model/DeleteDeviceFleetsRequest.js +106 -0
- package/dist/model/Device.js +267 -0
- package/dist/model/DeviceSession.js +537 -0
- package/dist/model/DeviceTowerInfo.js +102 -0
- package/dist/model/DeviceUsage.js +150 -0
- package/dist/model/EnvironmentVariables.js +103 -0
- package/dist/model/Error.js +164 -0
- package/dist/model/Event.js +676 -0
- package/dist/model/Fleet.js +129 -0
- package/dist/model/GetBillingAccounts200Response.js +103 -0
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +117 -0
- package/dist/model/GetDeviceHealthLog200Response.js +123 -0
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +125 -0
- package/dist/model/GetDeviceLatest200Response.js +104 -0
- package/dist/model/GetDevicePublicKey200Response.js +119 -0
- package/dist/model/GetDeviceSessions200Response.js +133 -0
- package/dist/model/GetProjectDevicePublicKeys200Response.js +133 -0
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +94 -0
- package/dist/model/GetProjectDevices200Response.js +133 -0
- package/dist/model/GetProjectEvents200Response.js +149 -0
- package/dist/model/GetProjectEventsByCursor200Response.js +149 -0
- package/dist/model/GetProjectFleets200Response.js +123 -0
- package/dist/model/GetProjectMembers200Response.js +123 -0
- package/dist/model/GetProjectProducts200Response.js +103 -0
- package/dist/model/GetProjects200Response.js +103 -0
- package/dist/model/Google.js +142 -0
- package/dist/model/HandleNoteChanges200Response.js +97 -0
- package/dist/model/HandleNoteGet200Response.js +101 -0
- package/dist/model/HandleNoteSignal200Response.js +79 -0
- package/dist/model/HandleNotefileChanges200Response.js +97 -0
- package/dist/model/HandleNotefileChangesPending200Response.js +106 -0
- package/dist/model/HandleNotefileDeleteRequest.js +83 -0
- package/dist/model/Http.js +163 -0
- package/dist/model/HttpFilter.js +128 -0
- package/dist/model/HttpTransform.js +139 -0
- package/dist/model/Location.js +167 -0
- package/dist/model/Login200Response.js +82 -0
- package/dist/model/LoginRequest.js +94 -0
- package/dist/model/Mqtt.js +240 -0
- package/dist/model/Note.js +90 -0
- package/dist/model/Product.js +141 -0
- package/dist/model/Project.js +165 -0
- package/dist/model/ProjectMember.js +131 -0
- package/dist/model/Proxy.js +128 -0
- package/dist/model/PutDeviceFleetsRequest.js +106 -0
- package/dist/model/Radresponder.js +130 -0
- package/dist/model/Role.js +43 -0
- package/dist/model/Route.js +245 -0
- package/dist/model/RouteSchema.js +427 -0
- package/dist/model/Snowflake.js +185 -0
- package/dist/model/SnowflakeTransform.js +97 -0
- package/dist/model/Thingworx.js +154 -0
- package/dist/model/TowerLocation.js +204 -0
- package/dist/model/Twilio.js +181 -0
- package/dist/model/UpdateFleetRequest.js +109 -0
- package/dist/model/UserDbRoute.js +131 -0
- package/package.json +49 -0
|
@@ -0,0 +1,129 @@
|
|
|
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 _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; } } }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
/**
|
|
19
|
+
* The Fleet model module.
|
|
20
|
+
* @module model/Fleet
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var Fleet = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>Fleet</code>.
|
|
26
|
+
* @alias module:model/Fleet
|
|
27
|
+
* @param uid {String}
|
|
28
|
+
* @param label {String}
|
|
29
|
+
* @param created {Date}
|
|
30
|
+
*/
|
|
31
|
+
function Fleet(uid, label, created) {
|
|
32
|
+
_classCallCheck(this, Fleet);
|
|
33
|
+
Fleet.initialize(this, uid, label, created);
|
|
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(Fleet, null, [{
|
|
42
|
+
key: "initialize",
|
|
43
|
+
value: function initialize(obj, uid, label, created) {
|
|
44
|
+
obj['uid'] = uid;
|
|
45
|
+
obj['label'] = label;
|
|
46
|
+
obj['created'] = created;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>Fleet</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/Fleet} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/Fleet} The populated <code>Fleet</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "constructFromObject",
|
|
58
|
+
value: function constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new Fleet();
|
|
61
|
+
if (data.hasOwnProperty('uid')) {
|
|
62
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('label')) {
|
|
65
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('created')) {
|
|
68
|
+
obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date');
|
|
69
|
+
}
|
|
70
|
+
} else if (data === null) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>Fleet</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Fleet</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(Fleet.RequiredProperties),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var property = _step.value;
|
|
90
|
+
if (!data[property]) {
|
|
91
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is a string
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
105
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
}]);
|
|
110
|
+
return Fleet;
|
|
111
|
+
}();
|
|
112
|
+
Fleet.RequiredProperties = ["uid", "label", "created"];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @member {String} uid
|
|
116
|
+
*/
|
|
117
|
+
Fleet.prototype['uid'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {String} label
|
|
121
|
+
*/
|
|
122
|
+
Fleet.prototype['label'] = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @member {Date} created
|
|
126
|
+
*/
|
|
127
|
+
Fleet.prototype['created'] = undefined;
|
|
128
|
+
var _default = Fleet;
|
|
129
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,103 @@
|
|
|
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 _BillingAccount = _interopRequireDefault(require("./BillingAccount"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
19
|
+
/**
|
|
20
|
+
* The GetBillingAccounts200Response model module.
|
|
21
|
+
* @module model/GetBillingAccounts200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetBillingAccounts200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetBillingAccounts200Response</code>.
|
|
27
|
+
* @alias module:model/GetBillingAccounts200Response
|
|
28
|
+
*/
|
|
29
|
+
function GetBillingAccounts200Response() {
|
|
30
|
+
_classCallCheck(this, GetBillingAccounts200Response);
|
|
31
|
+
GetBillingAccounts200Response.initialize(this);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Initializes the fields of this object.
|
|
36
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
37
|
+
* Only for internal use.
|
|
38
|
+
*/
|
|
39
|
+
_createClass(GetBillingAccounts200Response, null, [{
|
|
40
|
+
key: "initialize",
|
|
41
|
+
value: function initialize(obj) {}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Constructs a <code>GetBillingAccounts200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
45
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
46
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
47
|
+
* @param {module:model/GetBillingAccounts200Response} obj Optional instance to populate.
|
|
48
|
+
* @return {module:model/GetBillingAccounts200Response} The populated <code>GetBillingAccounts200Response</code> instance.
|
|
49
|
+
*/
|
|
50
|
+
}, {
|
|
51
|
+
key: "constructFromObject",
|
|
52
|
+
value: function constructFromObject(data, obj) {
|
|
53
|
+
if (data) {
|
|
54
|
+
obj = obj || new GetBillingAccounts200Response();
|
|
55
|
+
if (data.hasOwnProperty('billing_accounts')) {
|
|
56
|
+
obj['billing_accounts'] = _ApiClient["default"].convertToType(data['billing_accounts'], [_BillingAccount["default"]]);
|
|
57
|
+
}
|
|
58
|
+
} else if (data === null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return obj;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Validates the JSON data with respect to <code>GetBillingAccounts200Response</code>.
|
|
66
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
67
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetBillingAccounts200Response</code>.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "validateJSON",
|
|
71
|
+
value: function validateJSON(data) {
|
|
72
|
+
if (data['billing_accounts']) {
|
|
73
|
+
// data not null
|
|
74
|
+
// ensure the json data is an array
|
|
75
|
+
if (!Array.isArray(data['billing_accounts'])) {
|
|
76
|
+
throw new Error("Expected the field `billing_accounts` to be an array in the JSON data but got " + data['billing_accounts']);
|
|
77
|
+
}
|
|
78
|
+
// validate the optional field `billing_accounts` (array)
|
|
79
|
+
var _iterator = _createForOfIteratorHelper(data['billing_accounts']),
|
|
80
|
+
_step;
|
|
81
|
+
try {
|
|
82
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
83
|
+
var item = _step.value;
|
|
84
|
+
_BillingAccount["default"].validateJsonObject(item);
|
|
85
|
+
}
|
|
86
|
+
} catch (err) {
|
|
87
|
+
_iterator.e(err);
|
|
88
|
+
} finally {
|
|
89
|
+
_iterator.f();
|
|
90
|
+
}
|
|
91
|
+
;
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
return GetBillingAccounts200Response;
|
|
97
|
+
}();
|
|
98
|
+
/**
|
|
99
|
+
* @member {Array.<module:model/BillingAccount>} billing_accounts
|
|
100
|
+
*/
|
|
101
|
+
GetBillingAccounts200Response.prototype['billing_accounts'] = undefined;
|
|
102
|
+
var _default = GetBillingAccounts200Response;
|
|
103
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,117 @@
|
|
|
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 _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; } } }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
/**
|
|
19
|
+
* The GetDeviceEnvironmentVariables200Response model module.
|
|
20
|
+
* @module model/GetDeviceEnvironmentVariables200Response
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var GetDeviceEnvironmentVariables200Response = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>GetDeviceEnvironmentVariables200Response</code>.
|
|
26
|
+
* @alias module:model/GetDeviceEnvironmentVariables200Response
|
|
27
|
+
* @param environmentVariables {Object.<String, String>} The environment variables for this device that have been set using host firmware or the Notehub API or UI.
|
|
28
|
+
* @param environmentVariablesEnvDefault {Object.<String, String>} The environment variables that have been set using the env.default request through the Notecard API.
|
|
29
|
+
*/
|
|
30
|
+
function GetDeviceEnvironmentVariables200Response(environmentVariables, environmentVariablesEnvDefault) {
|
|
31
|
+
_classCallCheck(this, GetDeviceEnvironmentVariables200Response);
|
|
32
|
+
GetDeviceEnvironmentVariables200Response.initialize(this, environmentVariables, environmentVariablesEnvDefault);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initializes the fields of this object.
|
|
37
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
38
|
+
* Only for internal use.
|
|
39
|
+
*/
|
|
40
|
+
_createClass(GetDeviceEnvironmentVariables200Response, null, [{
|
|
41
|
+
key: "initialize",
|
|
42
|
+
value: function initialize(obj, environmentVariables, environmentVariablesEnvDefault) {
|
|
43
|
+
obj['environment_variables'] = environmentVariables;
|
|
44
|
+
obj['environment_variables_env_default'] = environmentVariablesEnvDefault;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>GetDeviceEnvironmentVariables200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
+
* @param {module:model/GetDeviceEnvironmentVariables200Response} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/GetDeviceEnvironmentVariables200Response} The populated <code>GetDeviceEnvironmentVariables200Response</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new GetDeviceEnvironmentVariables200Response();
|
|
59
|
+
if (data.hasOwnProperty('environment_variables')) {
|
|
60
|
+
obj['environment_variables'] = _ApiClient["default"].convertToType(data['environment_variables'], {
|
|
61
|
+
'String': 'String'
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('environment_variables_env_default')) {
|
|
65
|
+
obj['environment_variables_env_default'] = _ApiClient["default"].convertToType(data['environment_variables_env_default'], {
|
|
66
|
+
'String': 'String'
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
} else if (data === null) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Validates the JSON data with respect to <code>GetDeviceEnvironmentVariables200Response</code>.
|
|
77
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
78
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetDeviceEnvironmentVariables200Response</code>.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "validateJSON",
|
|
82
|
+
value: function validateJSON(data) {
|
|
83
|
+
// check to make sure all required properties are present in the JSON string
|
|
84
|
+
var _iterator = _createForOfIteratorHelper(GetDeviceEnvironmentVariables200Response.RequiredProperties),
|
|
85
|
+
_step;
|
|
86
|
+
try {
|
|
87
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
88
|
+
var property = _step.value;
|
|
89
|
+
if (!data[property]) {
|
|
90
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
} catch (err) {
|
|
94
|
+
_iterator.e(err);
|
|
95
|
+
} finally {
|
|
96
|
+
_iterator.f();
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
}]);
|
|
101
|
+
return GetDeviceEnvironmentVariables200Response;
|
|
102
|
+
}();
|
|
103
|
+
GetDeviceEnvironmentVariables200Response.RequiredProperties = ["environment_variables", "environment_variables_env_default"];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The environment variables for this device that have been set using host firmware or the Notehub API or UI.
|
|
107
|
+
* @member {Object.<String, String>} environment_variables
|
|
108
|
+
*/
|
|
109
|
+
GetDeviceEnvironmentVariables200Response.prototype['environment_variables'] = undefined;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The environment variables that have been set using the env.default request through the Notecard API.
|
|
113
|
+
* @member {Object.<String, String>} environment_variables_env_default
|
|
114
|
+
*/
|
|
115
|
+
GetDeviceEnvironmentVariables200Response.prototype['environment_variables_env_default'] = undefined;
|
|
116
|
+
var _default = GetDeviceEnvironmentVariables200Response;
|
|
117
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,123 @@
|
|
|
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 _GetDeviceHealthLog200ResponseHealthLogInner = _interopRequireDefault(require("./GetDeviceHealthLog200ResponseHealthLogInner"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
19
|
+
/**
|
|
20
|
+
* The GetDeviceHealthLog200Response model module.
|
|
21
|
+
* @module model/GetDeviceHealthLog200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetDeviceHealthLog200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetDeviceHealthLog200Response</code>.
|
|
27
|
+
* @alias module:model/GetDeviceHealthLog200Response
|
|
28
|
+
* @param healthLog {Array.<module:model/GetDeviceHealthLog200ResponseHealthLogInner>}
|
|
29
|
+
*/
|
|
30
|
+
function GetDeviceHealthLog200Response(healthLog) {
|
|
31
|
+
_classCallCheck(this, GetDeviceHealthLog200Response);
|
|
32
|
+
GetDeviceHealthLog200Response.initialize(this, healthLog);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initializes the fields of this object.
|
|
37
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
38
|
+
* Only for internal use.
|
|
39
|
+
*/
|
|
40
|
+
_createClass(GetDeviceHealthLog200Response, null, [{
|
|
41
|
+
key: "initialize",
|
|
42
|
+
value: function initialize(obj, healthLog) {
|
|
43
|
+
obj['health_log'] = healthLog;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a <code>GetDeviceHealthLog200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
48
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
49
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
50
|
+
* @param {module:model/GetDeviceHealthLog200Response} obj Optional instance to populate.
|
|
51
|
+
* @return {module:model/GetDeviceHealthLog200Response} The populated <code>GetDeviceHealthLog200Response</code> instance.
|
|
52
|
+
*/
|
|
53
|
+
}, {
|
|
54
|
+
key: "constructFromObject",
|
|
55
|
+
value: function constructFromObject(data, obj) {
|
|
56
|
+
if (data) {
|
|
57
|
+
obj = obj || new GetDeviceHealthLog200Response();
|
|
58
|
+
if (data.hasOwnProperty('health_log')) {
|
|
59
|
+
obj['health_log'] = _ApiClient["default"].convertToType(data['health_log'], [_GetDeviceHealthLog200ResponseHealthLogInner["default"]]);
|
|
60
|
+
}
|
|
61
|
+
} else if (data === null) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Validates the JSON data with respect to <code>GetDeviceHealthLog200Response</code>.
|
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
70
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetDeviceHealthLog200Response</code>.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "validateJSON",
|
|
74
|
+
value: function validateJSON(data) {
|
|
75
|
+
// check to make sure all required properties are present in the JSON string
|
|
76
|
+
var _iterator = _createForOfIteratorHelper(GetDeviceHealthLog200Response.RequiredProperties),
|
|
77
|
+
_step;
|
|
78
|
+
try {
|
|
79
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
80
|
+
var property = _step.value;
|
|
81
|
+
if (!data[property]) {
|
|
82
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
} catch (err) {
|
|
86
|
+
_iterator.e(err);
|
|
87
|
+
} finally {
|
|
88
|
+
_iterator.f();
|
|
89
|
+
}
|
|
90
|
+
if (data['health_log']) {
|
|
91
|
+
// data not null
|
|
92
|
+
// ensure the json data is an array
|
|
93
|
+
if (!Array.isArray(data['health_log'])) {
|
|
94
|
+
throw new Error("Expected the field `health_log` to be an array in the JSON data but got " + data['health_log']);
|
|
95
|
+
}
|
|
96
|
+
// validate the optional field `health_log` (array)
|
|
97
|
+
var _iterator2 = _createForOfIteratorHelper(data['health_log']),
|
|
98
|
+
_step2;
|
|
99
|
+
try {
|
|
100
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
101
|
+
var item = _step2.value;
|
|
102
|
+
_GetDeviceHealthLog200ResponseHealthLogInner["default"].validateJsonObject(item);
|
|
103
|
+
}
|
|
104
|
+
} catch (err) {
|
|
105
|
+
_iterator2.e(err);
|
|
106
|
+
} finally {
|
|
107
|
+
_iterator2.f();
|
|
108
|
+
}
|
|
109
|
+
;
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}]);
|
|
114
|
+
return GetDeviceHealthLog200Response;
|
|
115
|
+
}();
|
|
116
|
+
GetDeviceHealthLog200Response.RequiredProperties = ["health_log"];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @member {Array.<module:model/GetDeviceHealthLog200ResponseHealthLogInner>} health_log
|
|
120
|
+
*/
|
|
121
|
+
GetDeviceHealthLog200Response.prototype['health_log'] = undefined;
|
|
122
|
+
var _default = GetDeviceHealthLog200Response;
|
|
123
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,125 @@
|
|
|
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 _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; } } }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
/**
|
|
19
|
+
* The GetDeviceHealthLog200ResponseHealthLogInner model module.
|
|
20
|
+
* @module model/GetDeviceHealthLog200ResponseHealthLogInner
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var GetDeviceHealthLog200ResponseHealthLogInner = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>GetDeviceHealthLog200ResponseHealthLogInner</code>.
|
|
26
|
+
* @alias module:model/GetDeviceHealthLog200ResponseHealthLogInner
|
|
27
|
+
* @param when {Date}
|
|
28
|
+
* @param alert {Boolean}
|
|
29
|
+
* @param text {String}
|
|
30
|
+
*/
|
|
31
|
+
function GetDeviceHealthLog200ResponseHealthLogInner(when, alert, text) {
|
|
32
|
+
_classCallCheck(this, GetDeviceHealthLog200ResponseHealthLogInner);
|
|
33
|
+
GetDeviceHealthLog200ResponseHealthLogInner.initialize(this, when, alert, text);
|
|
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(GetDeviceHealthLog200ResponseHealthLogInner, null, [{
|
|
42
|
+
key: "initialize",
|
|
43
|
+
value: function initialize(obj, when, alert, text) {
|
|
44
|
+
obj['when'] = when;
|
|
45
|
+
obj['alert'] = alert;
|
|
46
|
+
obj['text'] = text;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>GetDeviceHealthLog200ResponseHealthLogInner</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/GetDeviceHealthLog200ResponseHealthLogInner} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/GetDeviceHealthLog200ResponseHealthLogInner} The populated <code>GetDeviceHealthLog200ResponseHealthLogInner</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "constructFromObject",
|
|
58
|
+
value: function constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new GetDeviceHealthLog200ResponseHealthLogInner();
|
|
61
|
+
if (data.hasOwnProperty('when')) {
|
|
62
|
+
obj['when'] = _ApiClient["default"].convertToType(data['when'], 'Date');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('alert')) {
|
|
65
|
+
obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('text')) {
|
|
68
|
+
obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String');
|
|
69
|
+
}
|
|
70
|
+
} else if (data === null) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>GetDeviceHealthLog200ResponseHealthLogInner</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetDeviceHealthLog200ResponseHealthLogInner</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(GetDeviceHealthLog200ResponseHealthLogInner.RequiredProperties),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var property = _step.value;
|
|
90
|
+
if (!data[property]) {
|
|
91
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is a string
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']);
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
return GetDeviceHealthLog200ResponseHealthLogInner;
|
|
107
|
+
}();
|
|
108
|
+
GetDeviceHealthLog200ResponseHealthLogInner.RequiredProperties = ["when", "alert", "text"];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @member {Date} when
|
|
112
|
+
*/
|
|
113
|
+
GetDeviceHealthLog200ResponseHealthLogInner.prototype['when'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @member {Boolean} alert
|
|
117
|
+
*/
|
|
118
|
+
GetDeviceHealthLog200ResponseHealthLogInner.prototype['alert'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @member {String} text
|
|
122
|
+
*/
|
|
123
|
+
GetDeviceHealthLog200ResponseHealthLogInner.prototype['text'] = undefined;
|
|
124
|
+
var _default = GetDeviceHealthLog200ResponseHealthLogInner;
|
|
125
|
+
exports["default"] = _default;
|