@corellium/corellium-cli 1.3.4 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. package/coverage/cobertura-coverage.xml +1 -1
  2. package/coverage/lcov-report/index.html +1 -1
  3. package/node_modules/@corellium/client-api/README.md +177 -14
  4. package/node_modules/@corellium/client-api/dist/ApiClient.js +67 -138
  5. package/node_modules/@corellium/client-api/dist/api/CorelliumApi.js +4668 -905
  6. package/node_modules/@corellium/client-api/dist/index.js +469 -37
  7. package/node_modules/@corellium/client-api/dist/model/Address.js +158 -0
  8. package/node_modules/@corellium/client-api/dist/model/AgentApp.js +159 -0
  9. package/node_modules/@corellium/client-api/dist/model/AgentAppReadyResponse.js +112 -0
  10. package/node_modules/@corellium/client-api/dist/model/AgentAppStatus.js +102 -0
  11. package/node_modules/@corellium/client-api/dist/model/AgentAppsList.js +127 -0
  12. package/node_modules/@corellium/client-api/dist/model/AgentAppsStatusList.js +127 -0
  13. package/node_modules/@corellium/client-api/dist/model/AgentError.js +153 -0
  14. package/node_modules/@corellium/client-api/dist/model/AgentIcons.js +89 -0
  15. package/node_modules/@corellium/client-api/dist/model/AgentInstallBody.js +93 -0
  16. package/node_modules/@corellium/client-api/dist/model/AgentProfilesReturn.js +116 -0
  17. package/node_modules/@corellium/client-api/dist/model/AgentSystemAdbAuth.js +89 -0
  18. package/node_modules/@corellium/client-api/dist/model/AgentSystemGetPropBody.js +116 -0
  19. package/node_modules/@corellium/client-api/dist/model/AgentValueReturn.js +93 -0
  20. package/node_modules/@corellium/client-api/dist/model/AgreedAck.js +89 -0
  21. package/node_modules/@corellium/client-api/dist/model/ApiConflictError.js +61 -22
  22. package/node_modules/@corellium/client-api/dist/model/ApiError.js +64 -21
  23. package/node_modules/@corellium/client-api/dist/model/ApiInternalConsistencyError.js +144 -0
  24. package/node_modules/@corellium/client-api/dist/model/ApiNotFoundError.js +65 -23
  25. package/node_modules/@corellium/client-api/dist/model/ApiToken.js +55 -17
  26. package/node_modules/@corellium/client-api/dist/model/Bit.js +24 -14
  27. package/node_modules/@corellium/client-api/dist/model/BtraceEnableOptions.js +93 -0
  28. package/node_modules/@corellium/client-api/dist/model/Button.js +90 -0
  29. package/node_modules/@corellium/client-api/dist/model/CouponOptions.js +161 -0
  30. package/node_modules/@corellium/client-api/dist/model/CreateTeam.js +116 -0
  31. package/node_modules/@corellium/client-api/dist/model/CreatedBy.js +128 -0
  32. package/node_modules/@corellium/client-api/dist/model/Credentials.js +59 -19
  33. package/node_modules/@corellium/client-api/dist/model/DomainOptions.js +103 -0
  34. package/node_modules/@corellium/client-api/dist/model/Extension.js +167 -0
  35. package/node_modules/@corellium/client-api/dist/model/Features.js +260 -0
  36. package/node_modules/@corellium/client-api/dist/model/FileChanges.js +120 -0
  37. package/node_modules/@corellium/client-api/dist/model/Firmware.js +97 -46
  38. package/node_modules/@corellium/client-api/dist/model/GpioStateDefinition.js +55 -20
  39. package/node_modules/@corellium/client-api/dist/model/GpiosState.js +120 -0
  40. package/node_modules/@corellium/client-api/dist/model/GrantTrialRequestResponse.js +93 -0
  41. package/node_modules/@corellium/client-api/dist/model/Hook.js +211 -0
  42. package/node_modules/@corellium/client-api/dist/model/Image.js +99 -49
  43. package/node_modules/@corellium/client-api/dist/model/Instance.js +201 -71
  44. package/node_modules/@corellium/client-api/dist/model/InstanceAgentState.js +106 -0
  45. package/node_modules/@corellium/client-api/dist/model/InstanceBootOptions.js +72 -29
  46. package/node_modules/@corellium/client-api/dist/model/InstanceBootOptionsAdditionalTag.js +90 -0
  47. package/node_modules/@corellium/client-api/dist/model/InstanceConsoleEndpoint.js +34 -17
  48. package/node_modules/@corellium/client-api/dist/model/InstanceCreateOptions.js +126 -49
  49. package/node_modules/@corellium/client-api/dist/model/InstanceInput.js +181 -0
  50. package/node_modules/@corellium/client-api/dist/model/InstanceNetdumpState.js +115 -0
  51. package/node_modules/@corellium/client-api/dist/model/InstanceNetmonState.js +56 -16
  52. package/node_modules/@corellium/client-api/dist/model/InstanceReturn.js +55 -20
  53. package/node_modules/@corellium/client-api/dist/model/InstanceServices.js +35 -18
  54. package/node_modules/@corellium/client-api/dist/model/InstanceStartOptions.js +39 -17
  55. package/node_modules/@corellium/client-api/dist/model/InstanceState.js +52 -21
  56. package/node_modules/@corellium/client-api/dist/model/InstanceStopOptions.js +30 -17
  57. package/node_modules/@corellium/client-api/dist/model/InstanceUpgradeBody.js +129 -0
  58. package/node_modules/@corellium/client-api/dist/model/Invitation.js +115 -0
  59. package/node_modules/@corellium/client-api/dist/model/InviteRevokeParams.js +94 -0
  60. package/node_modules/@corellium/client-api/dist/model/InviteRevokeParamsIds.js +150 -0
  61. package/node_modules/@corellium/client-api/dist/model/Kcrange.js +106 -0
  62. package/node_modules/@corellium/client-api/dist/model/KernelTask.js +149 -0
  63. package/node_modules/@corellium/client-api/dist/model/KernelThread.js +115 -0
  64. package/node_modules/@corellium/client-api/dist/model/MediaPlayBody.js +106 -0
  65. package/node_modules/@corellium/client-api/dist/model/Model.js +97 -35
  66. package/node_modules/@corellium/client-api/dist/model/ModelSoftware.js +77 -28
  67. package/node_modules/@corellium/client-api/dist/model/NetdumpFilter.js +158 -0
  68. package/node_modules/@corellium/client-api/dist/model/PasswordChangeBody.js +146 -0
  69. package/node_modules/@corellium/client-api/dist/model/PasswordResetBody.js +146 -0
  70. package/node_modules/@corellium/client-api/dist/model/PatchInstanceOptions.js +182 -0
  71. package/node_modules/@corellium/client-api/dist/model/PeripheralsData.js +63 -33
  72. package/node_modules/@corellium/client-api/dist/model/Plan.js +106 -0
  73. package/node_modules/@corellium/client-api/dist/model/Project.js +77 -28
  74. package/node_modules/@corellium/client-api/dist/model/ProjectKey.js +206 -0
  75. package/node_modules/@corellium/client-api/dist/model/ProjectQuota.js +35 -21
  76. package/node_modules/@corellium/client-api/dist/model/ProjectSettings.js +35 -21
  77. package/node_modules/@corellium/client-api/dist/model/ProjectUsage.js +37 -23
  78. package/node_modules/@corellium/client-api/dist/model/ProxyConfig.js +116 -0
  79. package/node_modules/@corellium/client-api/dist/model/RateInfo.js +98 -0
  80. package/node_modules/@corellium/client-api/dist/model/ResetLinkBody.js +116 -0
  81. package/node_modules/@corellium/client-api/dist/model/Role.js +164 -0
  82. package/node_modules/@corellium/client-api/dist/model/RotateBody.js +140 -0
  83. package/node_modules/@corellium/client-api/dist/model/Snapshot.js +56 -32
  84. package/node_modules/@corellium/client-api/dist/model/SnapshotCreationOptions.js +54 -17
  85. package/node_modules/@corellium/client-api/dist/model/SnapshotStatus.js +37 -19
  86. package/node_modules/@corellium/client-api/dist/model/SubscriberInvite.js +277 -0
  87. package/node_modules/@corellium/client-api/dist/model/Team.js +162 -0
  88. package/node_modules/@corellium/client-api/dist/model/TeamCreate.js +93 -0
  89. package/node_modules/@corellium/client-api/dist/model/TextInput.js +93 -0
  90. package/node_modules/@corellium/client-api/dist/model/Token.js +56 -19
  91. package/node_modules/@corellium/client-api/dist/model/TouchCurveInput.js +98 -0
  92. package/node_modules/@corellium/client-api/dist/model/TouchInput.js +89 -0
  93. package/node_modules/@corellium/client-api/dist/model/Trial.js +112 -0
  94. package/node_modules/@corellium/client-api/dist/model/TrialExtension.js +124 -0
  95. package/node_modules/@corellium/client-api/dist/model/TrialRequestMetadata.js +146 -0
  96. package/node_modules/@corellium/client-api/dist/model/TrialRequestOptions.js +156 -0
  97. package/node_modules/@corellium/client-api/dist/model/UpdateExtension.js +89 -0
  98. package/node_modules/@corellium/client-api/dist/model/User.js +170 -0
  99. package/node_modules/@corellium/client-api/dist/model/UserError.js +65 -22
  100. package/node_modules/@corellium/client-api/dist/model/V1CreateHookParameters.js +179 -0
  101. package/node_modules/@corellium/client-api/dist/model/V1LoadExtensionParameters.js +116 -0
  102. package/node_modules/@corellium/client-api/dist/model/V1SetStateBody.js +50 -18
  103. package/node_modules/@corellium/client-api/dist/model/ValidationError.js +157 -0
  104. package/node_modules/@corellium/client-api/dist/model/VolumeOptions.js +42 -21
  105. package/node_modules/@corellium/client-api/dist/model/VpnDefinition.js +45 -23
  106. package/node_modules/@corellium/client-api/dist/model/WebPlayerCreateSessionRequest.js +171 -0
  107. package/node_modules/@corellium/client-api/dist/model/WebPlayerSession.js +142 -0
  108. package/node_modules/@corellium/client-api/package.json +1 -1
  109. package/package.json +2 -2
  110. package/renovate.json +96 -0
  111. package/src/commands/login.js +6 -4
  112. package/src/commands/mast/constants.js +1 -2
  113. package/src/commands/mast/create-assessment.js +2 -3
  114. package/src/commands/mast/delete-assessment.js +2 -3
  115. package/src/commands/mast/download-report.js +3 -4
  116. package/src/commands/mast/get-assessment.js +2 -3
  117. package/src/commands/mast/get-assessments.js +2 -3
  118. package/src/commands/mast/start-monitor.js +2 -3
  119. package/src/commands/mast/stop-monitor.js +2 -3
  120. package/src/commands/mast/test.js +2 -3
  121. package/src/commands/mast/api-base-path.js +0 -21
