@openshift-migration-advisor/planner-sdk 0.8.0 → 0.9.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 (52) hide show
  1. package/.openapi-generator/FILES +2 -2
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +4 -4
  4. package/dist/apis/AssessmentApi.d.ts +13 -5
  5. package/dist/apis/AssessmentApi.js +1 -1
  6. package/dist/esm/apis/AssessmentApi.d.ts +13 -5
  7. package/dist/esm/apis/AssessmentApi.js +2 -2
  8. package/dist/esm/models/ClusterRequirementsRequest.d.ts +9 -3
  9. package/dist/esm/models/ClusterRequirementsRequest.js +2 -0
  10. package/dist/esm/models/EstimationDetail.d.ts +14 -2
  11. package/dist/esm/models/EstimationDetail.js +5 -3
  12. package/dist/esm/models/MigrationEstimationRequest.d.ts +16 -0
  13. package/dist/esm/models/MigrationEstimationRequest.js +4 -0
  14. package/dist/esm/models/SchemaEstimationResult.d.ts +47 -0
  15. package/dist/esm/models/{MigrationEstimationResponse.js → SchemaEstimationResult.js} +15 -11
  16. package/dist/esm/models/VMs.d.ts +9 -0
  17. package/dist/esm/models/VMs.js +2 -0
  18. package/dist/esm/models/index.d.ts +1 -1
  19. package/dist/esm/models/index.js +1 -1
  20. package/dist/esm/runtime.js +1 -1
  21. package/dist/models/ClusterRequirementsRequest.d.ts +9 -3
  22. package/dist/models/ClusterRequirementsRequest.js +2 -0
  23. package/dist/models/EstimationDetail.d.ts +14 -2
  24. package/dist/models/EstimationDetail.js +5 -3
  25. package/dist/models/MigrationEstimationRequest.d.ts +16 -0
  26. package/dist/models/MigrationEstimationRequest.js +4 -0
  27. package/dist/models/SchemaEstimationResult.d.ts +47 -0
  28. package/dist/models/SchemaEstimationResult.js +60 -0
  29. package/dist/models/VMs.d.ts +9 -0
  30. package/dist/models/VMs.js +2 -0
  31. package/dist/models/index.d.ts +1 -1
  32. package/dist/models/index.js +1 -1
  33. package/dist/runtime.js +1 -1
  34. package/docs/AssessmentApi.md +3 -3
  35. package/docs/ClusterRequirementsRequest.md +2 -0
  36. package/docs/EstimationDetail.md +5 -1
  37. package/docs/MigrationEstimationRequest.md +4 -0
  38. package/docs/{MigrationEstimationResponse.md → SchemaEstimationResult.md} +9 -7
  39. package/docs/VMs.md +2 -0
  40. package/package.json +1 -1
  41. package/src/apis/AssessmentApi.ts +8 -8
  42. package/src/models/ClusterRequirementsRequest.ts +11 -3
  43. package/src/models/EstimationDetail.ts +19 -4
  44. package/src/models/MigrationEstimationRequest.ts +18 -0
  45. package/src/models/SchemaEstimationResult.ts +92 -0
  46. package/src/models/VMs.ts +9 -0
  47. package/src/models/index.ts +1 -1
  48. package/src/runtime.ts +1 -1
  49. package/dist/esm/models/MigrationEstimationResponse.d.ts +0 -41
  50. package/dist/models/MigrationEstimationResponse.d.ts +0 -41
  51. package/dist/models/MigrationEstimationResponse.js +0 -56
  52. package/src/models/MigrationEstimationResponse.ts +0 -83
@@ -35,6 +35,8 @@ function MigrationEstimationRequestFromJSONTyped(json, ignoreDiscriminator) {
35
35
  }
36
36
  return {
37
37
  'clusterId': json['clusterId'],
38
+ 'estimationSchema': json['estimationSchema'] == null ? undefined : json['estimationSchema'],
39
+ 'params': json['params'] == null ? undefined : json['params'],
38
40
  };
39
41
  }
