@openshift-migration-advisor/planner-sdk 0.28.0 → 0.29.0-6be8b373fa84

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 (63) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +13 -2
  3. package/dist/apis/AssessmentApi.d.ts +162 -0
  4. package/dist/apis/AssessmentApi.js +168 -0
  5. package/dist/apis/JobApi.d.ts +86 -0
  6. package/dist/apis/JobApi.js +124 -0
  7. package/dist/esm/apis/AssessmentApi.d.ts +162 -0
  8. package/dist/esm/apis/AssessmentApi.js +168 -0
  9. package/dist/esm/apis/JobApi.d.ts +86 -0
  10. package/dist/esm/apis/JobApi.js +124 -0
  11. package/dist/esm/models/AssessmentV2.d.ts +36 -0
  12. package/dist/esm/models/AssessmentV2.js +49 -0
  13. package/dist/esm/models/AssessmentV2Summary.d.ts +97 -0
  14. package/dist/esm/models/AssessmentV2Summary.js +99 -0
  15. package/dist/esm/models/AssessmentVCenterV2.d.ts +36 -0
  16. package/dist/esm/models/AssessmentVCenterV2.js +49 -0
  17. package/dist/esm/models/Inventory.d.ts +5 -1
  18. package/dist/esm/models/Inventory.js +2 -0
  19. package/dist/esm/models/InventoryV2.d.ts +47 -0
  20. package/dist/esm/models/InventoryV2.js +55 -0
  21. package/dist/esm/models/SubResource.d.ts +30 -0
  22. package/dist/esm/models/SubResource.js +43 -0
  23. package/dist/esm/models/VsphereCoreInput.d.ts +8 -0
  24. package/dist/esm/models/VsphereCoreInput.js +4 -0
  25. package/dist/esm/models/index.d.ts +5 -0
  26. package/dist/esm/models/index.js +5 -0
  27. package/dist/models/AssessmentV2.d.ts +36 -0
  28. package/dist/models/AssessmentV2.js +56 -0
  29. package/dist/models/AssessmentV2Summary.d.ts +97 -0
  30. package/dist/models/AssessmentV2Summary.js +107 -0
  31. package/dist/models/AssessmentVCenterV2.d.ts +36 -0
  32. package/dist/models/AssessmentVCenterV2.js +56 -0
  33. package/dist/models/Inventory.d.ts +5 -1
  34. package/dist/models/Inventory.js +2 -0
  35. package/dist/models/InventoryV2.d.ts +47 -0
  36. package/dist/models/InventoryV2.js +62 -0
  37. package/dist/models/SubResource.d.ts +30 -0
  38. package/dist/models/SubResource.js +50 -0
  39. package/dist/models/VsphereCoreInput.d.ts +8 -0
  40. package/dist/models/VsphereCoreInput.js +4 -0
  41. package/dist/models/index.d.ts +5 -0
  42. package/dist/models/index.js +5 -0
  43. package/docs/AssessmentApi.md +287 -0
  44. package/docs/AssessmentV2.md +36 -0
  45. package/docs/AssessmentV2Summary.md +58 -0
  46. package/docs/AssessmentVCenterV2.md +36 -0
  47. package/docs/Inventory.md +2 -0
  48. package/docs/InventoryV2.md +42 -0
  49. package/docs/JobApi.md +152 -0
  50. package/docs/SubResource.md +34 -0
  51. package/docs/VsphereCoreInput.md +4 -0
  52. package/package.json +1 -1
  53. package/src/apis/AssessmentApi.ts +341 -0
  54. package/src/apis/JobApi.ts +219 -0
  55. package/src/models/AssessmentV2.ts +86 -0
  56. package/src/models/AssessmentV2Summary.ts +173 -0
  57. package/src/models/AssessmentVCenterV2.ts +86 -0
  58. package/src/models/Inventory.ts +7 -1
  59. package/src/models/InventoryV2.ts +97 -0
  60. package/src/models/SubResource.ts +64 -0
  61. package/src/models/VsphereCoreInput.ts +12 -0
  62. package/src/models/index.ts +5 -0
  63. package/src/runtime.ts +8 -8
