@openshift-migration-advisor/planner-sdk 0.8.0-265da09b88bf → 0.8.0-3ef6ec43d7b2

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 (40) 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/EstimationDetail.d.ts +14 -2
  9. package/dist/esm/models/EstimationDetail.js +5 -3
  10. package/dist/esm/models/MigrationEstimationRequest.d.ts +16 -0
  11. package/dist/esm/models/MigrationEstimationRequest.js +4 -0
  12. package/dist/esm/models/SchemaEstimationResult.d.ts +47 -0
  13. package/dist/esm/models/{MigrationEstimationResponse.js → SchemaEstimationResult.js} +15 -11
  14. package/dist/esm/models/index.d.ts +1 -1
  15. package/dist/esm/models/index.js +1 -1
  16. package/dist/esm/runtime.js +1 -1
  17. package/dist/models/EstimationDetail.d.ts +14 -2
  18. package/dist/models/EstimationDetail.js +5 -3
  19. package/dist/models/MigrationEstimationRequest.d.ts +16 -0
  20. package/dist/models/MigrationEstimationRequest.js +4 -0
  21. package/dist/models/SchemaEstimationResult.d.ts +47 -0
  22. package/dist/models/SchemaEstimationResult.js +60 -0
  23. package/dist/models/index.d.ts +1 -1
  24. package/dist/models/index.js +1 -1
  25. package/dist/runtime.js +1 -1
  26. package/docs/AssessmentApi.md +3 -3
  27. package/docs/EstimationDetail.md +5 -1
  28. package/docs/MigrationEstimationRequest.md +4 -0
  29. package/docs/{MigrationEstimationResponse.md → SchemaEstimationResult.md} +9 -7
  30. package/package.json +1 -1
  31. package/src/apis/AssessmentApi.ts +8 -8
  32. package/src/models/EstimationDetail.ts +19 -4
  33. package/src/models/MigrationEstimationRequest.ts +18 -0
  34. package/src/models/SchemaEstimationResult.ts +92 -0
  35. package/src/models/index.ts +1 -1
  36. package/src/runtime.ts +1 -1
  37. package/dist/esm/models/MigrationEstimationResponse.d.ts +0 -41
  38. package/dist/models/MigrationEstimationResponse.d.ts +0 -41
  39. package/dist/models/MigrationEstimationResponse.js +0 -56
  40. package/src/models/MigrationEstimationResponse.ts +0 -83
@@ -36,12 +36,12 @@ docs/Label.md
36
36
  docs/MigrationComplexityRequest.md
37
37
  docs/MigrationComplexityResponse.md
38
38
  docs/MigrationEstimationRequest.md
39
- docs/MigrationEstimationResponse.md
40
39
  docs/MigrationIssue.md
41
40
  docs/ModelError.md
42
41
  docs/Network.md
43
42
  docs/OsInfo.md
44
43
  docs/PresignedUrl.md
44
+ docs/SchemaEstimationResult.md
45
45
  docs/SizingOverCommitRatio.md
46
46
  docs/SizingResourceConsumption.md
47
47
  docs/SizingResourceLimits.md
@@ -95,12 +95,12 @@ src/models/Label.ts
95
95
  src/models/MigrationComplexityRequest.ts
96
96
  src/models/MigrationComplexityResponse.ts
97
97
  src/models/MigrationEstimationRequest.ts
98
- src/models/MigrationEstimationResponse.ts
99
98
  src/models/MigrationIssue.ts
100
99
  src/models/ModelError.ts
101
100
  src/models/Network.ts
102
101
  src/models/OsInfo.ts
103
102
  src/models/PresignedUrl.ts
103
+ src/models/SchemaEstimationResult.ts
104
104
  src/models/SizingOverCommitRatio.ts
105
105
  src/models/SizingResourceConsumption.ts
106
106
  src/models/SizingResourceLimits.ts
@@ -1 +1 @@
1
- 7.21.0-SNAPSHOT
1
+ 7.22.0-SNAPSHOT
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @openshift-migration-advisor/planner-sdk@0.8.0-265da09b88bf
1
+ # @openshift-migration-advisor/planner-sdk@0.8.0-3ef6ec43d7b2
2
2
 
3
3
  A TypeScript SDK client for the raw.githubusercontent.com API.
4
4
 
@@ -107,12 +107,12 @@ All URIs are relative to *https://raw.githubusercontent.com*
107
107
  - [MigrationComplexityRequest](docs/MigrationComplexityRequest.md)
