@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
@@ -37,6 +37,17 @@ export interface CreateRVToolsAssessmentRequest {
37
37
  file: Blob;
38
38
  }
39
39
 
40
+ export interface CreateRVToolsAssessmentV2Request {
41
+ /**
42
+ * Name of the assessment
43
+ */
44
+ name: string;
45
+ /**
46
+ * File upload for assessment data
47
+ */
48
+ file: Blob;
49
+ }
50
+
40
51
  export interface GetJobRequest {
41
52
  /**
42
53
  * ID of the job
@@ -44,6 +55,17 @@ export interface GetJobRequest {
44
55
  id: number;
45
56
  }
46
57
 
58
+ export interface UploadRvtoolsToAssessmentRequest {
59
+ /**
60
+ * ID of the assessment
61
+ */
62
+ id: string;
63
+ /**
64
+ * Rvtools extending the exising assessment
65
+ */
66
+ file: Blob;
67
+ }
68
+
47
69
  /**
48
70
  * JobApi - interface
49
71
  *
@@ -97,6 +119,30 @@ export interface JobApiInterface {
97
119
  */
98
120
  createRVToolsAssessment(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
99
121
 
122
+ /**
123
+ * Creates request options for createRVToolsAssessmentV2 without sending the request
124
+ * @param {string} name Name of the assessment
125
+ * @param {Blob} file File upload for assessment data
126
+ * @throws {RequiredError}
127
+ * @memberof JobApiInterface
128
+ */
129
+ createRVToolsAssessmentV2RequestOpts(requestParameters: CreateRVToolsAssessmentV2Request): Promise<runtime.RequestOpts>;
130
+
131
+ /**
132
+ * Create an assessment from RVTools file asynchronously
133
+ * @param {string} name Name of the assessment
134
+ * @param {Blob} file File upload for assessment data
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ * @memberof JobApiInterface
138
+ */
139
+ createRVToolsAssessmentV2Raw(requestParameters: CreateRVToolsAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
140
+
141
+ /**
142
+ * Create an assessment from RVTools file asynchronously
143
+ */
144
+ createRVToolsAssessmentV2(requestParameters: CreateRVToolsAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
145
+
100
146
  /**
101
147
  * Creates request options for getJob without sending the request
102
148
  * @param {number} id ID of the job
@@ -119,6 +165,30 @@ export interface JobApiInterface {
119
165
  */
120
166
  getJob(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
121
167
 
168
+ /**
169
+ * Creates request options for uploadRvtoolsToAssessment without sending the request
170
+ * @param {string} id ID of the assessment
171
+ * @param {Blob} file Rvtools extending the exising assessment
172
+ * @throws {RequiredError}
173
+ * @memberof JobApiInterface
174
+ */
175
+ uploadRvtoolsToAssessmentRequestOpts(requestParameters: UploadRvtoolsToAssessmentRequest): Promise<runtime.RequestOpts>;
176
+
177
+ /**
178
+ * Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
179
+ * @param {string} id ID of the assessment
180
+ * @param {Blob} file Rvtools extending the exising assessment
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ * @memberof JobApiInterface
184
+ */
185
+ uploadRvtoolsToAssessmentRaw(requestParameters: UploadRvtoolsToAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
186
+
187
+ /**
188
+ * Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
189
+ */
190
+ uploadRvtoolsToAssessment(requestParameters: UploadRvtoolsToAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
191
+
122
192
  }
123
193
 
124
194
  /**
@@ -247,6 +317,82 @@ export class JobApi extends runtime.BaseAPI implements JobApiInterface {
247
317
  return await response.value();
248
318
  }
249
319
 
320
+ /**
321
+ * Creates request options for createRVToolsAssessmentV2 without sending the request
322
+ */
323
+ async createRVToolsAssessmentV2RequestOpts(requestParameters: CreateRVToolsAssessmentV2Request): Promise<runtime.RequestOpts> {
324
+ if (requestParameters['name'] == null) {
325
+ throw new runtime.RequiredError(
326
+ 'name',
327
+ 'Required parameter "name" was null or undefined when calling createRVToolsAssessmentV2().'
328
+ );
329
+ }
330
+
331
+ if (requestParameters['file'] == null) {
332
+ throw new runtime.RequiredError(
333
+ 'file',
334
+ 'Required parameter "file" was null or undefined when calling createRVToolsAssessmentV2().'
335
+ );
336
+ }
337
+
338
+ const queryParameters: any = {};
339
+
340
+ const headerParameters: runtime.HTTPHeaders = {};
341
+
342
+ const consumes: runtime.Consume[] = [
343
+ { contentType: 'multipart/form-data' },
344
+ ];
345
+ // @ts-ignore: canConsumeForm may be unused
346
+ const canConsumeForm = runtime.canConsumeForm(consumes);
347
+
348
+ let formParams: { append(param: string, value: any): any };
349
+ let useForm = false;
350
+ // use FormData to transmit files using content-type "multipart/form-data"
351
+ useForm = canConsumeForm;
352
+ if (useForm) {
353
+ formParams = new FormData();
354
+ } else {
355
+ formParams = new URLSearchParams();
356
+ }
357
+
358
+ if (requestParameters['name'] != null) {
359
+ formParams.append('name', requestParameters['name'] as any);
360
+ }
361
+
362
+ if (requestParameters['file'] != null) {
363
+ formParams.append('file', requestParameters['file'] as any);
364
+ }
365
+
366
+
367
+ let urlPath = `/api/v2/assessments/rvtools`;
368
+
369
+ return {
370
+ path: urlPath,
371
+ method: 'POST',
372
+ headers: headerParameters,
373
+ query: queryParameters,
374
+ body: formParams,
375
+ };
376
+ }
377
+
378
+ /**
379
+ * Create an assessment from RVTools file asynchronously
380
+ */
381
+ async createRVToolsAssessmentV2Raw(requestParameters: CreateRVToolsAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>> {
382
+ const requestOptions = await this.createRVToolsAssessmentV2RequestOpts(requestParameters);
383
+ const response = await this.request(requestOptions, initOverrides);
384
+
385
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
386
+ }
387
+
388
+ /**
389
+ * Create an assessment from RVTools file asynchronously
390
+ */
391
+ async createRVToolsAssessmentV2(requestParameters: CreateRVToolsAssessmentV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job> {
392
+ const response = await this.createRVToolsAssessmentV2Raw(requestParameters, initOverrides);
393
+ return await response.value();
394
+ }
395
+
250
396
  /**
251
397
  * Creates request options for getJob without sending the request
252
398
  */
@@ -292,4 +438,77 @@ export class JobApi extends runtime.BaseAPI implements JobApiInterface {
292
438
  return await response.value();
293
439
  }
294
440
 
441
+ /**
442
+ * Creates request options for uploadRvtoolsToAssessment without sending the request
443
+ */
444
+ async uploadRvtoolsToAssessmentRequestOpts(requestParameters: UploadRvtoolsToAssessmentRequest): Promise<runtime.RequestOpts> {
445
+ if (requestParameters['id'] == null) {
446
+ throw new runtime.RequiredError(
447
+ 'id',
448
+ 'Required parameter "id" was null or undefined when calling uploadRvtoolsToAssessment().'
449
+ );
450
+ }
451
+
452
+ if (requestParameters['file'] == null) {
453
+ throw new runtime.RequiredError(
454
+ 'file',
455
+ 'Required parameter "file" was null or undefined when calling uploadRvtoolsToAssessment().'
456
+ );
457
+ }
458
+
459
+ const queryParameters: any = {};
460
+
461
+ const headerParameters: runtime.HTTPHeaders = {};
462
+
463
+ const consumes: runtime.Consume[] = [
464
+ { contentType: 'multipart/form-data' },
465
+ ];
466
+ // @ts-ignore: canConsumeForm may be unused
467
+ const canConsumeForm = runtime.canConsumeForm(consumes);
468
+
469
+ let formParams: { append(param: string, value: any): any };
470
+ let useForm = false;
471
+ // use FormData to transmit files using content-type "multipart/form-data"
472
+ useForm = canConsumeForm;
473
+ if (useForm) {
474
+ formParams = new FormData();
475
+ } else {
476
+ formParams = new URLSearchParams();
477
+ }
478
+
479
+ if (requestParameters['file'] != null) {
480
+ formParams.append('file', requestParameters['file'] as any);
481
+ }
482
+
483
+
484
+ let urlPath = `/api/v2/assessments/{id}/rvtools`;
485
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
486
+
487
+ return {
488
+ path: urlPath,
489
+ method: 'PUT',
490
+ headers: headerParameters,
491
+ query: queryParameters,
492
+ body: formParams,
493
+ };
494
+ }
495
+
496
+ /**
497
+ * Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
498
+ */
499
+ async uploadRvtoolsToAssessmentRaw(requestParameters: UploadRvtoolsToAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>> {
500
+ const requestOptions = await this.uploadRvtoolsToAssessmentRequestOpts(requestParameters);
501
+ const response = await this.request(requestOptions, initOverrides);
502
+
503
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
504
+ }
505
+
506
+ /**
507
+ * Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
508
+ */
509
+ async uploadRvtoolsToAssessment(requestParameters: UploadRvtoolsToAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job> {
510
+ const response = await this.uploadRvtoolsToAssessmentRaw(requestParameters, initOverrides);
511
+ return await response.value();
512
+ }
513
+
295
514
  }
@@ -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
+
@@ -35,6 +35,10 @@ export interface Datastore {
35
35
  * Storage access category derived from Datastore.Type
36
36
  */
37
37
  storageProtocol?: DatastoreStorageProtocolEnum;
38
+ /**
39
+ * Whether this datastore supports vSAN point-in-time snapshots
40
+ */
41
+ vsanSnapshotSupport?: boolean;
38
42
  /**
39
43
  *
40
44
  */
@@ -112,6 +116,7 @@ export function DatastoreFromJSONTyped(json: any, ignoreDiscriminator: boolean):
112
116
 
113
117
  'type': json['type'],
114
118
  'storageProtocol': json['storageProtocol'] == null ? undefined : json['storageProtocol'],
119
+ 'vsanSnapshotSupport': json['vsanSnapshotSupport'] == null ? undefined : json['vsanSnapshotSupport'],
115
120
  'totalCapacityGB': json['totalCapacityGB'],
116
121
  'freeCapacityGB': json['freeCapacityGB'],
117
122
  'vendor': json['vendor'],
@@ -137,6 +142,7 @@ export function DatastoreToJSONTyped(value?: Datastore | null, ignoreDiscriminat
137
142
 
138
143
  'type': value['type'],
139
144
  'storageProtocol': value['storageProtocol'],
145
+ 'vsanSnapshotSupport': value['vsanSnapshotSupport'],
140
146
  'totalCapacityGB': value['totalCapacityGB'],
141
147
  'freeCapacityGB': value['freeCapacityGB'],
142
148
  'vendor': value['vendor'],