@openshift-migration-advisor/planner-sdk 0.27.0 → 0.28.0-e15db54db2a1

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 (56) 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/Datastore.d.ts +4 -0
  18. package/dist/esm/models/Datastore.js +2 -0
  19. package/dist/esm/models/InventoryV2.d.ts +43 -0
  20. package/dist/esm/models/InventoryV2.js +53 -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/index.d.ts +5 -0
  24. package/dist/esm/models/index.js +5 -0
  25. package/dist/models/AssessmentV2.d.ts +36 -0
  26. package/dist/models/AssessmentV2.js +56 -0
  27. package/dist/models/AssessmentV2Summary.d.ts +97 -0
  28. package/dist/models/AssessmentV2Summary.js +107 -0
  29. package/dist/models/AssessmentVCenterV2.d.ts +36 -0
  30. package/dist/models/AssessmentVCenterV2.js +56 -0
  31. package/dist/models/Datastore.d.ts +4 -0
  32. package/dist/models/Datastore.js +2 -0
  33. package/dist/models/InventoryV2.d.ts +43 -0
  34. package/dist/models/InventoryV2.js +60 -0
  35. package/dist/models/SubResource.d.ts +30 -0
  36. package/dist/models/SubResource.js +50 -0
  37. package/dist/models/index.d.ts +5 -0
  38. package/dist/models/index.js +5 -0
  39. package/docs/AssessmentApi.md +287 -0
  40. package/docs/AssessmentV2.md +36 -0
  41. package/docs/AssessmentV2Summary.md +58 -0
  42. package/docs/AssessmentVCenterV2.md +36 -0
  43. package/docs/Datastore.md +2 -0
  44. package/docs/InventoryV2.md +40 -0
  45. package/docs/JobApi.md +150 -0
  46. package/docs/SubResource.md +34 -0
  47. package/package.json +1 -1
  48. package/src/apis/AssessmentApi.ts +341 -0
  49. package/src/apis/JobApi.ts +219 -0
  50. package/src/models/AssessmentV2.ts +86 -0
  51. package/src/models/AssessmentV2Summary.ts +173 -0
  52. package/src/models/AssessmentVCenterV2.ts +86 -0
  53. package/src/models/Datastore.ts +6 -0
  54. package/src/models/InventoryV2.ts +91 -0
  55. package/src/models/SubResource.ts +64 -0
  56. package/src/models/index.ts +5 -0
@@ -128,6 +128,69 @@ export class JobApi extends runtime.BaseAPI {
128
128
  return yield response.value();
129
129
  });
130
130
  }
131
+ /**
132
+ * Creates request options for createRVToolsAssessmentV2 without sending the request
133
+ */
134
+ createRVToolsAssessmentV2RequestOpts(requestParameters) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ if (requestParameters['name'] == null) {
137
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling createRVToolsAssessmentV2().');
138
+ }
139
+ if (requestParameters['file'] == null) {
140
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling createRVToolsAssessmentV2().');
141
+ }
142
+ const queryParameters = {};
143
+ const headerParameters = {};
144
+ const consumes = [
145
+ { contentType: 'multipart/form-data' },
146
+ ];
147
+ // @ts-ignore: canConsumeForm may be unused
148
+ const canConsumeForm = runtime.canConsumeForm(consumes);
149
+ let formParams;
150
+ let useForm = false;
151
+ // use FormData to transmit files using content-type "multipart/form-data"
152
+ useForm = canConsumeForm;
153
+ if (useForm) {
154
+ formParams = new FormData();
155
+ }
156
+ else {
157
+ formParams = new URLSearchParams();
158
+ }
159
+ if (requestParameters['name'] != null) {
160
+ formParams.append('name', requestParameters['name']);
161
+ }
162
+ if (requestParameters['file'] != null) {
163
+ formParams.append('file', requestParameters['file']);
164
+ }
165
+ let urlPath = `/api/v2/assessments/rvtools`;
166
+ return {
167
+ path: urlPath,
168
+ method: 'POST',
169
+ headers: headerParameters,
170
+ query: queryParameters,
171
+ body: formParams,
172
+ };
173
+ });
174
+ }
175
+ /**
176
+ * Create an assessment from RVTools file asynchronously
177
+ */
178
+ createRVToolsAssessmentV2Raw(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const requestOptions = yield this.createRVToolsAssessmentV2RequestOpts(requestParameters);
181
+ const response = yield this.request(requestOptions, initOverrides);
182
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
183
+ });
184
+ }
185
+ /**
186
+ * Create an assessment from RVTools file asynchronously
187
+ */
188
+ createRVToolsAssessmentV2(requestParameters, initOverrides) {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ const response = yield this.createRVToolsAssessmentV2Raw(requestParameters, initOverrides);
191
+ return yield response.value();
192
+ });
193
+ }
131
194
  /**
132
195
  * Creates request options for getJob without sending the request
133
196
  */