108
108
  - [MigrationComplexityResponse](docs/MigrationComplexityResponse.md)
109
109
  - [MigrationEstimationRequest](docs/MigrationEstimationRequest.md)
110
- - [MigrationEstimationResponse](docs/MigrationEstimationResponse.md)
111
110
  - [MigrationIssue](docs/MigrationIssue.md)
112
111
  - [ModelError](docs/ModelError.md)
113
112
  - [Network](docs/Network.md)
114
113
  - [OsInfo](docs/OsInfo.md)
115
114
  - [PresignedUrl](docs/PresignedUrl.md)
115
+ - [SchemaEstimationResult](docs/SchemaEstimationResult.md)
116
116
  - [SizingOverCommitRatio](docs/SizingOverCommitRatio.md)
117
117
  - [SizingResourceConsumption](docs/SizingResourceConsumption.md)
118
118
  - [SizingResourceLimits](docs/SizingResourceLimits.md)
@@ -140,8 +140,8 @@ and is automatically generated by the
140
140
  [OpenAPI Generator](https://openapi-generator.tech) project:
141
141
 
142
142
  - API version: `undefined`
143
- - Package version: `0.8.0-265da09b88bf`
144
- - Generator version: `7.21.0-SNAPSHOT`
143
+ - Package version: `0.8.0-3ef6ec43d7b2`
144
+ - Generator version: `7.22.0-SNAPSHOT`
145
145
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
146
146
 
147
147
  The generated npm module supports the following:
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationRequest, MigrationEstimationResponse } from '../models/index.js';
13
+ import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationRequest, SchemaEstimationResult } from '../models/index.js';
14
14
  export interface CalculateAssessmentClusterRequirementsRequest {
15
15
  id: string;
16
16
  clusterRequirementsRequest: ClusterRequirementsRequest;
@@ -104,11 +104,15 @@ export interface AssessmentApiInterface {
104
104
  * @throws {RequiredError}
105
105
  * @memberof AssessmentApiInterface
106
106
  */
107
- calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>>;
107
+ calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
108
+ [key: string]: SchemaEstimationResult;
109
+ }>>;
108
110
  /**
109
111
  * Calculate migration time estimation for an assessment
110
112
  */
111
- calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse>;
113
+ calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
114
+ [key: string]: SchemaEstimationResult;
115
+ }>;
112
116
  /**
113
117
  * Creates request options for createAssessment without sending the request
114
118
  * @param {AssessmentForm} assessmentForm
@@ -242,11 +246,15 @@ export declare class AssessmentApi extends runtime.BaseAPI implements Assessment
242
246
  /**
243
247
  * Calculate migration time estimation for an assessment
244
248
  */
245
- calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>>;
249
+ calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
250
+ [key: string]: SchemaEstimationResult;
251
+ }>>;
246
252
  /**
247
253
  * Calculate migration time estimation for an assessment
248
254
  */
249
- calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse>;
255
+ calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
256
+ [key: string]: SchemaEstimationResult;
257
+ }>;
250
258
  /**
251
259
  * Creates request options for createAssessment without sending the request
252
260
  */
@@ -149,7 +149,7 @@ class AssessmentApi extends runtime.BaseAPI {
149
149
  return __awaiter(this, void 0, void 0, function* () {
150
150
  const requestOptions = yield this.calculateMigrationEstimationRequestOpts(requestParameters);
151
151
  const response = yield this.request(requestOptions, initOverrides);
152
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.MigrationEstimationResponseFromJSON)(jsonValue));
152
+ return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, index_js_1.SchemaEstimationResultFromJSON));
153
153
  });
154
154
  }
155
155
  /**
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationRequest, MigrationEstimationResponse } from '../models/index.js';
13
+ import type { Assessment, AssessmentForm, AssessmentUpdate, ClusterRequirementsRequest, ClusterRequirementsResponse, MigrationComplexityRequest, MigrationComplexityResponse, MigrationEstimationRequest, SchemaEstimationResult } from '../models/index.js';
14
14
  export interface CalculateAssessmentClusterRequirementsRequest {
15
15
  id: string;
16
16
  clusterRequirementsRequest: ClusterRequirementsRequest;
@@ -104,11 +104,15 @@ export interface AssessmentApiInterface {
104
104
  * @throws {RequiredError}
105
105
  * @memberof AssessmentApiInterface
106
106
  */