40
42
  function MigrationEstimationRequestToJSON(json) {
@@ -46,5 +48,7 @@ function MigrationEstimationRequestToJSONTyped(value, ignoreDiscriminator = fals
46
48
  }
47
49
  return {
48
50
  'clusterId': value['clusterId'],
51
+ 'estimationSchema': value['estimationSchema'],
52
+ 'params': value['params'],
49
53
  };
50
54
  }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * OpenShift Migration Advisor API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: undefined
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { EstimationDetail } from './EstimationDetail.js';
13
+ /**
14
+ * Estimation results for a single schema
15
+ * @export
16
+ * @interface SchemaEstimationResult
17
+ */
18
+ export interface SchemaEstimationResult {
19
+ /**
20
+ * Minimum total estimated duration across all calculators
21
+ * @type {string}
22
+ * @memberof SchemaEstimationResult
23
+ */
24
+ minTotalDuration: string;
25
+ /**
26
+ * Maximum total estimated duration across all calculators
27
+ * @type {string}
28
+ * @memberof SchemaEstimationResult
29
+ */
30
+ maxTotalDuration: string;
31
+ /**
32
+ * Per-calculator results
33
+ * @type {{ [key: string]: EstimationDetail; }}
34
+ * @memberof SchemaEstimationResult
35
+ */
36
+ breakdown: {
37
+ [key: string]: EstimationDetail;
38
+ };
39
+ }
40
+ /**
41
+ * Check if a given object implements the SchemaEstimationResult interface.
42
+ */
43
+ export declare function instanceOfSchemaEstimationResult(value: object): value is SchemaEstimationResult;
44
+ export declare function SchemaEstimationResultFromJSON(json: any): SchemaEstimationResult;
45
+ export declare function SchemaEstimationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaEstimationResult;
46
+ export declare function SchemaEstimationResultToJSON(json: any): SchemaEstimationResult;
47
+ export declare function SchemaEstimationResultToJSONTyped(value?: SchemaEstimationResult | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * OpenShift Migration Advisor API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: undefined
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSchemaEstimationResult = instanceOfSchemaEstimationResult;
17
+ exports.SchemaEstimationResultFromJSON = SchemaEstimationResultFromJSON;
18
+ exports.SchemaEstimationResultFromJSONTyped = SchemaEstimationResultFromJSONTyped;
19
+ exports.SchemaEstimationResultToJSON = SchemaEstimationResultToJSON;
20
+ exports.SchemaEstimationResultToJSONTyped = SchemaEstimationResultToJSONTyped;
21
+ const runtime_js_1 = require("../runtime.js");
22
+ const EstimationDetail_js_1 = require("./EstimationDetail.js");
23
+ /**
24
+ * Check if a given object implements the SchemaEstimationResult interface.
25
+ */
26
+ function instanceOfSchemaEstimationResult(value) {
27
+ if (!('minTotalDuration' in value) || value['minTotalDuration'] === undefined)
28
+ return false;
29
+ if (!('maxTotalDuration' in value) || value['maxTotalDuration'] === undefined)
30
+ return false;
31
+ if (!('breakdown' in value) || value['breakdown'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function SchemaEstimationResultFromJSON(json) {
36
+ return SchemaEstimationResultFromJSONTyped(json, false);
37
+ }
38
+ function SchemaEstimationResultFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'minTotalDuration': json['minTotalDuration'],
44
+ 'maxTotalDuration': json['maxTotalDuration'],
45
+ 'breakdown': ((0, runtime_js_1.mapValues)(json['breakdown'], EstimationDetail_js_1.EstimationDetailFromJSON)),
46
+ };
47
+ }
48
+ function SchemaEstimationResultToJSON(json) {
49
+ return SchemaEstimationResultToJSONTyped(json, false);
50
+ }
51
+ function SchemaEstimationResultToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'minTotalDuration': value['minTotalDuration'],
57
+ 'maxTotalDuration': value['maxTotalDuration'],
58
+ 'breakdown': ((0, runtime_js_1.mapValues)(value['breakdown'], EstimationDetail_js_1.EstimationDetailToJSON)),
59
+ };
60
+ }
@@ -94,10 +94,19 @@ export interface VMs {
94
94
  * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
95
95
  * @type {{ [key: string]: number; }}
96
96
  * @memberof VMs
97
+ * @deprecated
97
98
  */
98
99
  distributionByComplexity?: {
99
100
  [key: string]: number;
100
101
  };
102
+ /**
103
+ * Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity.
104
+ * @type {{ [key: string]: DiskSizeTierSummary; }}
105
+ * @memberof VMs
106
+ */
107
+ complexityDistribution?: {
108
+ [key: string]: DiskSizeTierSummary;
109
+ };
101
110
  /**
102
111
  *
103
112
  * @type {VMResourceBreakdown}
@@ -67,6 +67,7 @@ function VMsFromJSONTyped(json, ignoreDiscriminator) {
67
67
  'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
68
68
  'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
69
69
  'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
70
+ 'complexityDistribution': json['complexityDistribution'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['complexityDistribution'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
70
71
  'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['ramGB']),
71
72
  'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskGB']),
72
73
  'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskCount']),
@@ -97,6 +98,7 @@ function VMsToJSONTyped(value, ignoreDiscriminator = false) {
97
98
  'distributionByMemoryTier': value['distributionByMemoryTier'],
98
99
  'distributionByNicCount': value['distributionByNicCount'],
99
100
  'distributionByComplexity': value['distributionByComplexity'],
101
+ 'complexityDistribution': value['complexityDistribution'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['complexityDistribution'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
100
102
  'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['ramGB']),
101
103
  'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskGB']),
102
104
  'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskCount']),
@@ -27,12 +27,12 @@ export * from './Label.js';
27
27
  export * from './MigrationComplexityRequest.js';
28
28
  export * from './MigrationComplexityResponse.js';
29
29
  export * from './MigrationEstimationRequest.js';
30
- export * from './MigrationEstimationResponse.js';
31
30
  export * from './MigrationIssue.js';
32
31
  export * from './ModelError.js';
33
32
  export * from './Network.js';
34
33
  export * from './OsInfo.js';
35
34
  export * from './PresignedUrl.js';
35
+ export * from './SchemaEstimationResult.js';
36
36
  export * from './SizingOverCommitRatio.js';
37
37
  export * from './SizingResourceConsumption.js';
38
38
  export * from './SizingResourceLimits.js';
@@ -45,12 +45,12 @@ __exportStar(require("./Label.js"), exports);
45
45
  __exportStar(require("./MigrationComplexityRequest.js"), exports);
46
46
  __exportStar(require("./MigrationComplexityResponse.js"), exports);
47
47
  __exportStar(require("./MigrationEstimationRequest.js"), exports);
48
- __exportStar(require("./MigrationEstimationResponse.js"), exports);
49
48
  __exportStar(require("./MigrationIssue.js"), exports);
50
49
  __exportStar(require("./ModelError.js"), exports);
51
50
  __exportStar(require("./Network.js"), exports);
52
51
  __exportStar(require("./OsInfo.js"), exports);
53
52
  __exportStar(require("./PresignedUrl.js"), exports);
53
+ __exportStar(require("./SchemaEstimationResult.js"), exports);
54
54
  __exportStar(require("./SizingOverCommitRatio.js"), exports);
55
55
  __exportStar(require("./SizingResourceConsumption.js"), exports);
56
56
  __exportStar(require("./SizingResourceLimits.js"), exports);
package/dist/runtime.js CHANGED
@@ -219,7 +219,7 @@ class BaseAPI {
219
219
  }
220
220
  }
221
221
  exports.BaseAPI = BaseAPI;
222
- BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
222
+ BaseAPI.jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
223
223
  ;
224
224
  function isBlob(value) {
225
225
  return typeof Blob !== 'undefined' && value instanceof Blob;
@@ -168,7 +168,7 @@ No authorization required
168
168
 
169
169
  ## calculateMigrationEstimation
170
170
 
171
- > MigrationEstimationResponse calculateMigrationEstimation(id, migrationEstimationRequest)
171
+ > { [key: string]: SchemaEstimationResult; } calculateMigrationEstimation(id, migrationEstimationRequest)
172
172
 
173
173
 
174
174
 
@@ -191,7 +191,7 @@ async function example() {
191
191
  // string | ID of the assessment
192
192
  id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
193
193
  // MigrationEstimationRequest
194
- migrationEstimationRequest: {"clusterId":"domain-c8"},
194
+ migrationEstimationRequest: {"clusterId":"domain-c8","estimationSchema":["network-based"],"params":{"transfer_rate_mbps":1000,"work_hours_per_day":6}},
195
195
  } satisfies CalculateMigrationEstimationRequest;
196
196
 
197
197
  try {
@@ -216,7 +216,7 @@ example().catch(console.error);
216
216
 
217
217
  ### Return type
218
218
 
219
- [**MigrationEstimationResponse**](MigrationEstimationResponse.md)
219
+ [**{ [key: string]: SchemaEstimationResult; }**](SchemaEstimationResult.md)
220
220
 
221
221
  ### Authorization
222
222
 
@@ -17,6 +17,7 @@ Name | Type
17
17
  `controlPlaneCPU` | number
18
18
  `controlPlaneMemory` | number
19
19
  `controlPlaneNodeCount` | number
20
+ `hostedControlPlane` | boolean
20
21
 
21
22
  ## Example
22
23
 
@@ -35,6 +36,7 @@ const example = {
35
36
  "controlPlaneCPU": null,
36
37
  "controlPlaneMemory": null,
37
38
  "controlPlaneNodeCount": null,
39
+ "hostedControlPlane": null,
38
40
  } satisfies ClusterRequirementsRequest
39
41
 
40
42
  console.log(example)
@@ -8,6 +8,8 @@ Detailed estimation result from a single calculator
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `duration` | string
11
+ `minDuration` | string
12
+ `maxDuration` | string
11
13
  `reason` | string
12
14
 
13
15
  ## Example
@@ -18,7 +20,9 @@ import type { EstimationDetail } from '@openshift-migration-advisor/planner-sdk'
18
20
  // TODO: Update the object below with actual values
19
21
  const example = {
20
22
  "duration": 3h40m0s,
21
- "reason": 1000.00 GB at 110 minutes per 500GB,
23
+ "minDuration": 8m20s,
24
+ "maxDuration": 33m20s,
25
+ "reason": null,
22
26
  } satisfies EstimationDetail
23
27
 
24
28
  console.log(example)
@@ -8,6 +8,8 @@ Request payload for calculating migration time estimation
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `clusterId` | string
11
+ `estimationSchema` | Array<string>
12
+ `params` | { [key: string]: any; }
11
13
 
12
14
  ## Example
13
15
 
@@ -17,6 +19,8 @@ import type { MigrationEstimationRequest } from '@openshift-migration-advisor/pl
17
19
  // TODO: Update the object below with actual values
18
20
  const example = {
19
21
  "clusterId": domain-c8,
22
+ "estimationSchema": null,
23
+ "params": null,
20
24
  } satisfies MigrationEstimationRequest
21
25
 
22
26
  console.log(example)
@@ -1,25 +1,27 @@
1
1
 
2
- # MigrationEstimationResponse
2
+ # SchemaEstimationResult
3
3
 
4
- Migration time estimation results
4
+ Estimation results for a single schema
5
5
 
6
6
  ## Properties
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
- `totalDuration` | string
10
+ `minTotalDuration` | string
11
+ `maxTotalDuration` | string
11
12
  `breakdown` | [{ [key: string]: EstimationDetail; }](EstimationDetail.md)
12
13
 
13
14
  ## Example
14
15
 
15
16
  ```typescript
16
- import type { MigrationEstimationResponse } from '@openshift-migration-advisor/planner-sdk'
17
+ import type { SchemaEstimationResult } from '@openshift-migration-advisor/planner-sdk'
17
18
 
18
19
  // TODO: Update the object below with actual values
19
20
  const example = {
20
- "totalDuration": 4h30m0s,
21
+ "minTotalDuration": 1h20m0s,
22
+ "maxTotalDuration": 5h20m0s,
21
23
  "breakdown": null,
22
- } satisfies MigrationEstimationResponse
24
+ } satisfies SchemaEstimationResult
23
25
 
24
26
  console.log(example)
25
27
 
@@ -28,7 +30,7 @@ const exampleJSON: string = JSON.stringify(example)
28
30
  console.log(exampleJSON)
29
31
 
30
32
  // Parse the JSON string back to an object
31
- const exampleParsed = JSON.parse(exampleJSON) as MigrationEstimationResponse
33
+ const exampleParsed = JSON.parse(exampleJSON) as SchemaEstimationResult
32
34
  console.log(exampleParsed)
33
35
  ```
34
36
 
package/docs/VMs.md CHANGED
@@ -17,6 +17,7 @@ Name | Type
17
17
  `distributionByMemoryTier` | { [key: string]: number; }
18
18
  `distributionByNicCount` | { [key: string]: number; }
19
19
  `distributionByComplexity` | { [key: string]: number; }
20
+ `complexityDistribution` | [{ [key: string]: DiskSizeTierSummary; }](DiskSizeTierSummary.md)
20
21
  `ramGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
21
22
  `diskGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
22
23
  `diskCount` | [VMResourceBreakdown](VMResourceBreakdown.md)
@@ -45,6 +46,7 @@ const example = {
45
46
  "distributionByMemoryTier": null,
46
47
  "distributionByNicCount": null,
47
48
  "distributionByComplexity": null,
49
+ "complexityDistribution": null,
48
50
  "ramGB": null,
49
51
  "diskGB": null,
50
52
  "diskCount": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/planner-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/planner-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -23,7 +23,7 @@ import type {
23
23
  MigrationComplexityRequest,
24
24
  MigrationComplexityResponse,
25
25
  MigrationEstimationRequest,
26
- MigrationEstimationResponse,
26
+ SchemaEstimationResult,
27
27
  } from '../models/index.js';
28
28
  import {
29
29
  AssessmentFromJSON,
@@ -42,8 +42,8 @@ import {
42
42
  MigrationComplexityResponseToJSON,
43
43
  MigrationEstimationRequestFromJSON,
44
44
  MigrationEstimationRequestToJSON,
45
- MigrationEstimationResponseFromJSON,
46
- MigrationEstimationResponseToJSON,
45
+ SchemaEstimationResultFromJSON,
46
+ SchemaEstimationResultToJSON,
47
47
  } from '../models/index.js';
48
48
 
49
49
  export interface CalculateAssessmentClusterRequirementsRequest {
@@ -154,12 +154,12 @@ export interface AssessmentApiInterface {
154
154
  * @throws {RequiredError}
155
155
  * @memberof AssessmentApiInterface
156
156
  */
157
- calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>>;
157
+ calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: SchemaEstimationResult; }>>;
158
158
 
