@openshift-migration-advisor/agent-sdk 0.32.0 → 0.33.1

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.
Files changed (82) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +8 -3
  3. package/dist/apis/AppliancesApi.d.ts +64 -0
  4. package/dist/apis/AppliancesApi.js +72 -0
  5. package/dist/apis/CollectorApi.d.ts +0 -38
  6. package/dist/apis/CollectorApi.js +0 -59
  7. package/dist/apis/GroupsApi.d.ts +39 -0
  8. package/dist/apis/GroupsApi.js +40 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/AppliancesApi.d.ts +64 -0
  12. package/dist/esm/apis/AppliancesApi.js +68 -0
  13. package/dist/esm/apis/CollectorApi.d.ts +0 -38
  14. package/dist/esm/apis/CollectorApi.js +0 -59
  15. package/dist/esm/apis/GroupsApi.d.ts +39 -0
  16. package/dist/esm/apis/GroupsApi.js +40 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/Appliance.d.ts +51 -0
  20. package/dist/esm/models/Appliance.js +64 -0
  21. package/dist/esm/models/ApplianceListResponse.d.ts +31 -0
  22. package/dist/esm/models/ApplianceListResponse.js +44 -0
  23. package/dist/esm/models/ApplicationOverview.d.ts +16 -0
  24. package/dist/esm/models/ApplicationOverview.js +12 -0
  25. package/dist/esm/models/Host.d.ts +16 -0
  26. package/dist/esm/models/Host.js +8 -0
  27. package/dist/esm/models/OsInfo.d.ts +12 -0
  28. package/dist/esm/models/OsInfo.js +9 -0
  29. package/dist/esm/models/Product.d.ts +66 -0
  30. package/dist/esm/models/Product.js +61 -0
  31. package/dist/esm/models/VirtualMachineDetail.d.ts +5 -0
  32. package/dist/esm/models/VirtualMachineDetail.js +3 -0
  33. package/dist/esm/models/VirtualMachineIdentity.d.ts +34 -0
  34. package/dist/esm/models/VirtualMachineIdentity.js +47 -0
  35. package/dist/esm/models/index.d.ts +4 -0
  36. package/dist/esm/models/index.js +4 -0
  37. package/dist/esm/runtime.js +4 -3
  38. package/dist/models/Appliance.d.ts +51 -0
  39. package/dist/models/Appliance.js +71 -0
  40. package/dist/models/ApplianceListResponse.d.ts +31 -0
  41. package/dist/models/ApplianceListResponse.js +51 -0
  42. package/dist/models/ApplicationOverview.d.ts +16 -0
  43. package/dist/models/ApplicationOverview.js +12 -0
  44. package/dist/models/Host.d.ts +16 -0
  45. package/dist/models/Host.js +8 -0
  46. package/dist/models/OsInfo.d.ts +12 -0
  47. package/dist/models/OsInfo.js +10 -1
  48. package/dist/models/Product.d.ts +66 -0
  49. package/dist/models/Product.js +68 -0
  50. package/dist/models/VirtualMachineDetail.d.ts +5 -0
  51. package/dist/models/VirtualMachineDetail.js +3 -0
  52. package/dist/models/VirtualMachineIdentity.d.ts +34 -0
  53. package/dist/models/VirtualMachineIdentity.js +54 -0
  54. package/dist/models/index.d.ts +4 -0
  55. package/dist/models/index.js +4 -0
  56. package/dist/runtime.js +4 -3
  57. package/docs/Appliance.md +44 -0
  58. package/docs/ApplianceListResponse.md +34 -0
  59. package/docs/AppliancesApi.md +76 -0
  60. package/docs/ApplicationOverview.md +8 -0
  61. package/docs/CollectorApi.md +0 -70
  62. package/docs/GroupsApi.md +68 -0
  63. package/docs/Host.md +8 -0
  64. package/docs/OsInfo.md +2 -0
  65. package/docs/Product.md +52 -0
  66. package/docs/VirtualMachineDetail.md +2 -0
  67. package/docs/VirtualMachineIdentity.md +36 -0
  68. package/package.json +1 -1
  69. package/src/apis/AppliancesApi.ts +111 -0
  70. package/src/apis/CollectorApi.ts +0 -97
  71. package/src/apis/GroupsApi.ts +80 -0
  72. package/src/apis/index.ts +1 -0
  73. package/src/models/Appliance.ts +107 -0
  74. package/src/models/ApplianceListResponse.ts +72 -0
  75. package/src/models/ApplicationOverview.ts +26 -0
  76. package/src/models/Host.ts +24 -0
  77. package/src/models/OsInfo.ts +15 -0
  78. package/src/models/Product.ts +118 -0
  79. package/src/models/VirtualMachineDetail.ts +13 -0
  80. package/src/models/VirtualMachineIdentity.ts +71 -0
  81. package/src/models/index.ts +4 -0
  82. package/src/runtime.ts +3 -3
