@openshift-migration-advisor/planner-sdk 0.28.0 → 0.29.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.
- package/.openapi-generator/FILES +10 -0
- package/README.md +13 -2
- package/dist/apis/AssessmentApi.d.ts +162 -0
- package/dist/apis/AssessmentApi.js +168 -0
- package/dist/apis/JobApi.d.ts +86 -0
- package/dist/apis/JobApi.js +124 -0
- package/dist/esm/apis/AssessmentApi.d.ts +162 -0
- package/dist/esm/apis/AssessmentApi.js +168 -0
- package/dist/esm/apis/JobApi.d.ts +86 -0
- package/dist/esm/apis/JobApi.js +124 -0
- package/dist/esm/models/AssessmentV2.d.ts +36 -0
- package/dist/esm/models/AssessmentV2.js +49 -0
- package/dist/esm/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/esm/models/AssessmentV2Summary.js +99 -0
- package/dist/esm/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/esm/models/AssessmentVCenterV2.js +49 -0
- package/dist/esm/models/InventoryV2.d.ts +43 -0
- package/dist/esm/models/InventoryV2.js +53 -0
- package/dist/esm/models/SubResource.d.ts +30 -0
- package/dist/esm/models/SubResource.js +43 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/AssessmentV2.d.ts +36 -0
- package/dist/models/AssessmentV2.js +56 -0
- package/dist/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/models/AssessmentV2Summary.js +107 -0
- package/dist/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/models/AssessmentVCenterV2.js +56 -0
- package/dist/models/InventoryV2.d.ts +43 -0
- package/dist/models/InventoryV2.js +60 -0
- package/dist/models/SubResource.d.ts +30 -0
- package/dist/models/SubResource.js +50 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AssessmentApi.md +287 -0
- package/docs/AssessmentV2.md +36 -0
- package/docs/AssessmentV2Summary.md +58 -0
- package/docs/AssessmentVCenterV2.md +36 -0
- package/docs/InventoryV2.md +40 -0
- package/docs/JobApi.md +150 -0
- package/docs/SubResource.md +34 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +341 -0
- package/src/apis/JobApi.ts +219 -0
- package/src/models/AssessmentV2.ts +86 -0
- package/src/models/AssessmentV2Summary.ts +173 -0
- package/src/models/AssessmentVCenterV2.ts +86 -0
- package/src/models/InventoryV2.ts +91 -0
- package/src/models/SubResource.ts +64 -0
- package/src/models/index.ts +5 -0
- package/src/runtime.ts +8 -8
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
import type { InventoryV2 } from './InventoryV2.js';
|
|
17
|
+
import {
|
|
18
|
+
InventoryV2FromJSON,
|
|
19
|
+
InventoryV2FromJSONTyped,
|
|
20
|
+
InventoryV2ToJSON,
|
|
21
|
+
InventoryV2ToJSONTyped,
|
|
22
|
+
} from './InventoryV2.js';
|
|
23
|
+
import type { SubResource } from './SubResource.js';
|
|
24
|
+
import {
|
|
25
|
+
SubResourceFromJSON,
|
|
26
|
+
SubResourceFromJSONTyped,
|
|
27
|
+
SubResourceToJSON,
|
|
28
|
+
SubResourceToJSONTyped,
|
|
29
|
+
} from './SubResource.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface AssessmentV2
|
|
35
|
+
*/
|
|
36
|
+
export interface AssessmentV2 {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
data: InventoryV2;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
vcetners: Array<SubResource>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the AssessmentV2 interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfAssessmentV2(value: object): value is AssessmentV2 {
|
|
51
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
52
|
+
if (!('vcetners' in value) || value['vcetners'] === undefined) return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AssessmentV2FromJSON(json: any): AssessmentV2 {
|
|
57
|
+
return AssessmentV2FromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AssessmentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentV2 {
|
|
61
|
+
if (json == null) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'data': InventoryV2FromJSON(json['data']),
|
|
67
|
+
'vcetners': ((json['vcetners'] as Array<any>).map(SubResourceFromJSON)),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function AssessmentV2ToJSON(json: any): AssessmentV2 {
|
|
72
|
+
return AssessmentV2ToJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function AssessmentV2ToJSONTyped(value?: AssessmentV2 | null, ignoreDiscriminator: boolean = false): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'data': InventoryV2ToJSON(value['data']),
|
|
83
|
+
'vcetners': ((value['vcetners'] as Array<any>).map(SubResourceToJSON)),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -0,0 +1,173 @@
|
|
|
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 { AssessmentSharing } from './AssessmentSharing.js';
|
|
17
|
+
import {
|
|
18
|
+
AssessmentSharingFromJSON,
|
|
19
|
+
AssessmentSharingFromJSONTyped,
|
|
20
|
+
AssessmentSharingToJSON,
|
|
21
|
+
AssessmentSharingToJSONTyped,
|
|
22
|
+
} from './AssessmentSharing.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AssessmentV2Summary
|
|
28
|
+
*/
|
|
29
|
+
export interface AssessmentV2Summary {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* Owner's first name
|
|
40
|
+
*/
|
|
41
|
+
ownerFirstName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Owner's last name
|
|
44
|
+
*/
|
|
45
|
+
ownerLastName?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
sourceType: AssessmentV2SummarySourceTypeEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
datastoresCount: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
hostsCount: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
vmsCount: number;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
networksCount: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
sourceId?: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
permissions?: Array<AssessmentV2SummaryPermissionsEnum>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
sharing?: AssessmentSharing;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export const AssessmentV2SummarySourceTypeEnum = {
|
|
89
|
+
Inventory: 'inventory',
|
|
90
|
+
Rvtools: 'rvtools',
|
|
91
|
+
Source: 'source',
|
|
92
|
+
} as const;
|
|
93
|
+
export type AssessmentV2SummarySourceTypeEnum = typeof AssessmentV2SummarySourceTypeEnum[keyof typeof AssessmentV2SummarySourceTypeEnum];
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @export
|
|
97
|
+
*/
|
|
98
|
+
export const AssessmentV2SummaryPermissionsEnum = {
|
|
99
|
+
Read: 'read',
|
|
100
|
+
Share: 'share',
|
|
101
|
+
Delete: 'delete',
|
|
102
|
+
} as const;
|
|
103
|
+
export type AssessmentV2SummaryPermissionsEnum = typeof AssessmentV2SummaryPermissionsEnum[keyof typeof AssessmentV2SummaryPermissionsEnum];
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Check if a given object implements the AssessmentV2Summary interface.
|
|
108
|
+
*/
|
|
109
|
+
export function instanceOfAssessmentV2Summary(value: object): value is AssessmentV2Summary {
|
|
110
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
111
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
112
|
+
if (!('sourceType' in value) || value['sourceType'] === undefined) return false;
|
|
113
|
+
if (!('datastoresCount' in value) || value['datastoresCount'] === undefined) return false;
|
|
114
|
+
if (!('hostsCount' in value) || value['hostsCount'] === undefined) return false;
|
|
115
|
+
if (!('vmsCount' in value) || value['vmsCount'] === undefined) return false;
|
|
116
|
+
if (!('networksCount' in value) || value['networksCount'] === undefined) return false;
|
|
117
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function AssessmentV2SummaryFromJSON(json: any): AssessmentV2Summary {
|
|
122
|
+
return AssessmentV2SummaryFromJSONTyped(json, false);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function AssessmentV2SummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentV2Summary {
|
|
126
|
+
if (json == null) {
|
|
127
|
+
return json;
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
|
|
131
|
+
'id': json['id'],
|
|
132
|
+
'name': json['name'],
|
|
133
|
+
'ownerFirstName': json['ownerFirstName'] == null ? undefined : json['ownerFirstName'],
|
|
134
|
+
'ownerLastName': json['ownerLastName'] == null ? undefined : json['ownerLastName'],
|
|
135
|
+
'sourceType': json['sourceType'],
|
|
136
|
+
'datastoresCount': json['datastoresCount'],
|
|
137
|
+
'hostsCount': json['hostsCount'],
|
|
138
|
+
'vmsCount': json['vmsCount'],
|
|
139
|
+
'networksCount': json['networksCount'],
|
|
140
|
+
'sourceId': json['sourceId'] == null ? undefined : json['sourceId'],
|
|
141
|
+
'createdAt': (json['createdAt'] == null ? json['createdAt'] : parseDateTime(json['createdAt'])),
|
|
142
|
+
'permissions': json['permissions'] == null ? undefined : json['permissions'],
|
|
143
|
+
'sharing': json['sharing'] == null ? undefined : AssessmentSharingFromJSON(json['sharing']),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function AssessmentV2SummaryToJSON(json: any): AssessmentV2Summary {
|
|
148
|
+
return AssessmentV2SummaryToJSONTyped(json, false);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function AssessmentV2SummaryToJSONTyped(value?: AssessmentV2Summary | null, ignoreDiscriminator: boolean = false): any {
|
|
152
|
+
if (value == null) {
|
|
153
|
+
return value;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return {
|
|
157
|
+
|
|
158
|
+
'id': value['id'],
|
|
159
|
+
'name': value['name'],
|
|
160
|
+
'ownerFirstName': value['ownerFirstName'],
|
|
161
|
+
'ownerLastName': value['ownerLastName'],
|
|
162
|
+
'sourceType': value['sourceType'],
|
|
163
|
+
'datastoresCount': value['datastoresCount'],
|
|
164
|
+
'hostsCount': value['hostsCount'],
|
|
165
|
+
'vmsCount': value['vmsCount'],
|
|
166
|
+
'networksCount': value['networksCount'],
|
|
167
|
+
'sourceId': value['sourceId'],
|
|
168
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
169
|
+
'permissions': value['permissions'],
|
|
170
|
+
'sharing': AssessmentSharingToJSON(value['sharing']),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
import type { InventoryV2 } from './InventoryV2.js';
|
|
17
|
+
import {
|
|
18
|
+
InventoryV2FromJSON,
|
|
19
|
+
InventoryV2FromJSONTyped,
|
|
20
|
+
InventoryV2ToJSON,
|
|
21
|
+
InventoryV2ToJSONTyped,
|
|
22
|
+
} from './InventoryV2.js';
|
|
23
|
+
import type { SubResource } from './SubResource.js';
|
|
24
|
+
import {
|
|
25
|
+
SubResourceFromJSON,
|
|
26
|
+
SubResourceFromJSONTyped,
|
|
27
|
+
SubResourceToJSON,
|
|
28
|
+
SubResourceToJSONTyped,
|
|
29
|
+
} from './SubResource.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface AssessmentVCenterV2
|
|
35
|
+
*/
|
|
36
|
+
export interface AssessmentVCenterV2 {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
data: InventoryV2;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
clusters: Array<SubResource>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the AssessmentVCenterV2 interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfAssessmentVCenterV2(value: object): value is AssessmentVCenterV2 {
|
|
51
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
52
|
+
if (!('clusters' in value) || value['clusters'] === undefined) return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AssessmentVCenterV2FromJSON(json: any): AssessmentVCenterV2 {
|
|
57
|
+
return AssessmentVCenterV2FromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AssessmentVCenterV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentVCenterV2 {
|
|
61
|
+
if (json == null) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'data': InventoryV2FromJSON(json['data']),
|
|
67
|
+
'clusters': ((json['clusters'] as Array<any>).map(SubResourceFromJSON)),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function AssessmentVCenterV2ToJSON(json: any): AssessmentVCenterV2 {
|
|
72
|
+
return AssessmentVCenterV2ToJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function AssessmentVCenterV2ToJSONTyped(value?: AssessmentVCenterV2 | null, ignoreDiscriminator: boolean = false): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'data': InventoryV2ToJSON(value['data']),
|
|
83
|
+
'clusters': ((value['clusters'] as Array<any>).map(SubResourceToJSON)),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the InventoryV2 interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfInventoryV2(value: object): value is InventoryV2 {
|
|
52
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
53
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function InventoryV2FromJSON(json: any): InventoryV2 {
|
|
58
|
+
return InventoryV2FromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function InventoryV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): InventoryV2 {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'id': json['id'],
|
|
68
|
+
'data': InventoryDataFromJSON(json['data']),
|
|
69
|
+
'vcenterVersion': json['vcenter_version'] == null ? undefined : json['vcenter_version'],
|
|
70
|
+
'createdAt': json['created_at'] == null ? undefined : (parseDateTime(json['created_at'])),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function InventoryV2ToJSON(json: any): InventoryV2 {
|
|
75
|
+
return InventoryV2ToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function InventoryV2ToJSONTyped(value?: InventoryV2 | null, ignoreDiscriminator: boolean = false): any {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'id': value['id'],
|
|
86
|
+
'data': InventoryDataToJSON(value['data']),
|
|
87
|
+
'vcenter_version': value['vcenterVersion'],
|
|
88
|
+
'created_at': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -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
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -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]);
|