159
159
  /**
160
160
  * Calculate migration time estimation for an assessment
161
161
  */
162
- calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse>;
162
+ calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: SchemaEstimationResult; }>;
163
163
 
164
164
  /**
165
165
  * Creates request options for createAssessment without sending the request
@@ -430,17 +430,17 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
430
430
  /**
431
431
  * Calculate migration time estimation for an assessment
432
432
  */
433
- async calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>> {
433
+ async calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: SchemaEstimationResult; }>> {
434
434
  const requestOptions = await this.calculateMigrationEstimationRequestOpts(requestParameters);
435
435
  const response = await this.request(requestOptions, initOverrides);
436
436
 
437
- return new runtime.JSONApiResponse(response, (jsonValue) => MigrationEstimationResponseFromJSON(jsonValue));
437
+ return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, SchemaEstimationResultFromJSON));
438
438
  }
439
439
 
440
440
  /**
441
441
  * Calculate migration time estimation for an assessment
442
442
  */
443
- async calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse> {
443
+ async calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: SchemaEstimationResult; }> {
444
444
  const response = await this.calculateMigrationEstimationRaw(requestParameters, initOverrides);
445
445
  return await response.value();
446
446
  }
@@ -56,7 +56,7 @@ export interface ClusterRequirementsRequest {
56
56
  */
57
57
  workerNodeThreads?: number;
58
58
  /**
59
- * Allow workload scheduling on control plane nodes
59
+ * Allow workload scheduling on control plane nodes (default: false)
60
60
  * @type {boolean}
61
61
  * @memberof ClusterRequirementsRequest
62
62
  */
@@ -68,17 +68,23 @@ export interface ClusterRequirementsRequest {
68
68
  */
69
69
  controlPlaneCPU?: number;
70
70
  /**
71
- * Memory (GB) per control plane node (default: 16)
71
+ * Memory in GB per control plane node (default: 16)
72
72
  * @type {number}
73
73
  * @memberof ClusterRequirementsRequest
74
74
  */
75
75
  controlPlaneMemory?: number;
76
76
  /**
77
- * Number of control plane nodes (1 for single node, 3 for HA)
77
+ * Number of control plane nodes: 1 or 3 (default: 3)
78
78
  * @type {ClusterRequirementsRequestControlPlaneNodeCountEnum}
79
79
  * @memberof ClusterRequirementsRequest
80
80
  */
81
81
  controlPlaneNodeCount?: ClusterRequirementsRequestControlPlaneNodeCountEnum;
82
+ /**
83
+ * If true, control plane is hosted externally. Incompatible with control plane fields (default: false)
84
+ * @type {boolean}
85
+ * @memberof ClusterRequirementsRequest
86
+ */
87
+ hostedControlPlane?: boolean;
82
88
  }
83
89
 
84
90
 
@@ -145,6 +151,7 @@ export function ClusterRequirementsRequestFromJSONTyped(json: any, ignoreDiscrim
145
151
  'controlPlaneCPU': json['controlPlaneCPU'] == null ? undefined : json['controlPlaneCPU'],
146
152
  'controlPlaneMemory': json['controlPlaneMemory'] == null ? undefined : json['controlPlaneMemory'],
147
153
  'controlPlaneNodeCount': json['controlPlaneNodeCount'] == null ? undefined : json['controlPlaneNodeCount'],
154
+ 'hostedControlPlane': json['hostedControlPlane'] == null ? undefined : json['hostedControlPlane'],
148
155
  };
149
156
  }
