@openshift-migration-advisor/agent-sdk 0.12.0-f90a4cad59fa → 0.16.0

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 (95) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +16 -3
  4. package/dist/apis/DefaultApi.d.ts +209 -4
  5. package/dist/apis/DefaultApi.js +229 -0
  6. package/dist/esm/apis/DefaultApi.d.ts +209 -4
  7. package/dist/esm/apis/DefaultApi.js +229 -0
  8. package/dist/esm/models/ApplicationListResponse.d.ts +33 -0
  9. package/dist/esm/models/ApplicationListResponse.js +44 -0
  10. package/dist/esm/models/ApplicationOverview.d.ts +51 -0
  11. package/dist/esm/models/ApplicationOverview.js +56 -0
  12. package/dist/esm/models/ApplicationVM.d.ts +38 -0
  13. package/dist/esm/models/ApplicationVM.js +47 -0
  14. package/dist/esm/models/CapabilityStatus.d.ts +33 -0
  15. package/dist/esm/models/CapabilityStatus.js +44 -0
  16. package/dist/esm/models/CapabilityStatusCapabilities.d.ts +45 -0
  17. package/dist/esm/models/CapabilityStatusCapabilities.js +52 -0
  18. package/dist/esm/models/CollectorStartRequest.d.ts +12 -0
  19. package/dist/esm/models/CollectorStartRequest.js +4 -0
  20. package/dist/esm/models/CredentialStatus.d.ts +44 -0
  21. package/dist/esm/models/CredentialStatus.js +51 -0
  22. package/dist/esm/models/OperationCapability.d.ts +38 -0
  23. package/dist/esm/models/OperationCapability.js +45 -0
  24. package/dist/esm/models/StartInspectionRequest.d.ts +1 -1
  25. package/dist/esm/models/StartInspectionRequest.js +1 -3
  26. package/dist/esm/models/VMFilterOptionsResponse.d.ts +6 -0
  27. package/dist/esm/models/VMFilterOptionsResponse.js +4 -0
  28. package/dist/esm/models/VMNIC.d.ts +12 -0
  29. package/dist/esm/models/VMNIC.js +4 -0
  30. package/dist/esm/models/VcenterCredentials.d.ts +12 -0
  31. package/dist/esm/models/VcenterCredentials.js +4 -0
  32. package/dist/esm/models/VmInspectionStatus.d.ts +6 -0
  33. package/dist/esm/models/VmInspectionStatus.js +4 -0
  34. package/dist/esm/models/index.d.ts +7 -0
  35. package/dist/esm/models/index.js +7 -0
  36. package/dist/esm/runtime.js +2 -1
  37. package/dist/models/ApplicationListResponse.d.ts +33 -0
  38. package/dist/models/ApplicationListResponse.js +51 -0
  39. package/dist/models/ApplicationOverview.d.ts +51 -0
  40. package/dist/models/ApplicationOverview.js +63 -0
  41. package/dist/models/ApplicationVM.d.ts +38 -0
  42. package/dist/models/ApplicationVM.js +54 -0
  43. package/dist/models/CapabilityStatus.d.ts +33 -0
  44. package/dist/models/CapabilityStatus.js +51 -0
  45. package/dist/models/CapabilityStatusCapabilities.d.ts +45 -0
  46. package/dist/models/CapabilityStatusCapabilities.js +59 -0
  47. package/dist/models/CollectorStartRequest.d.ts +12 -0
  48. package/dist/models/CollectorStartRequest.js +4 -0
  49. package/dist/models/CredentialStatus.d.ts +44 -0
  50. package/dist/models/CredentialStatus.js +58 -0
  51. package/dist/models/OperationCapability.d.ts +38 -0
  52. package/dist/models/OperationCapability.js +52 -0
  53. package/dist/models/StartInspectionRequest.d.ts +1 -1
  54. package/dist/models/StartInspectionRequest.js +1 -3
  55. package/dist/models/VMFilterOptionsResponse.d.ts +6 -0
  56. package/dist/models/VMFilterOptionsResponse.js +4 -0
  57. package/dist/models/VMNIC.d.ts +12 -0
  58. package/dist/models/VMNIC.js +4 -0
  59. package/dist/models/VcenterCredentials.d.ts +12 -0
  60. package/dist/models/VcenterCredentials.js +4 -0
  61. package/dist/models/VmInspectionStatus.d.ts +6 -0
  62. package/dist/models/VmInspectionStatus.js +4 -0
  63. package/dist/models/index.d.ts +7 -0
  64. package/dist/models/index.js +7 -0
  65. package/dist/runtime.js +2 -1
  66. package/docs/ApplicationListResponse.md +34 -0
  67. package/docs/ApplicationOverview.md +40 -0
  68. package/docs/ApplicationVM.md +36 -0
  69. package/docs/CapabilityStatus.md +34 -0
  70. package/docs/CapabilityStatusCapabilities.md +38 -0
  71. package/docs/CollectorStartRequest.md +4 -0
  72. package/docs/CredentialStatus.md +38 -0
  73. package/docs/DefaultApi.md +391 -7
  74. package/docs/OperationCapability.md +36 -0
  75. package/docs/VMFilterOptionsResponse.md +2 -0
  76. package/docs/VMNIC.md +4 -0
  77. package/docs/VcenterCredentials.md +4 -0
  78. package/docs/VmInspectionStatus.md +2 -0
  79. package/package.json +1 -1
  80. package/src/apis/DefaultApi.ts +408 -4
  81. package/src/models/ApplicationListResponse.ts +74 -0
  82. package/src/models/ApplicationOverview.ts +101 -0
  83. package/src/models/ApplicationVM.ts +75 -0
  84. package/src/models/CapabilityStatus.ts +74 -0
  85. package/src/models/CapabilityStatusCapabilities.ts +92 -0
  86. package/src/models/CollectorStartRequest.ts +16 -0
  87. package/src/models/CredentialStatus.ts +84 -0
  88. package/src/models/OperationCapability.ts +74 -0
  89. package/src/models/StartInspectionRequest.ts +2 -3
  90. package/src/models/VMFilterOptionsResponse.ts +9 -0
  91. package/src/models/VMNIC.ts +16 -0
  92. package/src/models/VcenterCredentials.ts +16 -0
  93. package/src/models/VmInspectionStatus.ts +9 -0
  94. package/src/models/index.ts +7 -0
  95. package/src/runtime.ts +1 -1
