@openshift-migration-advisor/agent-sdk 0.12.0-645d2fae3eee → 0.12.0-73dd4924f11b

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 (114) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +15 -3
  4. package/dist/apis/DefaultApi.d.ts +206 -4
  5. package/dist/apis/DefaultApi.js +227 -0
  6. package/dist/esm/apis/DefaultApi.d.ts +206 -4
  7. package/dist/esm/apis/DefaultApi.js +227 -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/ClusterUtilization.d.ts +68 -0
  15. package/dist/esm/models/ClusterUtilization.js +67 -0
  16. package/dist/esm/models/CollectorStartRequest.d.ts +12 -0
  17. package/dist/esm/models/CollectorStartRequest.js +4 -0
  18. package/dist/esm/models/CreateGroupRequest.d.ts +0 -6
  19. package/dist/esm/models/CreateGroupRequest.js +0 -2
  20. package/dist/esm/models/CredentialStatus.d.ts +38 -0
  21. package/dist/esm/models/CredentialStatus.js +47 -0
  22. package/dist/esm/models/Group.d.ts +0 -6
  23. package/dist/esm/models/Group.js +0 -2
  24. package/dist/esm/models/GroupResponse.d.ts +7 -0
  25. package/dist/esm/models/GroupResponse.js +3 -0
  26. package/dist/esm/models/InventoryData.d.ts +7 -0
  27. package/dist/esm/models/InventoryData.js +3 -0
  28. package/dist/esm/models/UpdateGroupRequest.d.ts +0 -6
  29. package/dist/esm/models/UpdateGroupRequest.js +0 -2
  30. package/dist/esm/models/VMFilterOptionsResponse.d.ts +56 -0
  31. package/dist/esm/models/VMFilterOptionsResponse.js +59 -0
  32. package/dist/esm/models/VMNIC.d.ts +12 -0
  33. package/dist/esm/models/VMNIC.js +4 -0
  34. package/dist/esm/models/VcenterCredentials.d.ts +12 -0
  35. package/dist/esm/models/VcenterCredentials.js +4 -0
  36. package/dist/esm/models/VirtualMachine.d.ts +14 -2
  37. package/dist/esm/models/VirtualMachine.js +6 -2
  38. package/dist/esm/models/VmInspectionStatus.d.ts +6 -0
  39. package/dist/esm/models/VmInspectionStatus.js +4 -0
  40. package/dist/esm/models/index.d.ts +6 -0
  41. package/dist/esm/models/index.js +6 -0
  42. package/dist/esm/runtime.js +2 -1
  43. package/dist/models/ApplicationListResponse.d.ts +33 -0
  44. package/dist/models/ApplicationListResponse.js +51 -0
  45. package/dist/models/ApplicationOverview.d.ts +51 -0
  46. package/dist/models/ApplicationOverview.js +63 -0
  47. package/dist/models/ApplicationVM.d.ts +38 -0
  48. package/dist/models/ApplicationVM.js +54 -0
  49. package/dist/models/ClusterUtilization.d.ts +68 -0
  50. package/dist/models/ClusterUtilization.js +74 -0
  51. package/dist/models/CollectorStartRequest.d.ts +12 -0
  52. package/dist/models/CollectorStartRequest.js +4 -0
  53. package/dist/models/CreateGroupRequest.d.ts +0 -6
  54. package/dist/models/CreateGroupRequest.js +0 -2
  55. package/dist/models/CredentialStatus.d.ts +38 -0
  56. package/dist/models/CredentialStatus.js +54 -0
  57. package/dist/models/Group.d.ts +0 -6
  58. package/dist/models/Group.js +0 -2
  59. package/dist/models/GroupResponse.d.ts +7 -0
  60. package/dist/models/GroupResponse.js +3 -0
  61. package/dist/models/InventoryData.d.ts +7 -0
  62. package/dist/models/InventoryData.js +3 -0
  63. package/dist/models/UpdateGroupRequest.d.ts +0 -6
  64. package/dist/models/UpdateGroupRequest.js +0 -2
  65. package/dist/models/VMFilterOptionsResponse.d.ts +56 -0
  66. package/dist/models/VMFilterOptionsResponse.js +66 -0
  67. package/dist/models/VMNIC.d.ts +12 -0
  68. package/dist/models/VMNIC.js +4 -0
  69. package/dist/models/VcenterCredentials.d.ts +12 -0
  70. package/dist/models/VcenterCredentials.js +4 -0
  71. package/dist/models/VirtualMachine.d.ts +14 -2
  72. package/dist/models/VirtualMachine.js +6 -2
  73. package/dist/models/VmInspectionStatus.d.ts +6 -0
  74. package/dist/models/VmInspectionStatus.js +4 -0
  75. package/dist/models/index.d.ts +6 -0
  76. package/dist/models/index.js +6 -0
  77. package/dist/runtime.js +2 -1
  78. package/docs/ApplicationListResponse.md +34 -0
  79. package/docs/ApplicationOverview.md +40 -0
  80. package/docs/ApplicationVM.md +36 -0
  81. package/docs/ClusterUtilization.md +46 -0
  82. package/docs/CollectorStartRequest.md +4 -0
  83. package/docs/CreateGroupRequest.md +0 -2
  84. package/docs/CredentialStatus.md +36 -0
  85. package/docs/DefaultApi.md +385 -4
  86. package/docs/Group.md +0 -2
  87. package/docs/GroupResponse.md +2 -0
  88. package/docs/InventoryData.md +2 -0
  89. package/docs/UpdateGroupRequest.md +0 -2
  90. package/docs/VMFilterOptionsResponse.md +42 -0
  91. package/docs/VMNIC.md +4 -0
  92. package/docs/VcenterCredentials.md +4 -0
  93. package/docs/VirtualMachine.md +6 -2
  94. package/docs/VmInspectionStatus.md +2 -0
  95. package/package.json +1 -1
  96. package/src/apis/DefaultApi.ts +405 -4
  97. package/src/models/ApplicationListResponse.ts +74 -0
  98. package/src/models/ApplicationOverview.ts +101 -0
  99. package/src/models/ApplicationVM.ts +75 -0
  100. package/src/models/ClusterUtilization.ts +120 -0
  101. package/src/models/CollectorStartRequest.ts +16 -0
  102. package/src/models/CreateGroupRequest.ts +0 -8
  103. package/src/models/CredentialStatus.ts +75 -0
  104. package/src/models/Group.ts +0 -8
  105. package/src/models/GroupResponse.ts +15 -0
  106. package/src/models/InventoryData.ts +15 -0
  107. package/src/models/UpdateGroupRequest.ts +0 -8
  108. package/src/models/VMFilterOptionsResponse.ts +102 -0
  109. package/src/models/VMNIC.ts +16 -0
  110. package/src/models/VcenterCredentials.ts +16 -0
  111. package/src/models/VirtualMachine.ts +20 -4
  112. package/src/models/VmInspectionStatus.ts +9 -0
  113. package/src/models/index.ts +6 -0
  114. package/src/runtime.ts +1 -1