150
157
 
@@ -169,6 +176,7 @@ export function ClusterRequirementsRequestToJSONTyped(value?: ClusterRequirement
169
176
  'controlPlaneCPU': value['controlPlaneCPU'],
170
177
  'controlPlaneMemory': value['controlPlaneMemory'],
171
178
  'controlPlaneNodeCount': value['controlPlaneNodeCount'],
179
+ 'hostedControlPlane': value['hostedControlPlane'],
172
180
  };
173
181
  }
174
182
 
@@ -20,11 +20,23 @@ import { mapValues } from '../runtime.js';
20
20
  */
21
21
  export interface EstimationDetail {
22
22
  /**
23
- * Estimated duration for this component (formatted as duration string)
23
+ * Estimated duration for this component (point calculators only)
24
24
  * @type {string}
25
25
  * @memberof EstimationDetail
26
26
  */
27
- duration: string;
27
+ duration?: string;
28
+ /**
29
+ * Minimum estimated duration (ranged calculators only)
30
+ * @type {string}
31
+ * @memberof EstimationDetail
32
+ */
33
+ minDuration?: string;
34
+ /**
35
+ * Maximum estimated duration (ranged calculators only)
36
+ * @type {string}
37
+ * @memberof EstimationDetail
38
+ */
39
+ maxDuration?: string;
28
40
  /**
29
41
  * Explanation of how the estimation was calculated
30
42
  * @type {string}
@@ -37,7 +49,6 @@ export interface EstimationDetail {
37
49
  * Check if a given object implements the EstimationDetail interface.
38
50
  */
39
51
  export function instanceOfEstimationDetail(value: object): value is EstimationDetail {
40
- if (!('duration' in value) || value['duration'] === undefined) return false;
41
52
  if (!('reason' in value) || value['reason'] === undefined) return false;
42
53
  return true;
43
54
  }
@@ -52,7 +63,9 @@ export function EstimationDetailFromJSONTyped(json: any, ignoreDiscriminator: bo
52
63
  }
53
64
  return {
54
65
 
55
- 'duration': json['duration'],
66
+ 'duration': json['duration'] == null ? undefined : json['duration'],
67
+ 'minDuration': json['minDuration'] == null ? undefined : json['minDuration'],
68
+ 'maxDuration': json['maxDuration'] == null ? undefined : json['maxDuration'],
56
69
  'reason': json['reason'],
57
70
  };
58
71
  }
