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

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
@@ -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
 
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/planner-sdk",
3
- "version": "0.8.0-265da09b88bf",
3
+ "version": "0.8.0-c0804255c486",
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
  }
@@ -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
+
@@ -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';
package/src/runtime.ts CHANGED
@@ -91,7 +91,7 @@ export const DefaultConfig = new Configuration();
91
91
  */
92
92
  export class BaseAPI {
93
93
 
94
- private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
94
+ private static readonly jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
95
95
  private middleware: Middleware[];
96
96
 
97
97
  constructor(protected configuration = DefaultConfig) {
@@ -1,41 +0,0 @@
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
- * Migration time estimation results
15
- * @export
16
- * @interface MigrationEstimationResponse
17
- */
18
- export interface MigrationEstimationResponse {
19
- /**
20
- * Total estimated migration duration (formatted as duration string, e.g., "2h30m")
21
- * @type {string}
22
- * @memberof MigrationEstimationResponse
23
- */
24
- totalDuration: string;
25
- /**
26
- * Breakdown of estimation by calculator
27
- * @type {{ [key: string]: EstimationDetail; }}
28
- * @memberof MigrationEstimationResponse
29
- */
30
- breakdown: {
31
- [key: string]: EstimationDetail;
32
- };
33
- }
34
- /**
35
- * Check if a given object implements the MigrationEstimationResponse interface.
36
- */
37
- export declare function instanceOfMigrationEstimationResponse(value: object): value is MigrationEstimationResponse;
38
- export declare function MigrationEstimationResponseFromJSON(json: any): MigrationEstimationResponse;
39
- export declare function MigrationEstimationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationEstimationResponse;
40
- export declare function MigrationEstimationResponseToJSON(json: any): MigrationEstimationResponse;
41
- export declare function MigrationEstimationResponseToJSONTyped(value?: MigrationEstimationResponse | null, ignoreDiscriminator?: boolean): any;
@@ -1,41 +0,0 @@
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
- * Migration time estimation results
15
- * @export
16
- * @interface MigrationEstimationResponse
17
- */
18
- export interface MigrationEstimationResponse {
19
- /**
20
- * Total estimated migration duration (formatted as duration string, e.g., "2h30m")
21
- * @type {string}
22
- * @memberof MigrationEstimationResponse
23
- */
24
- totalDuration: string;
25
- /**
26
- * Breakdown of estimation by calculator
27
- * @type {{ [key: string]: EstimationDetail; }}
28
- * @memberof MigrationEstimationResponse
29
- */
30
- breakdown: {
31
- [key: string]: EstimationDetail;
32
- };
33
- }
34
- /**
35
- * Check if a given object implements the MigrationEstimationResponse interface.
36
- */
37
- export declare function instanceOfMigrationEstimationResponse(value: object): value is MigrationEstimationResponse;
38
- export declare function MigrationEstimationResponseFromJSON(json: any): MigrationEstimationResponse;
39
- export declare function MigrationEstimationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationEstimationResponse;
40
- export declare function MigrationEstimationResponseToJSON(json: any): MigrationEstimationResponse;
41
- export declare function MigrationEstimationResponseToJSONTyped(value?: MigrationEstimationResponse | null, ignoreDiscriminator?: boolean): any;
@@ -1,56 +0,0 @@
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.instanceOfMigrationEstimationResponse = instanceOfMigrationEstimationResponse;
17
- exports.MigrationEstimationResponseFromJSON = MigrationEstimationResponseFromJSON;
18
- exports.MigrationEstimationResponseFromJSONTyped = MigrationEstimationResponseFromJSONTyped;
19
- exports.MigrationEstimationResponseToJSON = MigrationEstimationResponseToJSON;
20
- exports.MigrationEstimationResponseToJSONTyped = MigrationEstimationResponseToJSONTyped;
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 MigrationEstimationResponse interface.
25
- */
26
- function instanceOfMigrationEstimationResponse(value) {
27
- if (!('totalDuration' in value) || value['totalDuration'] === undefined)
28
- return false;
29
- if (!('breakdown' in value) || value['breakdown'] === undefined)
30
- return false;
31
- return true;
32
- }
33
- function MigrationEstimationResponseFromJSON(json) {
34
- return MigrationEstimationResponseFromJSONTyped(json, false);
35
- }
36
- function MigrationEstimationResponseFromJSONTyped(json, ignoreDiscriminator) {
37
- if (json == null) {
38
- return json;
39
- }
40
- return {
41
- 'totalDuration': json['totalDuration'],
42
- 'breakdown': ((0, runtime_js_1.mapValues)(json['breakdown'], EstimationDetail_js_1.EstimationDetailFromJSON)),
43
- };
44
- }
45
- function MigrationEstimationResponseToJSON(json) {
46
- return MigrationEstimationResponseToJSONTyped(json, false);
47
- }
48
- function MigrationEstimationResponseToJSONTyped(value, ignoreDiscriminator = false) {
49
- if (value == null) {
50
- return value;
51
- }
52
- return {
53
- 'totalDuration': value['totalDuration'],
54
- 'breakdown': ((0, runtime_js_1.mapValues)(value['breakdown'], EstimationDetail_js_1.EstimationDetailToJSON)),
55
- };
56
- }
@@ -1,83 +0,0 @@
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
- * Migration time estimation results
26
- * @export
27
- * @interface MigrationEstimationResponse
28
- */
29
- export interface MigrationEstimationResponse {
30
- /**
31
- * Total estimated migration duration (formatted as duration string, e.g., "2h30m")
32
- * @type {string}
33
- * @memberof MigrationEstimationResponse
34
- */
35
- totalDuration: string;
36
- /**
37
- * Breakdown of estimation by calculator
38
- * @type {{ [key: string]: EstimationDetail; }}
39
- * @memberof MigrationEstimationResponse
40
- */
41
- breakdown: { [key: string]: EstimationDetail; };
42
- }
43
-
44
- /**
45
- * Check if a given object implements the MigrationEstimationResponse interface.
46
- */
47
- export function instanceOfMigrationEstimationResponse(value: object): value is MigrationEstimationResponse {
48
- if (!('totalDuration' in value) || value['totalDuration'] === undefined) return false;
49
- if (!('breakdown' in value) || value['breakdown'] === undefined) return false;
50
- return true;
51
- }
52
-
53
- export function MigrationEstimationResponseFromJSON(json: any): MigrationEstimationResponse {
54
- return MigrationEstimationResponseFromJSONTyped(json, false);
55
- }
56
-
57
- export function MigrationEstimationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationEstimationResponse {
58
- if (json == null) {
59
- return json;
60
- }
61
- return {
62
-
63
- 'totalDuration': json['totalDuration'],
64
- 'breakdown': (mapValues(json['breakdown'], EstimationDetailFromJSON)),
65
- };
66
- }
67
-
68
- export function MigrationEstimationResponseToJSON(json: any): MigrationEstimationResponse {
69
- return MigrationEstimationResponseToJSONTyped(json, false);
70
- }
71
-
72
- export function MigrationEstimationResponseToJSONTyped(value?: MigrationEstimationResponse | null, ignoreDiscriminator: boolean = false): any {
73
- if (value == null) {
74
- return value;
75
- }
76
-
77
- return {
78
-
79
- 'totalDuration': value['totalDuration'],
80
- 'breakdown': (mapValues(value['breakdown'], EstimationDetailToJSON)),
81
- };
82
- }
83
-