@openshift-migration-advisor/agent-sdk 0.8.0-0a190192e598 → 0.8.0-a3f90da0e31d

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 (58) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +15 -14
  4. package/dist/apis/DefaultApi.d.ts +16 -51
  5. package/dist/apis/DefaultApi.js +18 -58
  6. package/dist/esm/apis/DefaultApi.d.ts +16 -51
  7. package/dist/esm/apis/DefaultApi.js +18 -58
  8. package/dist/esm/models/InspectorStatus.d.ts +0 -1
  9. package/dist/esm/models/InspectorStatus.js +0 -1
  10. package/dist/esm/models/VMs.d.ts +9 -0
  11. package/dist/esm/models/VMs.js +2 -0
  12. package/dist/esm/models/VirtualMachine.d.ts +7 -1
  13. package/dist/esm/models/VirtualMachine.js +4 -4
  14. package/dist/esm/models/VirtualMachineDetail.d.ts +3 -3
  15. package/dist/esm/models/VirtualMachineDetail.js +3 -3
  16. package/dist/esm/models/VmInspectionConcern.d.ts +44 -0
  17. package/dist/esm/models/VmInspectionConcern.js +51 -0
  18. package/dist/esm/models/VmInspectionResults.d.ts +33 -0
  19. package/dist/esm/models/VmInspectionResults.js +42 -0
  20. package/dist/esm/models/VmInspectionStatus.d.ts +0 -1
  21. package/dist/esm/models/VmInspectionStatus.js +1 -2
  22. package/dist/esm/models/index.d.ts +2 -0
  23. package/dist/esm/models/index.js +2 -0
  24. package/dist/esm/runtime.js +1 -1
  25. package/dist/models/InspectorStatus.d.ts +0 -1
  26. package/dist/models/InspectorStatus.js +0 -1
  27. package/dist/models/VMs.d.ts +9 -0
  28. package/dist/models/VMs.js +2 -0
  29. package/dist/models/VirtualMachine.d.ts +7 -1
  30. package/dist/models/VirtualMachine.js +4 -4
  31. package/dist/models/VirtualMachineDetail.d.ts +3 -3
  32. package/dist/models/VirtualMachineDetail.js +3 -3
  33. package/dist/models/VmInspectionConcern.d.ts +44 -0
  34. package/dist/models/VmInspectionConcern.js +58 -0
  35. package/dist/models/VmInspectionResults.d.ts +33 -0
  36. package/dist/models/VmInspectionResults.js +49 -0
  37. package/dist/models/VmInspectionStatus.d.ts +0 -1
  38. package/dist/models/VmInspectionStatus.js +1 -2
  39. package/dist/models/index.d.ts +2 -0
  40. package/dist/models/index.js +2 -0
  41. package/dist/runtime.js +1 -1
  42. package/docs/DefaultApi.md +22 -89
  43. package/docs/VMs.md +2 -0
  44. package/docs/VirtualMachine.md +4 -2
  45. package/docs/VirtualMachineDetail.md +1 -1
  46. package/docs/VmInspectionConcern.md +39 -0
  47. package/docs/VmInspectionResults.md +35 -0
  48. package/package.json +1 -1
  49. package/src/apis/DefaultApi.ts +29 -103
  50. package/src/models/InspectorStatus.ts +0 -1
  51. package/src/models/VMs.ts +9 -0
  52. package/src/models/VirtualMachine.ts +11 -4
  53. package/src/models/VirtualMachineDetail.ts +11 -11
  54. package/src/models/VmInspectionConcern.ts +84 -0
  55. package/src/models/VmInspectionResults.ts +73 -0
  56. package/src/models/VmInspectionStatus.ts +1 -2
  57. package/src/models/index.ts +2 -0
  58. package/src/runtime.ts +1 -1
@@ -70,8 +70,8 @@ import {
70
70
  VmInspectionStatusToJSON,
71
71
  } from '../models/index.js';
72
72
 
