@openshift-migration-advisor/planner-sdk 0.27.0 → 0.28.0-e15db54db2a1
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 +10 -0
- package/README.md +13 -2
- package/dist/apis/AssessmentApi.d.ts +162 -0
- package/dist/apis/AssessmentApi.js +168 -0
- package/dist/apis/JobApi.d.ts +86 -0
- package/dist/apis/JobApi.js +124 -0
- package/dist/esm/apis/AssessmentApi.d.ts +162 -0
- package/dist/esm/apis/AssessmentApi.js +168 -0
- package/dist/esm/apis/JobApi.d.ts +86 -0
- package/dist/esm/apis/JobApi.js +124 -0
- package/dist/esm/models/AssessmentV2.d.ts +36 -0
- package/dist/esm/models/AssessmentV2.js +49 -0
- package/dist/esm/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/esm/models/AssessmentV2Summary.js +99 -0
- package/dist/esm/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/esm/models/AssessmentVCenterV2.js +49 -0
- package/dist/esm/models/Datastore.d.ts +4 -0
- package/dist/esm/models/Datastore.js +2 -0
- package/dist/esm/models/InventoryV2.d.ts +43 -0
- package/dist/esm/models/InventoryV2.js +53 -0
- package/dist/esm/models/SubResource.d.ts +30 -0
- package/dist/esm/models/SubResource.js +43 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/AssessmentV2.d.ts +36 -0
- package/dist/models/AssessmentV2.js +56 -0
- package/dist/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/models/AssessmentV2Summary.js +107 -0
- package/dist/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/models/AssessmentVCenterV2.js +56 -0
- package/dist/models/Datastore.d.ts +4 -0
- package/dist/models/Datastore.js +2 -0
- package/dist/models/InventoryV2.d.ts +43 -0
- package/dist/models/InventoryV2.js +60 -0
- package/dist/models/SubResource.d.ts +30 -0
- package/dist/models/SubResource.js +50 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AssessmentApi.md +287 -0
- package/docs/AssessmentV2.md +36 -0
- package/docs/AssessmentV2Summary.md +58 -0
- package/docs/AssessmentVCenterV2.md +36 -0
- package/docs/Datastore.md +2 -0
- package/docs/InventoryV2.md +40 -0
- package/docs/JobApi.md +150 -0
- package/docs/SubResource.md +34 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +341 -0
- package/src/apis/JobApi.ts +219 -0
- package/src/models/AssessmentV2.ts +86 -0
- package/src/models/AssessmentV2Summary.ts +173 -0
- package/src/models/AssessmentVCenterV2.ts +86 -0
- package/src/models/Datastore.ts +6 -0
- package/src/models/InventoryV2.ts +91 -0
- package/src/models/SubResource.ts +64 -0
- package/src/models/index.ts +5 -0
package/docs/JobApi.md
CHANGED
|
@@ -6,7 +6,9 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**cancelJob**](JobApi.md#canceljob) | **DELETE** /api/v1/assessments/jobs/{id} | |
|
|
8
8
|
| [**createRVToolsAssessment**](JobApi.md#creatervtoolsassessment) | **POST** /api/v1/assessments/rvtools | |
|
|
9
|
+
| [**createRVToolsAssessmentV2**](JobApi.md#creatervtoolsassessmentv2) | **POST** /api/v2/assessments/rvtools | |
|
|
9
10
|
| [**getJob**](JobApi.md#getjob) | **GET** /api/v1/assessments/jobs/{id} | |
|
|
11
|
+
| [**uploadRvtoolsToAssessment**](JobApi.md#uploadrvtoolstoassessment) | **PUT** /api/v2/assessments/{id}/rvtools | |
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
@@ -156,6 +158,81 @@ No authorization required
|
|
|
156
158
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
157
159
|
|
|
158
160
|
|
|
161
|
+
## createRVToolsAssessmentV2
|
|
162
|
+
|
|
163
|
+
> Job createRVToolsAssessmentV2(name, file)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Create an assessment from RVTools file asynchronously
|
|
168
|
+
|
|
169
|
+
### Example
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import {
|
|
173
|
+
Configuration,
|
|
174
|
+
JobApi,
|
|
175
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
176
|
+
import type { CreateRVToolsAssessmentV2Request } from '@openshift-migration-advisor/planner-sdk';
|
|
177
|
+
|
|
178
|
+
async function example() {
|
|
179
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
180
|
+
const api = new JobApi();
|
|
181
|
+
|
|
182
|
+
const body = {
|
|
183
|
+
// string | Name of the assessment
|
|
184
|
+
name: name_example,
|
|
185
|
+
// Blob | File upload for assessment data
|
|
186
|
+
file: BINARY_DATA_HERE,
|
|
187
|
+
} satisfies CreateRVToolsAssessmentV2Request;
|
|
188
|
+
|
|
189
|
+
try {
|
|
190
|
+
const data = await api.createRVToolsAssessmentV2(body);
|
|
191
|
+
console.log(data);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(error);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Run the test
|
|
198
|
+
example().catch(console.error);
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description | Notes |
|
|
205
|
+
|------------- | ------------- | ------------- | -------------|
|
|
206
|
+
| **name** | `string` | Name of the assessment | [Defaults to `undefined`] |
|
|
207
|
+
| **file** | `Blob` | File upload for assessment data | [Defaults to `undefined`] |
|
|
208
|
+
|
|
209
|
+
### Return type
|
|
210
|
+
|
|
211
|
+
[**Job**](Job.md)
|
|
212
|
+
|
|
213
|
+
### Authorization
|
|
214
|
+
|
|
215
|
+
No authorization required
|
|
216
|
+
|
|
217
|
+
### HTTP request headers
|
|
218
|
+
|
|
219
|
+
- **Content-Type**: `multipart/form-data`
|
|
220
|
+
- **Accept**: `application/json`
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### HTTP response details
|
|
224
|
+
| Status code | Description | Response headers |
|
|
225
|
+
|-------------|-------------|------------------|
|
|
226
|
+
| **202** | Accepted - Job created | - |
|
|
227
|
+
| **400** | Bad Request | - |
|
|
228
|
+
| **401** | Unauthorized | - |
|
|
229
|
+
| **403** | Forbidden | - |
|
|
230
|
+
| **404** | NotFound | - |
|
|
231
|
+
| **500** | Internal error | - |
|
|
232
|
+
|
|
233
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
234
|
+
|
|
235
|
+
|
|
159
236
|
## getJob
|
|
160
237
|
|
|
161
238
|
> Job getJob(id)
|
|
@@ -227,3 +304,76 @@ No authorization required
|
|
|
227
304
|
|
|
228
305
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
229
306
|
|
|
307
|
+
|
|
308
|
+
## uploadRvtoolsToAssessment
|
|
309
|
+
|
|
310
|
+
> Job uploadRvtoolsToAssessment(id, file)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
|
|
315
|
+
|
|
316
|
+
### Example
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
import {
|
|
320
|
+
Configuration,
|
|
321
|
+
JobApi,
|
|
322
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
323
|
+
import type { UploadRvtoolsToAssessmentRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
324
|
+
|
|
325
|
+
async function example() {
|
|
326
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
327
|
+
const api = new JobApi();
|
|
328
|
+
|
|
329
|
+
const body = {
|
|
330
|
+
// string | ID of the assessment
|
|
331
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
332
|
+
// Blob | Rvtools extending the exising assessment
|
|
333
|
+
file: BINARY_DATA_HERE,
|
|
334
|
+
} satisfies UploadRvtoolsToAssessmentRequest;
|
|
335
|
+
|
|
336
|
+
try {
|
|
337
|
+
const data = await api.uploadRvtoolsToAssessment(body);
|
|
338
|
+
console.log(data);
|
|
339
|
+
} catch (error) {
|
|
340
|
+
console.error(error);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Run the test
|
|
345
|
+
example().catch(console.error);
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Parameters
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
| Name | Type | Description | Notes |
|
|
352
|
+
|------------- | ------------- | ------------- | -------------|
|
|
353
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
354
|
+
| **file** | `Blob` | Rvtools extending the exising assessment | [Defaults to `undefined`] |
|
|
355
|
+
|
|
356
|
+
### Return type
|
|
357
|
+
|
|
358
|
+
[**Job**](Job.md)
|
|
359
|
+
|
|
360
|
+
### Authorization
|
|
361
|
+
|
|
362
|
+
No authorization required
|
|
363
|
+
|
|
364
|
+
### HTTP request headers
|
|
365
|
+
|
|
366
|
+
- **Content-Type**: `multipart/form-data`
|
|
367
|
+
- **Accept**: `application/json`
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
### HTTP response details
|
|
371
|
+
| Status code | Description | Response headers |
|
|
372
|
+
|-------------|-------------|------------------|
|
|
373
|
+
| **202** | Accepted - Job created | - |
|
|
374
|
+
| **400** | Bad Request | - |
|
|
375
|
+
| **401** | Unauthorized | - |
|
|
376
|
+
| **500** | Internal error | - |
|
|
377
|
+
|
|
378
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
379
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# SubResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { SubResource } from '@openshift-migration-advisor/planner-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"id": null,
|
|
19
|
+
} satisfies SubResource
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as SubResource
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/package.json
CHANGED
|
@@ -28,6 +28,21 @@ import {
|
|
|
28
28
|
AssessmentUpdateFromJSON,
|
|
29
29
|
AssessmentUpdateToJSON,
|
|
30
30
|
} from '../models/AssessmentUpdate.js';
|
|
31
|
+
import {
|
|
32
|
+
type AssessmentV2,
|
|
33
|
+
AssessmentV2FromJSON,
|
|
34
|
+
AssessmentV2ToJSON,
|
|
35
|
+
} from '../models/AssessmentV2.js';
|
|
36
|
+
import {
|
|
37
|
+
type AssessmentV2Summary,
|
|
38
|
+
AssessmentV2SummaryFromJSON,
|
|
39
|
+
AssessmentV2SummaryToJSON,
|
|
40
|
+
} from '../models/AssessmentV2Summary.js';
|
|
41
|
+
import {
|
|
42
|
+
type AssessmentVCenterV2,
|
|
43
|
+
AssessmentVCenterV2FromJSON,
|
|
44
|
+
AssessmentVCenterV2ToJSON,
|
|
45
|
+
} from '../models/AssessmentVCenterV2.js';
|
|
31
46
|
import {
|
|
32
47
|
type ClusterRequirementsRequest,
|
|
33
48
|
ClusterRequirementsRequestFromJSON,
|
|
@@ -48,6 +63,11 @@ import {
|
|
|
48
63
|
EnhancementDataFromJSON,
|
|
49
64
|
EnhancementDataToJSON,
|
|
50
65
|
} from '../models/EnhancementData.js';
|
|
66
|
+
import {
|
|
67
|
+
type InventoryData,
|
|
68
|
+
InventoryDataFromJSON,
|
|
69
|
+
InventoryDataToJSON,
|
|
70
|
+
} from '../models/InventoryData.js';
|
|
51
71
|
import {
|
|
52
72
|
type MigrationComplexityRequest,
|
|
53
73
|
MigrationComplexityRequestFromJSON,
|
|
@@ -162,6 +182,39 @@ export interface GetAssessmentEnhancementDataRequest {
|
|
|
162
182
|
id: string;
|
|
163
183
|
}
|
|
164
184
|
|
|
185
|
+
export interface GetAssessmentV2Request {
|
|
186
|
+
/**
|
|
187
|
+
* ID of the assessment
|
|
188
|
+
*/
|
|
189
|
+
id: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface GetVcenterRequest {
|
|
193
|
+
/**
|
|
194
|
+
* ID of the assessment
|
|
195
|
+
*/
|
|
196
|
+
id: string;
|
|
197
|
+
/**
|
|
198
|
+
* ID of the vcenter
|
|
199
|
+
*/
|
|
200
|
+
vid: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface GetVcenterClusterRequest {
|
|
204
|
+
/**
|
|
205
|
+
* ID of the assessment
|
|
206
|
+
*/
|
|
207
|
+
id: string;
|
|
208
|
+
/**
|
|
209
|
+
* ID of the vcenter
|
|
210
|
+
*/
|
|
211
|
+
vid: string;
|
|
212
|
+
/**
|
|
213
|
+
* ID of the cluster
|
|
214
|
+
*/
|
|
215
|
+
cid: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
165
218
|
export interface SaveAssessmentEnhancementDataRequest {
|
|
166
219
|
/**
|
|
167
220
|
* ID of the assessment
|
|
@@ -413,6 +466,78 @@ export interface AssessmentApiInterface {
|
|
|
413
466
|
*/
|
|
414
467
|
getAssessmentEnhancementData(requestParameters: GetAssessmentEnhancementDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnhancementData>;
|
|
415
468
|
|
|
469
|
+
/**
|
|
470
|
+
* Creates request options for getAssessmentV2 without sending the request
|
|
471
|
+
* @param {string} id ID of the assessment
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
* @memberof AssessmentApiInterface
|
|
474
|
+
*/
|
|
475
|
+
getAssessmentV2RequestOpts(requestParameters: GetAssessmentV2Request): Promise<runtime.RequestOpts>;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Get the specified assessment inventory
|
|
479
|
+
* @param {string} id ID of the assessment
|
|
480
|
+
* @param {*} [options] Override http request option.
|
|
481
|
+
* @throws {RequiredError}
|
|
482
|
+
* @memberof AssessmentApiInterface
|
|
483
|
+
*/
|
|
484
|
+
getAssessmentV2Raw(requestParameters: GetAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssessmentV2>>;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Get the specified assessment inventory
|
|
488
|
+
*/
|
|
489
|
+
getAssessmentV2(requestParameters: GetAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssessmentV2>;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Creates request options for getVcenter without sending the request
|
|
493
|
+
* @param {string} id ID of the assessment
|
|
494
|
+
* @param {string} vid ID of the vcenter
|
|
495
|
+
* @throws {RequiredError}
|
|
496
|
+
* @memberof AssessmentApiInterface
|
|
497
|
+
*/
|
|
498
|
+
getVcenterRequestOpts(requestParameters: GetVcenterRequest): Promise<runtime.RequestOpts>;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Get the specified vcenter assessment inventory
|
|
502
|
+
* @param {string} id ID of the assessment
|
|
503
|
+
* @param {string} vid ID of the vcenter
|
|
504
|
+
* @param {*} [options] Override http request option.
|
|
505
|
+
* @throws {RequiredError}
|
|
506
|
+
* @memberof AssessmentApiInterface
|
|
507
|
+
*/
|
|
508
|
+
getVcenterRaw(requestParameters: GetVcenterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssessmentVCenterV2>>;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Get the specified vcenter assessment inventory
|
|
512
|
+
*/
|
|
513
|
+
getVcenter(requestParameters: GetVcenterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssessmentVCenterV2>;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Creates request options for getVcenterCluster without sending the request
|
|
517
|
+
* @param {string} id ID of the assessment
|
|
518
|
+
* @param {string} vid ID of the vcenter
|
|
519
|
+
* @param {string} cid ID of the cluster
|
|
520
|
+
* @throws {RequiredError}
|
|
521
|
+
* @memberof AssessmentApiInterface
|
|
522
|
+
*/
|
|
523
|
+
getVcenterClusterRequestOpts(requestParameters: GetVcenterClusterRequest): Promise<runtime.RequestOpts>;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Get the specified cluster assessment inventory
|
|
527
|
+
* @param {string} id ID of the assessment
|
|
528
|
+
* @param {string} vid ID of the vcenter
|
|
529
|
+
* @param {string} cid ID of the cluster
|
|
530
|
+
* @param {*} [options] Override http request option.
|
|
531
|
+
* @throws {RequiredError}
|
|
532
|
+
* @memberof AssessmentApiInterface
|
|
533
|
+
*/
|
|
534
|
+
getVcenterClusterRaw(requestParameters: GetVcenterClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InventoryData>>;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Get the specified cluster assessment inventory
|
|
538
|
+
*/
|
|
539
|
+
getVcenterCluster(requestParameters: GetVcenterClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InventoryData>;
|
|
540
|
+
|
|
416
541
|
/**
|
|
417
542
|
* Creates request options for listAssessments without sending the request
|
|
418
543
|
* @throws {RequiredError}
|
|
@@ -433,6 +558,26 @@ export interface AssessmentApiInterface {
|
|
|
433
558
|
*/
|
|
434
559
|
listAssessments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Assessment>>;
|
|
435
560
|
|
|
561
|
+
/**
|
|
562
|
+
* Creates request options for listAssessmentsV2 without sending the request
|
|
563
|
+
* @throws {RequiredError}
|
|
564
|
+
* @memberof AssessmentApiInterface
|
|
565
|
+
*/
|
|
566
|
+
listAssessmentsV2RequestOpts(): Promise<runtime.RequestOpts>;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* List assessments
|
|
570
|
+
* @param {*} [options] Override http request option.
|
|
571
|
+
* @throws {RequiredError}
|
|
572
|
+
* @memberof AssessmentApiInterface
|
|
573
|
+
*/
|
|
574
|
+
listAssessmentsV2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssessmentV2Summary>>>;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* List assessments
|
|
578
|
+
*/
|
|
579
|
+
listAssessmentsV2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssessmentV2Summary>>;
|
|
580
|
+
|
|
436
581
|
/**
|
|
437
582
|
* Creates request options for saveAssessmentEnhancementData without sending the request
|
|
438
583
|
* @param {string} id ID of the assessment
|
|
@@ -990,6 +1135,165 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
990
1135
|
return await response.value();
|
|
991
1136
|
}
|
|
992
1137
|
|
|
1138
|
+
/**
|
|
1139
|
+
* Creates request options for getAssessmentV2 without sending the request
|
|
1140
|
+
*/
|
|
1141
|
+
async getAssessmentV2RequestOpts(requestParameters: GetAssessmentV2Request): Promise<runtime.RequestOpts> {
|
|
1142
|
+
if (requestParameters['id'] == null) {
|
|
1143
|
+
throw new runtime.RequiredError(
|
|
1144
|
+
'id',
|
|
1145
|
+
'Required parameter "id" was null or undefined when calling getAssessmentV2().'
|
|
1146
|
+
);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
const queryParameters: any = {};
|
|
1150
|
+
|
|
1151
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
let urlPath = `/api/v2/assessments/{id}`;
|
|
1155
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
1156
|
+
|
|
1157
|
+
return {
|
|
1158
|
+
path: urlPath,
|
|
1159
|
+
method: 'GET',
|
|
1160
|
+
headers: headerParameters,
|
|
1161
|
+
query: queryParameters,
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Get the specified assessment inventory
|
|
1167
|
+
*/
|
|
1168
|
+
async getAssessmentV2Raw(requestParameters: GetAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssessmentV2>> {
|
|
1169
|
+
const requestOptions = await this.getAssessmentV2RequestOpts(requestParameters);
|
|
1170
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1171
|
+
|
|
1172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AssessmentV2FromJSON(jsonValue));
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Get the specified assessment inventory
|
|
1177
|
+
*/
|
|
1178
|
+
async getAssessmentV2(requestParameters: GetAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssessmentV2> {
|
|
1179
|
+
const response = await this.getAssessmentV2Raw(requestParameters, initOverrides);
|
|
1180
|
+
return await response.value();
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Creates request options for getVcenter without sending the request
|
|
1185
|
+
*/
|
|
1186
|
+
async getVcenterRequestOpts(requestParameters: GetVcenterRequest): Promise<runtime.RequestOpts> {
|
|
1187
|
+
if (requestParameters['id'] == null) {
|
|
1188
|
+
throw new runtime.RequiredError(
|
|
1189
|
+
'id',
|
|
1190
|
+
'Required parameter "id" was null or undefined when calling getVcenter().'
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
if (requestParameters['vid'] == null) {
|
|
1195
|
+
throw new runtime.RequiredError(
|
|
1196
|
+
'vid',
|
|
1197
|
+
'Required parameter "vid" was null or undefined when calling getVcenter().'
|
|
1198
|
+
);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
const queryParameters: any = {};
|
|
1202
|
+
|
|
1203
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
let urlPath = `/api/v2/assessments/{id}/vcenters/{vid}`;
|
|
1207
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
1208
|
+
urlPath = urlPath.replace('{vid}', encodeURIComponent(String(requestParameters['vid'])));
|
|
1209
|
+
|
|
1210
|
+
return {
|
|
1211
|
+
path: urlPath,
|
|
1212
|
+
method: 'GET',
|
|
1213
|
+
headers: headerParameters,
|
|
1214
|
+
query: queryParameters,
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* Get the specified vcenter assessment inventory
|
|
1220
|
+
*/
|
|
1221
|
+
async getVcenterRaw(requestParameters: GetVcenterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssessmentVCenterV2>> {
|
|
1222
|
+
const requestOptions = await this.getVcenterRequestOpts(requestParameters);
|
|
1223
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1224
|
+
|
|
1225
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AssessmentVCenterV2FromJSON(jsonValue));
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Get the specified vcenter assessment inventory
|
|
1230
|
+
*/
|
|
1231
|
+
async getVcenter(requestParameters: GetVcenterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssessmentVCenterV2> {
|
|
1232
|
+
const response = await this.getVcenterRaw(requestParameters, initOverrides);
|
|
1233
|
+
return await response.value();
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Creates request options for getVcenterCluster without sending the request
|
|
1238
|
+
*/
|
|
1239
|
+
async getVcenterClusterRequestOpts(requestParameters: GetVcenterClusterRequest): Promise<runtime.RequestOpts> {
|
|
1240
|
+
if (requestParameters['id'] == null) {
|
|
1241
|
+
throw new runtime.RequiredError(
|
|
1242
|
+
'id',
|
|
1243
|
+
'Required parameter "id" was null or undefined when calling getVcenterCluster().'
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
if (requestParameters['vid'] == null) {
|
|
1248
|
+
throw new runtime.RequiredError(
|
|
1249
|
+
'vid',
|
|
1250
|
+
'Required parameter "vid" was null or undefined when calling getVcenterCluster().'
|
|
1251
|
+
);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
if (requestParameters['cid'] == null) {
|
|
1255
|
+
throw new runtime.RequiredError(
|
|
1256
|
+
'cid',
|
|
1257
|
+
'Required parameter "cid" was null or undefined when calling getVcenterCluster().'
|
|
1258
|
+
);
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
const queryParameters: any = {};
|
|
1262
|
+
|
|
1263
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
let urlPath = `/api/v2/assessments/{id}/vcenters/{vid}/clusters/{cid}`;
|
|
1267
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
1268
|
+
urlPath = urlPath.replace('{vid}', encodeURIComponent(String(requestParameters['vid'])));
|
|
1269
|
+
urlPath = urlPath.replace('{cid}', encodeURIComponent(String(requestParameters['cid'])));
|
|
1270
|
+
|
|
1271
|
+
return {
|
|
1272
|
+
path: urlPath,
|
|
1273
|
+
method: 'GET',
|
|
1274
|
+
headers: headerParameters,
|
|
1275
|
+
query: queryParameters,
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* Get the specified cluster assessment inventory
|
|
1281
|
+
*/
|
|
1282
|
+
async getVcenterClusterRaw(requestParameters: GetVcenterClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InventoryData>> {
|
|
1283
|
+
const requestOptions = await this.getVcenterClusterRequestOpts(requestParameters);
|
|
1284
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1285
|
+
|
|
1286
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InventoryDataFromJSON(jsonValue));
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Get the specified cluster assessment inventory
|
|
1291
|
+
*/
|
|
1292
|
+
async getVcenterCluster(requestParameters: GetVcenterClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InventoryData> {
|
|
1293
|
+
const response = await this.getVcenterClusterRaw(requestParameters, initOverrides);
|
|
1294
|
+
return await response.value();
|
|
1295
|
+
}
|
|
1296
|
+
|
|
993
1297
|
/**
|
|
994
1298
|
* Creates request options for listAssessments without sending the request
|
|
995
1299
|
*/
|
|
@@ -1027,6 +1331,43 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
1027
1331
|
return await response.value();
|
|
1028
1332
|
}
|
|
1029
1333
|
|
|
1334
|
+
/**
|
|
1335
|
+
* Creates request options for listAssessmentsV2 without sending the request
|
|
1336
|
+
*/
|
|
1337
|
+
async listAssessmentsV2RequestOpts(): Promise<runtime.RequestOpts> {
|
|
1338
|
+
const queryParameters: any = {};
|
|
1339
|
+
|
|
1340
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
let urlPath = `/api/v2/assessments`;
|
|
1344
|
+
|
|
1345
|
+
return {
|
|
1346
|
+
path: urlPath,
|
|
1347
|
+
method: 'GET',
|
|
1348
|
+
headers: headerParameters,
|
|
1349
|
+
query: queryParameters,
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* List assessments
|
|
1355
|
+
*/
|
|
1356
|
+
async listAssessmentsV2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssessmentV2Summary>>> {
|
|
1357
|
+
const requestOptions = await this.listAssessmentsV2RequestOpts();
|
|
1358
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1359
|
+
|
|
1360
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssessmentV2SummaryFromJSON));
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* List assessments
|
|
1365
|
+
*/
|
|
1366
|
+
async listAssessmentsV2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssessmentV2Summary>> {
|
|
1367
|
+
const response = await this.listAssessmentsV2Raw(initOverrides);
|
|
1368
|
+
return await response.value();
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1030
1371
|
/**
|
|
1031
1372
|
* Creates request options for saveAssessmentEnhancementData without sending the request
|
|
1032
1373
|
*/
|