107
- calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>>;
107
+ calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
108
+ [key: string]: SchemaEstimationResult;
109
+ }>>;
108
110
  /**
109
111
  * Calculate migration time estimation for an assessment
110
112
  */
111
- calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse>;
113
+ calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
114
+ [key: string]: SchemaEstimationResult;
115
+ }>;
112
116
  /**
113
117
  * Creates request options for createAssessment without sending the request
114
118
  * @param {AssessmentForm} assessmentForm
@@ -242,11 +246,15 @@ export declare class AssessmentApi extends runtime.BaseAPI implements Assessment
242
246
  /**
243
247
  * Calculate migration time estimation for an assessment
244
248
  */
245
- calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>>;
249
+ calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
250
+ [key: string]: SchemaEstimationResult;
251
+ }>>;
246
252
  /**
247
253
  * Calculate migration time estimation for an assessment
248
254
  */
249
- calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse>;
255
+ calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
256
+ [key: string]: SchemaEstimationResult;
257
+ }>;
250
258
  /**
251
259
  * Creates request options for createAssessment without sending the request
252
260
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { AssessmentFromJSON, AssessmentFormToJSON, AssessmentUpdateToJSON, ClusterRequirementsRequestToJSON, ClusterRequirementsResponseFromJSON, MigrationComplexityRequestToJSON, MigrationComplexityResponseFromJSON, MigrationEstimationRequestToJSON, MigrationEstimationResponseFromJSON, } from '../models/index.js';
24
+ import { AssessmentFromJSON, AssessmentFormToJSON, AssessmentUpdateToJSON, ClusterRequirementsRequestToJSON, ClusterRequirementsResponseFromJSON, MigrationComplexityRequestToJSON, MigrationComplexityResponseFromJSON, MigrationEstimationRequestToJSON, SchemaEstimationResultFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -146,7 +146,7 @@ export class AssessmentApi extends runtime.BaseAPI {
146
146
  return __awaiter(this, void 0, void 0, function* () {
147
147
  const requestOptions = yield this.calculateMigrationEstimationRequestOpts(requestParameters);
148
148
  const response = yield this.request(requestOptions, initOverrides);
149
- return new runtime.JSONApiResponse(response, (jsonValue) => MigrationEstimationResponseFromJSON(jsonValue));
149
+ return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, SchemaEstimationResultFromJSON));
150
150
  });
151
151
  }
152
152
  /**
@@ -16,11 +16,23 @@
16
16
  */
17
17
  export interface EstimationDetail {
18
18
  /**
19
- * Estimated duration for this component (formatted as duration string)
19
+ * Estimated duration for this component (point calculators only)
20
20
  * @type {string}
21
21
  * @memberof EstimationDetail
22
22
  */
23
- duration: string;
23
+ duration?: string;
24
+ /**
25
+ * Minimum estimated duration (ranged calculators only)
26
+ * @type {string}
27
+ * @memberof EstimationDetail
28
+ */
29
+ minDuration?: string;
30
+ /**
31
+ * Maximum estimated duration (ranged calculators only)
32
+ * @type {string}
33
+ * @memberof EstimationDetail
34
+ */
35
+ maxDuration?: string;
24
36
  /**
25
37
  * Explanation of how the estimation was calculated
26
38
  * @type {string}
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the EstimationDetail interface.
16
16
  */
17
17
  export function instanceOfEstimationDetail(value) {
18
- if (!('duration' in value) || value['duration'] === undefined)
19
- return false;
20
18
  if (!('reason' in value) || value['reason'] === undefined)
21
19
  return false;
22
20
  return true;
@@ -29,7 +27,9 @@ export function EstimationDetailFromJSONTyped(json, ignoreDiscriminator) {
29
27
  return json;
30
28
  }
31
29
  return {
32
- 'duration': json['duration'],
30
+ 'duration': json['duration'] == null ? undefined : json['duration'],
31
+ 'minDuration': json['minDuration'] == null ? undefined : json['minDuration'],
32
+ 'maxDuration': json['maxDuration'] == null ? undefined : json['maxDuration'],
33
33
  'reason': json['reason'],
34
34
  };
35
35
  }
@@ -42,6 +42,8 @@ export function EstimationDetailToJSONTyped(value, ignoreDiscriminator = false)
42
42
  }