73
- export interface AddVMsToInspectionRequest {
74
- requestBody: Array<string>;
73
+ export interface AddVMToInspectionRequest {
74
+ id: string;
75
75
  }
76
76
 
77
77
  export interface CreateGroupOperationRequest {
@@ -98,10 +98,6 @@ export interface GetVMRequest {
98
98
  id: string;
99
99
  }
100
100
 
101
- export interface GetVMInspectionStatusRequest {
102
- id: string;
103
- }
104
-
105
101
  export interface GetVMsRequest {
106
102
  byExpression?: string;
107
103
  sort?: Array<string>;
@@ -148,27 +144,27 @@ export interface VddkPostRequest {
148
144
  */
149
145
  export interface DefaultApiInterface {
150
146
  /**
151
- * Creates request options for addVMsToInspection without sending the request
152
- * @param {Array<string>} requestBody
147
+ * Creates request options for addVMToInspection without sending the request
148
+ * @param {string} id
153
149
  * @throws {RequiredError}
154
150
  * @memberof DefaultApiInterface
155
151
  */
156
- addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts>;
152
+ addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
157
153
 
158
154
  /**
159
155
  *
160
- * @summary Add more VMs to inspection queue
161
- * @param {Array<string>} requestBody
156
+ * @summary Add VirtualMachine to inspection queue
157
+ * @param {string} id
162
158
  * @param {*} [options] Override http request option.
163
159
  * @throws {RequiredError}
164
160
  * @memberof DefaultApiInterface
165
161
  */
166
- addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>>;
162
+ addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
167
163
 
168
164
  /**
169
- * Add more VMs to inspection queue
165
+ * Add VirtualMachine to inspection queue
170
166
  */
171
- addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus>;
167
+ addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
172
168
 
173
169
  /**
174
170
  * Creates request options for createGroup without sending the request
@@ -356,29 +352,6 @@ export interface DefaultApiInterface {
356
352
  */
357
353
  getVM(requestParameters: GetVMRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineDetail>;
358
354
 
359
- /**
360
- * Creates request options for getVMInspectionStatus without sending the request
361
- * @param {string} id VirtualMachine ID
362
- * @throws {RequiredError}
363
- * @memberof DefaultApiInterface
364
- */
365
- getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts>;
366
-
367
- /**
368
- *
369
- * @summary Get inspection status for a specific VirtualMachine
370
- * @param {string} id VirtualMachine ID
371
- * @param {*} [options] Override http request option.
372
- * @throws {RequiredError}
373
- * @memberof DefaultApiInterface
374
- */
375
- getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
376
-
377
- /**
378
- * Get inspection status for a specific VirtualMachine
379
- */
380
- getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
381
-
382
355
  /**
383
356
  * Creates request options for getVMs without sending the request
384
357
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
@@ -667,13 +640,13 @@ export interface DefaultApiInterface {
667
640
  export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
668
641
 
669
642
  /**
670
- * Creates request options for addVMsToInspection without sending the request
643
+ * Creates request options for addVMToInspection without sending the request
671
644
  */
672
- async addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts> {
673
- if (requestParameters['requestBody'] == null) {
645
+ async addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts> {
646
+ if (requestParameters['id'] == null) {
674
647
  throw new runtime.RequiredError(
675
- 'requestBody',
676
- 'Required parameter "requestBody" was null or undefined when calling addVMsToInspection().'
648
+ 'id',
649
+ 'Required parameter "id" was null or undefined when calling addVMToInspection().'
677
650
  );
678
651
  }
679
652
 
@@ -681,35 +654,33 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
681
654
 
682
655
  const headerParameters: runtime.HTTPHeaders = {};
683
656
 
684
- headerParameters['Content-Type'] = 'application/json';
685
-
686
657
 
687
- let urlPath = `/vms/inspector`;
658
+ let urlPath = `/vms/{id}/inspection`;
659
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
688
660
 
689
661
  return {
690
662
  path: urlPath,
691
- method: 'PATCH',
663
+ method: 'POST',
692
664
  headers: headerParameters,
693
665
  query: queryParameters,
694
- body: requestParameters['requestBody'],
695
666
  };
696
667
  }
697
668
 
698
669
  /**
699
- * Add more VMs to inspection queue
670
+ * Add VirtualMachine to inspection queue
700
671
  */
701
- async addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>> {
702
- const requestOptions = await this.addVMsToInspectionRequestOpts(requestParameters);
672
+ async addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>> {
673
+ const requestOptions = await this.addVMToInspectionRequestOpts(requestParameters);
703
674
  const response = await this.request(requestOptions, initOverrides);
704
675
 
705
- return new runtime.JSONApiResponse(response, (jsonValue) => InspectorStatusFromJSON(jsonValue));
676
+ return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
706
677
  }
707
678
 
708
679
  /**
709
- * Add more VMs to inspection queue
680
+ * Add VirtualMachine to inspection queue
710
681
  */
711
- async addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus> {
712
- const response = await this.addVMsToInspectionRaw(requestParameters, initOverrides);
682
+ async addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus> {
683
+ const response = await this.addVMToInspectionRaw(requestParameters, initOverrides);
713
684
  return await response.value();
714
685
  }
715
686
 
@@ -944,7 +915,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
944
915
  const headerParameters: runtime.HTTPHeaders = {};
945
916
 
946
917
 
947
- let urlPath = `/vms/inspector`;
918
+ let urlPath = `/inspector`;
948
919
 
949
920
  return {
950
921
  path: urlPath,
@@ -1062,51 +1033,6 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1062
1033
  return await response.value();
1063
1034
  }
1064
1035
 
1065
- /**
1066
- * Creates request options for getVMInspectionStatus without sending the request
1067
- */
1068
- async getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts> {
1069
- if (requestParameters['id'] == null) {
1070
- throw new runtime.RequiredError(
1071
- 'id',
1072
- 'Required parameter "id" was null or undefined when calling getVMInspectionStatus().'
1073
- );
1074
- }
1075
-
1076
- const queryParameters: any = {};
1077
-
1078
- const headerParameters: runtime.HTTPHeaders = {};
1079
-
1080
-
1081
- let urlPath = `/vms/{id}/inspector`;
1082
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1083
-
1084
- return {
1085
- path: urlPath,
1086
- method: 'GET',
1087
- headers: headerParameters,
1088
- query: queryParameters,
1089
- };
1090
- }
1091
-
1092
- /**
1093
- * Get inspection status for a specific VirtualMachine
1094
- */
1095
- async getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>> {
1096
- const requestOptions = await this.getVMInspectionStatusRequestOpts(requestParameters);
1097
- const response = await this.request(requestOptions, initOverrides);
1098
-
1099
- return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
1100
- }
1101
-
1102
- /**
1103
- * Get inspection status for a specific VirtualMachine
1104
- */
1105
- async getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus> {
1106
- const response = await this.getVMInspectionStatusRaw(requestParameters, initOverrides);
1107
- return await response.value();
1108
- }
1109
-
1110
1036
  /**
1111
1037
  * Creates request options for getVMs without sending the request
1112
1038
  */
@@ -1299,7 +1225,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1299
1225
  const headerParameters: runtime.HTTPHeaders = {};
1300
1226
 
1301
1227
 
1302
- let urlPath = `/vms/{id}/inspector`;
1228
+ let urlPath = `/vms/{id}/inspection`;
1303
1229
  urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1304
1230
 
1305
1231
  return {
@@ -1440,7 +1366,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1440
1366
  headerParameters['Content-Type'] = 'application/json';
1441
1367
 
1442
1368
 
1443
- let urlPath = `/vms/inspector`;
1369
+ let urlPath = `/inspector`;
1444
1370
 
1445
1371
  return {
1446
1372
  path: urlPath,
@@ -1514,7 +1440,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1514
1440
  const headerParameters: runtime.HTTPHeaders = {};
1515
1441
 
1516
1442
 
1517
- let urlPath = `/vms/inspector`;
1443
+ let urlPath = `/inspector`;
1518
1444
 
1519
1445
  return {
1520
1446
  path: urlPath,
@@ -41,7 +41,6 @@ export const InspectorStatusStateEnum = {
41
41
  InspectorStatusStateReady: 'ready',
42
42
  InspectorStatusStateInitiating: 'Initiating',
43
43
  InspectorStatusStateRunning: 'running',
44
- InspectorStatusStateCanceling: 'canceling',
45
44
  InspectorStatusStateCanceled: 'canceled',
46
45
  InspectorStatusStateCompleted: 'completed',
47
46
  InspectorStatusStateError: 'error'
package/src/models/VMs.ts CHANGED
@@ -119,8 +119,15 @@ export interface VMs {
119
119
  * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
120
120
  * @type {{ [key: string]: number; }}
121
121
  * @memberof VMs
122
+ * @deprecated
122
123
  */
123
124
  distributionByComplexity?: { [key: string]: number; };
125
+ /**
126
+ * Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity.
127
+ * @type {{ [key: string]: DiskSizeTierSummary; }}
128
+ * @memberof VMs
129
+ */
130
+ complexityDistribution?: { [key: string]: DiskSizeTierSummary; };
124
131
  /**
125
132
  *
126
133
  * @type {VMResourceBreakdown}
@@ -215,6 +222,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
215
222
  'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
216
223
  'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
217
224
  'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
225
+ 'complexityDistribution': json['complexityDistribution'] == null ? undefined : (mapValues(json['complexityDistribution'], DiskSizeTierSummaryFromJSON)),
218
226
  'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
219
227
  'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
220
228
  'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
@@ -249,6 +257,7 @@ export function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator: boolean
249
257
  'distributionByMemoryTier': value['distributionByMemoryTier'],
250
258
  'distributionByNicCount': value['distributionByNicCount'],
251
259
  'distributionByComplexity': value['distributionByComplexity'],
260
+ 'complexityDistribution': value['complexityDistribution'] == null ? undefined : (mapValues(value['complexityDistribution'], DiskSizeTierSummaryToJSON)),
252
261
  'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
253
262
  'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
254
263
  'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
@@ -92,7 +92,13 @@ export interface VirtualMachine {
92
92
  * @type {VmInspectionStatus}
93
93
  * @memberof VirtualMachine
94
94
  */
95
- inspection: VmInspectionStatus;
95
+ inspectionStatus?: VmInspectionStatus;
96
+ /**
97
+ * Number of inspection concerns recorded for the latest persisted inspection result
98
+ * @type {number}
99
+ * @memberof VirtualMachine
100
+ */
101
+ inspectionConcernCount?: number;
96
102
  /**
97
103
  * Tags aggregated from matching groups
98
104
  * @type {Array<string>}
@@ -113,7 +119,6 @@ export function instanceOfVirtualMachine(value: object): value is VirtualMachine
113
119
  if (!('diskSize' in value) || value['diskSize'] === undefined) return false;
114
120
  if (!('memory' in value) || value['memory'] === undefined) return false;
115
121
  if (!('issueCount' in value) || value['issueCount'] === undefined) return false;
116
- if (!('inspection' in value) || value['inspection'] === undefined) return false;
117
122
  return true;
118
123
  }
119
124
 
@@ -137,7 +142,8 @@ export function VirtualMachineFromJSONTyped(json: any, ignoreDiscriminator: bool
137
142
  'issueCount': json['issueCount'],
138
143
  'migratable': json['migratable'] == null ? undefined : json['migratable'],
139
144
  'template': json['template'] == null ? undefined : json['template'],
140
- 'inspection': VmInspectionStatusFromJSON(json['inspection']),
145
+ 'inspectionStatus': json['inspectionStatus'] == null ? undefined : VmInspectionStatusFromJSON(json['inspectionStatus']),
146
+ 'inspectionConcernCount': json['inspectionConcernCount'] == null ? undefined : json['inspectionConcernCount'],
141
147
  'tags': json['tags'] == null ? undefined : json['tags'],
142
148
  };
143
149
  }
@@ -163,7 +169,8 @@ export function VirtualMachineToJSONTyped(value?: VirtualMachine | null, ignoreD
163
169
  'issueCount': value['issueCount'],
164
170
  'migratable': value['migratable'],
165
171
  'template': value['template'],
166
- 'inspection': VmInspectionStatusToJSON(value['inspection']),
172
+ 'inspectionStatus': VmInspectionStatusToJSON(value['inspectionStatus']),
173
+ 'inspectionConcernCount': value['inspectionConcernCount'],
167
174
  'tags': value['tags'],
168
175
  };
169
176
  }
@@ -20,13 +20,6 @@ import {
20
20
  VMNICToJSON,
21
21
  VMNICToJSONTyped,
22
22
  } from './VMNIC.js';
23
- import type { VmInspectionStatus } from './VmInspectionStatus.js';
24
- import {
25
- VmInspectionStatusFromJSON,
26
- VmInspectionStatusFromJSONTyped,
27
- VmInspectionStatusToJSON,
28
- VmInspectionStatusToJSONTyped,
29
- } from './VmInspectionStatus.js';
30
23
  import type { GuestNetwork } from './GuestNetwork.js';
31
24
  import {
32
25
  GuestNetworkFromJSON,
@@ -55,6 +48,13 @@ import {
55
48
  VMDiskToJSON,
56
49
  VMDiskToJSONTyped,
57
50
  } from './VMDisk.js';
51
+ import type { VmInspectionResults } from './VmInspectionResults.js';
52
+ import {
53
+ VmInspectionResultsFromJSON,
54
+ VmInspectionResultsFromJSONTyped,
55
+ VmInspectionResultsToJSON,
56
+ VmInspectionResultsToJSONTyped,
57
+ } from './VmInspectionResults.js';
58
58
 
59
59
  /**
60
60
  *
@@ -244,10 +244,10 @@ export interface VirtualMachineDetail {
244
244
  issues?: Array<VMIssue>;
245
245
  /**
246
246
  *
247
- * @type {VmInspectionStatus}
247
+ * @type {VmInspectionResults}
248
248
  * @memberof VirtualMachineDetail
249
249
  */
250
- inspection?: VmInspectionStatus;
250
+ inspection?: VmInspectionResults;
251
251
  }
252
252
 
253
253
  /**
@@ -306,7 +306,7 @@ export function VirtualMachineDetailFromJSONTyped(json: any, ignoreDiscriminator
306
306
  'devices': json['devices'] == null ? undefined : ((json['devices'] as Array<any>).map(VMDeviceFromJSON)),
307
307
  'guestNetworks': json['guestNetworks'] == null ? undefined : ((json['guestNetworks'] as Array<any>).map(GuestNetworkFromJSON)),
308
308
  'issues': json['issues'] == null ? undefined : ((json['issues'] as Array<any>).map(VMIssueFromJSON)),
309
- 'inspection': json['inspection'] == null ? undefined : VmInspectionStatusFromJSON(json['inspection']),
309
+ 'inspection': json['inspection'] == null ? undefined : VmInspectionResultsFromJSON(json['inspection']),
310
310
  };
311
311
  }
312
312
 
@@ -351,7 +351,7 @@ export function VirtualMachineDetailToJSONTyped(value?: VirtualMachineDetail | n
351
351
  'devices': value['devices'] == null ? undefined : ((value['devices'] as Array<any>).map(VMDeviceToJSON)),
352
352
  'guestNetworks': value['guestNetworks'] == null ? undefined : ((value['guestNetworks'] as Array<any>).map(GuestNetworkToJSON)),
353
353
  'issues': value['issues'] == null ? undefined : ((value['issues'] as Array<any>).map(VMIssueToJSON)),
354
- 'inspection': VmInspectionStatusToJSON(value['inspection']),
354
+ 'inspection': VmInspectionResultsToJSON(value['inspection']),
355
355
  };
356
356
  }
357
357
 
@@ -0,0 +1,84 @@
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: v1
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
+ /**
17
+ * Represents the structure of vm-migration-detective library inspection concerns
18
+ * @export
19
+ * @interface VmInspectionConcern
20
+ */
21
+ export interface VmInspectionConcern {
22
+ /**
23
+ * Short label identifying the concern
24
+ * @type {string}
25
+ * @memberof VmInspectionConcern
26
+ */
27
+ label: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof VmInspectionConcern
32
+ */
33
+ message: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof VmInspectionConcern
38
+ */
39
+ category: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the VmInspectionConcern interface.
44
+ */
45
+ export function instanceOfVmInspectionConcern(value: object): value is VmInspectionConcern {
46
+ if (!('label' in value) || value['label'] === undefined) return false;
47
+ if (!('message' in value) || value['message'] === undefined) return false;
48
+ if (!('category' in value) || value['category'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function VmInspectionConcernFromJSON(json: any): VmInspectionConcern {
53
+ return VmInspectionConcernFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function VmInspectionConcernFromJSONTyped(json: any, ignoreDiscriminator: boolean): VmInspectionConcern {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'label': json['label'],
63
+ 'message': json['message'],
64
+ 'category': json['category'],
65
+ };
66
+ }
67
+
68
+ export function VmInspectionConcernToJSON(json: any): VmInspectionConcern {
69
+ return VmInspectionConcernToJSONTyped(json, false);
70
+ }
71
+
72
+ export function VmInspectionConcernToJSONTyped(value?: VmInspectionConcern | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'label': value['label'],
80
+ 'message': value['message'],
81
+ 'category': value['category'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,73 @@
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: v1
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 { VmInspectionConcern } from './VmInspectionConcern.js';
17
+ import {
18
+ VmInspectionConcernFromJSON,
19
+ VmInspectionConcernFromJSONTyped,
20
+ VmInspectionConcernToJSON,
21
+ VmInspectionConcernToJSONTyped,
22
+ } from './VmInspectionConcern.js';
23
+
24
+ /**
25
+ * VirtualMachine Inspection results
26
+ * @export
27
+ * @interface VmInspectionResults
28
+ */
29
+ export interface VmInspectionResults {
30
+ /**
31
+ *
32
+ * @type {Array<VmInspectionConcern>}
33
+ * @memberof VmInspectionResults
34
+ */
35
+ concerns?: Array<VmInspectionConcern>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the VmInspectionResults interface.
40
+ */
41
+ export function instanceOfVmInspectionResults(value: object): value is VmInspectionResults {
42
+ return true;
43
+ }
44
+
45
+ export function VmInspectionResultsFromJSON(json: any): VmInspectionResults {
46
+ return VmInspectionResultsFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function VmInspectionResultsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VmInspectionResults {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'concerns': json['concerns'] == null ? undefined : ((json['concerns'] as Array<any>).map(VmInspectionConcernFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function VmInspectionResultsToJSON(json: any): VmInspectionResults {
60
+ return VmInspectionResultsToJSONTyped(json, false);
61
+ }
62
+
63
+ export function VmInspectionResultsToJSONTyped(value?: VmInspectionResults | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'concerns': value['concerns'] == null ? undefined : ((value['concerns'] as Array<any>).map(VmInspectionConcernToJSON)),
71
+ };
72
+ }
73
+
@@ -48,8 +48,7 @@ export const VmInspectionStatusStateEnum = {
48
48
  VmInspectionStatusStateRunning: 'running',
49
49
  VmInspectionStatusStateCompleted: 'completed',
50
50
  VmInspectionStatusStateCanceled: 'canceled',
51
- VmInspectionStatusStateError: 'error',
52
- VmInspectionStatusStateNotFound: 'not_found'
51
+ VmInspectionStatusStateError: 'error'
53
52
  } as const;
54
53
  export type VmInspectionStatusStateEnum = typeof VmInspectionStatusStateEnum[keyof typeof VmInspectionStatusStateEnum];
55
54
 
@@ -38,4 +38,6 @@ export * from './VersionInfo.js';
38
38
  export * from './VirtualMachine.js';
39
39
  export * from './VirtualMachineDetail.js';
40
40
  export * from './VirtualMachineListResponse.js';
41
+ export * from './VmInspectionConcern.js';
42
+ export * from './VmInspectionResults.js';
41
43
  export * from './VmInspectionStatus.js';
package/src/runtime.ts CHANGED
@@ -91,7 +91,7 @@ export const DefaultConfig = new Configuration();
91
91
  */
92
92
  export class BaseAPI {
93
93
 
94
- private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
94
+ private static readonly jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
95
95
  private middleware: Middleware[];
96
96
 
97
97
  constructor(protected configuration = DefaultConfig) {