@@ -4,50 +4,57 @@ 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
-
8
+ var _CreatedBy = _interopRequireDefault(require("./CreatedBy"));
9
+ var _InstanceAgentState = _interopRequireDefault(require("./InstanceAgentState"));
10
10
  var _InstanceBootOptions = _interopRequireDefault(require("./InstanceBootOptions"));
11
-
11
+ var _InstanceNetdumpState = _interopRequireDefault(require("./InstanceNetdumpState"));
12
12
  var _InstanceNetmonState = _interopRequireDefault(require("./InstanceNetmonState"));
13
-
14
13
  var _InstanceServices = _interopRequireDefault(require("./InstanceServices"));
15
-
16
14
  var _InstanceState = _interopRequireDefault(require("./InstanceState"));
17
-
18
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
16
+ 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); }
20
17
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
-
22
- 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); } }
23
-
18
+ 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); } }
24
19
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
-
20
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
+ 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); } /**
22
+ * Corellium API
23
+ * REST API to manage your virtual devices.
24
+ *
25
+ * The version of the OpenAPI document: 4.5.0-16775
26
+ *
27
+ *
28
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29
+ * https://openapi-generator.tech
30
+ * Do not edit the class manually.
31
+ *
32
+ */
26
33
  /**
27
34
  * The Instance model module.
28
35
  * @module model/Instance
29
- * @version 0.1.0
36
+ * @version 0.3.2
30
37
  */