@@ -69,6 +82,8 @@ export function EstimationDetailToJSONTyped(value?: EstimationDetail | null, ign
69
82
  return {
70
83
 
71
84
  'duration': value['duration'],
85
+ 'minDuration': value['minDuration'],
86
+ 'maxDuration': value['maxDuration'],
72
87
  'reason': value['reason'],
73
88
  };
74
89
  }
@@ -25,6 +25,20 @@ export interface MigrationEstimationRequest {
25
25
  * @memberof MigrationEstimationRequest
26
26
  */
27
27
  clusterId: string;
28
+ /**
29
+ * Schemas to run. Valid values: "network-based", "storage-offload". If omitted, all schemas are run.
30
+ *
31
+ * @type {Array<string>}
32
+ * @memberof MigrationEstimationRequest
33
+ */
34
+ estimationSchema?: Array<string>;
35
+ /**
36
+ * Optional calculator parameter overrides. Keys must match known calculator param names (e.g. "transfer_rate_mbps", "work_hours_per_day", "troubleshoot_mins_per_vm", "post_migration_engineers"). User-supplied values take precedence over both defaults and inventory-derived values. Unknown keys are silently ignored.
37
+ *
38
+ * @type {{ [key: string]: any; }}
39
+ * @memberof MigrationEstimationRequest
40
+ */
41
+ params?: { [key: string]: any; };
28
42
  }