@@ -23,6 +23,11 @@ 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,
@@ -43,6 +48,11 @@ import {
43
48
  CreateGroupRequestFromJSON,
44
49
  CreateGroupRequestToJSON,
45
50
  } from '../models/CreateGroupRequest.js';
51
+ import {
52
+ type CredentialStatus,
53
+ CredentialStatusFromJSON,
54
+ CredentialStatusToJSON,
55
+ } from '../models/CredentialStatus.js';
46
56
  import {
47
57
  type DatastoreDetail,
48
58
  DatastoreDetailFromJSON,
@@ -163,6 +173,11 @@ import {
163
173
  UpdateLabelVMsRequestFromJSON,
164
174
  UpdateLabelVMsRequestToJSON,
165
175
  } from '../models/UpdateLabelVMsRequest.js';
176
+ import {
177
+ type VMFilterOptionsResponse,
178
+ VMFilterOptionsResponseFromJSON,
179
+ VMFilterOptionsResponseToJSON,
180
+ } from '../models/VMFilterOptionsResponse.js';
166
181
  import {
167
182
  type VMLabelsResponse,
168
183
  VMLabelsResponseFromJSON,
@@ -225,6 +240,10 @@ export interface DeleteLabelGloballyRequest {
225
240
  label: string;
226
241
  }
227
242
 
243
+ export interface GetClusterUtilizationRequest {
244
+ clusterId: string;
245
+ }
246
+
228
247
  export interface GetForecasterDatastoresRequest {
229
248
  forecasterDatastoresRequest?: ForecasterDatastoresRequest;
230
249
  }
@@ -301,6 +320,10 @@ export interface PostForecasterPairCapabilitiesRequest {
301
320
  pairCapabilityRequest: PairCapabilityRequest;
302
321
  }
303
322
 
323
+ export interface PutCredentialsRequest {
324
+ vcenterCredentials: VcenterCredentials;
325
+ }
326
+
304
327
  export interface PutForecasterCredentialsRequest {
305
328
  vcenterCredentials: VcenterCredentials;
306
329
  }
@@ -386,6 +409,28 @@ export interface DefaultApiInterface {
386
409
  */
387
410
  createGroup(requestParameters: CreateGroupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Group>;
388
411
 
412
+ /**
413
+ * Creates request options for deleteCredentials without sending the request
414
+ * @throws {RequiredError}
415
+ * @memberof DefaultApiInterface
416
+ */
417
+ deleteCredentialsRequestOpts(): Promise<runtime.RequestOpts>;
418
+
419
+ /**
420
+ * Removes all stored vCenter credentials from the database.
421
+ * @summary Delete stored credentials
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ * @memberof DefaultApiInterface
425
+ */
426
+ deleteCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
427
+
428
+ /**
429
+ * Removes all stored vCenter credentials from the database.
430
+ * Delete stored credentials
431
+ */
432
+ deleteCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
433
+
389
434
  /**
390
435
  * Creates request options for deleteForecasterRun without sending the request
391
436
  * @param {number} id Run ID
@@ -476,6 +521,50 @@ export interface DefaultApiInterface {
476
521
  */
477
522
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
478
523
 
524
+ /**
525
+ * Creates request options for getApplications without sending the request
526
+ * @throws {RequiredError}
527
+ * @memberof DefaultApiInterface
528
+ */
529
+ getApplicationsRequestOpts(): Promise<runtime.RequestOpts>;
530
+
531
+ /**
532
+ *
533
+ * @summary List detected applications running on VMs
534
+ * @param {*} [options] Override http request option.
535
+ * @throws {RequiredError}
536
+ * @memberof DefaultApiInterface
537
+ */
538
+ getApplicationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>>;
539
+
540
+ /**
541
+ * List detected applications running on VMs
542
+ */
543
+ getApplications(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse>;
544
+
545
+ /**
546
+ * Creates request options for getClusterUtilization without sending the request
547
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
548
+ * @throws {RequiredError}
549
+ * @memberof DefaultApiInterface
550
+ */
551
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
552
+
553
+ /**
554
+ *
555
+ * @summary Get latest cluster utilization by cluster ID
556
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
557
+ * @param {*} [options] Override http request option.
558
+ * @throws {RequiredError}
559
+ * @memberof DefaultApiInterface
560
+ */
561
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
562
+
563
+ /**
564
+ * Get latest cluster utilization by cluster ID
565
+ */
566
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
567
+
479
568
  /**
480
569
  * Creates request options for getCollectorStatus without sending the request
481
570
  * @throws {RequiredError}
@@ -497,6 +586,28 @@ export interface DefaultApiInterface {
497
586
  */
498
587
  getCollectorStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectorStatus>;
499
588
 
589
+ /**
590
+ * Creates request options for getCredentials without sending the request
591
+ * @throws {RequiredError}
592
+ * @memberof DefaultApiInterface
593
+ */
594
+ getCredentialsRequestOpts(): Promise<runtime.RequestOpts>;
595
+
596
+ /**
597
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
598
+ * @summary Get stored credential status
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ * @memberof DefaultApiInterface
602
+ */
603
+ getCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>>;
604
+
605
+ /**
606
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
607
+ * Get stored credential status
608
+ */
609
+ getCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus>;
610
+
500
611
  /**
501
612
  * Creates request options for getForecasterDatastores without sending the request
502
613
  * @param {ForecasterDatastoresRequest} [forecasterDatastoresRequest]
@@ -594,7 +705,7 @@ export interface DefaultApiInterface {
594
705
  /**
595
706
  * Creates request options for getGroup without sending the request
596
707
  * @param {string} id Group ID
597
- * @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.
708
+ * @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.
598
709
  * @param {number} [page] Page number for pagination
599
710
  * @param {number} [pageSize] Number of items per page
600
711
  * @throws {RequiredError}
@@ -606,7 +717,7 @@ export interface DefaultApiInterface {
606
717
  *
607
718
  * @summary Get group by ID with its VMs
608
719
  * @param {string} id Group ID
609
- * @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.
720
+ * @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.
610
721
  * @param {number} [page] Page number for pagination
611
722
  * @param {number} [pageSize] Number of items per page
612
723
  * @param {*} [options] Override http request option.
@@ -861,7 +972,7 @@ export interface DefaultApiInterface {
861
972
  /**
862
973
  * Creates request options for getVMs without sending the request
863
974
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
864
- * @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.
975
+ * @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.
865
976
  * @param {number} [page] Page number for pagination
866
977
  * @param {number} [pageSize] Number of items per page
867
978
  * @throws {RequiredError}
@@ -873,7 +984,7 @@ export interface DefaultApiInterface {
873
984
  *
874
985
  * @summary Get list of VMs with filtering and pagination
875
986
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
876
- * @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.
987
+ * @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.
877
988
  * @param {number} [page] Page number for pagination
878
989
  * @param {number} [pageSize] Number of items per page
879
990
  * @param {*} [options] Override http request option.
@@ -887,6 +998,27 @@ export interface DefaultApiInterface {
887
998
  */
888
999
  getVMs(requestParameters: GetVMsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineListResponse>;
889
1000
 
1001
+ /**
1002
+ * Creates request options for getVMsFilterOptions without sending the request
1003
+ * @throws {RequiredError}
1004
+ * @memberof DefaultApiInterface
1005
+ */
1006
+ getVMsFilterOptionsRequestOpts(): Promise<runtime.RequestOpts>;
1007
+
1008
+ /**
1009
+ *
1010
+ * @summary Get distinct filter option values for VMs
1011
+ * @param {*} [options] Override http request option.
1012
+ * @throws {RequiredError}
1013
+ * @memberof DefaultApiInterface
1014
+ */
1015
+ getVMsFilterOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VMFilterOptionsResponse>>;
1016
+
1017
+ /**
1018
+ * Get distinct filter option values for VMs
1019
+ */
1020
+ getVMsFilterOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VMFilterOptionsResponse>;
1021
+
890
1022
  /**
891
1023
  * Creates request options for getVersion without sending the request
892
1024
  * @throws {RequiredError}
@@ -1005,6 +1137,30 @@ export interface DefaultApiInterface {
1005
1137
  */
1006
1138
  postForecasterPairCapabilities(requestParameters: PostForecasterPairCapabilitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PairCapability>>;
1007
1139
 
1140
+ /**
1141
+ * Creates request options for putCredentials without sending the request
1142
+ * @param {VcenterCredentials} vcenterCredentials
1143
+ * @throws {RequiredError}
1144
+ * @memberof DefaultApiInterface
1145
+ */
1146
+ putCredentialsRequestOpts(requestParameters: PutCredentialsRequest): Promise<runtime.RequestOpts>;
1147
+
1148
+ /**
1149
+ * 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.
1150
+ * @summary Store vCenter credentials
1151
+ * @param {VcenterCredentials} vcenterCredentials
1152
+ * @param {*} [options] Override http request option.
1153
+ * @throws {RequiredError}
1154
+ * @memberof DefaultApiInterface
1155
+ */
1156
+ putCredentialsRaw(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>>;
1157
+
1158
+ /**
1159
+ * 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.
1160
+ * Store vCenter credentials
1161
+ */
1162
+ putCredentials(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus>;
1163
+
1008
1164
  /**
1009
1165
  * Creates request options for putForecasterCredentials without sending the request
1010
1166
  * @param {VcenterCredentials} vcenterCredentials
@@ -1431,6 +1587,44 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1431
1587
  return await response.value();
1432
1588
  }
1433
1589
 
1590
+ /**
1591
+ * Creates request options for deleteCredentials without sending the request
1592
+ */
1593
+ async deleteCredentialsRequestOpts(): Promise<runtime.RequestOpts> {
1594
+ const queryParameters: any = {};
1595
+
1596
+ const headerParameters: runtime.HTTPHeaders = {};
1597
+
1598
+
1599
+ let urlPath = `/credentials`;
1600
+
1601
+ return {
1602
+ path: urlPath,
1603
+ method: 'DELETE',
1604
+ headers: headerParameters,
1605
+ query: queryParameters,
1606
+ };
1607
+ }
1608
+
1609
+ /**
1610
+ * Removes all stored vCenter credentials from the database.
1611
+ * Delete stored credentials
1612
+ */
1613
+ async deleteCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1614
+ const requestOptions = await this.deleteCredentialsRequestOpts();
1615
+ const response = await this.request(requestOptions, initOverrides);
1616
+
1617
+ return new runtime.VoidApiResponse(response);
1618
+ }
1619
+
1620
+ /**
1621
+ * Removes all stored vCenter credentials from the database.
1622
+ * Delete stored credentials
1623
+ */
1624
+ async deleteCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1625
+ await this.deleteCredentialsRaw(initOverrides);
1626
+ }
1627
+
1434
1628
  /**
1435
1629
  * Creates request options for deleteForecasterRun without sending the request
1436
1630
  */
@@ -1601,6 +1795,88 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1601
1795
  return await response.value();
1602
1796
  }
1603
1797
 
1798
+ /**
1799
+ * Creates request options for getApplications without sending the request
1800
+ */
1801
+ async getApplicationsRequestOpts(): Promise<runtime.RequestOpts> {
1802
+ const queryParameters: any = {};
1803
+
1804
+ const headerParameters: runtime.HTTPHeaders = {};
1805
+
1806
+
1807
+ let urlPath = `/applications`;
1808
+
1809
+ return {
1810
+ path: urlPath,
1811
+ method: 'GET',
1812
+ headers: headerParameters,
1813
+ query: queryParameters,
1814
+ };
1815
+ }
1816
+
1817
+ /**
1818
+ * List detected applications running on VMs
1819
+ */
1820
+ async getApplicationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationListResponse>> {
1821
+ const requestOptions = await this.getApplicationsRequestOpts();
1822
+ const response = await this.request(requestOptions, initOverrides);
1823
+
1824
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationListResponseFromJSON(jsonValue));
1825
+ }
1826
+
1827
+ /**
1828
+ * List detected applications running on VMs
1829
+ */
1830
+ async getApplications(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationListResponse> {
1831
+ const response = await this.getApplicationsRaw(initOverrides);
1832
+ return await response.value();
1833
+ }
1834
+
1835
+ /**
1836
+ * Creates request options for getClusterUtilization without sending the request
1837
+ */
1838
+ async getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts> {
1839
+ if (requestParameters['clusterId'] == null) {
1840
+ throw new runtime.RequiredError(
1841
+ 'clusterId',
1842
+ 'Required parameter "clusterId" was null or undefined when calling getClusterUtilization().'
1843
+ );
1844
+ }
1845
+
1846
+ const queryParameters: any = {};
1847
+
1848
+ const headerParameters: runtime.HTTPHeaders = {};
1849
+
1850
+
1851
+ let urlPath = `/clusters/{cluster_id}/utilization`;
1852
+ urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
1853
+
1854
+ return {
1855
+ path: urlPath,
1856
+ method: 'GET',
1857
+ headers: headerParameters,
1858
+ query: queryParameters,
1859
+ };
1860
+ }
1861
+
1862
+ /**
1863
+ * Get latest cluster utilization by cluster ID
1864
+ */
1865
+ async getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>> {
1866
+ const requestOptions = await this.getClusterUtilizationRequestOpts(requestParameters);
1867
+ const response = await this.request(requestOptions, initOverrides);
1868
+
1869
+ return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingClusterResponseFromJSON(jsonValue));
1870
+ }
1871
+
1872
+ /**
1873
+ * Get latest cluster utilization by cluster ID
1874
+ */
1875
+ async getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse> {
1876
+ const response = await this.getClusterUtilizationRaw(requestParameters, initOverrides);
1877
+ return await response.value();
1878
+ }
1879
+
1604
1880
  /**
1605
1881
  * Creates request options for getCollectorStatus without sending the request
1606
1882
  */
@@ -1638,6 +1914,45 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1638
1914
  return await response.value();
1639
1915
  }
1640
1916
 
1917
+ /**
1918
+ * Creates request options for getCredentials without sending the request
1919
+ */
1920
+ async getCredentialsRequestOpts(): Promise<runtime.RequestOpts> {
1921
+ const queryParameters: any = {};
1922
+
1923
+ const headerParameters: runtime.HTTPHeaders = {};
1924
+
1925
+
1926
+ let urlPath = `/credentials`;
1927
+
1928
+ return {
1929
+ path: urlPath,
1930
+ method: 'GET',
1931
+ headers: headerParameters,
1932
+ query: queryParameters,
1933
+ };
1934
+ }
1935
+
1936
+ /**
1937
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
1938
+ * Get stored credential status
1939
+ */
1940
+ async getCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>> {
1941
+ const requestOptions = await this.getCredentialsRequestOpts();
1942
+ const response = await this.request(requestOptions, initOverrides);
1943
+
1944
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialStatusFromJSON(jsonValue));
1945
+ }
1946
+
1947
+ /**
1948
+ * Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
1949
+ * Get stored credential status
1950
+ */
1951
+ async getCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus> {
1952
+ const response = await this.getCredentialsRaw(initOverrides);
1953
+ return await response.value();
1954
+ }
1955
+
1641
1956
  /**
1642
1957
  * Creates request options for getForecasterDatastores without sending the request
1643
1958
  */
@@ -2366,6 +2681,43 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
2366
2681
  return await response.value();
2367
2682
  }
2368
2683
 
2684
+ /**
2685
+ * Creates request options for getVMsFilterOptions without sending the request
2686
+ */
2687
+ async getVMsFilterOptionsRequestOpts(): Promise<runtime.RequestOpts> {
2688
+ const queryParameters: any = {};
2689
+
2690
+ const headerParameters: runtime.HTTPHeaders = {};
2691
+
2692
+
2693
+ let urlPath = `/vms/filter-options`;
2694
+
2695
+ return {
2696
+ path: urlPath,
2697
+ method: 'GET',
2698
+ headers: headerParameters,
2699
+ query: queryParameters,
2700
+ };
2701
+ }
2702
+
2703
+ /**
2704
+ * Get distinct filter option values for VMs
2705
+ */
2706
+ async getVMsFilterOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VMFilterOptionsResponse>> {
2707
+ const requestOptions = await this.getVMsFilterOptionsRequestOpts();
2708
+ const response = await this.request(requestOptions, initOverrides);
2709
+
2710
+ return new runtime.JSONApiResponse(response, (jsonValue) => VMFilterOptionsResponseFromJSON(jsonValue));
2711
+ }
2712
+
2713
+ /**
2714
+ * Get distinct filter option values for VMs
2715
+ */
2716
+ async getVMsFilterOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VMFilterOptionsResponse> {
2717
+ const response = await this.getVMsFilterOptionsRaw(initOverrides);
2718
+ return await response.value();
2719
+ }
2720
+
2369
2721
  /**
2370
2722
  * Creates request options for getVersion without sending the request
2371
2723
  */
@@ -2587,6 +2939,55 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
2587
2939
  return await response.value();
2588
2940
  }
2589
2941
 
2942
+ /**
2943
+ * Creates request options for putCredentials without sending the request
2944
+ */
2945
+ async putCredentialsRequestOpts(requestParameters: PutCredentialsRequest): Promise<runtime.RequestOpts> {
2946
+ if (requestParameters['vcenterCredentials'] == null) {
2947
+ throw new runtime.RequiredError(
2948
+ 'vcenterCredentials',
2949
+ 'Required parameter "vcenterCredentials" was null or undefined when calling putCredentials().'
2950
+ );
2951
+ }
2952
+
2953
+ const queryParameters: any = {};
2954
+
2955
+ const headerParameters: runtime.HTTPHeaders = {};
2956
+
2957
+ headerParameters['Content-Type'] = 'application/json';
2958
+
2959
+
2960
+ let urlPath = `/credentials`;
2961
+
2962
+ return {
2963
+ path: urlPath,
2964
+ method: 'PUT',
2965
+ headers: headerParameters,
2966
+ query: queryParameters,
2967
+ body: VcenterCredentialsToJSON(requestParameters['vcenterCredentials']),
2968
+ };
2969
+ }
2970
+
2971
+ /**
2972
+ * 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.
2973
+ * Store vCenter credentials
2974
+ */
2975
+ async putCredentialsRaw(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CredentialStatus>> {
2976
+ const requestOptions = await this.putCredentialsRequestOpts(requestParameters);
2977
+ const response = await this.request(requestOptions, initOverrides);
2978
+
2979
+ return new runtime.JSONApiResponse(response, (jsonValue) => CredentialStatusFromJSON(jsonValue));
2980
+ }
2981
+
2982
+ /**
2983
+ * 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.
2984
+ * Store vCenter credentials
2985
+ */
2986
+ async putCredentials(requestParameters: PutCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CredentialStatus> {
2987
+ const response = await this.putCredentialsRaw(requestParameters, initOverrides);
2988
+ return await response.value();
2989
+ }
2990
+
2590
2991
  /**
2591
2992
  * Creates request options for putForecasterCredentials without sending the request
2592
2993
  */
@@ -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
+