@@ -0,0 +1,97 @@
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: v1alpha1
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, parseDate, parseDateTime, serializeDate, serializeDateTime } from '../runtime.js';
16
+ import type { InventoryData } from './InventoryData.js';
17
+ import {
18
+ InventoryDataFromJSON,
19
+ InventoryDataFromJSONTyped,
20
+ InventoryDataToJSON,
21
+ InventoryDataToJSONTyped,
22
+ } from './InventoryData.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface InventoryV2
28
+ */
29
+ export interface InventoryV2 {
30
+ /**
31
+ *
32
+ */
33
+ id: string;
34
+ /**
35
+ *
36
+ */
37
+ data: InventoryData;
38
+ /**
39
+ * Version of the vCenter api. For example "8.0.3.0"
40
+ */
41
+ vcenterVersion?: string;
42
+ /**
43
+ * Timestamp when the inventory data was created or collected
44
+ */
45
+ createdAt?: Date;
46
+ /**
47
+ * Oldest known source collection time. Null when unknown.
48
+ */
49
+ collectionTime?: Date | null;
50
+ }
51
+
52
+ /**
53
+ * Check if a given object implements the InventoryV2 interface.
54
+ */
55
+ export function instanceOfInventoryV2(value: object): value is InventoryV2 {
56
+ if (!('id' in value) || value['id'] === undefined) return false;
57
+ if (!('data' in value) || value['data'] === undefined) return false;
58
+ return true;
59
+ }
60
+
61
+ export function InventoryV2FromJSON(json: any): InventoryV2 {
62
+ return InventoryV2FromJSONTyped(json, false);
63
+ }
64
+
65
+ export function InventoryV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): InventoryV2 {
66
+ if (json == null) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'id': json['id'],
72
+ 'data': InventoryDataFromJSON(json['data']),
73
+ 'vcenterVersion': json['vcenter_version'] == null ? undefined : json['vcenter_version'],
74
+ 'createdAt': json['created_at'] == null ? undefined : (parseDateTime(json['created_at'])),
75
+ 'collectionTime': json['collection_time'] === undefined ? undefined : json['collection_time'] === null ? null : (parseDateTime(json['collection_time'])),
76
+ };
77
+ }
78
+
79
+ export function InventoryV2ToJSON(json: any): InventoryV2 {
80
+ return InventoryV2ToJSONTyped(json, false);
81
+ }
82
+
83
+ export function InventoryV2ToJSONTyped(value?: InventoryV2 | null, ignoreDiscriminator: boolean = false): any {
84
+ if (value == null) {
85
+ return value;
86
+ }
87
+
88
+ return {
89
+
90
+ 'id': value['id'],
91
+ 'data': InventoryDataToJSON(value['data']),
92
+ 'vcenter_version': value['vcenterVersion'],
93
+ 'created_at': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
94
+ 'collection_time': value['collectionTime'] == null ? value['collectionTime'] : serializeDateTime(value['collectionTime']),
95
+ };
96
+ }
97
+
@@ -0,0 +1,64 @@
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: v1alpha1
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface SubResource
20
+ */
21
+ export interface SubResource {
22
+ /**
23
+ *
24
+ */
25
+ id: string;
26
+ }
27
+
28
+ /**
29
+ * Check if a given object implements the SubResource interface.
30
+ */
31
+ export function instanceOfSubResource(value: object): value is SubResource {
32
+ if (!('id' in value) || value['id'] === undefined) return false;
33
+ return true;
34
+ }
35
+
36
+ export function SubResourceFromJSON(json: any): SubResource {
37
+ return SubResourceFromJSONTyped(json, false);
38
+ }
39
+
40
+ export function SubResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubResource {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+
46
+ 'id': json['id'],
47
+ };
48
+ }
49
+
50
+ export function SubResourceToJSON(json: any): SubResource {
51
+ return SubResourceToJSONTyped(json, false);
52
+ }
53
+
54
+ export function SubResourceToJSONTyped(value?: SubResource | null, ignoreDiscriminator: boolean = false): any {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+
59
+ return {
60
+
61
+ 'id': value['id'],
62
+ };
63
+ }
64
+
@@ -31,6 +31,14 @@ export interface VsphereCoreInput {
31
31
  *
32
32
  */
33
33
  srmEnabled?: boolean;
34
+ /**
35
+ * Whether Network I/O Control is enabled
36
+ */
37
+ niocEnabled?: boolean;
38
+ /**
39
+ * How NIOC is configured and which traffic is prioritized
40
+ */
41
+ niocDetails?: string;
34
42
  }
35
43
 
