@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,104 @@
|
|
|
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 _Event = _interopRequireDefault(require("./Event"));
|
|
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 GetDeviceLatest200Response model module.
|
|
21
|
+
* @module model/GetDeviceLatest200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetDeviceLatest200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetDeviceLatest200Response</code>.
|
|
27
|
+
* @alias module:model/GetDeviceLatest200Response
|
|
28
|
+
*/
|
|
29
|
+
function GetDeviceLatest200Response() {
|
|
30
|
+
_classCallCheck(this, GetDeviceLatest200Response);
|
|
31
|
+
GetDeviceLatest200Response.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(GetDeviceLatest200Response, null, [{
|
|
40
|
+
key: "initialize",
|
|
41
|
+
value: function initialize(obj) {}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Constructs a <code>GetDeviceLatest200Response</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/GetDeviceLatest200Response} obj Optional instance to populate.
|
|
48
|
+
* @return {module:model/GetDeviceLatest200Response} The populated <code>GetDeviceLatest200Response</code> instance.
|
|
49
|
+
*/
|
|
50
|
+
}, {
|
|
51
|
+
key: "constructFromObject",
|
|
52
|
+
value: function constructFromObject(data, obj) {
|
|
53
|
+
if (data) {
|
|
54
|
+
obj = obj || new GetDeviceLatest200Response();
|
|
55
|
+
if (data.hasOwnProperty('latest_events')) {
|
|
56
|
+
obj['latest_events'] = _ApiClient["default"].convertToType(data['latest_events'], [_Event["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>GetDeviceLatest200Response</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>GetDeviceLatest200Response</code>.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "validateJSON",
|
|
71
|
+
value: function validateJSON(data) {
|
|
72
|
+
if (data['latest_events']) {
|
|
73
|
+
// data not null
|
|
74
|
+
// ensure the json data is an array
|
|
75
|
+
if (!Array.isArray(data['latest_events'])) {
|
|
76
|
+
throw new Error("Expected the field `latest_events` to be an array in the JSON data but got " + data['latest_events']);
|
|
77
|
+
}
|
|
78
|
+
// validate the optional field `latest_events` (array)
|
|
79
|
+
var _iterator = _createForOfIteratorHelper(data['latest_events']),
|
|
80
|
+
_step;
|
|
81
|
+
try {
|
|
82
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
83
|
+
var item = _step.value;
|
|
84
|
+
_Event["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 GetDeviceLatest200Response;
|
|
97
|
+
}();
|
|
98
|
+
/**
|
|
99
|
+
* The set of latest events. Will always include the current \"session.begin\" event.
|
|
100
|
+
* @member {Array.<module:model/Event>} latest_events
|
|
101
|
+
*/
|
|
102
|
+
GetDeviceLatest200Response.prototype['latest_events'] = undefined;
|
|
103
|
+
var _default = GetDeviceLatest200Response;
|
|
104
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
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 GetDevicePublicKey200Response model module.
|
|
20
|
+
* @module model/GetDevicePublicKey200Response
|
|
21
|
+
* @version 1.0.4
|
|
22
|
+
*/
|
|
23
|
+
var GetDevicePublicKey200Response = /*#__PURE__*/function () {
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new <code>GetDevicePublicKey200Response</code>.
|
|
26
|
+
* @alias module:model/GetDevicePublicKey200Response
|
|
27
|
+
* @param uid {String}
|
|
28
|
+
* @param key {String}
|
|
29
|
+
*/
|
|
30
|
+
function GetDevicePublicKey200Response(uid, key) {
|
|
31
|
+
_classCallCheck(this, GetDevicePublicKey200Response);
|
|
32
|
+
GetDevicePublicKey200Response.initialize(this, uid, key);
|
|
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(GetDevicePublicKey200Response, null, [{
|
|
41
|
+
key: "initialize",
|
|
42
|
+
value: function initialize(obj, uid, key) {
|
|
43
|
+
obj['uid'] = uid;
|
|
44
|
+
obj['key'] = key;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>GetDevicePublicKey200Response</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/GetDevicePublicKey200Response} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/GetDevicePublicKey200Response} The populated <code>GetDevicePublicKey200Response</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new GetDevicePublicKey200Response();
|
|
59
|
+
if (data.hasOwnProperty('uid')) {
|
|
60
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('key')) {
|
|
63
|
+
obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
|
|
64
|
+
}
|
|
65
|
+
} else if (data === null) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Validates the JSON data with respect to <code>GetDevicePublicKey200Response</code>.
|
|
73
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetDevicePublicKey200Response</code>.
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "validateJSON",
|
|
78
|
+
value: function validateJSON(data) {
|
|
79
|
+
// check to make sure all required properties are present in the JSON string
|
|
80
|
+
var _iterator = _createForOfIteratorHelper(GetDevicePublicKey200Response.RequiredProperties),
|
|
81
|
+
_step;
|
|
82
|
+
try {
|
|
83
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
84
|
+
var property = _step.value;
|
|
85
|
+
if (!data[property]) {
|
|
86
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// ensure the json data is a string
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_iterator.e(err);
|
|
92
|
+
} finally {
|
|
93
|
+
_iterator.f();
|
|
94
|
+
}
|
|
95
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
96
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
97
|
+
}
|
|
98
|
+
// ensure the json data is a string
|
|
99
|
+
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}]);
|
|
105
|
+
return GetDevicePublicKey200Response;
|
|
106
|
+
}();
|
|
107
|
+
GetDevicePublicKey200Response.RequiredProperties = ["uid", "key"];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @member {String} uid
|
|
111
|
+
*/
|
|
112
|
+
GetDevicePublicKey200Response.prototype['uid'] = undefined;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @member {String} key
|
|
116
|
+
*/
|
|
117
|
+
GetDevicePublicKey200Response.prototype['key'] = undefined;
|
|
118
|
+
var _default = GetDevicePublicKey200Response;
|
|
119
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,133 @@
|
|
|
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 _DeviceSession = _interopRequireDefault(require("./DeviceSession"));
|
|
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 GetDeviceSessions200Response model module.
|
|
21
|
+
* @module model/GetDeviceSessions200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetDeviceSessions200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetDeviceSessions200Response</code>.
|
|
27
|
+
* @alias module:model/GetDeviceSessions200Response
|
|
28
|
+
* @param sessions {Array.<module:model/DeviceSession>}
|
|
29
|
+
* @param hasMore {Boolean}
|
|
30
|
+
*/
|
|
31
|
+
function GetDeviceSessions200Response(sessions, hasMore) {
|
|
32
|
+
_classCallCheck(this, GetDeviceSessions200Response);
|
|
33
|
+
GetDeviceSessions200Response.initialize(this, sessions, hasMore);
|
|
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(GetDeviceSessions200Response, null, [{
|
|
42
|
+
key: "initialize",
|
|
43
|
+
value: function initialize(obj, sessions, hasMore) {
|
|
44
|
+
obj['sessions'] = sessions;
|
|
45
|
+
obj['has_more'] = hasMore;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>GetDeviceSessions200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
+
* @param {module:model/GetDeviceSessions200Response} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/GetDeviceSessions200Response} The populated <code>GetDeviceSessions200Response</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new GetDeviceSessions200Response();
|
|
60
|
+
if (data.hasOwnProperty('sessions')) {
|
|
61
|
+
obj['sessions'] = _ApiClient["default"].convertToType(data['sessions'], [_DeviceSession["default"]]);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('has_more')) {
|
|
64
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
|
|
65
|
+
}
|
|
66
|
+
} else if (data === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>GetDeviceSessions200Response</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetDeviceSessions200Response</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// check to make sure all required properties are present in the JSON string
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(GetDeviceSessions200Response.RequiredProperties),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var property = _step.value;
|
|
86
|
+
if (!data[property]) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_iterator.e(err);
|
|
92
|
+
} finally {
|
|
93
|
+
_iterator.f();
|
|
94
|
+
}
|
|
95
|
+
if (data['sessions']) {
|
|
96
|
+
// data not null
|
|
97
|
+
// ensure the json data is an array
|
|
98
|
+
if (!Array.isArray(data['sessions'])) {
|
|
99
|
+
throw new Error("Expected the field `sessions` to be an array in the JSON data but got " + data['sessions']);
|
|
100
|
+
}
|
|
101
|
+
// validate the optional field `sessions` (array)
|
|
102
|
+
var _iterator2 = _createForOfIteratorHelper(data['sessions']),
|
|
103
|
+
_step2;
|
|
104
|
+
try {
|
|
105
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
106
|
+
var item = _step2.value;
|
|
107
|
+
_DeviceSession["default"].validateJsonObject(item);
|
|
108
|
+
}
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_iterator2.e(err);
|
|
111
|
+
} finally {
|
|
112
|
+
_iterator2.f();
|
|
113
|
+
}
|
|
114
|
+
;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
}]);
|
|
119
|
+
return GetDeviceSessions200Response;
|
|
120
|
+
}();
|
|
121
|
+
GetDeviceSessions200Response.RequiredProperties = ["sessions", "has_more"];
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @member {Array.<module:model/DeviceSession>} sessions
|
|
125
|
+
*/
|
|
126
|
+
GetDeviceSessions200Response.prototype['sessions'] = undefined;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @member {Boolean} has_more
|
|
130
|
+
*/
|
|
131
|
+
GetDeviceSessions200Response.prototype['has_more'] = undefined;
|
|
132
|
+
var _default = GetDeviceSessions200Response;
|
|
133
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,133 @@
|
|
|
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 _GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner = _interopRequireDefault(require("./GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner"));
|
|
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 GetProjectDevicePublicKeys200Response model module.
|
|
21
|
+
* @module model/GetProjectDevicePublicKeys200Response
|
|
22
|
+
* @version 1.0.4
|
|
23
|
+
*/
|
|
24
|
+
var GetProjectDevicePublicKeys200Response = /*#__PURE__*/function () {
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new <code>GetProjectDevicePublicKeys200Response</code>.
|
|
27
|
+
* @alias module:model/GetProjectDevicePublicKeys200Response
|
|
28
|
+
* @param devicePublicKeys {Array.<module:model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner>}
|
|
29
|
+
* @param hasMore {Boolean}
|
|
30
|
+
*/
|
|
31
|
+
function GetProjectDevicePublicKeys200Response(devicePublicKeys, hasMore) {
|
|
32
|
+
_classCallCheck(this, GetProjectDevicePublicKeys200Response);
|
|
33
|
+
GetProjectDevicePublicKeys200Response.initialize(this, devicePublicKeys, hasMore);
|
|
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(GetProjectDevicePublicKeys200Response, null, [{
|
|
42
|
+
key: "initialize",
|
|
43
|
+
value: function initialize(obj, devicePublicKeys, hasMore) {
|
|
44
|
+
obj['device_public_keys'] = devicePublicKeys;
|
|
45
|
+
obj['has_more'] = hasMore;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>GetProjectDevicePublicKeys200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
+
* @param {module:model/GetProjectDevicePublicKeys200Response} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/GetProjectDevicePublicKeys200Response} The populated <code>GetProjectDevicePublicKeys200Response</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new GetProjectDevicePublicKeys200Response();
|
|
60
|
+
if (data.hasOwnProperty('device_public_keys')) {
|
|
61
|
+
obj['device_public_keys'] = _ApiClient["default"].convertToType(data['device_public_keys'], [_GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner["default"]]);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('has_more')) {
|
|
64
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
|
|
65
|
+
}
|
|
66
|
+
} else if (data === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>GetProjectDevicePublicKeys200Response</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetProjectDevicePublicKeys200Response</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// check to make sure all required properties are present in the JSON string
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(GetProjectDevicePublicKeys200Response.RequiredProperties),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var property = _step.value;
|
|
86
|
+
if (!data[property]) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_iterator.e(err);
|
|
92
|
+
} finally {
|
|
93
|
+
_iterator.f();
|
|
94
|
+
}
|
|
95
|
+
if (data['device_public_keys']) {
|
|
96
|
+
// data not null
|
|
97
|
+
// ensure the json data is an array
|
|
98
|
+
if (!Array.isArray(data['device_public_keys'])) {
|
|
99
|
+
throw new Error("Expected the field `device_public_keys` to be an array in the JSON data but got " + data['device_public_keys']);
|
|
100
|
+
}
|
|
101
|
+
// validate the optional field `device_public_keys` (array)
|
|
102
|
+
var _iterator2 = _createForOfIteratorHelper(data['device_public_keys']),
|
|
103
|
+
_step2;
|
|
104
|
+
try {
|
|
105
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
106
|
+
var item = _step2.value;
|
|
107
|
+
_GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner["default"].validateJsonObject(item);
|
|
108
|
+
}
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_iterator2.e(err);
|
|
111
|
+
} finally {
|
|
112
|
+
_iterator2.f();
|
|
113
|
+
}
|
|
114
|
+
;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
}]);
|
|
119
|
+
return GetProjectDevicePublicKeys200Response;
|
|
120
|
+
}();
|
|
121
|
+
GetProjectDevicePublicKeys200Response.RequiredProperties = ["device_public_keys", "has_more"];
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @member {Array.<module:model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner>} device_public_keys
|
|
125
|
+
*/
|
|
126
|
+
GetProjectDevicePublicKeys200Response.prototype['device_public_keys'] = undefined;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @member {Boolean} has_more
|
|
130
|
+
*/
|
|
131
|
+
GetProjectDevicePublicKeys200Response.prototype['has_more'] = undefined;
|
|
132
|
+
var _default = GetProjectDevicePublicKeys200Response;
|
|
133
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
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 GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner model module.
|
|
17
|
+
* @module model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner
|
|
18
|
+
* @version 1.0.4
|
|
19
|
+
*/
|
|
20
|
+
var GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner = /*#__PURE__*/function () {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a new <code>GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner</code>.
|
|
23
|
+
* @alias module:model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner
|
|
24
|
+
*/
|
|
25
|
+
function GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner() {
|
|
26
|
+
_classCallCheck(this, GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner);
|
|
27
|
+
GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.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(GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner, null, [{
|
|
36
|
+
key: "initialize",
|
|
37
|
+
value: function initialize(obj) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a <code>GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner</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/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner} obj Optional instance to populate.
|
|
44
|
+
* @return {module:model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner} The populated <code>GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner</code> instance.
|
|
45
|
+
*/
|
|
46
|
+
}, {
|
|
47
|
+
key: "constructFromObject",
|
|
48
|
+
value: function constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner();
|
|
51
|
+
if (data.hasOwnProperty('uid')) {
|
|
52
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
53
|
+
}
|
|
54
|
+
if (data.hasOwnProperty('key')) {
|
|
55
|
+
obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
|
|
56
|
+
}
|
|
57
|
+
} else if (data === null) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Validates the JSON data with respect to <code>GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner</code>.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner</code>.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "validateJSON",
|
|
70
|
+
value: function validateJSON(data) {
|
|
71
|
+
// ensure the json data is a string
|
|
72
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
73
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
74
|
+
}
|
|
75
|
+
// ensure the json data is a string
|
|
76
|
+
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
77
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
}]);
|
|
82
|
+
return GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner;
|
|
83
|
+
}();
|
|
84
|
+
/**
|
|
85
|
+
* @member {String} uid
|
|
86
|
+
*/
|
|
87
|
+
GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.prototype['uid'] = undefined;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @member {String} key
|
|
91
|
+
*/
|
|
92
|
+
GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.prototype['key'] = undefined;
|
|
93
|
+
var _default = GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner;
|
|
94
|
+
exports["default"] = _default;
|