31
38
  var Instance = /*#__PURE__*/function () {
32
39
  /**
33
40
  * Constructs a new <code>Instance</code>.
41
+ *
34
42
  * @alias module:model/Instance
35
43
  */
36
44
  function Instance() {
37
45
  _classCallCheck(this, Instance);
38
-
39
46
  Instance.initialize(this);
40
47
  }
48
+
41
49
  /**
42
50
  * Initializes the fields of this object.
43
51
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
52
  * Only for internal use.
45
53
  */
46
-
47
-
48
54
  _createClass(Instance, null, [{
49
55
  key: "initialize",
50
56
  value: function initialize(obj) {}
57
+
51
58
  /**
52
59
  * Constructs a <code>Instance</code> from a plain JavaScript object, optionally creating a new instance.
53
60
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -55,259 +62,382 @@ var Instance = /*#__PURE__*/function () {
55
62
  * @param {module:model/Instance} obj Optional instance to populate.
56
63
  * @return {module:model/Instance} The populated <code>Instance</code> instance.
57
64
  */
58
-
59
65
  }, {
60
66
  key: "constructFromObject",
61
67
  value: function constructFromObject(data, obj) {
62
68
  if (data) {
63
69
  obj = obj || new Instance();
64
-
65
70
  if (data.hasOwnProperty('id')) {
66
71
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
67
72
  }
68
-
69
73
  if (data.hasOwnProperty('name')) {
70
74
  obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
71
75
  }
72
-
73
76
  if (data.hasOwnProperty('key')) {
74
77
  obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
75
78
  }
76
-
77
79
  if (data.hasOwnProperty('flavor')) {
78
80
  obj['flavor'] = _ApiClient["default"].convertToType(data['flavor'], 'String');
79
81
  }
80
-
81
82
  if (data.hasOwnProperty('type')) {
82
83
  obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
83
84
  }
84
-
85
85
  if (data.hasOwnProperty('project')) {
86
86
  obj['project'] = _ApiClient["default"].convertToType(data['project'], 'String');
87
87
  }
88
-
89
88
  if (data.hasOwnProperty('state')) {
90
89
  obj['state'] = _InstanceState["default"].constructFromObject(data['state']);
91
90
  }
92
-
93
91
  if (data.hasOwnProperty('stateChanged')) {
94
92
  obj['stateChanged'] = _ApiClient["default"].convertToType(data['stateChanged'], 'Date');
95
93
  }
96
-
94
+ if (data.hasOwnProperty('startedAt')) {
95
+ obj['startedAt'] = _ApiClient["default"].convertToType(data['startedAt'], 'String');
96
+ }
97
97
  if (data.hasOwnProperty('userTask')) {
98
98
  obj['userTask'] = _ApiClient["default"].convertToType(data['userTask'], 'String');
99
99
  }
100
-
101
100
  if (data.hasOwnProperty('taskState')) {
102
101
  obj['taskState'] = _ApiClient["default"].convertToType(data['taskState'], 'String');
103
102
  }
104
-
105
103
  if (data.hasOwnProperty('error')) {
106
104
  obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
107
105
  }
108
-
109
106
  if (data.hasOwnProperty('bootOptions')) {
110
107
  obj['bootOptions'] = _InstanceBootOptions["default"].constructFromObject(data['bootOptions']);
111
108
  }
112
-
113
109
  if (data.hasOwnProperty('serviceIp')) {
114
110
  obj['serviceIp'] = _ApiClient["default"].convertToType(data['serviceIp'], 'String');
115
111
  }
116
-
117
112
  if (data.hasOwnProperty('wifiIp')) {
118
113
  obj['wifiIp'] = _ApiClient["default"].convertToType(data['wifiIp'], 'String');
119
114
  }
120
-
115
+ if (data.hasOwnProperty('secondaryIp')) {
116
+ obj['secondaryIp'] = _ApiClient["default"].convertToType(data['secondaryIp'], 'String');
117
+ }
121
118
  if (data.hasOwnProperty('services')) {
122
119
  obj['services'] = _InstanceServices["default"].constructFromObject(data['services']);
123
120
  }
124
-
125
121
  if (data.hasOwnProperty('panicked')) {
126
122
  obj['panicked'] = _ApiClient["default"].convertToType(data['panicked'], 'Boolean');
127
123
  }
128
-
129
124
  if (data.hasOwnProperty('created')) {
130
125
  obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date');
131
126
  }
132
-
133
127
  if (data.hasOwnProperty('model')) {
134
128
  obj['model'] = _ApiClient["default"].convertToType(data['model'], 'String');
135
129
  }
136
-
137
130
  if (data.hasOwnProperty('fwpackage')) {
138
131
  obj['fwpackage'] = _ApiClient["default"].convertToType(data['fwpackage'], 'String');
139
132
  }
140
-
141
133
  if (data.hasOwnProperty('os')) {
142
134
  obj['os'] = _ApiClient["default"].convertToType(data['os'], 'String');
143
135
  }
144
-
145
136
  if (data.hasOwnProperty('agent')) {
146
- obj['agent'] = _ApiClient["default"].convertToType(data['agent'], 'String');
137
+ obj['agent'] = _InstanceAgentState["default"].constructFromObject(data['agent']);
147
138
  }
148
-
149
139
  if (data.hasOwnProperty('netmon')) {
150
140
  obj['netmon'] = _InstanceNetmonState["default"].constructFromObject(data['netmon']);
151
141
  }
152
-
142
+ if (data.hasOwnProperty('netdump')) {
143
+ obj['netdump'] = _InstanceNetdumpState["default"].constructFromObject(data['netdump']);
144
+ }
153
145
  if (data.hasOwnProperty('exposePort')) {
154
146
  obj['exposePort'] = _ApiClient["default"].convertToType(data['exposePort'], 'String');
155
147
  }
156
-
157
148
  if (data.hasOwnProperty('fault')) {
158
149
  obj['fault'] = _ApiClient["default"].convertToType(data['fault'], 'Boolean');
159
150
  }
160
-
161
151
  if (data.hasOwnProperty('patches')) {
162
152
  obj['patches'] = _ApiClient["default"].convertToType(data['patches'], ['String']);
163
153
  }
154
+ if (data.hasOwnProperty('createdBy')) {
155
+ obj['createdBy'] = _CreatedBy["default"].constructFromObject(data['createdBy']);
156
+ }
164
157
  }
165
-
166
158
  return obj;
167
159
  }
168
- }]);
169
160
 
161
+ /**
162
+ * Validates the JSON data with respect to <code>Instance</code>.
163
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
164
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Instance</code>.
165
+ */
166
+ }, {
167
+ key: "validateJSON",
168
+ value: function validateJSON(data) {
169
+ // ensure the json data is a string
170
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
171
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
172
+ }
173
+ // ensure the json data is a string
174
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
175
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
176
+ }
177
+ // ensure the json data is a string
178
+ if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
179
+ throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
180
+ }
181
+ // ensure the json data is a string
182
+ if (data['flavor'] && !(typeof data['flavor'] === 'string' || data['flavor'] instanceof String)) {
183
+ throw new Error("Expected the field `flavor` to be a primitive type in the JSON string but got " + data['flavor']);
184
+ }
185
+ // ensure the json data is a string
186
+ if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
187
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
188
+ }
189
+ // ensure the json data is a string
190
+ if (data['project'] && !(typeof data['project'] === 'string' || data['project'] instanceof String)) {
191
+ throw new Error("Expected the field `project` to be a primitive type in the JSON string but got " + data['project']);
192
+ }
193
+ // ensure the json data is a string
194
+ if (data['startedAt'] && !(typeof data['startedAt'] === 'string' || data['startedAt'] instanceof String)) {
195
+ throw new Error("Expected the field `startedAt` to be a primitive type in the JSON string but got " + data['startedAt']);
196
+ }
197
+ // ensure the json data is a string
198
+ if (data['userTask'] && !(typeof data['userTask'] === 'string' || data['userTask'] instanceof String)) {
199
+ throw new Error("Expected the field `userTask` to be a primitive type in the JSON string but got " + data['userTask']);
200
+ }
201
+ // ensure the json data is a string
202
+ if (data['taskState'] && !(typeof data['taskState'] === 'string' || data['taskState'] instanceof String)) {
203
+ throw new Error("Expected the field `taskState` to be a primitive type in the JSON string but got " + data['taskState']);
204
+ }
205
+ // ensure the json data is a string
206
+ if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) {
207
+ throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
208
+ }
209
+ // validate the optional field `bootOptions`
210
+ if (data['bootOptions']) {
211
+ // data not null
212
+ _InstanceBootOptions["default"].validateJSON(data['bootOptions']);
213
+ }
214
+ // ensure the json data is a string
215
+ if (data['serviceIp'] && !(typeof data['serviceIp'] === 'string' || data['serviceIp'] instanceof String)) {
216
+ throw new Error("Expected the field `serviceIp` to be a primitive type in the JSON string but got " + data['serviceIp']);
217
+ }
218
+ // ensure the json data is a string
219
+ if (data['wifiIp'] && !(typeof data['wifiIp'] === 'string' || data['wifiIp'] instanceof String)) {
220
+ throw new Error("Expected the field `wifiIp` to be a primitive type in the JSON string but got " + data['wifiIp']);
221
+ }
222
+ // ensure the json data is a string
223
+ if (data['secondaryIp'] && !(typeof data['secondaryIp'] === 'string' || data['secondaryIp'] instanceof String)) {
224
+ throw new Error("Expected the field `secondaryIp` to be a primitive type in the JSON string but got " + data['secondaryIp']);
225
+ }
226
+ // validate the optional field `services`
227
+ if (data['services']) {
228
+ // data not null
229
+ _InstanceServices["default"].validateJSON(data['services']);
230
+ }
231
+ // ensure the json data is a string
232
+ if (data['model'] && !(typeof data['model'] === 'string' || data['model'] instanceof String)) {
233
+ throw new Error("Expected the field `model` to be a primitive type in the JSON string but got " + data['model']);
234
+ }
235
+ // ensure the json data is a string
236
+ if (data['fwpackage'] && !(typeof data['fwpackage'] === 'string' || data['fwpackage'] instanceof String)) {
237
+ throw new Error("Expected the field `fwpackage` to be a primitive type in the JSON string but got " + data['fwpackage']);
238
+ }
239
+ // ensure the json data is a string
240
+ if (data['os'] && !(typeof data['os'] === 'string' || data['os'] instanceof String)) {
241
+ throw new Error("Expected the field `os` to be a primitive type in the JSON string but got " + data['os']);
242
+ }
243
+ // validate the optional field `agent`
244
+ if (data['agent']) {
245
+ // data not null
246
+ _InstanceAgentState["default"].validateJSON(data['agent']);
247
+ }
248
+ // validate the optional field `netmon`
249
+ if (data['netmon']) {
250
+ // data not null
251
+ _InstanceNetmonState["default"].validateJSON(data['netmon']);
252
+ }
253
+ // validate the optional field `netdump`
254
+ if (data['netdump']) {
255
+ // data not null
256
+ _InstanceNetdumpState["default"].validateJSON(data['netdump']);
257
+ }
258
+ // ensure the json data is a string
259
+ if (data['exposePort'] && !(typeof data['exposePort'] === 'string' || data['exposePort'] instanceof String)) {
260
+ throw new Error("Expected the field `exposePort` to be a primitive type in the JSON string but got " + data['exposePort']);
261
+ }
262
+ // ensure the json data is an array
263
+ if (!Array.isArray(data['patches'])) {
264
+ throw new Error("Expected the field `patches` to be an array in the JSON data but got " + data['patches']);
265
+ }
266
+ // validate the optional field `createdBy`
267
+ if (data['createdBy']) {
268
+ // data not null
269
+ _CreatedBy["default"].validateJSON(data['createdBy']);
270
+ }
271
+ return true;
272
+ }
273
+ }]);
170
274
  return Instance;
