@corellium/corellium-cli 1.3.4 → 1.3.6
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/coverage/cobertura-coverage.xml +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/node_modules/@corellium/client-api/README.md +177 -14
- package/node_modules/@corellium/client-api/dist/ApiClient.js +67 -138
- package/node_modules/@corellium/client-api/dist/api/CorelliumApi.js +4668 -905
- package/node_modules/@corellium/client-api/dist/index.js +469 -37
- package/node_modules/@corellium/client-api/dist/model/Address.js +158 -0
- package/node_modules/@corellium/client-api/dist/model/AgentApp.js +159 -0
- package/node_modules/@corellium/client-api/dist/model/AgentAppReadyResponse.js +112 -0
- package/node_modules/@corellium/client-api/dist/model/AgentAppStatus.js +102 -0
- package/node_modules/@corellium/client-api/dist/model/AgentAppsList.js +127 -0
- package/node_modules/@corellium/client-api/dist/model/AgentAppsStatusList.js +127 -0
- package/node_modules/@corellium/client-api/dist/model/AgentError.js +153 -0
- package/node_modules/@corellium/client-api/dist/model/AgentIcons.js +89 -0
- package/node_modules/@corellium/client-api/dist/model/AgentInstallBody.js +93 -0
- package/node_modules/@corellium/client-api/dist/model/AgentProfilesReturn.js +116 -0
- package/node_modules/@corellium/client-api/dist/model/AgentSystemAdbAuth.js +89 -0
- package/node_modules/@corellium/client-api/dist/model/AgentSystemGetPropBody.js +116 -0
- package/node_modules/@corellium/client-api/dist/model/AgentValueReturn.js +93 -0
- package/node_modules/@corellium/client-api/dist/model/AgreedAck.js +89 -0
- package/node_modules/@corellium/client-api/dist/model/ApiConflictError.js +61 -22
- package/node_modules/@corellium/client-api/dist/model/ApiError.js +64 -21
- package/node_modules/@corellium/client-api/dist/model/ApiInternalConsistencyError.js +144 -0
- package/node_modules/@corellium/client-api/dist/model/ApiNotFoundError.js +65 -23
- package/node_modules/@corellium/client-api/dist/model/ApiToken.js +55 -17
- package/node_modules/@corellium/client-api/dist/model/Bit.js +24 -14
- package/node_modules/@corellium/client-api/dist/model/BtraceEnableOptions.js +93 -0
- package/node_modules/@corellium/client-api/dist/model/Button.js +90 -0
- package/node_modules/@corellium/client-api/dist/model/CouponOptions.js +161 -0
- package/node_modules/@corellium/client-api/dist/model/CreateTeam.js +116 -0
- package/node_modules/@corellium/client-api/dist/model/CreatedBy.js +128 -0
- package/node_modules/@corellium/client-api/dist/model/Credentials.js +59 -19
- package/node_modules/@corellium/client-api/dist/model/DomainOptions.js +103 -0
- package/node_modules/@corellium/client-api/dist/model/Extension.js +167 -0
- package/node_modules/@corellium/client-api/dist/model/Features.js +260 -0
- package/node_modules/@corellium/client-api/dist/model/FileChanges.js +120 -0
- package/node_modules/@corellium/client-api/dist/model/Firmware.js +97 -46
- package/node_modules/@corellium/client-api/dist/model/GpioStateDefinition.js +55 -20
- package/node_modules/@corellium/client-api/dist/model/GpiosState.js +120 -0
- package/node_modules/@corellium/client-api/dist/model/GrantTrialRequestResponse.js +93 -0
- package/node_modules/@corellium/client-api/dist/model/Hook.js +211 -0
- package/node_modules/@corellium/client-api/dist/model/Image.js +99 -49
- package/node_modules/@corellium/client-api/dist/model/Instance.js +201 -71
- package/node_modules/@corellium/client-api/dist/model/InstanceAgentState.js +106 -0
- package/node_modules/@corellium/client-api/dist/model/InstanceBootOptions.js +72 -29
- package/node_modules/@corellium/client-api/dist/model/InstanceBootOptionsAdditionalTag.js +90 -0
- package/node_modules/@corellium/client-api/dist/model/InstanceConsoleEndpoint.js +34 -17
- package/node_modules/@corellium/client-api/dist/model/InstanceCreateOptions.js +126 -49
- package/node_modules/@corellium/client-api/dist/model/InstanceInput.js +181 -0
- package/node_modules/@corellium/client-api/dist/model/InstanceNetdumpState.js +115 -0
- package/node_modules/@corellium/client-api/dist/model/InstanceNetmonState.js +56 -16
- package/node_modules/@corellium/client-api/dist/model/InstanceReturn.js +55 -20
- package/node_modules/@corellium/client-api/dist/model/InstanceServices.js +35 -18
- package/node_modules/@corellium/client-api/dist/model/InstanceStartOptions.js +39 -17
- package/node_modules/@corellium/client-api/dist/model/InstanceState.js +52 -21
- package/node_modules/@corellium/client-api/dist/model/InstanceStopOptions.js +30 -17
- package/node_modules/@corellium/client-api/dist/model/InstanceUpgradeBody.js +129 -0
- package/node_modules/@corellium/client-api/dist/model/Invitation.js +115 -0
- package/node_modules/@corellium/client-api/dist/model/InviteRevokeParams.js +94 -0
- package/node_modules/@corellium/client-api/dist/model/InviteRevokeParamsIds.js +150 -0
- package/node_modules/@corellium/client-api/dist/model/Kcrange.js +106 -0
- package/node_modules/@corellium/client-api/dist/model/KernelTask.js +149 -0
- package/node_modules/@corellium/client-api/dist/model/KernelThread.js +115 -0
- package/node_modules/@corellium/client-api/dist/model/MediaPlayBody.js +106 -0
- package/node_modules/@corellium/client-api/dist/model/Model.js +97 -35
- package/node_modules/@corellium/client-api/dist/model/ModelSoftware.js +77 -28
- package/node_modules/@corellium/client-api/dist/model/NetdumpFilter.js +158 -0
- package/node_modules/@corellium/client-api/dist/model/PasswordChangeBody.js +146 -0
- package/node_modules/@corellium/client-api/dist/model/PasswordResetBody.js +146 -0
- package/node_modules/@corellium/client-api/dist/model/PatchInstanceOptions.js +182 -0
- package/node_modules/@corellium/client-api/dist/model/PeripheralsData.js +63 -33
- package/node_modules/@corellium/client-api/dist/model/Plan.js +106 -0
- package/node_modules/@corellium/client-api/dist/model/Project.js +77 -28
- package/node_modules/@corellium/client-api/dist/model/ProjectKey.js +206 -0
- package/node_modules/@corellium/client-api/dist/model/ProjectQuota.js +35 -21
- package/node_modules/@corellium/client-api/dist/model/ProjectSettings.js +35 -21
- package/node_modules/@corellium/client-api/dist/model/ProjectUsage.js +37 -23
- package/node_modules/@corellium/client-api/dist/model/ProxyConfig.js +116 -0
- package/node_modules/@corellium/client-api/dist/model/RateInfo.js +98 -0
- package/node_modules/@corellium/client-api/dist/model/ResetLinkBody.js +116 -0
- package/node_modules/@corellium/client-api/dist/model/Role.js +164 -0
- package/node_modules/@corellium/client-api/dist/model/RotateBody.js +140 -0
- package/node_modules/@corellium/client-api/dist/model/Snapshot.js +56 -32
- package/node_modules/@corellium/client-api/dist/model/SnapshotCreationOptions.js +54 -17
- package/node_modules/@corellium/client-api/dist/model/SnapshotStatus.js +37 -19
- package/node_modules/@corellium/client-api/dist/model/SubscriberInvite.js +277 -0
- package/node_modules/@corellium/client-api/dist/model/Team.js +162 -0
- package/node_modules/@corellium/client-api/dist/model/TeamCreate.js +93 -0
- package/node_modules/@corellium/client-api/dist/model/TextInput.js +93 -0
- package/node_modules/@corellium/client-api/dist/model/Token.js +56 -19
- package/node_modules/@corellium/client-api/dist/model/TouchCurveInput.js +98 -0
- package/node_modules/@corellium/client-api/dist/model/TouchInput.js +89 -0
- package/node_modules/@corellium/client-api/dist/model/Trial.js +112 -0
- package/node_modules/@corellium/client-api/dist/model/TrialExtension.js +124 -0
- package/node_modules/@corellium/client-api/dist/model/TrialRequestMetadata.js +146 -0
- package/node_modules/@corellium/client-api/dist/model/TrialRequestOptions.js +156 -0
- package/node_modules/@corellium/client-api/dist/model/UpdateExtension.js +89 -0
- package/node_modules/@corellium/client-api/dist/model/User.js +170 -0
- package/node_modules/@corellium/client-api/dist/model/UserError.js +65 -22
- package/node_modules/@corellium/client-api/dist/model/V1CreateHookParameters.js +179 -0
- package/node_modules/@corellium/client-api/dist/model/V1LoadExtensionParameters.js +116 -0
- package/node_modules/@corellium/client-api/dist/model/V1SetStateBody.js +50 -18
- package/node_modules/@corellium/client-api/dist/model/ValidationError.js +157 -0
- package/node_modules/@corellium/client-api/dist/model/VolumeOptions.js +42 -21
- package/node_modules/@corellium/client-api/dist/model/VpnDefinition.js +45 -23
- package/node_modules/@corellium/client-api/dist/model/WebPlayerCreateSessionRequest.js +171 -0
- package/node_modules/@corellium/client-api/dist/model/WebPlayerSession.js +142 -0
- package/node_modules/@corellium/client-api/package.json +1 -1
- package/package.json +2 -2
- package/renovate.json +96 -0
- package/src/commands/login.js +6 -4
- package/src/commands/mast/constants.js +1 -2
- package/src/commands/mast/create-assessment.js +2 -3
- package/src/commands/mast/delete-assessment.js +2 -3
- package/src/commands/mast/download-report.js +3 -4
- package/src/commands/mast/get-assessment.js +2 -3
- package/src/commands/mast/get-assessments.js +2 -3
- package/src/commands/mast/start-monitor.js +2 -3
- package/src/commands/mast/stop-monitor.js +2 -3
- package/src/commands/mast/test.js +2 -3
- package/src/commands/mast/api-base-path.js +0 -21
|
@@ -4,31 +4,40 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
9
|
-
|
|
10
8
|
var _InstanceBootOptions = _interopRequireDefault(require("./InstanceBootOptions"));
|
|
11
|
-
|
|
12
9
|
var _Model = _interopRequireDefault(require("./Model"));
|
|
13
|
-
|
|
14
10
|
var _VolumeOptions = _interopRequireDefault(require("./VolumeOptions"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
12
|
+
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); }
|
|
13
|
+
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; } } }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
18
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
-
|
|
20
|
-
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, descriptor.key, descriptor); } }
|
|
21
|
-
|
|
17
|
+
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); } }
|
|
22
18
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
|
-
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
+
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); } /**
|
|
21
|
+
* Corellium API
|
|
22
|
+
* REST API to manage your virtual devices.
|
|
23
|
+
*
|
|
24
|
+
* The version of the OpenAPI document: 4.5.0-16775
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
24
32
|
/**
|
|
25
33
|
* The InstanceCreateOptions model module.
|
|
26
34
|
* @module model/InstanceCreateOptions
|
|
27
|
-
* @version 0.
|
|
35
|
+
* @version 0.3.2
|
|
28
36
|
*/
|
|
29
37
|
var InstanceCreateOptions = /*#__PURE__*/function () {
|
|
30
38
|
/**
|
|
31
39
|
* Constructs a new <code>InstanceCreateOptions</code>.
|
|
40
|
+
*
|
|
32
41
|
* @alias module:model/InstanceCreateOptions
|
|
33
42
|
* @param flavor {String} the flavor id
|
|
34
43
|
* @param project {String} project UUID
|
|
@@ -36,16 +45,14 @@ var InstanceCreateOptions = /*#__PURE__*/function () {
|
|
|
36
45
|
*/
|
|
37
46
|
function InstanceCreateOptions(flavor, project, os) {
|
|
38
47
|
_classCallCheck(this, InstanceCreateOptions);
|
|
39
|
-
|
|
40
48
|
InstanceCreateOptions.initialize(this, flavor, project, os);
|
|
41
49
|
}
|
|
50
|
+
|
|
42
51
|
/**
|
|
43
52
|
* Initializes the fields of this object.
|
|
44
53
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
54
|
* Only for internal use.
|
|
46
55
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
56
|
_createClass(InstanceCreateOptions, null, [{
|
|
50
57
|
key: "initialize",
|
|
51
58
|
value: function initialize(obj, flavor, project, os) {
|
|
@@ -53,6 +60,7 @@ var InstanceCreateOptions = /*#__PURE__*/function () {
|
|
|
53
60
|
obj['project'] = project;
|
|
54
61
|
obj['os'] = os;
|
|
55
62
|
}
|
|
63
|
+
|
|
56
64
|
/**
|
|
57
65
|
* Constructs a <code>InstanceCreateOptions</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
66
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
@@ -60,165 +68,234 @@ var InstanceCreateOptions = /*#__PURE__*/function () {
|
|
|
60
68
|
* @param {module:model/InstanceCreateOptions} obj Optional instance to populate.
|
|
61
69
|
* @return {module:model/InstanceCreateOptions} The populated <code>InstanceCreateOptions</code> instance.
|
|
62
70
|
*/
|
|
63
|
-
|
|
64
71
|
}, {
|
|
65
72
|
key: "constructFromObject",
|
|
66
73
|
value: function constructFromObject(data, obj) {
|
|
67
74
|
if (data) {
|
|
68
75
|
obj = obj || new InstanceCreateOptions();
|
|
69
|
-
|
|
70
76
|
if (data.hasOwnProperty('name')) {
|
|
71
77
|
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
72
78
|
}
|
|
73
|
-
|
|
74
79
|
if (data.hasOwnProperty('key')) {
|
|
75
80
|
obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
|
|
76
81
|
}
|
|
77
|
-
|
|
78
82
|
if (data.hasOwnProperty('flavor')) {
|
|
79
83
|
obj['flavor'] = _ApiClient["default"].convertToType(data['flavor'], 'String');
|
|
80
84
|
}
|
|
81
|
-
|
|
82
85
|
if (data.hasOwnProperty('project')) {
|
|
83
86
|
obj['project'] = _ApiClient["default"].convertToType(data['project'], 'String');
|
|
84
87
|
}
|
|
85
|
-
|
|
86
88
|
if (data.hasOwnProperty('os')) {
|
|
87
89
|
obj['os'] = _ApiClient["default"].convertToType(data['os'], 'String');
|
|
88
90
|
}
|
|
89
|
-
|
|
90
91
|
if (data.hasOwnProperty('osbuild')) {
|
|
91
92
|
obj['osbuild'] = _ApiClient["default"].convertToType(data['osbuild'], 'String');
|
|
92
93
|
}
|
|
93
|
-
|
|
94
94
|
if (data.hasOwnProperty('patches')) {
|
|
95
95
|
obj['patches'] = _ApiClient["default"].convertToType(data['patches'], ['String']);
|
|
96
96
|
}
|
|
97
|
-
|
|
98
97
|
if (data.hasOwnProperty('fwpackage')) {
|
|
99
98
|
obj['fwpackage'] = _ApiClient["default"].convertToType(data['fwpackage'], 'String');
|
|
100
99
|
}
|
|
101
|
-
|
|
102
100
|
if (data.hasOwnProperty('origFwPackageUrl')) {
|
|
103
101
|
obj['origFwPackageUrl'] = _ApiClient["default"].convertToType(data['origFwPackageUrl'], 'String');
|
|
104
102
|
}
|
|
105
|
-
|
|
106
103
|
if (data.hasOwnProperty('encrypt')) {
|
|
107
104
|
obj['encrypt'] = _ApiClient["default"].convertToType(data['encrypt'], 'Boolean');
|
|
108
105
|
}
|
|
109
|
-
|
|
110
106
|
if (data.hasOwnProperty('overrideWifiMAC')) {
|
|
111
107
|
obj['overrideWifiMAC'] = _ApiClient["default"].convertToType(data['overrideWifiMAC'], 'String');
|
|
112
108
|
}
|
|
113
|
-
|
|
114
109
|
if (data.hasOwnProperty('volume')) {
|
|
115
110
|
obj['volume'] = _VolumeOptions["default"].constructFromObject(data['volume']);
|
|
116
111
|
}
|
|
117
|
-
|
|
118
112
|
if (data.hasOwnProperty('snapshot')) {
|
|
119
113
|
obj['snapshot'] = _ApiClient["default"].convertToType(data['snapshot'], 'String');
|
|
120
114
|
}
|
|
121
|
-
|
|
122
115
|
if (data.hasOwnProperty('bootOptions')) {
|
|
123
116
|
obj['bootOptions'] = _InstanceBootOptions["default"].constructFromObject(data['bootOptions']);
|
|
124
117
|
}
|
|
125
|
-
|
|
126
118
|
if (data.hasOwnProperty('device')) {
|
|
127
119
|
obj['device'] = _Model["default"].constructFromObject(data['device']);
|
|
128
120
|
}
|
|
129
121
|
}
|
|
130
|
-
|
|
131
122
|
return obj;
|
|
132
123
|
}
|
|
133
|
-
}]);
|
|
134
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Validates the JSON data with respect to <code>InstanceCreateOptions</code>.
|
|
127
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
128
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>InstanceCreateOptions</code>.
|
|
129
|
+
*/
|
|
130
|
+
}, {
|
|
131
|
+
key: "validateJSON",
|
|
132
|
+
value: function validateJSON(data) {
|
|
133
|
+
// check to make sure all required properties are present in the JSON string
|
|
134
|
+
var _iterator = _createForOfIteratorHelper(InstanceCreateOptions.RequiredProperties),
|
|
135
|
+
_step;
|
|
136
|
+
try {
|
|
137
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
138
|
+
var property = _step.value;
|
|
139
|
+
if (!data[property]) {
|
|
140
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// ensure the json data is a string
|
|
144
|
+
} catch (err) {
|
|
145
|
+
_iterator.e(err);
|
|
146
|
+
} finally {
|
|
147
|
+
_iterator.f();
|
|
148
|
+
}
|
|
149
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
150
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
151
|
+
}
|
|
152
|
+
// ensure the json data is a string
|
|
153
|
+
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
155
|
+
}
|
|
156
|
+
// ensure the json data is a string
|
|
157
|
+
if (data['flavor'] && !(typeof data['flavor'] === 'string' || data['flavor'] instanceof String)) {
|
|
158
|
+
throw new Error("Expected the field `flavor` to be a primitive type in the JSON string but got " + data['flavor']);
|
|
159
|
+
}
|
|
160
|
+
// ensure the json data is a string
|
|
161
|
+
if (data['project'] && !(typeof data['project'] === 'string' || data['project'] instanceof String)) {
|
|
162
|
+
throw new Error("Expected the field `project` to be a primitive type in the JSON string but got " + data['project']);
|
|
163
|
+
}
|
|
164
|
+
// ensure the json data is a string
|
|
165
|
+
if (data['os'] && !(typeof data['os'] === 'string' || data['os'] instanceof String)) {
|
|
166
|
+
throw new Error("Expected the field `os` to be a primitive type in the JSON string but got " + data['os']);
|
|
167
|
+
}
|
|
168
|
+
// ensure the json data is a string
|
|
169
|
+
if (data['osbuild'] && !(typeof data['osbuild'] === 'string' || data['osbuild'] instanceof String)) {
|
|
170
|
+
throw new Error("Expected the field `osbuild` to be a primitive type in the JSON string but got " + data['osbuild']);
|
|
171
|
+
}
|
|
172
|
+
// ensure the json data is an array
|
|
173
|
+
if (!Array.isArray(data['patches'])) {
|
|
174
|
+
throw new Error("Expected the field `patches` to be an array in the JSON data but got " + data['patches']);
|
|
175
|
+
}
|
|
176
|
+
// ensure the json data is a string
|
|
177
|
+
if (data['fwpackage'] && !(typeof data['fwpackage'] === 'string' || data['fwpackage'] instanceof String)) {
|
|
178
|
+
throw new Error("Expected the field `fwpackage` to be a primitive type in the JSON string but got " + data['fwpackage']);
|
|
179
|
+
}
|
|
180
|
+
// ensure the json data is a string
|
|
181
|
+
if (data['origFwPackageUrl'] && !(typeof data['origFwPackageUrl'] === 'string' || data['origFwPackageUrl'] instanceof String)) {
|
|
182
|
+
throw new Error("Expected the field `origFwPackageUrl` to be a primitive type in the JSON string but got " + data['origFwPackageUrl']);
|
|
183
|
+
}
|
|
184
|
+
// ensure the json data is a string
|
|
185
|
+
if (data['overrideWifiMAC'] && !(typeof data['overrideWifiMAC'] === 'string' || data['overrideWifiMAC'] instanceof String)) {
|
|
186
|
+
throw new Error("Expected the field `overrideWifiMAC` to be a primitive type in the JSON string but got " + data['overrideWifiMAC']);
|
|
187
|
+
}
|
|
188
|
+
// validate the optional field `volume`
|
|
189
|
+
if (data['volume']) {
|
|
190
|
+
// data not null
|
|
191
|
+
_VolumeOptions["default"].validateJSON(data['volume']);
|
|
192
|
+
}
|
|
193
|
+
// ensure the json data is a string
|
|
194
|
+
if (data['snapshot'] && !(typeof data['snapshot'] === 'string' || data['snapshot'] instanceof String)) {
|
|
195
|
+
throw new Error("Expected the field `snapshot` to be a primitive type in the JSON string but got " + data['snapshot']);
|
|
196
|
+
}
|
|
197
|
+
// validate the optional field `bootOptions`
|
|
198
|
+
if (data['bootOptions']) {
|
|
199
|
+
// data not null
|
|
200
|
+
_InstanceBootOptions["default"].validateJSON(data['bootOptions']);
|
|
201
|
+
}
|
|
202
|
+
// validate the optional field `device`
|
|
203
|
+
if (data['device']) {
|
|
204
|
+
// data not null
|
|
205
|
+
_Model["default"].validateJSON(data['device']);
|
|
206
|
+
}
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
}]);
|
|
135
210
|
return InstanceCreateOptions;
|
|
136
211
|
}();
|
|
212
|
+
InstanceCreateOptions.RequiredProperties = ["flavor", "project", "os"];
|
|
213
|
+
|
|
137
214
|
/**
|
|
138
215
|
* the name of the device
|
|
139
216
|
* @member {String} name
|
|
140
217
|
*/
|
|
141
|
-
|
|
142
|
-
|
|
143
218
|
InstanceCreateOptions.prototype['name'] = undefined;
|
|
219
|
+
|
|
144
220
|
/**
|
|
145
221
|
* Key used to encrypt the Instance
|
|
146
222
|
* @member {String} key
|
|
147
223
|
*/
|
|
148
|
-
|
|
149
224
|
InstanceCreateOptions.prototype['key'] = undefined;
|
|
225
|
+
|
|
150
226
|
/**
|
|
151
227
|
* the flavor id
|
|
152
228
|
* @member {String} flavor
|
|
153
229
|
*/
|
|
154
|
-
|
|
155
230
|
InstanceCreateOptions.prototype['flavor'] = undefined;
|
|
231
|
+
|
|
156
232
|
/**
|
|
157
233
|
* project UUID
|
|
158
234
|
* @member {String} project
|
|
159
235
|
*/
|
|
160
|
-
|
|
161
236
|
InstanceCreateOptions.prototype['project'] = undefined;
|
|
237
|
+
|
|
162
238
|
/**
|
|
163
239
|
* OS Version
|
|
164
240
|
* @member {String} os
|
|
165
241
|
*/
|
|
166
|
-
|
|
167
242
|
InstanceCreateOptions.prototype['os'] = undefined;
|
|
243
|
+
|
|
168
244
|
/**
|
|
169
245
|
* OS Build
|
|
170
246
|
* @member {String} osbuild
|
|
171
247
|
*/
|
|
172
|
-
|
|
173
248
|
InstanceCreateOptions.prototype['osbuild'] = undefined;
|
|
249
|
+
|
|
174
250
|
/**
|
|
175
251
|
* list of patches to apply
|
|
176
252
|
* @member {Array.<String>} patches
|
|
177
253
|
*/
|
|
178
|
-
|
|
179
254
|
InstanceCreateOptions.prototype['patches'] = undefined;
|
|
255
|
+
|
|
180
256
|
/**
|
|
181
257
|
* URL or image id
|
|
182
258
|
* @member {String} fwpackage
|
|
183
259
|
*/
|
|
184
|
-
|
|
185
260
|
InstanceCreateOptions.prototype['fwpackage'] = undefined;
|
|
261
|
+
|
|
186
262
|
/**
|
|
187
263
|
* URL that firmware package used to create this instance is available at
|
|
188
264
|
* @member {String} origFwPackageUrl
|
|
189
265
|
*/
|
|
190
|
-
|
|
191
266
|
InstanceCreateOptions.prototype['origFwPackageUrl'] = undefined;
|
|
267
|
+
|
|
192
268
|
/**
|
|
269
|
+
*
|
|
193
270
|
* @member {Boolean} encrypt
|
|
194
271
|
*/
|
|
195
|
-
|
|
196
272
|
InstanceCreateOptions.prototype['encrypt'] = undefined;
|
|
273
|
+
|
|
197
274
|
/**
|
|
275
|
+
*
|
|
198
276
|
* @member {String} overrideWifiMAC
|
|
199
277
|
*/
|
|
200
|
-
|
|
201
278
|
InstanceCreateOptions.prototype['overrideWifiMAC'] = undefined;
|
|
279
|
+
|
|
202
280
|
/**
|
|
203
281
|
* @member {module:model/VolumeOptions} volume
|
|
204
282
|
*/
|
|
205
|
-
|
|
206
283
|
InstanceCreateOptions.prototype['volume'] = undefined;
|
|
284
|
+
|
|
207
285
|
/**
|
|
208
|
-
* Snapshot ID
|
|
286
|
+
* Snapshot ID for this instance to be cloned from if defined
|
|
209
287
|
* @member {String} snapshot
|
|
210
288
|
*/
|
|
211
|
-
|
|
212
289
|
InstanceCreateOptions.prototype['snapshot'] = undefined;
|
|
290
|
+
|
|
213
291
|
/**
|
|
214
292
|
* @member {module:model/InstanceBootOptions} bootOptions
|
|
215
293
|
*/
|
|
216
|
-
|
|
217
294
|
InstanceCreateOptions.prototype['bootOptions'] = undefined;
|
|
295
|
+
|
|
218
296
|
/**
|
|
219
297
|
* @member {module:model/Model} device
|
|
220
298
|
*/
|
|
221
|
-
|
|
222
299
|
InstanceCreateOptions.prototype['device'] = undefined;
|
|
223
300
|
var _default = InstanceCreateOptions;
|
|
224
301
|
exports["default"] = _default;
|
|
@@ -0,0 +1,181 @@
|
|
|
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 _TextInput = _interopRequireDefault(require("./TextInput"));
|
|
9
|
+
var _TouchCurveInput = _interopRequireDefault(require("./TouchCurveInput"));
|
|
10
|
+
var _TouchInput = _interopRequireDefault(require("./TouchInput"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
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 _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
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
|
+
* Corellium API
|
|
20
|
+
* REST API to manage your virtual devices.
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: 4.5.0-16775
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The InstanceInput model module.
|
|
32
|
+
* @module model/InstanceInput
|
|
33
|
+
* @version 0.3.2
|
|
34
|
+
*/
|
|
35
|
+
var InstanceInput = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>InstanceInput</code>.
|
|
38
|
+
*
|
|
39
|
+
* @alias module:model/InstanceInput
|
|
40
|
+
* @param {(module:model/TextInput|module:model/TouchCurveInput|module:model/TouchInput)} instance The actual instance to initialize InstanceInput.
|
|
41
|
+
*/
|
|
42
|
+
function InstanceInput() {
|
|
43
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
44
|
+
_classCallCheck(this, InstanceInput);
|
|
45
|
+
/**
|
|
46
|
+
* Returns the JSON representation of the actual instance.
|
|
47
|
+
* @return {string}
|
|
48
|
+
*/
|
|
49
|
+
_defineProperty(this, "toJSON", function () {
|
|
50
|
+
return this.getActualInstance();
|
|
51
|
+
});
|
|
52
|
+
if (instance === null) {
|
|
53
|
+
this.actualInstance = null;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
var match = 0;
|
|
57
|
+
var errorMessages = [];
|
|
58
|
+
try {
|
|
59
|
+
if (typeof instance === "TouchInput") {
|
|
60
|
+
this.actualInstance = instance;
|
|
61
|
+
} else {
|
|
62
|
+
// plain JS object
|
|
63
|
+
// validate the object
|
|
64
|
+
_TouchInput["default"].validateJSON(instance); // throw an exception if no match
|
|
65
|
+
// create TouchInput from JS object
|
|
66
|
+
this.actualInstance = _TouchInput["default"].constructFromObject(instance);
|
|
67
|
+
}
|
|
68
|
+
match++;
|
|
69
|
+
} catch (err) {
|
|
70
|
+
// json data failed to deserialize into TouchInput
|
|
71
|
+
errorMessages.push("Failed to construct TouchInput: " + err);
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
if (typeof instance === "TouchCurveInput") {
|
|
75
|
+
this.actualInstance = instance;
|
|
76
|
+
} else {
|
|
77
|
+
// plain JS object
|
|
78
|
+
// validate the object
|
|
79
|
+
_TouchCurveInput["default"].validateJSON(instance); // throw an exception if no match
|
|
80
|
+
// create TouchCurveInput from JS object
|
|
81
|
+
this.actualInstance = _TouchCurveInput["default"].constructFromObject(instance);
|
|
82
|
+
}
|
|
83
|
+
match++;
|
|
84
|
+
} catch (err) {
|
|
85
|
+
// json data failed to deserialize into TouchCurveInput
|
|
86
|
+
errorMessages.push("Failed to construct TouchCurveInput: " + err);
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
if (typeof instance === "TextInput") {
|
|
90
|
+
this.actualInstance = instance;
|
|
91
|
+
} else {
|
|
92
|
+
// plain JS object
|
|
93
|
+
// validate the object
|
|
94
|
+
_TextInput["default"].validateJSON(instance); // throw an exception if no match
|
|
95
|
+
// create TextInput from JS object
|
|
96
|
+
this.actualInstance = _TextInput["default"].constructFromObject(instance);
|
|
97
|
+
}
|
|
98
|
+
match++;
|
|
99
|
+
} catch (err) {
|
|
100
|
+
// json data failed to deserialize into TextInput
|
|
101
|
+
errorMessages.push("Failed to construct TextInput: " + err);
|
|
102
|
+
}
|
|
103
|
+
if (match > 1) {
|
|
104
|
+
throw new Error("Multiple matches found constructing `InstanceInput` with oneOf schemas TextInput, TouchCurveInput, TouchInput. Input: " + JSON.stringify(instance));
|
|
105
|
+
} else if (match === 0) {
|
|
106
|
+
this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
107
|
+
throw new Error("No match found constructing `InstanceInput` with oneOf schemas TextInput, TouchCurveInput, TouchInput. Details: " + errorMessages.join(", "));
|
|
108
|
+
} else {// only 1 match
|
|
109
|
+
// the input is valid
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Constructs a <code>InstanceInput</code> from a plain JavaScript object, optionally creating a new instance.
|
|
115
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
116
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
117
|
+
* @param {module:model/InstanceInput} obj Optional instance to populate.
|
|
118
|
+
* @return {module:model/InstanceInput} The populated <code>InstanceInput</code> instance.
|
|
119
|
+
*/
|
|
120
|
+
_createClass(InstanceInput, [{
|
|
121
|
+
key: "getActualInstance",
|
|
122
|
+
value:
|
|
123
|
+
/**
|
|
124
|
+
* Gets the actual instance, which can be <code>TextInput</code>, <code>TouchCurveInput</code>, <code>TouchInput</code>.
|
|
125
|
+
* @return {(module:model/TextInput|module:model/TouchCurveInput|module:model/TouchInput)} The actual instance.
|
|
126
|
+
*/
|
|
127
|
+
function getActualInstance() {
|
|
128
|
+
return this.actualInstance;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Sets the actual instance, which can be <code>TextInput</code>, <code>TouchCurveInput</code>, <code>TouchInput</code>.
|
|
133
|
+
* @param {(module:model/TextInput|module:model/TouchCurveInput|module:model/TouchInput)} obj The actual instance.
|
|
134
|
+
*/
|
|
135
|
+
}, {
|
|
136
|
+
key: "setActualInstance",
|
|
137
|
+
value: function setActualInstance(obj) {
|
|
138
|
+
this.actualInstance = InstanceInput.constructFromObject(obj).getActualInstance();
|
|
139
|
+
}
|
|
140
|
+
}], [{
|
|
141
|
+
key: "constructFromObject",
|
|
142
|
+
value: function constructFromObject(data, obj) {
|
|
143
|
+
return new InstanceInput(data);
|
|
144
|
+
}
|
|
145
|
+
}]);
|
|
146
|
+
return InstanceInput;
|
|
147
|
+
}();
|
|
148
|
+
/**
|
|
149
|
+
* Finger Positions
|
|
150
|
+
* @member {Object} position
|
|
151
|
+
*/
|
|
152
|
+
/**
|
|
153
|
+
* Create an instance of InstanceInput from a JSON string.
|
|
154
|
+
* @param {string} json_string JSON string.
|
|
155
|
+
* @return {module:model/InstanceInput} An instance of InstanceInput.
|
|
156
|
+
*/
|
|
157
|
+
_defineProperty(InstanceInput, "fromJSON", function (json_string) {
|
|
158
|
+
return InstanceInput.constructFromObject(JSON.parse(json_string));
|
|
159
|
+
});
|
|
160
|
+
InstanceInput.prototype['position'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Finger Positions
|
|
164
|
+
* @member {Object} start
|
|
165
|
+
*/
|
|
166
|
+
InstanceInput.prototype['start'] = undefined;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Finger Positions
|
|
170
|
+
* @member {Object} end
|
|
171
|
+
*/
|
|
172
|
+
InstanceInput.prototype['end'] = undefined;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* text to type
|
|
176
|
+
* @member {String} text
|
|
177
|
+
*/
|
|
178
|
+
InstanceInput.prototype['text'] = undefined;
|
|
179
|
+
InstanceInput.OneOf = ["TextInput", "TouchCurveInput", "TouchInput"];
|
|
180
|
+
var _default = InstanceInput;
|
|
181
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
* Corellium API
|
|
16
|
+
* REST API to manage your virtual devices.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 4.5.0-16775
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The InstanceNetdumpState model module.
|
|
28
|
+
* @module model/InstanceNetdumpState
|
|
29
|
+
* @version 0.3.2
|
|
30
|
+
*/
|
|
31
|
+
var InstanceNetdumpState = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>InstanceNetdumpState</code>.
|
|
34
|
+
*
|
|
35
|
+
* @alias module:model/InstanceNetdumpState
|
|
36
|
+
*/
|
|
37
|
+
function InstanceNetdumpState() {
|
|
38
|
+
_classCallCheck(this, InstanceNetdumpState);
|
|
39
|
+
InstanceNetdumpState.initialize(this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
_createClass(InstanceNetdumpState, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>InstanceNetdumpState</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/InstanceNetdumpState} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/InstanceNetdumpState} The populated <code>InstanceNetdumpState</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new InstanceNetdumpState();
|
|
63
|
+
if (data.hasOwnProperty('hash')) {
|
|
64
|
+
obj['hash'] = _ApiClient["default"].convertToType(data['hash'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('info')) {
|
|
67
|
+
obj['info'] = _ApiClient["default"].convertToType(data['info'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('enabled')) {
|
|
70
|
+
obj['enabled'] = _ApiClient["default"].convertToType(data['enabled'], 'Boolean');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>InstanceNetdumpState</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>InstanceNetdumpState</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// ensure the json data is a string
|
|
85
|
+
if (data['hash'] && !(typeof data['hash'] === 'string' || data['hash'] instanceof String)) {
|
|
86
|
+
throw new Error("Expected the field `hash` to be a primitive type in the JSON string but got " + data['hash']);
|
|
87
|
+
}
|
|
88
|
+
// ensure the json data is a string
|
|
89
|
+
if (data['info'] && !(typeof data['info'] === 'string' || data['info'] instanceof String)) {
|
|
90
|
+
throw new Error("Expected the field `info` to be a primitive type in the JSON string but got " + data['info']);
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
95
|
+
return InstanceNetdumpState;
|
|
96
|
+
}();
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @member {String} hash
|
|
100
|
+
*/
|
|
101
|
+
InstanceNetdumpState.prototype['hash'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @member {String} info
|
|
106
|
+
*/
|
|
107
|
+
InstanceNetdumpState.prototype['info'] = undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @member {Boolean} enabled
|
|
112
|
+
*/
|
|
113
|
+
InstanceNetdumpState.prototype['enabled'] = undefined;
|
|
114
|
+
var _default = InstanceNetdumpState;
|
|
115
|
+
exports["default"] = _default;
|