@openshift-migration-advisor/agent-sdk 0.8.0 → 0.12.0-d4bdc4301890
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/.openapi-generator/FILES +20 -2
- package/.openapi-generator/VERSION +1 -1
- package/README.md +29 -17
- package/dist/apis/DefaultApi.d.ts +260 -130
- package/dist/apis/DefaultApi.js +313 -172
- package/dist/esm/apis/DefaultApi.d.ts +260 -130
- package/dist/esm/apis/DefaultApi.js +295 -154
- package/dist/esm/models/InspectorStatus.d.ts +20 -7
- package/dist/esm/models/InspectorStatus.js +12 -7
- package/dist/esm/models/RightsizingCollectRequest.d.ts +70 -0
- package/dist/esm/models/RightsizingCollectRequest.js +56 -0
- package/dist/esm/models/RightsizingMetricStats.d.ts +62 -0
- package/dist/esm/models/RightsizingMetricStats.js +63 -0
- package/dist/esm/models/RightsizingReport.d.ts +81 -0
- package/dist/esm/models/RightsizingReport.js +76 -0
- package/dist/esm/models/RightsizingReportListResponse.d.ts +39 -0
- package/dist/esm/models/RightsizingReportListResponse.js +48 -0
- package/dist/esm/models/RightsizingReportSummary.d.ts +74 -0
- package/dist/esm/models/RightsizingReportSummary.js +71 -0
- package/dist/esm/models/RightsizingVMReport.d.ts +53 -0
- package/dist/esm/models/RightsizingVMReport.js +57 -0
- package/dist/esm/models/StartInspectionRequest.d.ts +32 -0
- package/dist/esm/models/StartInspectionRequest.js +43 -0
- package/dist/esm/models/VMs.d.ts +18 -0
- package/dist/esm/models/VMs.js +4 -0
- package/dist/esm/models/VirtualMachine.d.ts +31 -1
- package/dist/esm/models/VirtualMachine.js +12 -4
- package/dist/esm/models/VirtualMachineDetail.d.ts +3 -3
- package/dist/esm/models/VirtualMachineDetail.js +3 -3
- package/dist/esm/models/VmInspectionConcern.d.ts +44 -0
- package/dist/esm/models/VmInspectionConcern.js +51 -0
- package/dist/esm/models/VmInspectionResults.d.ts +33 -0
- package/dist/esm/models/VmInspectionResults.js +42 -0
- package/dist/esm/models/VmInspectionStatus.d.ts +0 -1
- package/dist/esm/models/VmInspectionStatus.js +1 -2
- package/dist/esm/models/VmUtilizationDetails.d.ts +98 -0
- package/dist/esm/models/VmUtilizationDetails.js +87 -0
- package/dist/esm/models/index.d.ts +10 -1
- package/dist/esm/models/index.js +10 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/InspectorStatus.d.ts +20 -7
- package/dist/models/InspectorStatus.js +12 -7
- package/dist/models/RightsizingCollectRequest.d.ts +70 -0
- package/dist/models/RightsizingCollectRequest.js +63 -0
- package/dist/models/RightsizingMetricStats.d.ts +62 -0
- package/dist/models/RightsizingMetricStats.js +70 -0
- package/dist/models/RightsizingReport.d.ts +81 -0
- package/dist/models/RightsizingReport.js +83 -0
- package/dist/models/RightsizingReportListResponse.d.ts +39 -0
- package/dist/models/RightsizingReportListResponse.js +55 -0
- package/dist/models/RightsizingReportSummary.d.ts +74 -0
- package/dist/models/RightsizingReportSummary.js +78 -0
- package/dist/models/RightsizingVMReport.d.ts +53 -0
- package/dist/models/RightsizingVMReport.js +64 -0
- package/dist/models/StartInspectionRequest.d.ts +32 -0
- package/dist/models/StartInspectionRequest.js +50 -0
- package/dist/models/VMs.d.ts +18 -0
- package/dist/models/VMs.js +4 -0
- package/dist/models/VirtualMachine.d.ts +31 -1
- package/dist/models/VirtualMachine.js +12 -4
- package/dist/models/VirtualMachineDetail.d.ts +3 -3
- package/dist/models/VirtualMachineDetail.js +3 -3
- package/dist/models/VmInspectionConcern.d.ts +44 -0
- package/dist/models/VmInspectionConcern.js +58 -0
- package/dist/models/VmInspectionResults.d.ts +33 -0
- package/dist/models/VmInspectionResults.js +49 -0
- package/dist/models/VmInspectionStatus.d.ts +0 -1
- package/dist/models/VmInspectionStatus.js +1 -2
- package/dist/models/VmUtilizationDetails.d.ts +98 -0
- package/dist/models/VmUtilizationDetails.js +94 -0
- package/dist/models/index.d.ts +10 -1
- package/dist/models/index.js +10 -1
- package/dist/runtime.js +1 -1
- package/docs/DefaultApi.md +368 -163
- package/docs/InspectorStatus.md +4 -0
- package/docs/RightsizingCollectRequest.md +46 -0
- package/docs/RightsizingMetricStats.md +44 -0
- package/docs/RightsizingReport.md +50 -0
- package/docs/RightsizingReportListResponse.md +36 -0
- package/docs/RightsizingReportSummary.md +49 -0
- package/docs/RightsizingVMReport.md +40 -0
- package/docs/{InspectorStartRequest.md → StartInspectionRequest.md} +5 -6
- package/docs/VMs.md +4 -0
- package/docs/VirtualMachine.md +12 -2
- package/docs/VirtualMachineDetail.md +1 -1
- package/docs/VmInspectionConcern.md +39 -0
- package/docs/VmInspectionResults.md +35 -0
- package/docs/VmUtilizationDetails.md +56 -0
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +564 -285
- package/src/models/InspectorStatus.ts +37 -7
- package/src/models/RightsizingCollectRequest.ts +123 -0
- package/src/models/RightsizingMetricStats.ts +111 -0
- package/src/models/RightsizingReport.ts +146 -0
- package/src/models/RightsizingReportListResponse.ts +83 -0
- package/src/models/RightsizingReportSummary.ts +129 -0
- package/src/models/RightsizingVMReport.ts +101 -0
- package/src/models/StartInspectionRequest.ts +66 -0
- package/src/models/VMs.ts +18 -0
- package/src/models/VirtualMachine.ts +43 -4
- package/src/models/VirtualMachineDetail.ts +11 -11
- package/src/models/VmInspectionConcern.ts +84 -0
- package/src/models/VmInspectionResults.ts +73 -0
- package/src/models/VmInspectionStatus.ts +1 -2
- package/src/models/VmUtilizationDetails.ts +165 -0
- package/src/models/index.ts +10 -1
- package/src/runtime.ts +1 -2
- package/dist/esm/models/InspectorStartRequest.d.ts +0 -39
- package/dist/esm/models/InspectorStartRequest.js +0 -48
- package/dist/models/InspectorStartRequest.d.ts +0 -39
- package/dist/models/InspectorStartRequest.js +0 -55
- package/src/models/InspectorStartRequest.ts +0 -83
package/dist/apis/DefaultApi.js
CHANGED
|
@@ -24,51 +24,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.DefaultApi = void 0;
|
|
26
26
|
const runtime = require("../runtime.js");
|
|
27
|
-
const
|
|
27
|
+
const AgentModeRequest_js_1 = require("../models/AgentModeRequest.js");
|
|
28
|
+
const AgentStatus_js_1 = require("../models/AgentStatus.js");
|
|
29
|
+
const CollectorStartRequest_js_1 = require("../models/CollectorStartRequest.js");
|
|
30
|
+
const CollectorStatus_js_1 = require("../models/CollectorStatus.js");
|
|
31
|
+
const CreateGroupRequest_js_1 = require("../models/CreateGroupRequest.js");
|
|
32
|
+
const GetInventory200Response_js_1 = require("../models/GetInventory200Response.js");
|
|
33
|
+
const Group_js_1 = require("../models/Group.js");
|
|
34
|
+
const GroupListResponse_js_1 = require("../models/GroupListResponse.js");
|
|
35
|
+
const GroupResponse_js_1 = require("../models/GroupResponse.js");
|
|
36
|
+
const InspectorStatus_js_1 = require("../models/InspectorStatus.js");
|
|
37
|
+
const RightsizingCollectRequest_js_1 = require("../models/RightsizingCollectRequest.js");
|
|
38
|
+
const RightsizingReport_js_1 = require("../models/RightsizingReport.js");
|
|
39
|
+
const RightsizingReportListResponse_js_1 = require("../models/RightsizingReportListResponse.js");
|
|
40
|
+
const RightsizingReportSummary_js_1 = require("../models/RightsizingReportSummary.js");
|
|
41
|
+
const StartInspectionRequest_js_1 = require("../models/StartInspectionRequest.js");
|
|
42
|
+
const UpdateGroupRequest_js_1 = require("../models/UpdateGroupRequest.js");
|
|
43
|
+
const VcenterCredentials_js_1 = require("../models/VcenterCredentials.js");
|
|
44
|
+
const VddkProperties_js_1 = require("../models/VddkProperties.js");
|
|
45
|
+
const VersionInfo_js_1 = require("../models/VersionInfo.js");
|
|
46
|
+
const VirtualMachineDetail_js_1 = require("../models/VirtualMachineDetail.js");
|
|
47
|
+
const VirtualMachineListResponse_js_1 = require("../models/VirtualMachineListResponse.js");
|
|
48
|
+
const VmInspectionStatus_js_1 = require("../models/VmInspectionStatus.js");
|
|
49
|
+
const VmUtilizationDetails_js_1 = require("../models/VmUtilizationDetails.js");
|
|
28
50
|
/**
|
|
29
51
|
*
|
|
30
52
|
*/
|
|
31
53
|
class DefaultApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Creates request options for addVMsToInspection without sending the request
|
|
34
|
-
*/
|
|
35
|
-
addVMsToInspectionRequestOpts(requestParameters) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
if (requestParameters['requestBody'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling addVMsToInspection().');
|
|
39
|
-
}
|
|
40
|
-
const queryParameters = {};
|
|
41
|
-
const headerParameters = {};
|
|
42
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
-
let urlPath = `/vms/inspector`;
|
|
44
|
-
return {
|
|
45
|
-
path: urlPath,
|
|
46
|
-
method: 'PATCH',
|
|
47
|
-
headers: headerParameters,
|
|
48
|
-
query: queryParameters,
|
|
49
|
-
body: requestParameters['requestBody'],
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Add more VMs to inspection queue
|
|
55
|
-
*/
|
|
56
|
-
addVMsToInspectionRaw(requestParameters, initOverrides) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const requestOptions = yield this.addVMsToInspectionRequestOpts(requestParameters);
|
|
59
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.InspectorStatusFromJSON)(jsonValue));
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Add more VMs to inspection queue
|
|
65
|
-
*/
|
|
66
|
-
addVMsToInspection(requestParameters, initOverrides) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const response = yield this.addVMsToInspectionRaw(requestParameters, initOverrides);
|
|
69
|
-
return yield response.value();
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
54
|
/**
|
|
73
55
|
* Creates request options for createGroup without sending the request
|
|
74
56
|
*/
|
|
@@ -86,7 +68,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
86
68
|
method: 'POST',
|
|
87
69
|
headers: headerParameters,
|
|
88
70
|
query: queryParameters,
|
|
89
|
-
body: (0,
|
|
71
|
+
body: (0, CreateGroupRequest_js_1.CreateGroupRequestToJSON)(requestParameters['createGroupRequest']),
|
|
90
72
|
};
|
|
91
73
|
});
|
|
92
74
|
}
|
|
@@ -97,7 +79,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
97
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
80
|
const requestOptions = yield this.createGroupRequestOpts(requestParameters);
|
|
99
81
|
const response = yield this.request(requestOptions, initOverrides);
|
|
100
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
82
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Group_js_1.GroupFromJSON)(jsonValue));
|
|
101
83
|
});
|
|
102
84
|
}
|
|
103
85
|
/**
|
|
@@ -120,7 +102,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
120
102
|
const queryParameters = {};
|
|
121
103
|
const headerParameters = {};
|
|
122
104
|
let urlPath = `/groups/{id}`;
|
|
123
|
-
urlPath = urlPath.replace(
|
|
105
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
124
106
|
return {
|
|
125
107
|
path: urlPath,
|
|
126
108
|
method: 'DELETE',
|
|
@@ -170,7 +152,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
170
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
153
|
const requestOptions = yield this.getAgentStatusRequestOpts();
|
|
172
154
|
const response = yield this.request(requestOptions, initOverrides);
|
|
173
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
155
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, AgentStatus_js_1.AgentStatusFromJSON)(jsonValue));
|
|
174
156
|
});
|
|
175
157
|
}
|
|
176
158
|
/**
|
|
@@ -205,7 +187,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
205
187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
188
|
const requestOptions = yield this.getCollectorStatusRequestOpts();
|
|
207
189
|
const response = yield this.request(requestOptions, initOverrides);
|
|
208
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CollectorStatus_js_1.CollectorStatusFromJSON)(jsonValue));
|
|
209
191
|
});
|
|
210
192
|
}
|
|
211
193
|
/**
|
|
@@ -237,7 +219,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
237
219
|
}
|
|
238
220
|
const headerParameters = {};
|
|
239
221
|
let urlPath = `/groups/{id}`;
|
|
240
|
-
urlPath = urlPath.replace(
|
|
222
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
241
223
|
return {
|
|
242
224
|
path: urlPath,
|
|
243
225
|
method: 'GET',
|
|
@@ -253,7 +235,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
253
235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
236
|
const requestOptions = yield this.getGroupRequestOpts(requestParameters);
|
|
255
237
|
const response = yield this.request(requestOptions, initOverrides);
|
|
256
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
238
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GroupResponse_js_1.GroupResponseFromJSON)(jsonValue));
|
|
257
239
|
});
|
|
258
240
|
}
|
|
259
241
|
/**
|
|
@@ -268,11 +250,17 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
268
250
|
/**
|
|
269
251
|
* Creates request options for getInspectorStatus without sending the request
|
|
270
252
|
*/
|
|
271
|
-
getInspectorStatusRequestOpts() {
|
|
253
|
+
getInspectorStatusRequestOpts(requestParameters) {
|
|
272
254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
255
|
const queryParameters = {};
|
|
256
|
+
if (requestParameters['includeVddk'] != null) {
|
|
257
|
+
queryParameters['includeVddk'] = requestParameters['includeVddk'];
|
|
258
|
+
}
|
|
259
|
+
if (requestParameters['includeCredentials'] != null) {
|
|
260
|
+
queryParameters['includeCredentials'] = requestParameters['includeCredentials'];
|
|
261
|
+
}
|
|
274
262
|
const headerParameters = {};
|
|
275
|
-
let urlPath = `/
|
|
263
|
+
let urlPath = `/inspector`;
|
|
276
264
|
return {
|
|
277
265
|
path: urlPath,
|
|
278
266
|
method: 'GET',
|
|
@@ -284,19 +272,54 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
284
272
|
/**
|
|
285
273
|
* Get inspector status
|
|
286
274
|
*/
|
|
287
|
-
getInspectorStatusRaw(initOverrides) {
|
|
275
|
+
getInspectorStatusRaw(requestParameters, initOverrides) {
|
|
288
276
|
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
-
const requestOptions = yield this.getInspectorStatusRequestOpts();
|
|
277
|
+
const requestOptions = yield this.getInspectorStatusRequestOpts(requestParameters);
|
|
290
278
|
const response = yield this.request(requestOptions, initOverrides);
|
|
291
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
279
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, InspectorStatus_js_1.InspectorStatusFromJSON)(jsonValue));
|
|
292
280
|
});
|
|
293
281
|
}
|
|
294
282
|
/**
|
|
295
283
|
* Get inspector status
|
|
296
284
|
*/
|
|
297
|
-
getInspectorStatus(
|
|
285
|
+
getInspectorStatus() {
|
|
286
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
287
|
+
const response = yield this.getInspectorStatusRaw(requestParameters, initOverrides);
|
|
288
|
+
return yield response.value();
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Creates request options for getInspectorVddkStatus without sending the request
|
|
293
|
+
*/
|
|
294
|
+
getInspectorVddkStatusRequestOpts() {
|
|
298
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
-
const
|
|
296
|
+
const queryParameters = {};
|
|
297
|
+
const headerParameters = {};
|
|
298
|
+
let urlPath = `/inspector/vddk`;
|
|
299
|
+
return {
|
|
300
|
+
path: urlPath,
|
|
301
|
+
method: 'GET',
|
|
302
|
+
headers: headerParameters,
|
|
303
|
+
query: queryParameters,
|
|
304
|
+
};
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Get VDDK status
|
|
309
|
+
*/
|
|
310
|
+
getInspectorVddkStatusRaw(initOverrides) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
const requestOptions = yield this.getInspectorVddkStatusRequestOpts();
|
|
313
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
314
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VddkProperties_js_1.VddkPropertiesFromJSON)(jsonValue));
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Get VDDK status
|
|
319
|
+
*/
|
|
320
|
+
getInspectorVddkStatus(initOverrides) {
|
|
321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
+
const response = yield this.getInspectorVddkStatusRaw(initOverrides);
|
|
300
323
|
return yield response.value();
|
|
301
324
|
});
|
|
302
325
|
}
|
|
@@ -329,7 +352,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
329
352
|
return __awaiter(this, void 0, void 0, function* () {
|
|
330
353
|
const requestOptions = yield this.getInventoryRequestOpts(requestParameters);
|
|
331
354
|
const response = yield this.request(requestOptions, initOverrides);
|
|
332
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
355
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetInventory200Response_js_1.GetInventory200ResponseFromJSON)(jsonValue));
|
|
333
356
|
});
|
|
334
357
|
}
|
|
335
358
|
/**
|
|
@@ -341,6 +364,45 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
341
364
|
return yield response.value();
|
|
342
365
|
});
|
|
343
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Creates request options for getRightsizingReport without sending the request
|
|
369
|
+
*/
|
|
370
|
+
getRightsizingReportRequestOpts(requestParameters) {
|
|
371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
372
|
+
if (requestParameters['id'] == null) {
|
|
373
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRightsizingReport().');
|
|
374
|
+
}
|
|
375
|
+
const queryParameters = {};
|
|
376
|
+
const headerParameters = {};
|
|
377
|
+
let urlPath = `/rightsizing/{id}`;
|
|
378
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
379
|
+
return {
|
|
380
|
+
path: urlPath,
|
|
381
|
+
method: 'GET',
|
|
382
|
+
headers: headerParameters,
|
|
383
|
+
query: queryParameters,
|
|
384
|
+
};
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Get a specific rightsizing report with full VM metrics
|
|
389
|
+
*/
|
|
390
|
+
getRightsizingReportRaw(requestParameters, initOverrides) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
const requestOptions = yield this.getRightsizingReportRequestOpts(requestParameters);
|
|
393
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
394
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingReport_js_1.RightsizingReportFromJSON)(jsonValue));
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Get a specific rightsizing report with full VM metrics
|
|
399
|
+
*/
|
|
400
|
+
getRightsizingReport(requestParameters, initOverrides) {
|
|
401
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
402
|
+
const response = yield this.getRightsizingReportRaw(requestParameters, initOverrides);
|
|
403
|
+
return yield response.value();
|
|
404
|
+
});
|
|
405
|
+
}
|
|
344
406
|
/**
|
|
345
407
|
* Creates request options for getVM without sending the request
|
|
346
408
|
*/
|
|
@@ -352,7 +414,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
352
414
|
const queryParameters = {};
|
|
353
415
|
const headerParameters = {};
|
|
354
416
|
let urlPath = `/vms/{id}`;
|
|
355
|
-
urlPath = urlPath.replace(
|
|
417
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
356
418
|
return {
|
|
357
419
|
path: urlPath,
|
|
358
420
|
method: 'GET',
|
|
@@ -368,7 +430,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
368
430
|
return __awaiter(this, void 0, void 0, function* () {
|
|
369
431
|
const requestOptions = yield this.getVMRequestOpts(requestParameters);
|
|
370
432
|
const response = yield this.request(requestOptions, initOverrides);
|
|
371
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
433
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VirtualMachineDetail_js_1.VirtualMachineDetailFromJSON)(jsonValue));
|
|
372
434
|
});
|
|
373
435
|
}
|
|
374
436
|
/**
|
|
@@ -381,17 +443,17 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
381
443
|
});
|
|
382
444
|
}
|
|
383
445
|
/**
|
|
384
|
-
* Creates request options for
|
|
446
|
+
* Creates request options for getVMUtilization without sending the request
|
|
385
447
|
*/
|
|
386
|
-
|
|
448
|
+
getVMUtilizationRequestOpts(requestParameters) {
|
|
387
449
|
return __awaiter(this, void 0, void 0, function* () {
|
|
388
450
|
if (requestParameters['id'] == null) {
|
|
389
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
451
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getVMUtilization().');
|
|
390
452
|
}
|
|
391
453
|
const queryParameters = {};
|
|
392
454
|
const headerParameters = {};
|
|
393
|
-
let urlPath = `/vms/{id}/
|
|
394
|
-
urlPath = urlPath.replace(
|
|
455
|
+
let urlPath = `/vms/{id}/utilization`;
|
|
456
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
395
457
|
return {
|
|
396
458
|
path: urlPath,
|
|
397
459
|
method: 'GET',
|
|
@@ -401,21 +463,21 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
401
463
|
});
|
|
402
464
|
}
|
|
403
465
|
/**
|
|
404
|
-
* Get
|
|
466
|
+
* Get utilization breakdown for a specific VM
|
|
405
467
|
*/
|
|
406
|
-
|
|
468
|
+
getVMUtilizationRaw(requestParameters, initOverrides) {
|
|
407
469
|
return __awaiter(this, void 0, void 0, function* () {
|
|
408
|
-
const requestOptions = yield this.
|
|
470
|
+
const requestOptions = yield this.getVMUtilizationRequestOpts(requestParameters);
|
|
409
471
|
const response = yield this.request(requestOptions, initOverrides);
|
|
410
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
472
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VmUtilizationDetails_js_1.VmUtilizationDetailsFromJSON)(jsonValue));
|
|
411
473
|
});
|
|
412
474
|
}
|
|
413
475
|
/**
|
|
414
|
-
* Get
|
|
476
|
+
* Get utilization breakdown for a specific VM
|
|
415
477
|
*/
|
|
416
|
-
|
|
478
|
+
getVMUtilization(requestParameters, initOverrides) {
|
|
417
479
|
return __awaiter(this, void 0, void 0, function* () {
|
|
418
|
-
const response = yield this.
|
|
480
|
+
const response = yield this.getVMUtilizationRaw(requestParameters, initOverrides);
|
|
419
481
|
return yield response.value();
|
|
420
482
|
});
|
|
421
483
|
}
|
|
@@ -454,7 +516,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
454
516
|
return __awaiter(this, void 0, void 0, function* () {
|
|
455
517
|
const requestOptions = yield this.getVMsRequestOpts(requestParameters);
|
|
456
518
|
const response = yield this.request(requestOptions, initOverrides);
|
|
457
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
519
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VirtualMachineListResponse_js_1.VirtualMachineListResponseFromJSON)(jsonValue));
|
|
458
520
|
});
|
|
459
521
|
}
|
|
460
522
|
/**
|
|
@@ -466,41 +528,6 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
466
528
|
return yield response.value();
|
|
467
529
|
});
|
|
468
530
|
}
|
|
469
|
-
/**
|
|
470
|
-
* Creates request options for getVddkStatus without sending the request
|
|
471
|
-
*/
|
|
472
|
-
getVddkStatusRequestOpts() {
|
|
473
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
474
|
-
const queryParameters = {};
|
|
475
|
-
const headerParameters = {};
|
|
476
|
-
let urlPath = `/vddk`;
|
|
477
|
-
return {
|
|
478
|
-
path: urlPath,
|
|
479
|
-
method: 'GET',
|
|
480
|
-
headers: headerParameters,
|
|
481
|
-
query: queryParameters,
|
|
482
|
-
};
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Get VDDK status
|
|
487
|
-
*/
|
|
488
|
-
getVddkStatusRaw(initOverrides) {
|
|
489
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
490
|
-
const requestOptions = yield this.getVddkStatusRequestOpts();
|
|
491
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
492
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.VddkPropertiesFromJSON)(jsonValue));
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Get VDDK status
|
|
497
|
-
*/
|
|
498
|
-
getVddkStatus(initOverrides) {
|
|
499
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
500
|
-
const response = yield this.getVddkStatusRaw(initOverrides);
|
|
501
|
-
return yield response.value();
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
531
|
/**
|
|
505
532
|
* Creates request options for getVersion without sending the request
|
|
506
533
|
*/
|
|
@@ -524,7 +551,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
524
551
|
return __awaiter(this, void 0, void 0, function* () {
|
|
525
552
|
const requestOptions = yield this.getVersionRequestOpts();
|
|
526
553
|
const response = yield this.request(requestOptions, initOverrides);
|
|
527
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
554
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VersionInfo_js_1.VersionInfoFromJSON)(jsonValue));
|
|
528
555
|
});
|
|
529
556
|
}
|
|
530
557
|
/**
|
|
@@ -568,7 +595,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
568
595
|
return __awaiter(this, void 0, void 0, function* () {
|
|
569
596
|
const requestOptions = yield this.listGroupsRequestOpts(requestParameters);
|
|
570
597
|
const response = yield this.request(requestOptions, initOverrides);
|
|
571
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
598
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GroupListResponse_js_1.GroupListResponseFromJSON)(jsonValue));
|
|
572
599
|
});
|
|
573
600
|
}
|
|
574
601
|
/**
|
|
@@ -580,6 +607,137 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
580
607
|
return yield response.value();
|
|
581
608
|
});
|
|
582
609
|
}
|
|
610
|
+
/**
|
|
611
|
+
* Creates request options for listRightsizingReports without sending the request
|
|
612
|
+
*/
|
|
613
|
+
listRightsizingReportsRequestOpts() {
|
|
614
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
615
|
+
const queryParameters = {};
|
|
616
|
+
const headerParameters = {};
|
|
617
|
+
let urlPath = `/rightsizing`;
|
|
618
|
+
return {
|
|
619
|
+
path: urlPath,
|
|
620
|
+
method: 'GET',
|
|
621
|
+
headers: headerParameters,
|
|
622
|
+
query: queryParameters,
|
|
623
|
+
};
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* List all rightsizing reports
|
|
628
|
+
*/
|
|
629
|
+
listRightsizingReportsRaw(initOverrides) {
|
|
630
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
631
|
+
const requestOptions = yield this.listRightsizingReportsRequestOpts();
|
|
632
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
633
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingReportListResponse_js_1.RightsizingReportListResponseFromJSON)(jsonValue));
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* List all rightsizing reports
|
|
638
|
+
*/
|
|
639
|
+
listRightsizingReports(initOverrides) {
|
|
640
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
641
|
+
const response = yield this.listRightsizingReportsRaw(initOverrides);
|
|
642
|
+
return yield response.value();
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Creates request options for putInspectorCredentials without sending the request
|
|
647
|
+
*/
|
|
648
|
+
putInspectorCredentialsRequestOpts(requestParameters) {
|
|
649
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
650
|
+
if (requestParameters['vcenterCredentials'] == null) {
|
|
651
|
+
throw new runtime.RequiredError('vcenterCredentials', 'Required parameter "vcenterCredentials" was null or undefined when calling putInspectorCredentials().');
|
|
652
|
+
}
|
|
653
|
+
const queryParameters = {};
|
|
654
|
+
const headerParameters = {};
|
|
655
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
656
|
+
let urlPath = `/inspector/credentials`;
|
|
657
|
+
return {
|
|
658
|
+
path: urlPath,
|
|
659
|
+
method: 'PUT',
|
|
660
|
+
headers: headerParameters,
|
|
661
|
+
query: queryParameters,
|
|
662
|
+
body: (0, VcenterCredentials_js_1.VcenterCredentialsToJSON)(requestParameters['vcenterCredentials']),
|
|
663
|
+
};
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Set or replace inspector credentials
|
|
668
|
+
*/
|
|
669
|
+
putInspectorCredentialsRaw(requestParameters, initOverrides) {
|
|
670
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
671
|
+
const requestOptions = yield this.putInspectorCredentialsRequestOpts(requestParameters);
|
|
672
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
673
|
+
return new runtime.VoidApiResponse(response);
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Set or replace inspector credentials
|
|
678
|
+
*/
|
|
679
|
+
putInspectorCredentials(requestParameters, initOverrides) {
|
|
680
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
681
|
+
yield this.putInspectorCredentialsRaw(requestParameters, initOverrides);
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Creates request options for putInspectorVddk without sending the request
|
|
686
|
+
*/
|
|
687
|
+
putInspectorVddkRequestOpts(requestParameters) {
|
|
688
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
689
|
+
if (requestParameters['file'] == null) {
|
|
690
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling putInspectorVddk().');
|
|
691
|
+
}
|
|
692
|
+
const queryParameters = {};
|
|
693
|
+
const headerParameters = {};
|
|
694
|
+
const consumes = [
|
|
695
|
+
{ contentType: 'multipart/form-data' },
|
|
696
|
+
];
|
|
697
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
698
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
699
|
+
let formParams;
|
|
700
|
+
let useForm = false;
|
|
701
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
702
|
+
useForm = canConsumeForm;
|
|
703
|
+
if (useForm) {
|
|
704
|
+
formParams = new FormData();
|
|
705
|
+
}
|
|
706
|
+
else {
|
|
707
|
+
formParams = new URLSearchParams();
|
|
708
|
+
}
|
|
709
|
+
if (requestParameters['file'] != null) {
|
|
710
|
+
formParams.append('file', requestParameters['file']);
|
|
711
|
+
}
|
|
712
|
+
let urlPath = `/inspector/vddk`;
|
|
713
|
+
return {
|
|
714
|
+
path: urlPath,
|
|
715
|
+
method: 'PUT',
|
|
716
|
+
headers: headerParameters,
|
|
717
|
+
query: queryParameters,
|
|
718
|
+
body: formParams,
|
|
719
|
+
};
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Upload VDDK tarball
|
|
724
|
+
*/
|
|
725
|
+
putInspectorVddkRaw(requestParameters, initOverrides) {
|
|
726
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
727
|
+
const requestOptions = yield this.putInspectorVddkRequestOpts(requestParameters);
|
|
728
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
729
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VddkProperties_js_1.VddkPropertiesFromJSON)(jsonValue));
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Upload VDDK tarball
|
|
734
|
+
*/
|
|
735
|
+
putInspectorVddk(requestParameters, initOverrides) {
|
|
736
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
737
|
+
const response = yield this.putInspectorVddkRaw(requestParameters, initOverrides);
|
|
738
|
+
return yield response.value();
|
|
739
|
+
});
|
|
740
|
+
}
|
|
583
741
|
/**
|
|
584
742
|
* Creates request options for removeVMFromInspection without sending the request
|
|
585
743
|
*/
|
|
@@ -590,8 +748,8 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
590
748
|
}
|
|
591
749
|
const queryParameters = {};
|
|
592
750
|
const headerParameters = {};
|
|
593
|
-
let urlPath = `/vms/{id}/
|
|
594
|
-
urlPath = urlPath.replace(
|
|
751
|
+
let urlPath = `/vms/{id}/inspection`;
|
|
752
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
595
753
|
return {
|
|
596
754
|
path: urlPath,
|
|
597
755
|
method: 'DELETE',
|
|
@@ -607,7 +765,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
607
765
|
return __awaiter(this, void 0, void 0, function* () {
|
|
608
766
|
const requestOptions = yield this.removeVMFromInspectionRequestOpts(requestParameters);
|
|
609
767
|
const response = yield this.request(requestOptions, initOverrides);
|
|
610
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
768
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VmInspectionStatus_js_1.VmInspectionStatusFromJSON)(jsonValue));
|
|
611
769
|
});
|
|
612
770
|
}
|
|
613
771
|
/**
|
|
@@ -636,7 +794,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
636
794
|
method: 'POST',
|
|
637
795
|
headers: headerParameters,
|
|
638
796
|
query: queryParameters,
|
|
639
|
-
body: (0,
|
|
797
|
+
body: (0, AgentModeRequest_js_1.AgentModeRequestToJSON)(requestParameters['agentModeRequest']),
|
|
640
798
|
};
|
|
641
799
|
});
|
|
642
800
|
}
|
|
@@ -647,7 +805,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
647
805
|
return __awaiter(this, void 0, void 0, function* () {
|
|
648
806
|
const requestOptions = yield this.setAgentModeRequestOpts(requestParameters);
|
|
649
807
|
const response = yield this.request(requestOptions, initOverrides);
|
|
650
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
808
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, AgentStatus_js_1.AgentStatusFromJSON)(jsonValue));
|
|
651
809
|
});
|
|
652
810
|
}
|
|
653
811
|
/**
|
|
@@ -676,7 +834,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
676
834
|
method: 'POST',
|
|
677
835
|
headers: headerParameters,
|
|
678
836
|
query: queryParameters,
|
|
679
|
-
body: (0,
|
|
837
|
+
body: (0, CollectorStartRequest_js_1.CollectorStartRequestToJSON)(requestParameters['collectorStartRequest']),
|
|
680
838
|
};
|
|
681
839
|
});
|
|
682
840
|
}
|
|
@@ -687,7 +845,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
687
845
|
return __awaiter(this, void 0, void 0, function* () {
|
|
688
846
|
const requestOptions = yield this.startCollectorRequestOpts(requestParameters);
|
|
689
847
|
const response = yield this.request(requestOptions, initOverrides);
|
|
690
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
848
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CollectorStatus_js_1.CollectorStatusFromJSON)(jsonValue));
|
|
691
849
|
});
|
|
692
850
|
}
|
|
693
851
|
/**
|
|
@@ -704,19 +862,19 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
704
862
|
*/
|
|
705
863
|
startInspectionRequestOpts(requestParameters) {
|
|
706
864
|
return __awaiter(this, void 0, void 0, function* () {
|
|
707
|
-
if (requestParameters['
|
|
708
|
-
throw new runtime.RequiredError('
|
|
865
|
+
if (requestParameters['startInspectionRequest'] == null) {
|
|
866
|
+
throw new runtime.RequiredError('startInspectionRequest', 'Required parameter "startInspectionRequest" was null or undefined when calling startInspection().');
|
|
709
867
|
}
|
|
710
868
|
const queryParameters = {};
|
|
711
869
|
const headerParameters = {};
|
|
712
870
|
headerParameters['Content-Type'] = 'application/json';
|
|
713
|
-
let urlPath = `/
|
|
871
|
+
let urlPath = `/inspector`;
|
|
714
872
|
return {
|
|
715
873
|
path: urlPath,
|
|
716
874
|
method: 'POST',
|
|
717
875
|
headers: headerParameters,
|
|
718
876
|
query: queryParameters,
|
|
719
|
-
body: (0,
|
|
877
|
+
body: (0, StartInspectionRequest_js_1.StartInspectionRequestToJSON)(requestParameters['startInspectionRequest']),
|
|
720
878
|
};
|
|
721
879
|
});
|
|
722
880
|
}
|
|
@@ -727,7 +885,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
727
885
|
return __awaiter(this, void 0, void 0, function* () {
|
|
728
886
|
const requestOptions = yield this.startInspectionRequestOpts(requestParameters);
|
|
729
887
|
const response = yield this.request(requestOptions, initOverrides);
|
|
730
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
888
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, InspectorStatus_js_1.InspectorStatusFromJSON)(jsonValue));
|
|
731
889
|
});
|
|
732
890
|
}
|
|
733
891
|
/**
|
|
@@ -780,7 +938,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
780
938
|
return __awaiter(this, void 0, void 0, function* () {
|
|
781
939
|
const queryParameters = {};
|
|
782
940
|
const headerParameters = {};
|
|
783
|
-
let urlPath = `/
|
|
941
|
+
let urlPath = `/inspector`;
|
|
784
942
|
return {
|
|
785
943
|
path: urlPath,
|
|
786
944
|
method: 'DELETE',
|
|
@@ -796,7 +954,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
796
954
|
return __awaiter(this, void 0, void 0, function* () {
|
|
797
955
|
const requestOptions = yield this.stopInspectionRequestOpts();
|
|
798
956
|
const response = yield this.request(requestOptions, initOverrides);
|
|
799
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
957
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, InspectorStatus_js_1.InspectorStatusFromJSON)(jsonValue));
|
|
800
958
|
});
|
|
801
959
|
}
|
|
802
960
|
/**
|
|
@@ -809,103 +967,86 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
809
967
|
});
|
|
810
968
|
}
|
|
811
969
|
/**
|
|
812
|
-
* Creates request options for
|
|
970
|
+
* Creates request options for triggerRightsizingCollection without sending the request
|
|
813
971
|
*/
|
|
814
|
-
|
|
972
|
+
triggerRightsizingCollectionRequestOpts(requestParameters) {
|
|
815
973
|
return __awaiter(this, void 0, void 0, function* () {
|
|
816
|
-
if (requestParameters['
|
|
817
|
-
throw new runtime.RequiredError('
|
|
818
|
-
}
|
|
819
|
-
if (requestParameters['updateGroupRequest'] == null) {
|
|
820
|
-
throw new runtime.RequiredError('updateGroupRequest', 'Required parameter "updateGroupRequest" was null or undefined when calling updateGroup().');
|
|
974
|
+
if (requestParameters['rightsizingCollectRequest'] == null) {
|
|
975
|
+
throw new runtime.RequiredError('rightsizingCollectRequest', 'Required parameter "rightsizingCollectRequest" was null or undefined when calling triggerRightsizingCollection().');
|
|
821
976
|
}
|
|
822
977
|
const queryParameters = {};
|
|
823
978
|
const headerParameters = {};
|
|
824
979
|
headerParameters['Content-Type'] = 'application/json';
|
|
825
|
-
let urlPath = `/
|
|
826
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
980
|
+
let urlPath = `/rightsizing`;
|
|
827
981
|
return {
|
|
828
982
|
path: urlPath,
|
|
829
|
-
method: '
|
|
983
|
+
method: 'POST',
|
|
830
984
|
headers: headerParameters,
|
|
831
985
|
query: queryParameters,
|
|
832
|
-
body: (0,
|
|
986
|
+
body: (0, RightsizingCollectRequest_js_1.RightsizingCollectRequestToJSON)(requestParameters['rightsizingCollectRequest']),
|
|
833
987
|
};
|
|
834
988
|
});
|
|
835
989
|
}
|
|
836
990
|
/**
|
|
837
|
-
*
|
|
991
|
+
* Trigger rightsizing metrics collection
|
|
838
992
|
*/
|
|
839
|
-
|
|
993
|
+
triggerRightsizingCollectionRaw(requestParameters, initOverrides) {
|
|
840
994
|
return __awaiter(this, void 0, void 0, function* () {
|
|
841
|
-
const requestOptions = yield this.
|
|
995
|
+
const requestOptions = yield this.triggerRightsizingCollectionRequestOpts(requestParameters);
|
|
842
996
|
const response = yield this.request(requestOptions, initOverrides);
|
|
843
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
997
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingReportSummary_js_1.RightsizingReportSummaryFromJSON)(jsonValue));
|
|
844
998
|
});
|
|
845
999
|
}
|
|
846
1000
|
/**
|
|
847
|
-
*
|
|
1001
|
+
* Trigger rightsizing metrics collection
|
|
848
1002
|
*/
|
|
849
|
-
|
|
1003
|
+
triggerRightsizingCollection(requestParameters, initOverrides) {
|
|
850
1004
|
return __awaiter(this, void 0, void 0, function* () {
|
|
851
|
-
const response = yield this.
|
|
1005
|
+
const response = yield this.triggerRightsizingCollectionRaw(requestParameters, initOverrides);
|
|
852
1006
|
return yield response.value();
|
|
853
1007
|
});
|
|
854
1008
|
}
|
|
855
1009
|
/**
|
|
856
|
-
* Creates request options for
|
|
1010
|
+
* Creates request options for updateGroup without sending the request
|
|
857
1011
|
*/
|
|
858
|
-
|
|
1012
|
+
updateGroupRequestOpts(requestParameters) {
|
|
859
1013
|
return __awaiter(this, void 0, void 0, function* () {
|
|
860
|
-
if (requestParameters['
|
|
861
|
-
throw new runtime.RequiredError('
|
|
1014
|
+
if (requestParameters['id'] == null) {
|
|
1015
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateGroup().');
|
|
1016
|
+
}
|
|
1017
|
+
if (requestParameters['updateGroupRequest'] == null) {
|
|
1018
|
+
throw new runtime.RequiredError('updateGroupRequest', 'Required parameter "updateGroupRequest" was null or undefined when calling updateGroup().');
|
|
862
1019
|
}
|
|
863
1020
|
const queryParameters = {};
|
|
864
1021
|
const headerParameters = {};
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
];
|
|
868
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
869
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
870
|
-
let formParams;
|
|
871
|
-
let useForm = false;
|
|
872
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
873
|
-
useForm = canConsumeForm;
|
|
874
|
-
if (useForm) {
|
|
875
|
-
formParams = new FormData();
|
|
876
|
-
}
|
|
877
|
-
else {
|
|
878
|
-
formParams = new URLSearchParams();
|
|
879
|
-
}
|
|
880
|
-
if (requestParameters['file'] != null) {
|
|
881
|
-
formParams.append('file', requestParameters['file']);
|
|
882
|
-
}
|
|
883
|
-
let urlPath = `/vddk`;
|
|
1022
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1023
|
+
let urlPath = `/groups/{id}`;
|
|
1024
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
884
1025
|
return {
|
|
885
1026
|
path: urlPath,
|
|
886
|
-
method: '
|
|
1027
|
+
method: 'PATCH',
|
|
887
1028
|
headers: headerParameters,
|
|
888
1029
|
query: queryParameters,
|
|
889
|
-
body:
|
|
1030
|
+
body: (0, UpdateGroupRequest_js_1.UpdateGroupRequestToJSON)(requestParameters['updateGroupRequest']),
|
|
890
1031
|
};
|
|
891
1032
|
});
|
|
892
1033
|
}
|
|
893
1034
|
/**
|
|
894
|
-
*
|
|
1035
|
+
* Update group
|
|
895
1036
|
*/
|
|
896
|
-
|
|
1037
|
+
updateGroupRaw(requestParameters, initOverrides) {
|
|
897
1038
|
return __awaiter(this, void 0, void 0, function* () {
|
|
898
|
-
const requestOptions = yield this.
|
|
1039
|
+
const requestOptions = yield this.updateGroupRequestOpts(requestParameters);
|
|
899
1040
|
const response = yield this.request(requestOptions, initOverrides);
|
|
900
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
1041
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Group_js_1.GroupFromJSON)(jsonValue));
|
|
901
1042
|
});
|
|
902
1043
|
}
|
|
903
1044
|
/**
|
|
904
|
-
*
|
|
1045
|
+
* Update group
|
|
905
1046
|
*/
|
|
906
|
-
|
|
1047
|
+
updateGroup(requestParameters, initOverrides) {
|
|
907
1048
|
return __awaiter(this, void 0, void 0, function* () {
|
|
908
|
-
const response = yield this.
|
|
1049
|
+
const response = yield this.updateGroupRaw(requestParameters, initOverrides);
|
|
909
1050
|
return yield response.value();
|
|
910
1051
|
});
|
|
911
1052
|
}
|