@@ -23,11 +23,21 @@ import {
23
23
  AgentStatusFromJSON,
24
24
  AgentStatusToJSON,
25
25
  } from '../models/AgentStatus.js';
26
+ import {
27
+ type ApplicationListResponse,
28
+ ApplicationListResponseFromJSON,
29
+ ApplicationListResponseToJSON,
30
+ } from '../models/ApplicationListResponse.js';
26
31
  import {
27
32
  type BenchmarkRun,
28
33
  BenchmarkRunFromJSON,
29
34
  BenchmarkRunToJSON,
30
35
  } from '../models/BenchmarkRun.js';
36
+ import {
37
+ type CapabilityStatus,
38
+ CapabilityStatusFromJSON,
39
+ CapabilityStatusToJSON,
40
+ } from '../models/CapabilityStatus.js';
31
41
  import {
32
42
  type CollectorStartRequest,
33
43
  CollectorStartRequestFromJSON,
@@ -43,6 +53,11 @@ import {
43
53
  CreateGroupRequestFromJSON,
44
54
  CreateGroupRequestToJSON,
45
55
  } from '../models/CreateGroupRequest.js';
56
+ import {
57
+ type CredentialStatus,
58
+ CredentialStatusFromJSON,
59
+ CredentialStatusToJSON,
60
+ } from '../models/CredentialStatus.js';
46
61
  import {
47
62
  type DatastoreDetail,
48
63
  DatastoreDetailFromJSON,
@@ -230,6 +245,10 @@ export interface DeleteLabelGloballyRequest {
230
245
  label: string;
231
246
  }
232
247
 
248
+ export interface GetClusterUtilizationRequest {
249
+ clusterId: string;
250
+ }
251
+
233
252
  export interface GetForecasterDatastoresRequest {
234
253
  forecasterDatastoresRequest?: ForecasterDatastoresRequest;
235
254
  }
@@ -306,6 +325,10 @@ export interface PostForecasterPairCapabilitiesRequest {
306
325
  pairCapabilityRequest: PairCapabilityRequest;
307
326
  }
308
327
 
328
+ export interface PutCredentialsRequest {
329
+ vcenterCredentials: VcenterCredentials;
330
+ }
331
+
309
332
  export interface PutForecasterCredentialsRequest {
310
333
  vcenterCredentials: VcenterCredentials;
311
334
  }
@@ -391,6 +414,28 @@ export interface DefaultApiInterface {
391
414
  */
392
415
  createGroup(requestParameters: CreateGroupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Group>;
393
416
 
417
+ /**
418
+ * Creates request options for deleteCredentials without sending the request
419
+ * @throws {RequiredError}
420
+ * @memberof DefaultApiInterface
421
+ */
422
+ deleteCredentialsRequestOpts(): Promise<runtime.RequestOpts>;
423
+
424
+ /**
425
+ * Removes all stored vCenter credentials from the database.
426
+ * @summary Delete stored credentials
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ * @memberof DefaultApiInterface
430
+ */
431
+ deleteCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
432
+
433
+ /**
434
+ * Removes all stored vCenter credentials from the database.
435
+ * Delete stored credentials
436
+ */
437
+ deleteCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
438
+
394
439
  /**
395
440
  * Creates request options for deleteForecasterRun without sending the request
396
441
  * @param {number} id Run ID
@@ -481,6 +526,50 @@ export interface DefaultApiInterface {
481
526
  */
482
527
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
483
528
 
529
+ /**
530
+ * Creates request options for getApplications without sending the request
531
+ * @throws {RequiredError}
532
+ * @memberof DefaultApiInterface
533
+ */
534
+ getApplicationsRequestOpts(): Promise<runtime.RequestOpts>;
535
+
536
+ /**
537
+ *
538
+ * @summary List detected applications running on VMs
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ * @memberof DefaultApiInterface
542
+ */
543
+ getApplicationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
544
+
545
+ /**
546
+ * List detected applications running on VMs
547
+ */
548
+ getApplications(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
549
+
550
+ /**
551
+ * Creates request options for getClusterUtilization without sending the request
552
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
553
+ * @throws {RequiredError}
554
+ * @memberof DefaultApiInterface
555
+ */
556
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
557
+
558
+ /**
559
+ *
560
+ * @summary Get latest cluster utilization by cluster ID
561
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ * @memberof DefaultApiInterface
565
+ */
566
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
567
+
568
+ /**
569
+ * Get latest cluster utilization by cluster ID
570
+ */
571
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
572
+
484
573
  /**
485
574
  * Creates request options for getCollectorStatus without sending the request
486
575
  * @throws {RequiredError}
@@ -502,6 +591,50 @@ export interface DefaultApiInterface {
502
591
  */
503
592
  getCollectorStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectorStatus>;
504
593
 
594
+ /**
595
+ * Creates request options for getCredentialCapabilities without sending the request
596
+ * @throws {RequiredError}
597
+ * @memberof DefaultApiInterface
598
+ */
599
+ getCredentialCapabilitiesRequestOpts(): Promise<runtime.RequestOpts>;
600
+
601
+ /**
602
+ * Checks vSphere privileges for all operations (collector, inspector, forecaster) using stored credentials. Single live vSphere check, no caching.
603
+ * @summary Check vSphere operation capabilities
604
+ * @param {*} [options] Override http request option.
605
+ * @throws {RequiredError}
606
+ * @memberof DefaultApiInterface
607
+ */
608
+ getCredentialCapabilitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CapabilityStatus>>;
609
+
610
+ /**
611
+ * Checks vSphere privileges for all operations (collector, inspector, forecaster) using stored credentials. Single live vSphere check, no caching.
612
+ * Check vSphere operation capabilities
613
+ */
614
+ getCredentialCapabilities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CapabilityStatus>;
615
+
616
+ /**
617
+ * Creates request options for getCredentials without sending the request
618
+ * @throws {RequiredError}
619
+ * @memberof DefaultApiInterface
620
+ */
621
+ getCredentialsRequestOpts(): Promise<runtime.RequestOpts>;
622
+
623
+ /**
624
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
625
+ * @summary Get stored credential status
626
+ * @param {*} [options] Override http request option.
627
+ * @throws {RequiredError}
628
+ * @memberof DefaultApiInterface
629
+ */
630
+ getCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>>;
631
+
632
+ /**
633
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
634
+ * Get stored credential status
635
+ */
636
+ getCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus>;
637
+
505
638
  /**
506
639
  * Creates request options for getForecasterDatastores without sending the request
507
640
  * @param {ForecasterDatastoresRequest} [forecasterDatastoresRequest]
@@ -599,7 +732,7 @@ export interface DefaultApiInterface {
599
732
  /**
600
733
  * Creates request options for getGroup without sending the request
601
734
  * @param {string} id Group ID
602
- * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues.
735
+ * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
603
736
  * @param {number} [page] Page number for pagination
604
737
  * @param {number} [pageSize] Number of items per page
605
738
  * @throws {RequiredError}
@@ -611,7 +744,7 @@ export interface DefaultApiInterface {
611
744
  *
612
745
  * @summary Get group by ID with its VMs
613
746
  * @param {string} id Group ID
614
- * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues.
747
+ * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
615
748
  * @param {number} [page] Page number for pagination
616
749
  * @param {number} [pageSize] Number of items per page
617
750
  * @param {*} [options] Override http request option.
@@ -866,7 +999,7 @@ export interface DefaultApiInterface {
866
999
  /**
867
1000
  * Creates request options for getVMs without sending the request
868
1001
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
869
- * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues.
1002
+ * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
870
1003
  * @param {number} [page] Page number for pagination
871
1004
  * @param {number} [pageSize] Number of items per page
872
1005
  * @throws {RequiredError}
@@ -878,7 +1011,7 @@ export interface DefaultApiInterface {
878
1011
  *
879
1012
  * @summary Get list of VMs with filtering and pagination
880
1013
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
881
- * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues.
1014
+ * @param {Array<string>} [sort] Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
882
1015
  * @param {number} [page] Page number for pagination
883
1016
  * @param {number} [pageSize] Number of items per page
884
1017
  * @param {*} [options] Override http request option.
@@ -1031,6 +1164,30 @@ export interface DefaultApiInterface {
1031
1164
  */
1032
1165
  postForecasterPairCapabilities(requestParameters: PostForecasterPairCapabilitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PairCapability>>;
1033
1166
 
1167
+ /**
1168
+ * Creates request options for putCredentials without sending the request
1169
+ * @param {VcenterCredentials} vcenterCredentials
1170
+ * @throws {RequiredError}
1171
+ * @memberof DefaultApiInterface
1172
+ */
1173
+ putCredentialsRequestOpts(requestParameters: PutCredentialsRequest): Promise<runtime.RequestOpts>;
1174
+
1175
+ /**
1176
+ * Validates credentials against vSphere, encrypts with disk-based key, and stores in the local database as the active credential set. A subsequent PUT overwrites the previously stored credentials.
1177
+ * @summary Store vCenter credentials
1178
+ * @param {VcenterCredentials} vcenterCredentials
1179
+ * @param {*} [options] Override http request option.
1180
+ * @throws {RequiredError}
1181
+ * @memberof DefaultApiInterface
1182
+ */
1183
+ putCredentialsRaw(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>>;
1184
+
1185
+ /**
1186
+ * Validates credentials against vSphere, encrypts with disk-based key, and stores in the local database as the active credential set. A subsequent PUT overwrites the previously stored credentials.
1187
+ * Store vCenter credentials
1188
+ */
1189
+ putCredentials(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus>;
1190
+
1034
1191
  /**
1035
1192
  * Creates request options for putForecasterCredentials without sending the request
1036
1193
  * @param {VcenterCredentials} vcenterCredentials
@@ -1457,6 +1614,44 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1457
1614
  return await response.value();
1458
1615
  }
1459
1616
 
1617
+ /**
1618
+ * Creates request options for deleteCredentials without sending the request
1619
+ */
1620
+ async deleteCredentialsRequestOpts(): Promise<runtime.RequestOpts> {
1621
+ const queryParameters: any = {};
1622
+
1623
+ const headerParameters: runtime.HTTPHeaders = {};
1624
+
1625
+
1626
+ let urlPath = `/credentials`;
1627
+
1628
+ return {
1629
+ path: urlPath,
1630
+ method: 'DELETE',
1631
+ headers: headerParameters,
1632
+ query: queryParameters,
1633
+ };
1634
+ }
1635
+
1636
+ /**
1637
+ * Removes all stored vCenter credentials from the database.
1638
+ * Delete stored credentials
1639
+ */
1640
+ async deleteCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1641
+ const requestOptions = await this.deleteCredentialsRequestOpts();
1642
+ const response = await this.request(requestOptions, initOverrides);
1643
+
1644
+ return new runtime.VoidApiResponse(response);
1645
+ }
1646
+
1647
+ /**
1648
+ * Removes all stored vCenter credentials from the database.
1649
+ * Delete stored credentials
1650
+ */
1651
+ async deleteCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1652
+ await this.deleteCredentialsRaw(initOverrides);
1653
+ }
1654
+
1460
1655
  /**
1461
1656
  * Creates request options for deleteForecasterRun without sending the request
1462
1657
  */
@@ -1627,6 +1822,88 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1627
1822
  return await response.value();
1628
1823
  }
1629
1824
 
1825
+ /**
1826
+ * Creates request options for getApplications without sending the request
1827
+ */
1828
+ async getApplicationsRequestOpts(): Promise<runtime.RequestOpts> {
1829
+ const queryParameters: any = {};
1830
+
1831
+ const headerParameters: runtime.HTTPHeaders = {};
1832
+
1833
+
1834
+ let urlPath = `/applications`;
1835
+
1836
+ return {
1837
+ path: urlPath,
1838
+ method: 'GET',
1839
+ headers: headerParameters,
1840
+ query: queryParameters,
1841
+ };
1842
+ }
1843
+
1844
+ /**
1845
+ * List detected applications running on VMs
1846
+ */
1847
+ async getApplicationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>> {
1848
+ const requestOptions = await this.getApplicationsRequestOpts();
1849
+ const response = await this.request(requestOptions, initOverrides);
1850
+
1851
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationListResponseFromJSON(jsonValue));
1852
+ }
1853
+
1854
+ /**
1855
+ * List detected applications running on VMs
1856
+ */
1857
+ async getApplications(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse> {
1858
+ const response = await this.getApplicationsRaw(initOverrides);
1859
+ return await response.value();
1860
+ }
1861
+
1862
+ /**
1863
+ * Creates request options for getClusterUtilization without sending the request
1864
+ */
1865
+ async getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts> {
1866
+ if (requestParameters['clusterId'] == null) {
1867
+ throw new runtime.RequiredError(
1868
+ 'clusterId',
1869
+ 'Required parameter "clusterId" was null or undefined when calling getClusterUtilization().'
1870
+ );
1871
+ }
1872
+
1873
+ const queryParameters: any = {};
1874
+
1875
+ const headerParameters: runtime.HTTPHeaders = {};
1876
+
1877
+
1878
+ let urlPath = `/clusters/{cluster_id}/utilization`;
1879
+ urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
1880
+
1881
+ return {
1882
+ path: urlPath,
1883
+ method: 'GET',
1884
+ headers: headerParameters,
1885
+ query: queryParameters,
1886
+ };
1887
+ }
1888
+
1889
+ /**
1890
+ * Get latest cluster utilization by cluster ID
1891
+ */
1892
+ async getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>> {
1893
+ const requestOptions = await this.getClusterUtilizationRequestOpts(requestParameters);
1894
+ const response = await this.request(requestOptions, initOverrides);
1895
+
1896
+ return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingClusterResponseFromJSON(jsonValue));
1897
+ }
1898
+
1899
+ /**
1900
+ * Get latest cluster utilization by cluster ID
1901
+ */
1902
+ async getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse> {
1903
+ const response = await this.getClusterUtilizationRaw(requestParameters, initOverrides);
1904
+ return await response.value();
1905
+ }
1906
+
1630
1907
  /**
1631
1908
  * Creates request options for getCollectorStatus without sending the request
1632
1909
  */
@@ -1664,6 +1941,84 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1664
1941
  return await response.value();
1665
1942
  }
1666
1943
 
1944
+ /**
1945
+ * Creates request options for getCredentialCapabilities without sending the request
1946
+ */
1947
+ async getCredentialCapabilitiesRequestOpts(): Promise<runtime.RequestOpts> {
1948
+ const queryParameters: any = {};
1949
+
1950
+ const headerParameters: runtime.HTTPHeaders = {};
1951
+
1952
+
1953
+ let urlPath = `/credentials/capabilities`;
1954
+
1955
+ return {
1956
+ path: urlPath,
1957
+ method: 'GET',
1958
+ headers: headerParameters,
1959
+ query: queryParameters,
1960
+ };
1961
+ }
1962
+
1963
+ /**
1964
+ * Checks vSphere privileges for all operations (collector, inspector, forecaster) using stored credentials. Single live vSphere check, no caching.
1965
+ * Check vSphere operation capabilities
1966
+ */
1967
+ async getCredentialCapabilitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CapabilityStatus>> {
1968
+ const requestOptions = await this.getCredentialCapabilitiesRequestOpts();
1969
+ const response = await this.request(requestOptions, initOverrides);
1970
+
1971
+ return new runtime.JSONApiResponse(response, (jsonValue) => CapabilityStatusFromJSON(jsonValue));
1972
+ }
1973
+
1974
+ /**
1975
+ * Checks vSphere privileges for all operations (collector, inspector, forecaster) using stored credentials. Single live vSphere check, no caching.
1976
+ * Check vSphere operation capabilities
1977
+ */
1978
+ async getCredentialCapabilities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CapabilityStatus> {
1979
+ const response = await this.getCredentialCapabilitiesRaw(initOverrides);
1980
+ return await response.value();
1981
+ }
1982
+
1983
+ /**
1984
+ * Creates request options for getCredentials without sending the request
1985
+ */
1986
+ async getCredentialsRequestOpts(): Promise<runtime.RequestOpts> {
1987
+ const queryParameters: any = {};
1988
+
1989
+ const headerParameters: runtime.HTTPHeaders = {};
1990
+
1991
+
1992
+ let urlPath = `/credentials`;
1993
+
1994
+ return {
1995
+ path: urlPath,
1996
+ method: 'GET',
1997
+ headers: headerParameters,
1998
+ query: queryParameters,
1999
+ };
2000
+ }
2001
+
2002
+ /**
2003
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
2004
+ * Get stored credential status
2005
+ */
2006
+ async getCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>> {
2007
+ const requestOptions = await this.getCredentialsRequestOpts();
2008
+ const response = await this.request(requestOptions, initOverrides);
2009
+
2010
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialStatusFromJSON(jsonValue));
2011
+ }
2012
+
2013
+ /**
2014
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
2015
+ * Get stored credential status
2016
+ */
2017
+ async getCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus> {
2018
+ const response = await this.getCredentialsRaw(initOverrides);
2019
+ return await response.value();
2020
+ }
2021
+
1667
2022
  /**
1668
2023
  * Creates request options for getForecasterDatastores without sending the request
1669
2024
  */
@@ -2650,6 +3005,55 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
2650
3005
  return await response.value();
2651
3006
  }
2652
3007
 
3008
+ /**
3009
+ * Creates request options for putCredentials without sending the request
3010
+ */
3011
+ async putCredentialsRequestOpts(requestParameters: PutCredentialsRequest): Promise<runtime.RequestOpts> {
3012
+ if (requestParameters['vcenterCredentials'] == null) {
3013
+ throw new runtime.RequiredError(
3014
+ 'vcenterCredentials',
3015
+ 'Required parameter "vcenterCredentials" was null or undefined when calling putCredentials().'
3016
+ );
3017
+ }
3018
+
3019
+ const queryParameters: any = {};
3020
+
3021
+ const headerParameters: runtime.HTTPHeaders = {};
3022
+
3023
+ headerParameters['Content-Type'] = 'application/json';
3024
+
3025
+
3026
+ let urlPath = `/credentials`;
3027
+
3028
+ return {
3029
+ path: urlPath,
3030
+ method: 'PUT',
3031
+ headers: headerParameters,
3032
+ query: queryParameters,
3033
+ body: VcenterCredentialsToJSON(requestParameters['vcenterCredentials']),
3034
+ };
3035
+ }
3036
+
3037
+ /**
3038
+ * Validates credentials against vSphere, encrypts with disk-based key, and stores in the local database as the active credential set. A subsequent PUT overwrites the previously stored credentials.
3039
+ * Store vCenter credentials
3040
+ */
3041
+ async putCredentialsRaw(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>> {
3042
+ const requestOptions = await this.putCredentialsRequestOpts(requestParameters);
3043
+ const response = await this.request(requestOptions, initOverrides);
3044
+
3045
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialStatusFromJSON(jsonValue));
3046
+ }
3047
+
3048
+ /**
3049
+ * Validates credentials against vSphere, encrypts with disk-based key, and stores in the local database as the active credential set. A subsequent PUT overwrites the previously stored credentials.
3050
+ * Store vCenter credentials
3051
+ */
3052
+ async putCredentials(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus> {
3053
+ const response = await this.putCredentialsRaw(requestParameters, initOverrides);
3054
+ return await response.value();
3055
+ }
3056
+
2653
3057
  /**
2654
3058
  * Creates request options for putForecasterCredentials without sending the request
2655
3059
  */
@@ -0,0 +1,74 @@
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 { ApplicationOverview } from './ApplicationOverview.js';
17
+ import {
18
+ ApplicationOverviewFromJSON,
19
+ ApplicationOverviewFromJSONTyped,
20
+ ApplicationOverviewToJSON,
21
+ ApplicationOverviewToJSONTyped,
22
+ } from './ApplicationOverview.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ApplicationListResponse
28
+ */
29
+ export interface ApplicationListResponse {
30
+ /**
31
+ *
32
+ * @type {Array<ApplicationOverview>}
33
+ * @memberof ApplicationListResponse
34
+ */
35
+ applications: Array<ApplicationOverview>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the ApplicationListResponse interface.
40
+ */
41
+ export function instanceOfApplicationListResponse(value: object): value is ApplicationListResponse {
42
+ if (!('applications' in value) || value['applications'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function ApplicationListResponseFromJSON(json: any): ApplicationListResponse {
47
+ return ApplicationListResponseFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function ApplicationListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationListResponse {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'applications': ((json['applications'] as Array<any>).map(ApplicationOverviewFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function ApplicationListResponseToJSON(json: any): ApplicationListResponse {
61
+ return ApplicationListResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function ApplicationListResponseToJSONTyped(value?: ApplicationListResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'applications': ((value['applications'] as Array<any>).map(ApplicationOverviewToJSON)),
72
+ };
73
+ }
74
+