171
275
  }();
172
276
  /**
173
277
  * Instance Identifier
174
278
  * @member {String} id
175
279
  */
176
-
177
-
178
280
  Instance.prototype['id'] = undefined;
281
+
179
282
  /**
180
283
  * Instance Name
181
284
  * @member {String} name
182
285
  */
183
-
184
286
  Instance.prototype['name'] = undefined;
287
+
185
288
  /**
186
289
  * Key used to encrypt the Instance
187
290
  * @member {String} key
188
291
  */
189
-
190
292
  Instance.prototype['key'] = undefined;
293
+
191
294
  /**
192
295
  * The type of virtual machine this is
193
296
  * @member {String} flavor
194
297
  */
195
-
196
298
  Instance.prototype['flavor'] = undefined;
299
+
197
300
  /**
301
+ *
198
302
  * @member {String} type
199
303
  */
200
-
201
304
  Instance.prototype['type'] = undefined;
305
+
202
306
  /**
203
307
  * The projectId of the project this instance belongs to
204
308
  * @member {String} project
205
309
  */
206
-
207
310
  Instance.prototype['project'] = undefined;
311
+
208
312
  /**
209
313
  * @member {module:model/InstanceState} state
210
314
  */
211
-
212
315
  Instance.prototype['state'] = undefined;