29
43
 
30
44
  /**
@@ -46,6 +60,8 @@ export function MigrationEstimationRequestFromJSONTyped(json: any, ignoreDiscrim
46
60
  return {
47
61
 
48
62
  'clusterId': json['clusterId'],
63
+ 'estimationSchema': json['estimationSchema'] == null ? undefined : json['estimationSchema'],
64
+ 'params': json['params'] == null ? undefined : json['params'],
49
65
  };
50
66
  }
51
67
 
@@ -61,6 +77,8 @@ export function MigrationEstimationRequestToJSONTyped(value?: MigrationEstimatio
61
77
  return {
62
78
 
63
79
  'clusterId': value['clusterId'],
80
+ 'estimationSchema': value['estimationSchema'],
81
+ 'params': value['params'],
64
82
  };
65
83
  }
66
84
 
@@ -0,0 +1,92 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * OpenShift Migration Advisor API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
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 { EstimationDetail } from './EstimationDetail.js';
17
+ import {
18
+ EstimationDetailFromJSON,
19
+ EstimationDetailFromJSONTyped,
20
+ EstimationDetailToJSON,
21
+ EstimationDetailToJSONTyped,
22
+ } from './EstimationDetail.js';
23
+
24
+ /**
25
+ * Estimation results for a single schema
26
+ * @export
27
+ * @interface SchemaEstimationResult
28
+ */
29
+ export interface SchemaEstimationResult {
30
+ /**
31
+ * Minimum total estimated duration across all calculators
32
+ * @type {string}
33
+ * @memberof SchemaEstimationResult
34
+ */
35
+ minTotalDuration: string;
36
+ /**
37
+ * Maximum total estimated duration across all calculators
38
+ * @type {string}
39
+ * @memberof SchemaEstimationResult
40
+ */
41
+ maxTotalDuration: string;
42
+ /**
43
+ * Per-calculator results
44
+ * @type {{ [key: string]: EstimationDetail; }}
45
+ * @memberof SchemaEstimationResult
46
+ */
47
+ breakdown: { [key: string]: EstimationDetail; };
48
+ }
49
+
50
+ /**
51
+ * Check if a given object implements the SchemaEstimationResult interface.
52
+ */
53
+ export function instanceOfSchemaEstimationResult(value: object): value is SchemaEstimationResult {
54
+ if (!('minTotalDuration' in value) || value['minTotalDuration'] === undefined) return false;
55
+ if (!('maxTotalDuration' in value) || value['maxTotalDuration'] === undefined) return false;
56
+ if (!('breakdown' in value) || value['breakdown'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function SchemaEstimationResultFromJSON(json: any): SchemaEstimationResult {
61
+ return SchemaEstimationResultFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function SchemaEstimationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaEstimationResult {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'minTotalDuration': json['minTotalDuration'],
71
+ 'maxTotalDuration': json['maxTotalDuration'],
72
+ 'breakdown': (mapValues(json['breakdown'], EstimationDetailFromJSON)),
73
+ };
74
+ }
75
+
76
+ export function SchemaEstimationResultToJSON(json: any): SchemaEstimationResult {
77
+ return SchemaEstimationResultToJSONTyped(json, false);
78
+ }
79
+
80
+ export function SchemaEstimationResultToJSONTyped(value?: SchemaEstimationResult | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'minTotalDuration': value['minTotalDuration'],
88
+ 'maxTotalDuration': value['maxTotalDuration'],
89
+ 'breakdown': (mapValues(value['breakdown'], EstimationDetailToJSON)),
90
+ };
91
+ }
92
+