@@ -167,4 +230,65 @@ export class JobApi extends runtime.BaseAPI {
167
230
  return yield response.value();
168
231
  });
169
232
  }
233
+ /**
234
+ * Creates request options for uploadRvtoolsToAssessment without sending the request
235
+ */
236
+ uploadRvtoolsToAssessmentRequestOpts(requestParameters) {
237
+ return __awaiter(this, void 0, void 0, function* () {
238
+ if (requestParameters['id'] == null) {
239
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling uploadRvtoolsToAssessment().');
240
+ }
241
+ if (requestParameters['file'] == null) {
242
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadRvtoolsToAssessment().');
243
+ }
244
+ const queryParameters = {};
245
+ const headerParameters = {};
246
+ const consumes = [
247
+ { contentType: 'multipart/form-data' },
248
+ ];
249
+ // @ts-ignore: canConsumeForm may be unused
250
+ const canConsumeForm = runtime.canConsumeForm(consumes);
251
+ let formParams;
252
+ let useForm = false;
253
+ // use FormData to transmit files using content-type "multipart/form-data"
254
+ useForm = canConsumeForm;
255
+ if (useForm) {
256
+ formParams = new FormData();
257
+ }
258
+ else {
259
+ formParams = new URLSearchParams();
260
+ }
261
+ if (requestParameters['file'] != null) {
262
+ formParams.append('file', requestParameters['file']);
263
+ }
264
+ let urlPath = `/api/v2/assessments/{id}/rvtools`;
265
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
266
+ return {
267
+ path: urlPath,
268
+ method: 'PUT',
269
+ headers: headerParameters,
270
+ query: queryParameters,
271
+ body: formParams,
272
+ };
273
+ });
274
+ }
275
+ /**
276
+ * Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
277
+ */
278
+ uploadRvtoolsToAssessmentRaw(requestParameters, initOverrides) {
279
+ return __awaiter(this, void 0, void 0, function* () {
280
+ const requestOptions = yield this.uploadRvtoolsToAssessmentRequestOpts(requestParameters);
281
+ const response = yield this.request(requestOptions, initOverrides);
282
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
283
+ });
284
+ }
285
+ /**
286
+ * Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
287
+ */
288
+ uploadRvtoolsToAssessment(requestParameters, initOverrides) {
289
+ return __awaiter(this, void 0, void 0, function* () {
290
+ const response = yield this.uploadRvtoolsToAssessmentRaw(requestParameters, initOverrides);
291
+ return yield response.value();
292
+ });
293
+ }
170
294
  }