316
+
213
317
  /**
214
318
  * Time the state of the instance last changed
215
319
  * @member {Date} stateChanged
216
320
  */
217
-
218
321
  Instance.prototype['stateChanged'] = undefined;
322
+
323
+ /**
324
+ * Time the instance was started
325
+ * @member {String} startedAt
326
+ */
327
+ Instance.prototype['startedAt'] = undefined;
328
+
219
329
  /**
220
330
  * Currently executing User Task
221
331
  * @member {String} userTask
222
332
  */
223
-
224
333
  Instance.prototype['userTask'] = undefined;
334
+
225
335
  /**
226
336
  * Current task state if any
227
337
  * @member {String} taskState
228
338
  */
229
-
230
339
  Instance.prototype['taskState'] = undefined;
340
+
231
341
  /**
232
342
  * Current error state if any
233
343
  * @member {String} error
234
344
  */
235
-
236
345
  Instance.prototype['error'] = undefined;
346
+
237
347
  /**
238
348
  * @member {module:model/InstanceBootOptions} bootOptions
239
349
  */
240
-
241
350
  Instance.prototype['bootOptions'] = undefined;
351
+
242
352
  /**
243
353
  * Services IP Address
244
354
  * @member {String} serviceIp
245
355
  */
246
-
247
356
  Instance.prototype['serviceIp'] = undefined;
