@openshift-migration-advisor/agent-sdk 0.31.0 → 0.32.0-b4969275f1eb

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 (138) hide show
  1. package/.openapi-generator/FILES +18 -2
  2. package/README.md +12 -4
  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/InventoriesApi.d.ts +9 -9
  10. package/dist/apis/InventoriesApi.js +3 -3
  11. package/dist/apis/index.d.ts +1 -0
  12. package/dist/apis/index.js +1 -0
  13. package/dist/esm/apis/AppliancesApi.d.ts +64 -0
  14. package/dist/esm/apis/AppliancesApi.js +68 -0
  15. package/dist/esm/apis/CollectorApi.d.ts +0 -38
  16. package/dist/esm/apis/CollectorApi.js +0 -59
  17. package/dist/esm/apis/GroupsApi.d.ts +39 -0
  18. package/dist/esm/apis/GroupsApi.js +40 -0
  19. package/dist/esm/apis/InventoriesApi.d.ts +9 -9
  20. package/dist/esm/apis/InventoriesApi.js +3 -3
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/Appliance.d.ts +51 -0
  24. package/dist/esm/models/Appliance.js +64 -0
  25. package/dist/esm/models/ApplianceListResponse.d.ts +31 -0
  26. package/dist/esm/models/ApplianceListResponse.js +44 -0
  27. package/dist/esm/models/ApplicationOverview.d.ts +16 -0
  28. package/dist/esm/models/ApplicationOverview.js +12 -0
  29. package/dist/esm/models/CollectedInventory.d.ts +31 -0
  30. package/dist/esm/models/CollectedInventory.js +44 -0
  31. package/dist/esm/models/GroupResponse.d.ts +2 -2
  32. package/dist/esm/models/GroupResponse.js +3 -3
  33. package/dist/esm/models/Host.d.ts +10 -0
  34. package/dist/esm/models/Host.js +6 -0
  35. package/dist/esm/models/HostPhysicalNIC.d.ts +34 -0
  36. package/dist/esm/models/HostPhysicalNIC.js +45 -0
  37. package/dist/esm/models/HostStorageAdapter.d.ts +58 -0
  38. package/dist/esm/models/HostStorageAdapter.js +55 -0
  39. package/dist/esm/models/HostStorageLun.d.ts +50 -0
  40. package/dist/esm/models/HostStorageLun.js +51 -0
  41. package/dist/esm/models/Inventory.d.ts +24 -2
  42. package/dist/esm/models/Inventory.js +17 -4
  43. package/dist/esm/models/OsInfo.d.ts +12 -0
  44. package/dist/esm/models/OsInfo.js +9 -0
  45. package/dist/esm/models/Product.d.ts +66 -0
  46. package/dist/esm/models/Product.js +61 -0
  47. package/dist/esm/models/UpdateInventory.d.ts +2 -2
  48. package/dist/esm/models/UpdateInventory.js +3 -3
  49. package/dist/esm/models/VirtualMachineDetail.d.ts +14 -0
  50. package/dist/esm/models/VirtualMachineDetail.js +8 -0
  51. package/dist/esm/models/VirtualMachineIdentity.d.ts +34 -0
  52. package/dist/esm/models/VirtualMachineIdentity.js +47 -0
  53. package/dist/esm/models/VirtualMachineNIC.d.ts +12 -0
  54. package/dist/esm/models/VirtualMachineNIC.js +6 -0
  55. package/dist/esm/models/index.d.ts +8 -1
  56. package/dist/esm/models/index.js +8 -1
  57. package/dist/models/Appliance.d.ts +51 -0
  58. package/dist/models/Appliance.js +71 -0
  59. package/dist/models/ApplianceListResponse.d.ts +31 -0
  60. package/dist/models/ApplianceListResponse.js +51 -0
  61. package/dist/models/ApplicationOverview.d.ts +16 -0
  62. package/dist/models/ApplicationOverview.js +12 -0
  63. package/dist/models/CollectedInventory.d.ts +31 -0
  64. package/dist/models/CollectedInventory.js +51 -0
  65. package/dist/models/GroupResponse.d.ts +2 -2
  66. package/dist/models/GroupResponse.js +3 -3
  67. package/dist/models/Host.d.ts +10 -0
  68. package/dist/models/Host.js +6 -0
  69. package/dist/models/HostPhysicalNIC.d.ts +34 -0
  70. package/dist/models/HostPhysicalNIC.js +52 -0
  71. package/dist/models/HostStorageAdapter.d.ts +58 -0
  72. package/dist/models/HostStorageAdapter.js +62 -0
  73. package/dist/models/HostStorageLun.d.ts +50 -0
  74. package/dist/models/HostStorageLun.js +58 -0
  75. package/dist/models/Inventory.d.ts +24 -2
  76. package/dist/models/Inventory.js +17 -4
  77. package/dist/models/OsInfo.d.ts +12 -0
  78. package/dist/models/OsInfo.js +10 -1
  79. package/dist/models/Product.d.ts +66 -0
  80. package/dist/models/Product.js +68 -0
  81. package/dist/models/UpdateInventory.d.ts +2 -2
  82. package/dist/models/UpdateInventory.js +3 -3
  83. package/dist/models/VirtualMachineDetail.d.ts +14 -0
  84. package/dist/models/VirtualMachineDetail.js +8 -0
  85. package/dist/models/VirtualMachineIdentity.d.ts +34 -0
  86. package/dist/models/VirtualMachineIdentity.js +54 -0
  87. package/dist/models/VirtualMachineNIC.d.ts +12 -0
  88. package/dist/models/VirtualMachineNIC.js +6 -0
  89. package/dist/models/index.d.ts +8 -1
  90. package/dist/models/index.js +8 -1
  91. package/docs/{Inventory1.md → Appliance.md} +16 -16
  92. package/docs/ApplianceListResponse.md +34 -0
  93. package/docs/AppliancesApi.md +76 -0
  94. package/docs/ApplicationOverview.md +8 -0
  95. package/docs/CollectedInventory.md +34 -0
  96. package/docs/CollectorApi.md +0 -70
  97. package/docs/GroupResponse.md +1 -1
  98. package/docs/GroupsApi.md +68 -0
  99. package/docs/Host.md +4 -0
  100. package/docs/HostPhysicalNIC.md +36 -0
  101. package/docs/HostStorageAdapter.md +49 -0
  102. package/docs/HostStorageLun.md +45 -0
  103. package/docs/InventoriesApi.md +4 -4
  104. package/docs/Inventory.md +12 -2
  105. package/docs/OsInfo.md +2 -0
  106. package/docs/Product.md +52 -0
  107. package/docs/UpdateInventory.md +1 -1
  108. package/docs/VirtualMachineDetail.md +6 -0
  109. package/docs/VirtualMachineIdentity.md +36 -0
  110. package/docs/VirtualMachineNIC.md +6 -0
  111. package/package.json +1 -1
  112. package/src/apis/AppliancesApi.ts +111 -0
  113. package/src/apis/CollectorApi.ts +0 -97
  114. package/src/apis/GroupsApi.ts +80 -0
  115. package/src/apis/InventoriesApi.ts +14 -14
  116. package/src/apis/index.ts +1 -0
  117. package/src/models/Appliance.ts +107 -0
  118. package/src/models/ApplianceListResponse.ts +72 -0
  119. package/src/models/ApplicationOverview.ts +26 -0
  120. package/src/models/CollectedInventory.ts +72 -0
  121. package/src/models/GroupResponse.ts +9 -9
  122. package/src/models/Host.ts +27 -0
  123. package/src/models/HostPhysicalNIC.ts +70 -0
  124. package/src/models/HostStorageAdapter.ts +105 -0
  125. package/src/models/HostStorageLun.ts +93 -0
  126. package/src/models/Inventory.ts +42 -11
  127. package/src/models/OsInfo.ts +15 -0
  128. package/src/models/Product.ts +118 -0
  129. package/src/models/UpdateInventory.ts +9 -9
  130. package/src/models/VirtualMachineDetail.ts +32 -0
  131. package/src/models/VirtualMachineIdentity.ts +71 -0
  132. package/src/models/VirtualMachineNIC.ts +18 -0
  133. package/src/models/index.ts +8 -1
  134. package/dist/esm/models/Inventory1.d.ts +0 -53
  135. package/dist/esm/models/Inventory1.js +0 -57
  136. package/dist/models/Inventory1.d.ts +0 -53
  137. package/dist/models/Inventory1.js +0 -64
  138. package/src/models/Inventory1.ts +0 -103