package/docs/GroupsApi.md CHANGED
@@ -8,6 +8,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v2*
8
8
  | [**deleteLatestGroup**](GroupsApi.md#deletelatestgroup) | **DELETE** /groups/{groupId} | Delete group from the latest collection |
9
9
  | [**getGroup**](GroupsApi.md#getgroup) | **GET** /collections/{id}/groups/{groupId} | Get group by ID with its VirtualMachines |
10
10
  | [**getLatestGroup**](GroupsApi.md#getlatestgroup) | **GET** /groups/{groupId} | Get group by ID from the latest collection |
11
+ | [**listGroupAppliances**](GroupsApi.md#listgroupappliances) | **GET** /groups/{groupId}/appliances | List detected appliances for a group |
11
12
  | [**listGroupApplications**](GroupsApi.md#listgroupapplications) | **GET** /groups/{groupId}/applications | List detected applications for a group |
12
13
  | [**listGroups**](GroupsApi.md#listgroups) | **GET** /collections/{id}/groups | List all groups in a collection |
13
14
  | [**listLatestGroups**](GroupsApi.md#listlatestgroups) | **GET** /groups | List groups from the latest collection |
@@ -305,6 +306,73 @@ No authorization required
305
306
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
306
307
 
307
308
 
309
+ ## listGroupAppliances
310
+
311
+ > ApplianceListResponse listGroupAppliances(groupId)
312
+
313
+ List detected appliances for a group
314
+
315
+ ### Example
316
+
317
+ ```ts
318
+ import {
319
+ Configuration,
320
+ GroupsApi,
321
+ } from '@openshift-migration-advisor/agent-sdk';
322
+ import type { ListGroupAppliancesRequest } from '@openshift-migration-advisor/agent-sdk';
323
+
324
+ async function example() {
325
+ console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
326
+ const api = new GroupsApi();
327
+
328
+ const body = {
329
+ // string | Group ID
330
+ groupId: groupId_example,
331
+ } satisfies ListGroupAppliancesRequest;
332
+
333
+ try {
334
+ const data = await api.listGroupAppliances(body);
335
+ console.log(data);
336
+ } catch (error) {
337
+ console.error(error);
338
+ }
339
+ }
340
+
341
+ // Run the test
342
+ example().catch(console.error);
343
+ ```
344
+
345
+ ### Parameters
346
+
347
+
348
+ | Name | Type | Description | Notes |
349
+ |------------- | ------------- | ------------- | -------------|
350
+ | **groupId** | `string` | Group ID | [Defaults to `undefined`] |
351
+
352
+ ### Return type
353
+
354
+ [**ApplianceListResponse**](ApplianceListResponse.md)
355
+
356
+ ### Authorization
357
+
358
+ No authorization required
359
+
360
+ ### HTTP request headers
361
+
362
+ - **Content-Type**: Not defined
363
+ - **Accept**: `application/json`
364
+
365
+
366
+ ### HTTP response details
367
+ | Status code | Description | Response headers |
368
+ |-------------|-------------|------------------|
369
+ | **200** | List of detected appliances | - |
370
+ | **404** | No collections or group not found | - |
371
+ | **500** | Internal server error | - |
372
+
373
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
374
+
375
+
308
376
  ## listGroupApplications
309
377
 
310
378
  > ApplicationListResponse listGroupApplications(groupId)
package/docs/Host.md CHANGED
@@ -9,6 +9,10 @@ Name | Type
9
9
  `id` | string
10
10
  `vendor` | string
11
11
  `model` | string
12
+ `datacenter` | string
13
+ `cluster` | string
14
+ `cpuModel` | string
15
+ `serialNumber` | string
12
16
  `cpuCores` | number
13
17
  `cpuSockets` | number
14
18
  `memoryMB` | number
@@ -27,6 +31,10 @@ const example = {
27
31
  "id": null,
28
32
  "vendor": null,
29
33
  "model": null,
34
+ "datacenter": null,
35
+ "cluster": null,
36
+ "cpuModel": null,
37
+ "serialNumber": null,
30
38
  "cpuCores": null,
31
39
  "cpuSockets": null,
32
40
  "memoryMB": null,
package/docs/OsInfo.md CHANGED
@@ -9,6 +9,7 @@ Name | Type
9
9
  `count` | number
10
10
  `supported` | boolean
11
11
  `supportTier` | string
12
+ `mtvStatus` | string
12
13
  `upgradeRecommendation` | string
13
14
 
14
15
  ## Example
@@ -21,6 +22,7 @@ const example = {
21
22
  "count": null,
22
23
  "supported": null,
23
24
  "supportTier": null,
25
+ "mtvStatus": null,
24
26
  "upgradeRecommendation": null,
25
27
  } satisfies OsInfo
26
28
 
@@ -0,0 +1,52 @@
1
+
2
+ # Product
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `key` | number
10
+ `classId` | string
11
+ `instanceId` | string
12
+ `name` | string
13
+ `vendor` | string
14
+ `version` | string
15
+ `fullVersion` | string
16
+ `vendorUrl` | string
17
+ `productUrl` | string
18
+ `appUrl` | string
19
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ import type { Product } from '@openshift-migration-advisor/agent-sdk'
24
+
25
+ // TODO: Update the object below with actual values
26
+ const example = {
27
+ "key": null,
28
+ "classId": null,
29
+ "instanceId": null,
30
+ "name": null,
31
+ "vendor": null,
32
+ "version": null,
33
+ "fullVersion": null,
34
+ "vendorUrl": null,
35
+ "productUrl": null,
36
+ "appUrl": null,
37
+ } satisfies Product
38
+
39
+ console.log(example)
40
+
41
+ // Convert the instance to a JSON string
42
+ const exampleJSON: string = JSON.stringify(example)
43
+ console.log(exampleJSON)
44
+
45
+ // Parse the JSON string back to an object
46
+ const exampleParsed = JSON.parse(exampleJSON) as Product
47
+ console.log(exampleParsed)
48
+ ```
49
+
50
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
51
+
52
+
@@ -47,6 +47,7 @@ Name | Type
47
47
  `inspection` | [VirtualMachineInspectionResults](VirtualMachineInspectionResults.md)
48
48
  `utilization` | [VmUtilizationDetails](VmUtilizationDetails.md)
49
49
  `processes` | [Array<Process>](Process.md)
50
+ `products` | [Array<Product>](Product.md)
50
51
 
51
52
  ## Example
52
53
 
@@ -96,6 +97,7 @@ const example = {
96
97
  "inspection": null,
97
98
  "utilization": null,
98
99
  "processes": null,
100
+ "products": null,
99
101
  } satisfies VirtualMachineDetail
100
102
 
101
103
  console.log(example)
@@ -0,0 +1,36 @@
1
+
2
+ # VirtualMachineIdentity
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `name` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { VirtualMachineIdentity } from '@openshift-migration-advisor/agent-sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "id": null,
20
+ "name": null,
21
+ } satisfies VirtualMachineIdentity
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as VirtualMachineIdentity
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/agent-sdk",
3
- "version": "0.32.0",
3
+ "version": "0.33.1",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/agent-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v2
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import * as runtime from '../runtime.js';
16
+ import {
17
+ type ApplianceListResponse,
18
+ ApplianceListResponseFromJSON,
19
+ ApplianceListResponseToJSON,
20
+ } from '../models/ApplianceListResponse.js';
21
+
22
+ export interface ListAppliancesRequest {
23
+ /**
24
+ * Collection ID
25
+ */
26
+ id: string;
27
+ }
28
+
29
+ /**
30
+ * AppliancesApi - interface
31
+ *
32
+ * @export
33
+ * @interface AppliancesApiInterface
34
+ */
35
+ export interface AppliancesApiInterface {
36
+ /**
37
+ * Creates request options for listAppliances without sending the request
38
+ * @param {string} id Collection ID
39
+ * @throws {RequiredError}
40
+ * @memberof AppliancesApiInterface
41
+ */
42
+ listAppliancesRequestOpts(requestParameters: ListAppliancesRequest): Promise<runtime.RequestOpts>;
43
+
44
+ /**
45
+ *
46
+ * @summary List detected appliances in a collection
47
+ * @param {string} id Collection ID
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ * @memberof AppliancesApiInterface
51
+ */
52
+ listAppliancesRaw(requestParameters: ListAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceListResponse>>;
53
+
54
+ /**
55
+ * List detected appliances in a collection
56
+ */
57
+ listAppliances(requestParameters: ListAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceListResponse>;
58
+
59
+ }
60
+
61
+ /**
62
+ *
63
+ */
64
+ export class AppliancesApi extends runtime.BaseAPI implements AppliancesApiInterface {
65
+
66
+ /**
67
+ * Creates request options for listAppliances without sending the request
68
+ */
69
+ async listAppliancesRequestOpts(requestParameters: ListAppliancesRequest): Promise<runtime.RequestOpts> {
70
+ if (requestParameters['id'] == null) {
71
+ throw new runtime.RequiredError(
72
+ 'id',
73
+ 'Required parameter "id" was null or undefined when calling listAppliances().'
74
+ );
75
+ }
76
+
77
+ const queryParameters: any = {};
78
+
79
+ const headerParameters: runtime.HTTPHeaders = {};
80
+
81
+
82
+ let urlPath = `/collections/{id}/appliances`;
83
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
84
+
85
+ return {
86
+ path: urlPath,
87
+ method: 'GET',
88
+ headers: headerParameters,
89
+ query: queryParameters,
90
+ };
91
+ }
92
+
93
+ /**
94
+ * List detected appliances in a collection
95
+ */
96
+ async listAppliancesRaw(requestParameters: ListAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceListResponse>> {
97
+ const requestOptions = await this.listAppliancesRequestOpts(requestParameters);
98
+ const response = await this.request(requestOptions, initOverrides);
99
+
100
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceListResponseFromJSON(jsonValue));
101
+ }
102
+
103
+ /**
104
+ * List detected appliances in a collection
105
+ */
106
+ async listAppliances(requestParameters: ListAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceListResponse> {
107
+ const response = await this.listAppliancesRaw(requestParameters, initOverrides);
108
+ return await response.value();
109
+ }
110
+
111
+ }
@@ -19,13 +19,6 @@ import {
19
19
  CollectorStatusToJSON,
20
20
  } from '../models/CollectorStatus.js';
21
21
 
22
- export interface StartRvtoolsCollectorRequest {
23
- /**
24
- *
25
- */
26
- files: Array<Blob>;
27
- }
28
-
29
22
  /**
30
23
  * CollectorApi - interface
31
24
  *
@@ -75,29 +68,6 @@ export interface CollectorApiInterface {
75
68
  */
76
69
  startCollector(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectorStatus>;
77
70
 
78
- /**
79
- * Creates request options for startRvtoolsCollector without sending the request
80
- * @param {Array<Blob>} files
81
- * @throws {RequiredError}
82
- * @memberof CollectorApiInterface
83
- */
84
- startRvtoolsCollectorRequestOpts(requestParameters: StartRvtoolsCollectorRequest): Promise<runtime.RequestOpts>;
85
-
86
- /**
87
- *
88
- * @summary Start a collection from RVTools files
89
- * @param {Array<Blob>} files
90
- * @param {*} [options] Override http request option.
91
- * @throws {RequiredError}
92
- * @memberof CollectorApiInterface
93
- */
94
- startRvtoolsCollectorRaw(requestParameters: StartRvtoolsCollectorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectorStatus>>;
95
-
96
- /**
97
- * Start a collection from RVTools files
98
- */
99
- startRvtoolsCollector(requestParameters: StartRvtoolsCollectorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectorStatus>;
100
-
101
71
  /**
102
72
  * Creates request options for stopCollector without sending the request
103
73
  * @throws {RequiredError}
@@ -200,73 +170,6 @@ export class CollectorApi extends runtime.BaseAPI implements CollectorApiInterfa
200
170
  return await response.value();
201
171
  }
202
172
 
203
- /**
204
- * Creates request options for startRvtoolsCollector without sending the request
205
- */
206
- async startRvtoolsCollectorRequestOpts(requestParameters: StartRvtoolsCollectorRequest): Promise<runtime.RequestOpts> {
207
- if (requestParameters['files'] == null) {
208
- throw new runtime.RequiredError(
209
- 'files',
210
- 'Required parameter "files" was null or undefined when calling startRvtoolsCollector().'
211
- );
212
- }
213
-
214
- const queryParameters: any = {};
215
-
216
- const headerParameters: runtime.HTTPHeaders = {};
217
-
218
- const consumes: runtime.Consume[] = [
219
- { contentType: 'multipart/form-data' },
220
- ];
221
- // @ts-ignore: canConsumeForm may be unused
222
- const canConsumeForm = runtime.canConsumeForm(consumes);
223
-
224
- let formParams: { append(param: string, value: any): any };
225
- let useForm = false;
226
- // use FormData to transmit files using content-type "multipart/form-data"
227
- useForm = canConsumeForm;
228
- if (useForm) {
229
- formParams = new FormData();
230
- } else {
231
- formParams = new URLSearchParams();
232
- }
233
-
234
- if (requestParameters['files'] != null) {
235
- requestParameters['files'].forEach((element) => {
236
- formParams.append('files', element as any);
237
- })
238
- }
239
-
240
-
241
- let urlPath = `/collector/rvtools`;
242
-
243
- return {
244
- path: urlPath,
245
- method: 'POST',
246
- headers: headerParameters,
247
- query: queryParameters,
248
- body: formParams,
249
- };
250
- }
251
-
252
- /**
253
- * Start a collection from RVTools files
254
- */
255
- async startRvtoolsCollectorRaw(requestParameters: StartRvtoolsCollectorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectorStatus>> {
256
- const requestOptions = await this.startRvtoolsCollectorRequestOpts(requestParameters);
257
- const response = await this.request(requestOptions, initOverrides);
258
-
259
- return new runtime.JSONApiResponse(response, (jsonValue) => CollectorStatusFromJSON(jsonValue));
260
- }
261
-
262
- /**
263
- * Start a collection from RVTools files
264
- */
265
- async startRvtoolsCollector(requestParameters: StartRvtoolsCollectorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectorStatus> {
266
- const response = await this.startRvtoolsCollectorRaw(requestParameters, initOverrides);
267
- return await response.value();
268
- }
269
-
270
173
  /**
271
174
  * Creates request options for stopCollector without sending the request
272
175
  */
@@ -13,6 +13,11 @@
13
13
  */
14
14
 
15
15
  import * as runtime from '../runtime.js';
16
+ import {
17
+ type ApplianceListResponse,
18
+ ApplianceListResponseFromJSON,
19
+ ApplianceListResponseToJSON,
20
+ } from '../models/ApplianceListResponse.js';
16
21
  import {
17
22
  type ApplicationListResponse,
18
23
  ApplicationListResponseFromJSON,
@@ -100,6 +105,13 @@ export interface GetLatestGroupRequest {
100
105
  pageSize?: number;
101
106
  }
102
107
 
108
+ export interface ListGroupAppliancesRequest {
109
+ /**
110
+ * Group ID
111
+ */
112
+ groupId: string;
113
+ }
114
+
103
115
  export interface ListGroupApplicationsRequest {
104
116
  /**
105
117
  * Group ID
@@ -265,6 +277,29 @@ export interface GroupsApiInterface {
265
277
  */
266
278
  getLatestGroup(requestParameters: GetLatestGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupResponse>;
267
279
 
280
+ /**
281
+ * Creates request options for listGroupAppliances without sending the request
282
+ * @param {string} groupId Group ID
283
+ * @throws {RequiredError}
284
+ * @memberof GroupsApiInterface
285
+ */
286
+ listGroupAppliancesRequestOpts(requestParameters: ListGroupAppliancesRequest): Promise<runtime.RequestOpts>;
287
+
288
+ /**
289
+ *
290
+ * @summary List detected appliances for a group
291
+ * @param {string} groupId Group ID
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ * @memberof GroupsApiInterface
295
+ */
296
+ listGroupAppliancesRaw(requestParameters: ListGroupAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceListResponse>>;
297
+
298
+ /**
299
+ * List detected appliances for a group
300
+ */
301
+ listGroupAppliances(requestParameters: ListGroupAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceListResponse>;
302
+
268
303
  /**
269
304
  * Creates request options for listGroupApplications without sending the request
270
305
  * @param {string} groupId Group ID
@@ -589,6 +624,51 @@ export class GroupsApi extends runtime.BaseAPI implements GroupsApiInterface {
589
624
  return await response.value();
590
625
  }
591
626
 
627
+ /**
628
+ * Creates request options for listGroupAppliances without sending the request
629
+ */
630
+ async listGroupAppliancesRequestOpts(requestParameters: ListGroupAppliancesRequest): Promise<runtime.RequestOpts> {
631
+ if (requestParameters['groupId'] == null) {
632
+ throw new runtime.RequiredError(
633
+ 'groupId',
634
+ 'Required parameter "groupId" was null or undefined when calling listGroupAppliances().'
635
+ );
636
+ }
637
+
638
+ const queryParameters: any = {};
639
+
640
+ const headerParameters: runtime.HTTPHeaders = {};
641
+
642
+
643
+ let urlPath = `/groups/{groupId}/appliances`;
644
+ urlPath = urlPath.replace('{groupId}', encodeURIComponent(String(requestParameters['groupId'])));
645
+
646
+ return {
647
+ path: urlPath,
648
+ method: 'GET',
649
+ headers: headerParameters,
650
+ query: queryParameters,
651
+ };
652
+ }
653
+
654
+ /**
655
+ * List detected appliances for a group
656
+ */
657
+ async listGroupAppliancesRaw(requestParameters: ListGroupAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceListResponse>> {
658
+ const requestOptions = await this.listGroupAppliancesRequestOpts(requestParameters);
659
+ const response = await this.request(requestOptions, initOverrides);
660
+
661
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceListResponseFromJSON(jsonValue));
662
+ }
663
+
664
+ /**
665
+ * List detected appliances for a group
666
+ */
667
+ async listGroupAppliances(requestParameters: ListGroupAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceListResponse> {
668
+ const response = await this.listGroupAppliancesRaw(requestParameters, initOverrides);
669
+ return await response.value();
670
+ }
671
+
592
672
  /**
593
673
  * Creates request options for listGroupApplications without sending the request
594
674
  */
package/src/apis/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './AgentApi.js';
4
+ export * from './AppliancesApi.js';
4
5
  export * from './ApplicationsApi.js';
5
6
  export * from './CollectionsApi.js';
6
7
  export * from './CollectorApi.js';
@@ -0,0 +1,107 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v2
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { VirtualMachineIdentity } from './VirtualMachineIdentity.js';
17
+ import {
18
+ VirtualMachineIdentityFromJSON,
19
+ VirtualMachineIdentityFromJSONTyped,
20
+ VirtualMachineIdentityToJSON,
21
+ VirtualMachineIdentityToJSONTyped,
22
+ } from './VirtualMachineIdentity.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface Appliance
28
+ */
29
+ export interface Appliance {
30
+ /**
31
+ * Appliance product name
32
+ */
33
+ name: string;
34
+ /**
35
+ * Appliance vendor; defaults to Unknown when not reported
36
+ */
37
+ vendor: string;
38
+ /**
39
+ * Appliance product version; defaults to empty when not reported
40
+ */
41
+ version: string;
42
+ /**
43
+ *
44
+ */
45
+ confidence: number;
46
+ /**
47
+ * Number of VMs running this appliance
48
+ */
49
+ vmCount: number;
50
+ /**
51
+ *
52
+ */
53
+ vms: Array<VirtualMachineIdentity>;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the Appliance interface.
58
+ */
59
+ export function instanceOfAppliance(value: object): value is Appliance {
60
+ if (!('name' in value) || value['name'] === undefined) return false;
61
+ if (!('vendor' in value) || value['vendor'] === undefined) return false;
62
+ if (!('version' in value) || value['version'] === undefined) return false;
63
+ if (!('confidence' in value) || value['confidence'] === undefined) return false;
64
+ if (!('vmCount' in value) || value['vmCount'] === undefined) return false;
65
+ if (!('vms' in value) || value['vms'] === undefined) return false;
66
+ return true;
67
+ }
68
+
69
+ export function ApplianceFromJSON(json: any): Appliance {
70
+ return ApplianceFromJSONTyped(json, false);
71
+ }
72
+
73
+ export function ApplianceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Appliance {
74
+ if (json == null) {
75
+ return json;
76
+ }
77
+ return {
78
+
79
+ 'name': json['name'],
80
+ 'vendor': json['vendor'],
81
+ 'version': json['version'],
82
+ 'confidence': json['confidence'],
83
+ 'vmCount': json['vmCount'],
84
+ 'vms': ((json['vms'] as Array<any>).map(VirtualMachineIdentityFromJSON)),
85
+ };
86
+ }
87
+
88
+ export function ApplianceToJSON(json: any): Appliance {
89
+ return ApplianceToJSONTyped(json, false);
90
+ }
91
+
92
+ export function ApplianceToJSONTyped(value?: Appliance | null, ignoreDiscriminator: boolean = false): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+
97
+ return {
98
+
99
+ 'name': value['name'],
100
+ 'vendor': value['vendor'],
101
+ 'version': value['version'],
102
+ 'confidence': value['confidence'],
103
+ 'vmCount': value['vmCount'],
104
+ 'vms': ((value['vms'] as Array<any>).map(VirtualMachineIdentityToJSON)),
105
+ };
106
+ }
107
+