357
+
248
358
  /**
249
359
  * LAN IP Address
250
360
  * @member {String} wifiIp
251
361
  */
252
-
253
362
  Instance.prototype['wifiIp'] = undefined;
363
+
254
364
  /**
255
- * @member {module:model/InstanceServices} services
365
+ * Secondary Inteface LAN IP Address (if supported)
366
+ * @member {String} secondaryIp
256
367
  */
368
+ Instance.prototype['secondaryIp'] = undefined;
257
369
 
370
+ /**
371
+ * @member {module:model/InstanceServices} services
372
+ */
258
373
  Instance.prototype['services'] = undefined;
374
+
259
375
  /**
376
+ *
260
377
  * @member {Boolean} panicked
261
378
  */
262
-
263
379
  Instance.prototype['panicked'] = undefined;
380
+
264
381
  /**
265
382
  * Time instance was created
266
383
  * @member {Date} created
267
384
  */
268
-
269
385
  Instance.prototype['created'] = undefined;
386
+
270
387
  /**
271
388
  * Model of virtual machine device
272
389
  * @member {String} model
273
390
  */
274
-
275
391
  Instance.prototype['model'] = undefined;
392
+
276
393
  /**
277
394
  * URL that package used to create this instance is available at
278
395
  * @member {String} fwpackage
279
396
  */