43
43
  return {
44
44
  'duration': value['duration'],
45
+ 'minDuration': value['minDuration'],
46
+ 'maxDuration': value['maxDuration'],
45
47
  'reason': value['reason'],
46
48
  };
47
49
  }
@@ -21,6 +21,22 @@ export interface MigrationEstimationRequest {
21
21
  * @memberof MigrationEstimationRequest
22
22
  */
23
23
  clusterId: string;
24
+ /**
25
+ * Schemas to run. Valid values: "network-based", "storage-offload". If omitted, all schemas are run.
26
+ *
27
+ * @type {Array<string>}
28
+ * @memberof MigrationEstimationRequest
29
+ */
30
+ estimationSchema?: Array<string>;
31
+ /**
32
+ * 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.
33
+ *
34
+ * @type {{ [key: string]: any; }}
35
+ * @memberof MigrationEstimationRequest
36
+ */
37
+ params?: {
38
+ [key: string]: any;
39
+ };
24
40
  }
25
41
  /**
26
42
  * Check if a given object implements the MigrationEstimationRequest interface.
@@ -28,6 +28,8 @@ export function MigrationEstimationRequestFromJSONTyped(json, ignoreDiscriminato
28
28
  }
29
29
  return {
30
30
  'clusterId': json['clusterId'],
31
+ 'estimationSchema': json['estimationSchema'] == null ? undefined : json['estimationSchema'],
32
+ 'params': json['params'] == null ? undefined : json['params'],
31
33
  };
32
34
  }
33
35
  export function MigrationEstimationRequestToJSON(json) {
@@ -39,5 +41,7 @@ export function MigrationEstimationRequestToJSONTyped(value, ignoreDiscriminator
39
41
  }
40
42
  return {
41
43
  'clusterId': value['clusterId'],
44
+ 'estimationSchema': value['estimationSchema'],
45
+ 'params': value['params'],
42
46
  };
43
47
  }
@@ -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;
@@ -14,36 +14,40 @@
14
14
  import { mapValues } from '../runtime.js';
15
15
  import { EstimationDetailFromJSON, EstimationDetailToJSON, } from './EstimationDetail.js';
16
16
  /**
17
- * Check if a given object implements the MigrationEstimationResponse interface.
17
+ * Check if a given object implements the SchemaEstimationResult interface.
18
18
  */