36
44
  /**
@@ -53,6 +61,8 @@ export function VsphereCoreInputFromJSONTyped(json: any, ignoreDiscriminator: bo
53
61
  'vmEncryptionEnabled': json['vmEncryptionEnabled'] == null ? undefined : json['vmEncryptionEnabled'],
54
62
  'vmEncryptionPolicy': json['vmEncryptionPolicy'] == null ? undefined : json['vmEncryptionPolicy'],
55
63
  'srmEnabled': json['srmEnabled'] == null ? undefined : json['srmEnabled'],
64
+ 'niocEnabled': json['niocEnabled'] == null ? undefined : json['niocEnabled'],
65
+ 'niocDetails': json['niocDetails'] == null ? undefined : json['niocDetails'],
56
66
  };
57
67
  }
58
68
 
@@ -70,6 +80,8 @@ export function VsphereCoreInputToJSONTyped(value?: VsphereCoreInput | null, ign
70
80
  'vmEncryptionEnabled': value['vmEncryptionEnabled'],
71
81
  'vmEncryptionPolicy': value['vmEncryptionPolicy'],
72
82
  'srmEnabled': value['srmEnabled'],
83
+ 'niocEnabled': value['niocEnabled'],
84
+ 'niocDetails': value['niocDetails'],
73
85
  };
74
86
  }
75
87
 
@@ -11,6 +11,9 @@ export * from './AssessmentForm.js';
11
11
  export * from './AssessmentSharing.js';
12
12
  export * from './AssessmentSubsetInventory.js';
13
13
  export * from './AssessmentUpdate.js';
14
+ export * from './AssessmentV2.js';
15
+ export * from './AssessmentV2Summary.js';
16
+ export * from './AssessmentVCenterV2.js';
14
17
  export * from './ClusterFeatures.js';
15
18
  export * from './ClusterRequirementsRequest.js';
16
19
  export * from './ClusterRequirementsResponse.js';
@@ -41,6 +44,7 @@ export * from './Infra.js';
41
44
  export * from './Inventory.js';
42
45
  export * from './InventoryData.js';
43
46
  export * from './InventoryTotals.js';
47
+ export * from './InventoryV2.js';
44
48
  export * from './Ipv4Config.js';
45
49
  export * from './IssuesBreakdown.js';
46
50
  export * from './Job.js';
@@ -83,6 +87,7 @@ export * from './StandaloneClusterRequirementsRequest.js';
83
87
  export * from './StandaloneClusterRequirementsResponse.js';
84
88
  export * from './Status.js';
85
89
  export * from './StorageIoConfiguration.js';
90
+ export * from './SubResource.js';
86
91
  export * from './UpdateInventory.js';
87
92
  export * from './VCenter.js';
88
93
  export * from './VMResourceBreakdown.js';
package/src/runtime.ts CHANGED
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- export const BASE_PATH = "https://raw.githubusercontent.com".replace(/\/+$/, "");
15
+ export const BASE_PATH: string = "https://raw.githubusercontent.com".replace(/\/+$/, "");
16
16
 
17
17
  export interface ConfigurationParameters {
18
18
  basePath?: string; // override base path
@@ -83,7 +83,7 @@ export class Configuration {
83
83
  }
84
84
  }
85
85
 
86
- export const DefaultConfig = new Configuration();
86
+ export const DefaultConfig: Configuration = new Configuration();
87
87
 
88
88
  /**
89
89
  * This is the base class for all generated API classes.
@@ -93,22 +93,22 @@ export class BaseAPI {
93
93
  private static readonly jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
94
94
  private middleware: Middleware[];
95
95
 
96
- constructor(protected configuration = DefaultConfig) {
96
+ constructor(protected configuration: Configuration = DefaultConfig) {
97
97
  this.middleware = configuration.middleware;
98
98
  }
99
99
 
100
- withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
100
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T {
101
101
  const next = this.clone<T>();
102
102
  next.middleware = next.middleware.concat(...middlewares);
103
103
  return next;
104
104
  }
105
105
 
106
- withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
106
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T {
107
107
  const middlewares = preMiddlewares.map((pre) => ({ pre }));
108
108
  return this.withMiddleware<T>(...middlewares);
109
109
  }
110
110
 
111
- withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
111
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T {
112
112
  const middlewares = postMiddlewares.map((post) => ({ post }));
113
113
  return this.withMiddleware<T>(...middlewares);
114
114
  }
@@ -354,7 +354,7 @@ function querystringSingleKey(key: string, value: string | number | null | undef
354
354
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
355
355
  }
356
356
 
357
- export function exists(json: any, key: string) {
357
+ export function exists(json: any, key: string): boolean {
358
358
  const value = json[key];
359
359
  return value !== null && value !== undefined;
360
360
  }
@@ -410,7 +410,7 @@ export function parseDateTime(value: any): Date {
410
410
  return new Date(value);
411
411
  }
412
412
 
413
- export function mapValues(data: any, fn: (item: any) => any) {
413
+ export function mapValues(data: any, fn: (item: any) => any): { [key: string]: any } {
414
414
  const result: { [key: string]: any } = {};
415
415
  for (const key of Object.keys(data)) {
416
416
  result[key] = fn(data[key]);