280
-
281
397
  Instance.prototype['fwpackage'] = undefined;
398
+
282
399
  /**
400
+ *
283
401
  * @member {String} os
284
402
  */
285
-
286
403
  Instance.prototype['os'] = undefined;
404
+
287
405
  /**
288
- * @member {String} agent
406
+ * @member {module:model/InstanceAgentState} agent
289
407
  */
290
-
291
408
  Instance.prototype['agent'] = undefined;
409
+
292
410
  /**
293
411
  * @member {module:model/InstanceNetmonState} netmon
294
412
  */
295
-
296
413
  Instance.prototype['netmon'] = undefined;
414
+
297
415
  /**
298
- * @member {String} exposePort
416
+ * @member {module:model/InstanceNetdumpState} netdump
299
417
  */
418
+ Instance.prototype['netdump'] = undefined;
300
419
 
420
+ /**
421
+ *
422
+ * @member {String} exposePort
423
+ */
301
424
  Instance.prototype['exposePort'] = undefined;
425
+
302
426
  /**
427
+ *
303
428
  * @member {Boolean} fault
304
429
  */
305
-
306
430
  Instance.prototype['fault'] = undefined;
431
+
307
432
  /**
433
+ *
308
434
  * @member {Array.<String>} patches
309
435
  */
310
-
311
436
  Instance.prototype['patches'] = undefined;