19
- export function instanceOfMigrationEstimationResponse(value) {
20
- if (!('totalDuration' in value) || value['totalDuration'] === undefined)
19
+ export function instanceOfSchemaEstimationResult(value) {
20
+ if (!('minTotalDuration' in value) || value['minTotalDuration'] === undefined)
21
+ return false;
22
+ if (!('maxTotalDuration' in value) || value['maxTotalDuration'] === undefined)
21
23
  return false;
22
24
  if (!('breakdown' in value) || value['breakdown'] === undefined)
23
25
  return false;
24
26
  return true;
25
27
  }
26
- export function MigrationEstimationResponseFromJSON(json) {
27
- return MigrationEstimationResponseFromJSONTyped(json, false);
28
+ export function SchemaEstimationResultFromJSON(json) {
29
+ return SchemaEstimationResultFromJSONTyped(json, false);
28
30
  }
29
- export function MigrationEstimationResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ export function SchemaEstimationResultFromJSONTyped(json, ignoreDiscriminator) {
30
32
  if (json == null) {
31
33
  return json;
32
34
  }
33
35
  return {
34
- 'totalDuration': json['totalDuration'],
36
+ 'minTotalDuration': json['minTotalDuration'],
37
+ 'maxTotalDuration': json['maxTotalDuration'],
35
38
  'breakdown': (mapValues(json['breakdown'], EstimationDetailFromJSON)),
36
39
  };
37
40
  }
38
- export function MigrationEstimationResponseToJSON(json) {
39
- return MigrationEstimationResponseToJSONTyped(json, false);
41
+ export function SchemaEstimationResultToJSON(json) {
42
+ return SchemaEstimationResultToJSONTyped(json, false);
40
43
  }
41
- export function MigrationEstimationResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ export function SchemaEstimationResultToJSONTyped(value, ignoreDiscriminator = false) {
42
45
  if (value == null) {
43
46
  return value;
44
47
  }
45
48
  return {
46
- 'totalDuration': value['totalDuration'],
49
+ 'minTotalDuration': value['minTotalDuration'],
50
+ 'maxTotalDuration': value['maxTotalDuration'],
47
51
  'breakdown': (mapValues(value['breakdown'], EstimationDetailToJSON)),
48
52
  };
49
53
  }
@@ -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';
@@ -29,12 +29,12 @@ export * from './Label.js';
29
29
  export * from './MigrationComplexityRequest.js';
30
30
  export * from './MigrationComplexityResponse.js';
31
31
  export * from './MigrationEstimationRequest.js';
32
- export * from './MigrationEstimationResponse.js';
33
32
  export * from './MigrationIssue.js';
34
33
  export * from './ModelError.js';
35
34
  export * from './Network.js';
36
35
  export * from './OsInfo.js';
37
36
  export * from './PresignedUrl.js';
37
+ export * from './SchemaEstimationResult.js';
38
38
  export * from './SizingOverCommitRatio.js';
39
39
  export * from './SizingResourceConsumption.js';
40
40
  export * from './SizingResourceLimits.js';
@@ -210,7 +210,7 @@ export class BaseAPI {
210
210
  return next;
211
211
  }
212
212
  }
213
- BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
213
+ BaseAPI.jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
214
214
  ;
215
215
  function isBlob(value) {
216
216
  return typeof Blob !== 'undefined' && value instanceof Blob;
@@ -16,11 +16,23 @@
16
16
  */
17
17
  export interface EstimationDetail {
18
18
  /**
19
- * Estimated duration for this component (formatted as duration string)
19
+ * Estimated duration for this component (point calculators only)
20
20
  * @type {string}
21
21
  * @memberof EstimationDetail
22
22
  */
23
- duration: string;
23
+ duration?: string;
24
+ /**
25
+ * Minimum estimated duration (ranged calculators only)
26
+ * @type {string}
27
+ * @memberof EstimationDetail
28
+ */
29
+ minDuration?: string;
30
+ /**
31
+ * Maximum estimated duration (ranged calculators only)
32
+ * @type {string}
33
+ * @memberof EstimationDetail
34
+ */
35
+ maxDuration?: string;
24
36
  /**
25
37
  * Explanation of how the estimation was calculated
26
38
  * @type {string}
@@ -22,8 +22,6 @@ exports.EstimationDetailToJSONTyped = EstimationDetailToJSONTyped;
22
22
  * Check if a given object implements the EstimationDetail interface.
23
23
  */
24
24
  function instanceOfEstimationDetail(value) {
25
- if (!('duration' in value) || value['duration'] === undefined)
26
- return false;
27
25
  if (!('reason' in value) || value['reason'] === undefined)
28
26
  return false;
29
27
  return true;
@@ -36,7 +34,9 @@ function EstimationDetailFromJSONTyped(json, ignoreDiscriminator) {
36
34
  return json;
37
35
  }
38
36
  return {
39
- 'duration': json['duration'],
37
+ 'duration': json['duration'] == null ? undefined : json['duration'],
38
+ 'minDuration': json['minDuration'] == null ? undefined : json['minDuration'],
39
+ 'maxDuration': json['maxDuration'] == null ? undefined : json['maxDuration'],
40
40
  'reason': json['reason'],
41
41
  };
42
42
  }
@@ -49,6 +49,8 @@ function EstimationDetailToJSONTyped(value, ignoreDiscriminator = false) {
49
49
  }
50
50
  return {
51
51
  'duration': value['duration'],
52
+ 'minDuration': value['minDuration'],
53
+ 'maxDuration': value['maxDuration'],
52
54
  'reason': value['reason'],
53
55
  };
54
56
  }
@@ -21,6 +21,22 @@ export interface MigrationEstimationRequest {
21
21
  * @memberof MigrationEstimationRequest
22
22
  */
23
23
  clusterId: string;
24
+ /**
25
+ * Schemas to run. Valid values: "network-based", "storage-offload". If omitted, all schemas are run.
26
+ *
27
+ * @type {Array<string>}
28
+ * @memberof MigrationEstimationRequest
29
+ */
30
+ estimationSchema?: Array<string>;
31
+ /**
32
+ * 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.
33
+ *
34
+ * @type {{ [key: string]: any; }}
35
+ * @memberof MigrationEstimationRequest
36
+ */
37
+ params?: {
38
+ [key: string]: any;
39
+ };
24
40
  }
25
41
  /**
26
42
  * Check if a given object implements the MigrationEstimationRequest interface.
@@ -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
+ }
@@ -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';