@@ -8,6 +8,7 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
10
  `name` | string
11
+ `annotation` | string
11
12
  `vCenterID` | string
12
13
  `uuid` | string
13
14
  `firmware` | string
@@ -37,6 +38,7 @@ Name | Type
37
38
  `toolsStatus` | string
38
39
  `toolsRunningStatus` | string
39
40
  `disks` | [Array<VirtualMachineDisk>](VirtualMachineDisk.md)
41
+ `hostPhysicalNics` | [Array<HostPhysicalNIC>](HostPhysicalNIC.md)
40
42
  `nicCount` | number
41
43
  `nics` | [Array<VirtualMachineNIC>](VirtualMachineNIC.md)
42
44
  `devices` | [Array<VirtualMachineDevice>](VirtualMachineDevice.md)
@@ -45,6 +47,7 @@ Name | Type
45
47
  `inspection` | [VirtualMachineInspectionResults](VirtualMachineInspectionResults.md)
46
48
  `utilization` | [VmUtilizationDetails](VmUtilizationDetails.md)
47
49
  `processes` | [Array<Process>](Process.md)
50
+ `products` | [Array<Product>](Product.md)
48
51
 
49
52
  ## Example
50
53
 
@@ -55,6 +58,7 @@ import type { VirtualMachineDetail } from '@openshift-migration-advisor/agent-sd
55
58
  const example = {
56
59
  "id": null,
57
60
  "name": null,
61
+ "annotation": null,
58
62
  "vCenterID": null,
59
63
  "uuid": null,
60
64
  "firmware": null,
@@ -84,6 +88,7 @@ const example = {
84
88
  "toolsStatus": null,
85
89
  "toolsRunningStatus": null,
86
90
  "disks": null,
91
+ "hostPhysicalNics": null,
87
92
  "nicCount": null,
88
93
  "nics": null,
89
94
  "devices": null,
@@ -92,6 +97,7 @@ const example = {
92
97
  "inspection": null,
93
98
  "utilization": null,
94
99
  "processes": null,
100
+ "products": null,
95
101
  } satisfies VirtualMachineDetail
96
102
 
97
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
+
@@ -7,6 +7,9 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `adapter` | string
10
+ `vlanId` | string
11
+ `ipv4Addresses` | Array<string>
12
+ `ipv6Addresses` | Array<string>
10
13
  `mac` | string
11
14
  `network` | string
12
15
  `index` | number
@@ -19,6 +22,9 @@ import type { VirtualMachineNIC } from '@openshift-migration-advisor/agent-sdk'
19
22
  // TODO: Update the object below with actual values
20
23
  const example = {
21
24
  "adapter": null,
25
+ "vlanId": null,
26
+ "ipv4Addresses": null,
27
+ "ipv6Addresses": null,
22
28
  "mac": null,
23
29
  "network": null,
24
30
  "index": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/agent-sdk",
3
- "version": "0.31.0",
3
+ "version": "0.32.0-b4969275f1eb",
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
  */
@@ -14,10 +14,10 @@
14
14
 
15
15
  import * as runtime from '../runtime.js';
16
16
  import {
17
- type Inventory,
18
- InventoryFromJSON,
19
- InventoryToJSON,
20
- } from '../models/Inventory.js';
17
+ type CollectedInventory,
18
+ CollectedInventoryFromJSON,
19
+ CollectedInventoryToJSON,
20
+ } from '../models/CollectedInventory.js';
21
21
 
22
22
  export interface GetInventoryRequest {
23
23
  /**
@@ -56,12 +56,12 @@ export interface InventoriesApiInterface {
56
56
  * @throws {RequiredError}
57
57
  * @memberof InventoriesApiInterface
58
58
  */
59
- getInventoryRaw(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
59
+ getInventoryRaw(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectedInventory>>;
60
60
 
61
61
  /**
62
62
  * Get collected inventory for a collection
63
63
  */
64
- getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
64
+ getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectedInventory>;
65
65
 
66
66
  /**
67
67
  * Creates request options for getLatestInventory without sending the request
@@ -79,12 +79,12 @@ export interface InventoriesApiInterface {
79
79
  * @throws {RequiredError}
80
80
  * @memberof InventoriesApiInterface
81
81
  */
82
- getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
82
+ getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectedInventory>>;
83
83
 
84
84
  /**
85
85
  * Get inventory from the latest collection
86
86
  */
87
- getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
87
+ getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectedInventory>;
88
88
 
89
89
  }
90
90
 
@@ -123,17 +123,17 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
123
123
  /**
124
124
  * Get collected inventory for a collection
125
125
  */
126
- async getInventoryRaw(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>> {
126
+ async getInventoryRaw(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectedInventory>> {
127
127
  const requestOptions = await this.getInventoryRequestOpts(requestParameters);
128
128
  const response = await this.request(requestOptions, initOverrides);
129
129
 
130
- return new runtime.JSONApiResponse(response, (jsonValue) => InventoryFromJSON(jsonValue));
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => CollectedInventoryFromJSON(jsonValue));
131
131
  }
132
132
 
133
133
  /**
134
134
  * Get collected inventory for a collection
135
135
  */
136
- async getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory> {
136
+ async getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectedInventory> {
137
137
  const response = await this.getInventoryRaw(requestParameters, initOverrides);
138
138
  return await response.value();
139
139
  }
@@ -164,17 +164,17 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
164
164
  /**
165
165
  * Get inventory from the latest collection
166
166
  */
167
- async getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>> {
167
+ async getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectedInventory>> {
168
168
  const requestOptions = await this.getLatestInventoryRequestOpts(requestParameters);
169
169
  const response = await this.request(requestOptions, initOverrides);
170
170
 
171
- return new runtime.JSONApiResponse(response, (jsonValue) => InventoryFromJSON(jsonValue));
171
+ return new runtime.JSONApiResponse(response, (jsonValue) => CollectedInventoryFromJSON(jsonValue));
172
172
  }
173
173
 
174
174
  /**
175
175
  * Get inventory from the latest collection
176
176
  */
177
- async getLatestInventory(requestParameters: GetLatestInventoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory> {
177
+ async getLatestInventory(requestParameters: GetLatestInventoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectedInventory> {
178
178
  const response = await this.getLatestInventoryRaw(requestParameters, initOverrides);
179
179
  return await response.value();
180
180
  }
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
+