@@ -0,0 +1,36 @@
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: v1alpha1
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 { InventoryV2 } from './InventoryV2.js';
13
+ import type { SubResource } from './SubResource.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface AssessmentV2
18
+ */
19
+ export interface AssessmentV2 {
20
+ /**
21
+ *
22
+ */
23
+ data: InventoryV2;
24
+ /**
25
+ *
26
+ */
27
+ vcetners: Array<SubResource>;
28
+ }
29
+ /**
30
+ * Check if a given object implements the AssessmentV2 interface.
31
+ */
32
+ export declare function instanceOfAssessmentV2(value: object): value is AssessmentV2;
33
+ export declare function AssessmentV2FromJSON(json: any): AssessmentV2;
34
+ export declare function AssessmentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentV2;
35
+ export declare function AssessmentV2ToJSON(json: any): AssessmentV2;
36
+ export declare function AssessmentV2ToJSONTyped(value?: AssessmentV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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
+ import { InventoryV2FromJSON, InventoryV2ToJSON, } from './InventoryV2.js';
15
+ import { SubResourceFromJSON, SubResourceToJSON, } from './SubResource.js';
16
+ /**
17
+ * Check if a given object implements the AssessmentV2 interface.
18
+ */
19
+ export function instanceOfAssessmentV2(value) {
20
+ if (!('data' in value) || value['data'] === undefined)
21
+ return false;
22
+ if (!('vcetners' in value) || value['vcetners'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function AssessmentV2FromJSON(json) {
27
+ return AssessmentV2FromJSONTyped(json, false);
28
+ }
29
+ export function AssessmentV2FromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'data': InventoryV2FromJSON(json['data']),
35
+ 'vcetners': (json['vcetners'].map(SubResourceFromJSON)),
36
+ };
37
+ }
38
+ export function AssessmentV2ToJSON(json) {
39
+ return AssessmentV2ToJSONTyped(json, false);
40
+ }
41
+ export function AssessmentV2ToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'data': InventoryV2ToJSON(value['data']),
47
+ 'vcetners': (value['vcetners'].map(SubResourceToJSON)),
48
+ };
49
+ }
@@ -0,0 +1,97 @@
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: v1alpha1
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 { AssessmentSharing } from './AssessmentSharing.js';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AssessmentV2Summary
17
+ */
18
+ export interface AssessmentV2Summary {
19
+ /**
20
+ *
21
+ */
22
+ id: string;
23
+ /**
24
+ *
25
+ */
26
+ name: string;
27
+ /**
28
+ * Owner's first name
29
+ */
30
+ ownerFirstName?: string;
31
+ /**
32
+ * Owner's last name
33
+ */
34
+ ownerLastName?: string;
35
+ /**
36
+ *
37
+ */
38
+ sourceType: AssessmentV2SummarySourceTypeEnum;
39
+ /**
40
+ *
41
+ */
42
+ datastoresCount: number;
43
+ /**
44
+ *
45
+ */
46
+ hostsCount: number;
47
+ /**
48
+ *
49
+ */
50
+ vmsCount: number;
51
+ /**
52
+ *
53
+ */
54
+ networksCount: number;
55
+ /**
56
+ *
57
+ */
58
+ sourceId?: string;
59
+ /**
60
+ *
61
+ */
62
+ createdAt: Date;
63
+ /**
64
+ *
65
+ */
66
+ permissions?: Array<AssessmentV2SummaryPermissionsEnum>;
67
+ /**
68
+ *
69
+ */
70
+ sharing?: AssessmentSharing;
71
+ }
72
+ /**
73
+ * @export
74
+ */
75
+ export declare const AssessmentV2SummarySourceTypeEnum: {
76
+ readonly Inventory: "inventory";
77
+ readonly Rvtools: "rvtools";
78
+ readonly Source: "source";
79
+ };
80
+ export type AssessmentV2SummarySourceTypeEnum = typeof AssessmentV2SummarySourceTypeEnum[keyof typeof AssessmentV2SummarySourceTypeEnum];
81
+ /**
82
+ * @export
83
+ */
84
+ export declare const AssessmentV2SummaryPermissionsEnum: {
85
+ readonly Read: "read";
86
+ readonly Share: "share";
87
+ readonly Delete: "delete";
88
+ };
89
+ export type AssessmentV2SummaryPermissionsEnum = typeof AssessmentV2SummaryPermissionsEnum[keyof typeof AssessmentV2SummaryPermissionsEnum];
90
+ /**
91
+ * Check if a given object implements the AssessmentV2Summary interface.
92
+ */
93
+ export declare function instanceOfAssessmentV2Summary(value: object): value is AssessmentV2Summary;
94
+ export declare function AssessmentV2SummaryFromJSON(json: any): AssessmentV2Summary;
95
+ export declare function AssessmentV2SummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentV2Summary;
96
+ export declare function AssessmentV2SummaryToJSON(json: any): AssessmentV2Summary;
97
+ export declare function AssessmentV2SummaryToJSONTyped(value?: AssessmentV2Summary | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,99 @@
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
+ import { parseDateTime, serializeDateTime } from '../runtime.js';
15
+ import { AssessmentSharingFromJSON, AssessmentSharingToJSON, } from './AssessmentSharing.js';
16
+ /**
17
+ * @export
18
+ */
19
+ export const AssessmentV2SummarySourceTypeEnum = {
20
+ Inventory: 'inventory',
21
+ Rvtools: 'rvtools',
22
+ Source: 'source',
23
+ };
24
+ /**
25
+ * @export
26
+ */
27
+ export const AssessmentV2SummaryPermissionsEnum = {
28
+ Read: 'read',
29
+ Share: 'share',
30
+ Delete: 'delete',
31
+ };
32
+ /**
33
+ * Check if a given object implements the AssessmentV2Summary interface.
34
+ */
35
+ export function instanceOfAssessmentV2Summary(value) {
36
+ if (!('id' in value) || value['id'] === undefined)
37
+ return false;
38
+ if (!('name' in value) || value['name'] === undefined)
39
+ return false;
40
+ if (!('sourceType' in value) || value['sourceType'] === undefined)
41
+ return false;
42
+ if (!('datastoresCount' in value) || value['datastoresCount'] === undefined)
43
+ return false;
44
+ if (!('hostsCount' in value) || value['hostsCount'] === undefined)
45
+ return false;
46
+ if (!('vmsCount' in value) || value['vmsCount'] === undefined)
47
+ return false;
48
+ if (!('networksCount' in value) || value['networksCount'] === undefined)
49
+ return false;
50
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
51
+ return false;
52
+ return true;
53
+ }
54
+ export function AssessmentV2SummaryFromJSON(json) {
55
+ return AssessmentV2SummaryFromJSONTyped(json, false);
56
+ }
57
+ export function AssessmentV2SummaryFromJSONTyped(json, ignoreDiscriminator) {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+ 'id': json['id'],
63
+ 'name': json['name'],
64
+ 'ownerFirstName': json['ownerFirstName'] == null ? undefined : json['ownerFirstName'],
65
+ 'ownerLastName': json['ownerLastName'] == null ? undefined : json['ownerLastName'],
66
+ 'sourceType': json['sourceType'],
67
+ 'datastoresCount': json['datastoresCount'],
68
+ 'hostsCount': json['hostsCount'],
69
+ 'vmsCount': json['vmsCount'],
70
+ 'networksCount': json['networksCount'],
71
+ 'sourceId': json['sourceId'] == null ? undefined : json['sourceId'],
72
+ 'createdAt': (json['createdAt'] == null ? json['createdAt'] : parseDateTime(json['createdAt'])),
73
+ 'permissions': json['permissions'] == null ? undefined : json['permissions'],
74
+ 'sharing': json['sharing'] == null ? undefined : AssessmentSharingFromJSON(json['sharing']),
75
+ };
76
+ }
77
+ export function AssessmentV2SummaryToJSON(json) {
78
+ return AssessmentV2SummaryToJSONTyped(json, false);
79
+ }
80
+ export function AssessmentV2SummaryToJSONTyped(value, ignoreDiscriminator = false) {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+ return {
85
+ 'id': value['id'],
86
+ 'name': value['name'],
87
+ 'ownerFirstName': value['ownerFirstName'],
88
+ 'ownerLastName': value['ownerLastName'],
89
+ 'sourceType': value['sourceType'],
90
+ 'datastoresCount': value['datastoresCount'],
91
+ 'hostsCount': value['hostsCount'],
92
+ 'vmsCount': value['vmsCount'],
93
+ 'networksCount': value['networksCount'],
94
+ 'sourceId': value['sourceId'],
95
+ 'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
96
+ 'permissions': value['permissions'],
97
+ 'sharing': AssessmentSharingToJSON(value['sharing']),
98
+ };
99
+ }
@@ -0,0 +1,36 @@
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: v1alpha1
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 { InventoryV2 } from './InventoryV2.js';
13
+ import type { SubResource } from './SubResource.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface AssessmentVCenterV2
18
+ */
19
+ export interface AssessmentVCenterV2 {
20
+ /**
21
+ *
22
+ */
23
+ data: InventoryV2;
24
+ /**
25
+ *
26
+ */
27
+ clusters: Array<SubResource>;
28
+ }
29
+ /**
30
+ * Check if a given object implements the AssessmentVCenterV2 interface.
31
+ */
32
+ export declare function instanceOfAssessmentVCenterV2(value: object): value is AssessmentVCenterV2;
33
+ export declare function AssessmentVCenterV2FromJSON(json: any): AssessmentVCenterV2;
34
+ export declare function AssessmentVCenterV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentVCenterV2;
35
+ export declare function AssessmentVCenterV2ToJSON(json: any): AssessmentVCenterV2;
36
+ export declare function AssessmentVCenterV2ToJSONTyped(value?: AssessmentVCenterV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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
+ import { InventoryV2FromJSON, InventoryV2ToJSON, } from './InventoryV2.js';
15
+ import { SubResourceFromJSON, SubResourceToJSON, } from './SubResource.js';
16
+ /**
17
+ * Check if a given object implements the AssessmentVCenterV2 interface.
18
+ */
19
+ export function instanceOfAssessmentVCenterV2(value) {
20
+ if (!('data' in value) || value['data'] === undefined)
21
+ return false;
22
+ if (!('clusters' in value) || value['clusters'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function AssessmentVCenterV2FromJSON(json) {
27
+ return AssessmentVCenterV2FromJSONTyped(json, false);
28
+ }
29
+ export function AssessmentVCenterV2FromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'data': InventoryV2FromJSON(json['data']),
35
+ 'clusters': (json['clusters'].map(SubResourceFromJSON)),
36
+ };
37
+ }
38
+ export function AssessmentVCenterV2ToJSON(json) {
39
+ return AssessmentVCenterV2ToJSONTyped(json, false);
40
+ }
41
+ export function AssessmentVCenterV2ToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'data': InventoryV2ToJSON(value['data']),
47
+ 'clusters': (value['clusters'].map(SubResourceToJSON)),
48
+ };
49
+ }
@@ -24,6 +24,10 @@ export interface Datastore {
24
24
  * Storage access category derived from Datastore.Type
25
25
  */
26
26
  storageProtocol?: DatastoreStorageProtocolEnum;
27
+ /**
28
+ * Whether this datastore supports vSAN point-in-time snapshots
29
+ */
30
+ vsanSnapshotSupport?: boolean;
27
31
  /**
28
32
  *
29
33
  */
@@ -52,6 +52,7 @@ export function DatastoreFromJSONTyped(json, ignoreDiscriminator) {
52
52
  return {
53
53
  'type': json['type'],
54
54
  'storageProtocol': json['storageProtocol'] == null ? undefined : json['storageProtocol'],
55
+ 'vsanSnapshotSupport': json['vsanSnapshotSupport'] == null ? undefined : json['vsanSnapshotSupport'],
55
56
  'totalCapacityGB': json['totalCapacityGB'],
56
57
  'freeCapacityGB': json['freeCapacityGB'],
57
58
  'vendor': json['vendor'],
@@ -73,6 +74,7 @@ export function DatastoreToJSONTyped(value, ignoreDiscriminator = false) {
73
74
  return {
74
75
  'type': value['type'],
75
76
  'storageProtocol': value['storageProtocol'],
77
+ 'vsanSnapshotSupport': value['vsanSnapshotSupport'],
76
78
  'totalCapacityGB': value['totalCapacityGB'],
77
79
  'freeCapacityGB': value['freeCapacityGB'],
78
80
  'vendor': value['vendor'],
@@ -0,0 +1,43 @@
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: v1alpha1
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 { InventoryData } from './InventoryData.js';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface InventoryV2
17
+ */
18
+ export interface InventoryV2 {
19
+ /**
20
+ *
21
+ */
22
+ id: string;
23
+ /**
24
+ *
25
+ */
26
+ data: InventoryData;
27
+ /**
28
+ * Version of the vCenter api. For example "8.0.3.0"
29
+ */
30
+ vcenterVersion?: string;
31
+ /**
32
+ * Timestamp when the inventory data was created or collected
33
+ */
34
+ createdAt?: Date;
35
+ }
36
+ /**
37
+ * Check if a given object implements the InventoryV2 interface.
38
+ */
39
+ export declare function instanceOfInventoryV2(value: object): value is InventoryV2;
40
+ export declare function InventoryV2FromJSON(json: any): InventoryV2;
41
+ export declare function InventoryV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): InventoryV2;
42
+ export declare function InventoryV2ToJSON(json: any): InventoryV2;
43
+ export declare function InventoryV2ToJSONTyped(value?: InventoryV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
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
+ import { parseDateTime, serializeDateTime } from '../runtime.js';
15
+ import { InventoryDataFromJSON, InventoryDataToJSON, } from './InventoryData.js';
16
+ /**
17
+ * Check if a given object implements the InventoryV2 interface.
18
+ */
19
+ export function instanceOfInventoryV2(value) {
20
+ if (!('id' in value) || value['id'] === undefined)
21
+ return false;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function InventoryV2FromJSON(json) {
27
+ return InventoryV2FromJSONTyped(json, false);
28
+ }
29
+ export function InventoryV2FromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'id': json['id'],
35
+ 'data': InventoryDataFromJSON(json['data']),
36
+ 'vcenterVersion': json['vcenter_version'] == null ? undefined : json['vcenter_version'],
37
+ 'createdAt': json['created_at'] == null ? undefined : (parseDateTime(json['created_at'])),
38
+ };
39
+ }
40
+ export function InventoryV2ToJSON(json) {
41
+ return InventoryV2ToJSONTyped(json, false);
42
+ }
43
+ export function InventoryV2ToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'id': value['id'],
49
+ 'data': InventoryDataToJSON(value['data']),
50
+ 'vcenter_version': value['vcenterVersion'],
51
+ 'created_at': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
52
+ };
53
+ }
@@ -0,0 +1,30 @@
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: v1alpha1
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SubResource
16
+ */
17
+ export interface SubResource {
18
+ /**
19
+ *
20
+ */
21
+ id: string;
22
+ }
23
+ /**
24
+ * Check if a given object implements the SubResource interface.
25
+ */
26
+ export declare function instanceOfSubResource(value: object): value is SubResource;
27
+ export declare function SubResourceFromJSON(json: any): SubResource;
28
+ export declare function SubResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubResource;
29
+ export declare function SubResourceToJSON(json: any): SubResource;
30
+ export declare function SubResourceToJSONTyped(value?: SubResource | null, ignoreDiscriminator?: boolean): any;