437
+
438
+ /**
439
+ * @member {module:model/CreatedBy} createdBy
440
+ */
441
+ Instance.prototype['createdBy'] = undefined;
312
442
  var _default = Instance;
313
443
  exports["default"] = _default;
@@ -0,0 +1,106 @@
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 InstanceAgentState model module.
28
+ * @module model/InstanceAgentState
29
+ * @version 0.3.2
30
+ */
31
+ var InstanceAgentState = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>InstanceAgentState</code>.
34
+ *
35
+ * @alias module:model/InstanceAgentState
36
+ */
37
+ function InstanceAgentState() {
38
+ _classCallCheck(this, InstanceAgentState);
39
+ InstanceAgentState.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(InstanceAgentState, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>InstanceAgentState</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/InstanceAgentState} obj Optional instance to populate.
56
+ * @return {module:model/InstanceAgentState} The populated <code>InstanceAgentState</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new InstanceAgentState();
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
+ }
70
+ return obj;
71
+ }
72
+
73
+ /**
74
+ * Validates the JSON data with respect to <code>InstanceAgentState</code>.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>InstanceAgentState</code>.
77
+ */
78
+ }, {
79
+ key: "validateJSON",
80
+ value: function validateJSON(data) {
81
+ // ensure the json data is a string
82
+ if (data['hash'] && !(typeof data['hash'] === 'string' || data['hash'] instanceof String)) {
83
+ throw new Error("Expected the field `hash` to be a primitive type in the JSON string but got " + data['hash']);
84
+ }
85
+ // ensure the json data is a string
86
+ if (data['info'] && !(typeof data['info'] === 'string' || data['info'] instanceof String)) {
87
+ throw new Error("Expected the field `info` to be a primitive type in the JSON string but got " + data['info']);
88
+ }
89
+ return true;
90
+ }
91
+ }]);
92
+ return InstanceAgentState;
93
+ }();
94
+ /**
95
+ *
96
+ * @member {String} hash
97
+ */
98
+ InstanceAgentState.prototype['hash'] = undefined;
99
+
100
+ /**
101
+ *
102
+ * @member {String} info
103
+ */
104
+ InstanceAgentState.prototype['info'] = undefined;
105
+ var _default = InstanceAgentState;
106
+ exports["default"] = _default;