@migration-planner-ui/api-client 0.0.23 → 0.0.24

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.
@@ -17,6 +17,7 @@ src/models/Host.ts
17
17
  src/models/Info.ts
18
18
  src/models/Infra.ts
19
19
  src/models/Inventory.ts
20
+ src/models/InventoryData.ts
20
21
  src/models/Ipv4Config.ts
21
22
  src/models/Label.ts
22
23
  src/models/MigrationIssue.ts
@@ -11,9 +11,6 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { Assessment, AssessmentForm, AssessmentUpdate } from '../models/index';
14
- export interface CancelAssessmentJobRequest {
15
- id: string;
16
- }
17
14
  export interface CreateAssessmentRequest {
18
15
  assessmentForm: AssessmentForm;
19
16
  }
@@ -34,18 +31,6 @@ export interface UpdateAssessmentRequest {
34
31
  * @interface AssessmentApiInterface
35
32
  */
36
33
  export interface AssessmentApiInterface {
37
- /**
38
- * Cancel the processing job for an assessment
39
- * @param {string} id ID of the assessment
40
- * @param {*} [options] Override http request option.
41
- * @throws {RequiredError}
42
- * @memberof AssessmentApiInterface
43
- */
44
- cancelAssessmentJobRaw(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
45
- /**
46
- * Cancel the processing job for an assessment
47
- */
48
- cancelAssessmentJob(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
49
34
  /**
50
35
  * Create an assessment
51
36
  * @param {AssessmentForm} assessmentForm
@@ -111,14 +96,6 @@ export interface AssessmentApiInterface {
111
96
  *
112
97
  */
113
98
  export declare class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInterface {
114
- /**
115
- * Cancel the processing job for an assessment
116
- */
117
- cancelAssessmentJobRaw(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
118
- /**
119
- * Cancel the processing job for an assessment
120
- */
121
- cancelAssessmentJob(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
122
99
  /**
123
100
  * Create an assessment
124
101
  */
@@ -26,33 +26,6 @@ import { AssessmentFromJSON, AssessmentFormToJSON, AssessmentUpdateToJSON, } fro
26
26
  *
27
27
  */
28
28
  export class AssessmentApi extends runtime.BaseAPI {
29
- /**
30
- * Cancel the processing job for an assessment
31
- */
32
- cancelAssessmentJobRaw(requestParameters, initOverrides) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- if (requestParameters['id'] == null) {
35
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling cancelAssessmentJob().');
36
- }
37
- const queryParameters = {};
38
- const headerParameters = {};
39
- const response = yield this.request({
40
- path: `/api/v1/assessments/{id}/job`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
41
- method: 'DELETE',
42
- headers: headerParameters,
43
- query: queryParameters,
44
- }, initOverrides);
45
- return new runtime.VoidApiResponse(response);
46
- });
47
- }
48
- /**
49
- * Cancel the processing job for an assessment
50
- */
51
- cancelAssessmentJob(requestParameters, initOverrides) {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- yield this.cancelAssessmentJobRaw(requestParameters, initOverrides);
54
- });
55
- }
56
29
  /**
57
30
  * Create an assessment
58
31
  */
@@ -9,9 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { VCenter } from './VCenter';
13
- import type { Infra } from './Infra';
14
- import type { VMs } from './VMs';
12
+ import type { InventoryData } from './InventoryData';
15
13
  /**
16
14
  *
17
15
  * @export
@@ -19,23 +17,25 @@ import type { VMs } from './VMs';
19
17
  */
20
18
  export interface Inventory {
21
19
  /**
22
- *
23
- * @type {VCenter}
20
+ * ID of the vCenter
21
+ * @type {string}
24
22
  * @memberof Inventory
25
23
  */
26
- vcenter: VCenter;
24
+ vcenterId: string;
27
25
  /**
28
- *
29
- * @type {VMs}
26
+ * Map of cluster names to their inventory data
27
+ * @type {{ [key: string]: InventoryData; }}
30
28
  * @memberof Inventory
31
29
  */
32
- vms: VMs;
30
+ clusters: {
31
+ [key: string]: InventoryData;
32
+ };
33
33
  /**
34
34
  *
35
- * @type {Infra}
35
+ * @type {InventoryData}
36
36
  * @memberof Inventory
37
37
  */
38
- infra: Infra;
38
+ vcenter?: InventoryData;
39
39
  }
40
40
  /**
41
41
  * Check if a given object implements the Inventory interface.
@@ -11,18 +11,15 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import { VCenterFromJSON, VCenterToJSON, } from './VCenter';
15
- import { InfraFromJSON, InfraToJSON, } from './Infra';
16
- import { VMsFromJSON, VMsToJSON, } from './VMs';
14
+ import { mapValues } from '../runtime';
15
+ import { InventoryDataFromJSON, InventoryDataToJSON, } from './InventoryData';
17
16
  /**
18
17
  * Check if a given object implements the Inventory interface.
19
18
  */
20
19
  export function instanceOfInventory(value) {
21
- if (!('vcenter' in value) || value['vcenter'] === undefined)
20
+ if (!('vcenterId' in value) || value['vcenterId'] === undefined)
22
21
  return false;
23
- if (!('vms' in value) || value['vms'] === undefined)
24
- return false;
25
- if (!('infra' in value) || value['infra'] === undefined)
22
+ if (!('clusters' in value) || value['clusters'] === undefined)
26
23
  return false;
27
24
  return true;
28
25
  }
@@ -34,9 +31,9 @@ export function InventoryFromJSONTyped(json, ignoreDiscriminator) {
34
31
  return json;
35
32
  }
36
33
  return {
37
- 'vcenter': VCenterFromJSON(json['vcenter']),
38
- 'vms': VMsFromJSON(json['vms']),
39
- 'infra': InfraFromJSON(json['infra']),
34
+ 'vcenterId': json['vcenter_id'],
35
+ 'clusters': (mapValues(json['clusters'], InventoryDataFromJSON)),
36
+ 'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']),
40
37
  };
41
38
  }
42
39
  export function InventoryToJSON(value) {
@@ -44,8 +41,8 @@ export function InventoryToJSON(value) {
44
41
  return value;
45
42
  }
46
43
  return {
47
- 'vcenter': VCenterToJSON(value['vcenter']),
48
- 'vms': VMsToJSON(value['vms']),
49
- 'infra': InfraToJSON(value['infra']),
44
+ 'vcenter_id': value['vcenterId'],
45
+ 'clusters': (mapValues(value['clusters'], InventoryDataToJSON)),
46
+ 'vcenter': InventoryDataToJSON(value['vcenter']),
50
47
  };
51
48
  }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Migration Planner 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 { VCenter } from './VCenter';
13
+ import type { Infra } from './Infra';
14
+ import type { VMs } from './VMs';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface InventoryData
19
+ */
20
+ export interface InventoryData {
21
+ /**
22
+ *
23
+ * @type {VCenter}
24
+ * @memberof InventoryData
25
+ */
26
+ vcenter?: VCenter;
27
+ /**
28
+ *
29
+ * @type {VMs}
30
+ * @memberof InventoryData
31
+ */
32
+ vms: VMs;
33
+ /**
34
+ *
35
+ * @type {Infra}
36
+ * @memberof InventoryData
37
+ */
38
+ infra: Infra;
39
+ }
40
+ /**
41
+ * Check if a given object implements the InventoryData interface.
42
+ */
43
+ export declare function instanceOfInventoryData(value: object): value is InventoryData;
44
+ export declare function InventoryDataFromJSON(json: any): InventoryData;
45
+ export declare function InventoryDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): InventoryData;
46
+ export declare function InventoryDataToJSON(value?: InventoryData | null): any;
@@ -0,0 +1,49 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner 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
+ import { VCenterFromJSON, VCenterToJSON, } from './VCenter';
15
+ import { InfraFromJSON, InfraToJSON, } from './Infra';
16
+ import { VMsFromJSON, VMsToJSON, } from './VMs';
17
+ /**
18
+ * Check if a given object implements the InventoryData interface.
19
+ */
20
+ export function instanceOfInventoryData(value) {
21
+ if (!('vms' in value) || value['vms'] === undefined)
22
+ return false;
23
+ if (!('infra' in value) || value['infra'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function InventoryDataFromJSON(json) {
28
+ return InventoryDataFromJSONTyped(json, false);
29
+ }
30
+ export function InventoryDataFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'vcenter': json['vcenter'] == null ? undefined : VCenterFromJSON(json['vcenter']),
36
+ 'vms': VMsFromJSON(json['vms']),
37
+ 'infra': InfraFromJSON(json['infra']),
38
+ };
39
+ }
40
+ export function InventoryDataToJSON(value) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'vcenter': VCenterToJSON(value['vcenter']),
46
+ 'vms': VMsToJSON(value['vms']),
47
+ 'infra': InfraToJSON(value['infra']),
48
+ };
49
+ }
@@ -18,40 +18,17 @@ import type { Inventory } from './Inventory';
18
18
  export interface Snapshot {
19
19
  /**
20
20
  *
21
- * @type {Date}
22
- * @memberof Snapshot
23
- */
24
- createdAt: Date;
25
- /**
26
- * Status of the snapshot processing
27
- * @type {string}
28
- * @memberof Snapshot
29
- */
30
- status: SnapshotStatusEnum;
31
- /**
32
- * Error message if snapshot processing failed
33
- * @type {string}
21
+ * @type {Inventory}
34
22
  * @memberof Snapshot
35
23
  */
36
- error?: string;
24
+ inventory: Inventory;
37
25
  /**
38
26
  *
39
- * @type {Inventory}
27
+ * @type {Date}
40
28
  * @memberof Snapshot
41
29
  */
42
- inventory?: Inventory;
30
+ createdAt: Date;
43
31
  }
44
- /**
45
- * @export
46
- */
47
- export declare const SnapshotStatusEnum: {
48
- readonly Pending: "pending";
49
- readonly Parsing: "parsing";
50
- readonly Validating: "validating";
51
- readonly Ready: "ready";
52
- readonly Failed: "failed";
53
- };
54
- export type SnapshotStatusEnum = typeof SnapshotStatusEnum[keyof typeof SnapshotStatusEnum];
55
32
  /**
56
33
  * Check if a given object implements the Snapshot interface.
57
34
  */
@@ -1,34 +1,11 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Migration Planner 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
1
  import { InventoryFromJSON, InventoryToJSON, } from './Inventory';
15
- /**
16
- * @export
17
- */
18
- export const SnapshotStatusEnum = {
19
- Pending: 'pending',
20
- Parsing: 'parsing',
21
- Validating: 'validating',
22
- Ready: 'ready',
23
- Failed: 'failed'
24
- };
25
2
  /**
26
3
  * Check if a given object implements the Snapshot interface.
27
4
  */
28
5
  export function instanceOfSnapshot(value) {
29
- if (!('createdAt' in value) || value['createdAt'] === undefined)
6
+ if (!('inventory' in value) || value['inventory'] === undefined)
30
7
  return false;
31
- if (!('status' in value) || value['status'] === undefined)
8
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
32
9
  return false;
33
10
  return true;
34
11
  }
@@ -40,10 +17,8 @@ export function SnapshotFromJSONTyped(json, ignoreDiscriminator) {
40
17
  return json;
41
18
  }
42
19
  return {
20
+ 'inventory': InventoryFromJSON(json['inventory']),
43
21
  'createdAt': (new Date(json['createdAt'])),
44
- 'status': json['status'],
45
- 'error': json['error'] == null ? undefined : json['error'],
46
- 'inventory': json['inventory'] == null ? undefined : InventoryFromJSON(json['inventory']),
47
22
  };
48
23
  }
49
24
  export function SnapshotToJSON(value) {
@@ -51,9 +26,7 @@ export function SnapshotToJSON(value) {
51
26
  return value;
52
27
  }
53
28
  return {
54
- 'createdAt': ((value['createdAt']).toISOString()),
55
- 'status': value['status'],
56
- 'error': value['error'],
57
29
  'inventory': InventoryToJSON(value['inventory']),
30
+ 'createdAt': ((value['createdAt']).toISOString()),
58
31
  };
59
32
  }
@@ -10,6 +10,7 @@ export * from './Host';
10
10
  export * from './Info';
11
11
  export * from './Infra';
12
12
  export * from './Inventory';
13
+ export * from './InventoryData';
13
14
  export * from './Ipv4Config';
14
15
  export * from './Label';
15
16
  export * from './MigrationIssue';
@@ -12,6 +12,7 @@ export * from './Host';
12
12
  export * from './Info';
13
13
  export * from './Infra';
14
14
  export * from './Inventory';
15
+ export * from './InventoryData';
15
16
  export * from './Ipv4Config';
16
17
  export * from './Label';
17
18
  export * from './MigrationIssue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@migration-planner-ui/api-client",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "OpenAPI client for the Migration Planner API",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -21,17 +21,10 @@ import type {
21
21
  } from '../models/index';
22
22
  import {
23
23
  AssessmentFromJSON,
24
- AssessmentToJSON,
25
- AssessmentFormFromJSON,
26
24
  AssessmentFormToJSON,
27
- AssessmentUpdateFromJSON,
28
25
  AssessmentUpdateToJSON,
29
26
  } from '../models/index';
30
27
 
31
- export interface CancelAssessmentJobRequest {
32
- id: string;
33
- }
34
-
35
28
  export interface CreateAssessmentRequest {
36
29
  assessmentForm: AssessmentForm;
37
30
  }
@@ -56,20 +49,6 @@ export interface UpdateAssessmentRequest {
56
49
  * @interface AssessmentApiInterface
57
50
  */
58
51
  export interface AssessmentApiInterface {
59
- /**
60
- * Cancel the processing job for an assessment
61
- * @param {string} id ID of the assessment
62
- * @param {*} [options] Override http request option.
63
- * @throws {RequiredError}
64
- * @memberof AssessmentApiInterface
65
- */
66
- cancelAssessmentJobRaw(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
67
-
68
- /**
69
- * Cancel the processing job for an assessment
70
- */
71
- cancelAssessmentJob(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
72
-
73
52
  /**
74
53
  * Create an assessment
75
54
  * @param {AssessmentForm} assessmentForm
@@ -147,38 +126,6 @@ export interface AssessmentApiInterface {
147
126
  */
148
127
  export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInterface {
149
128
 
150
- /**
151
- * Cancel the processing job for an assessment
152
- */
153
- async cancelAssessmentJobRaw(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
154
- if (requestParameters['id'] == null) {
155
- throw new runtime.RequiredError(
156
- 'id',
157
- 'Required parameter "id" was null or undefined when calling cancelAssessmentJob().'
158
- );
159
- }
160
-
161
- const queryParameters: any = {};
162
-
163
- const headerParameters: runtime.HTTPHeaders = {};
164
-
165
- const response = await this.request({
166
- path: `/api/v1/assessments/{id}/job`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
167
- method: 'DELETE',
168
- headers: headerParameters,
169
- query: queryParameters,
170
- }, initOverrides);
171
-
172
- return new runtime.VoidApiResponse(response);
173
- }
174
-
175
- /**
176
- * Cancel the processing job for an assessment
177
- */
178
- async cancelAssessmentJob(requestParameters: CancelAssessmentJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
179
- await this.cancelAssessmentJobRaw(requestParameters, initOverrides);
180
- }
181
-
182
129
  /**
183
130
  * Create an assessment
184
131
  */
@@ -13,24 +13,11 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { VCenter } from './VCenter';
16
+ import type { InventoryData } from './InventoryData';
17
17
  import {
18
- VCenterFromJSON,
19
- VCenterFromJSONTyped,
20
- VCenterToJSON,
21
- } from './VCenter';
22
- import type { Infra } from './Infra';
23
- import {
24
- InfraFromJSON,
25
- InfraFromJSONTyped,
26
- InfraToJSON,
27
- } from './Infra';
28
- import type { VMs } from './VMs';
29
- import {
30
- VMsFromJSON,
31
- VMsFromJSONTyped,
32
- VMsToJSON,
33
- } from './VMs';
18
+ InventoryDataFromJSON,
19
+ InventoryDataToJSON,
20
+ } from './InventoryData';
34
21
 
35
22
  /**
36
23
  *
@@ -39,32 +26,31 @@ import {
39
26
  */
40
27
  export interface Inventory {
41
28
  /**
42
- *
43
- * @type {VCenter}
29
+ * ID of the vCenter
30
+ * @type {string}
44
31
  * @memberof Inventory
45
32
  */
46
- vcenter: VCenter;
33
+ vcenterId: string;
47
34
  /**
48
- *
49
- * @type {VMs}
35
+ * Map of cluster names to their inventory data
36
+ * @type {{ [key: string]: InventoryData; }}
50
37
  * @memberof Inventory
51
38
  */
52
- vms: VMs;
39
+ clusters: { [key: string]: InventoryData; };
53
40
  /**
54
41
  *
55
- * @type {Infra}
42
+ * @type {InventoryData}
56
43
  * @memberof Inventory
57
44
  */
58
- infra: Infra;
45
+ vcenter?: InventoryData;
59
46
  }
60
47
 
61
48
  /**
62
49
  * Check if a given object implements the Inventory interface.
63
50
  */
64
51
  export function instanceOfInventory(value: object): value is Inventory {
65
- if (!('vcenter' in value) || value['vcenter'] === undefined) return false;
66
- if (!('vms' in value) || value['vms'] === undefined) return false;
67
- if (!('infra' in value) || value['infra'] === undefined) return false;
52
+ if (!('vcenterId' in value) || value['vcenterId'] === undefined) return false;
53
+ if (!('clusters' in value) || value['clusters'] === undefined) return false;
68
54
  return true;
69
55
  }
70
56
 
@@ -78,9 +64,9 @@ export function InventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
78
64
  }
79
65
  return {
80
66
 
81
- 'vcenter': VCenterFromJSON(json['vcenter']),
82
- 'vms': VMsFromJSON(json['vms']),
83
- 'infra': InfraFromJSON(json['infra']),
67
+ 'vcenterId': json['vcenter_id'],
68
+ 'clusters': (mapValues(json['clusters'], InventoryDataFromJSON)),
69
+ 'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']),
84
70
  };
85
71
  }
86
72
 
@@ -90,9 +76,9 @@ export function InventoryToJSON(value?: Inventory | null): any {
90
76
  }
91
77
  return {
92
78
 
93
- 'vcenter': VCenterToJSON(value['vcenter']),
94
- 'vms': VMsToJSON(value['vms']),
95
- 'infra': InfraToJSON(value['infra']),
79
+ 'vcenter_id': value['vcenterId'],
80
+ 'clusters': (mapValues(value['clusters'], InventoryDataToJSON)),
81
+ 'vcenter': InventoryDataToJSON(value['vcenter']),
96
82
  };
97
83
  }
98
84
 
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Migration Planner 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 type { VCenter } from './VCenter';
16
+ import {
17
+ VCenterFromJSON,
18
+ VCenterToJSON,
19
+ } from './VCenter';
20
+ import type { Infra } from './Infra';
21
+ import {
22
+ InfraFromJSON,
23
+ InfraToJSON,
24
+ } from './Infra';
25
+ import type { VMs } from './VMs';
26
+ import {
27
+ VMsFromJSON,
28
+ VMsToJSON,
29
+ } from './VMs';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface InventoryData
35
+ */
36
+ export interface InventoryData {
37
+ /**
38
+ *
39
+ * @type {VCenter}
40
+ * @memberof InventoryData
41
+ */
42
+ vcenter?: VCenter;
43
+ /**
44
+ *
45
+ * @type {VMs}
46
+ * @memberof InventoryData
47
+ */
48
+ vms: VMs;
49
+ /**
50
+ *
51
+ * @type {Infra}
52
+ * @memberof InventoryData
53
+ */
54
+ infra: Infra;
55
+ }
56
+
57
+ /**
58
+ * Check if a given object implements the InventoryData interface.
59
+ */
60
+ export function instanceOfInventoryData(value: object): value is InventoryData {
61
+ if (!('vms' in value) || value['vms'] === undefined) return false;
62
+ if (!('infra' in value) || value['infra'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function InventoryDataFromJSON(json: any): InventoryData {
67
+ return InventoryDataFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function InventoryDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): InventoryData {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'vcenter': json['vcenter'] == null ? undefined : VCenterFromJSON(json['vcenter']),
77
+ 'vms': VMsFromJSON(json['vms']),
78
+ 'infra': InfraFromJSON(json['infra']),
79
+ };
80
+ }
81
+
82
+ export function InventoryDataToJSON(value?: InventoryData | null): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+ return {
87
+
88
+ 'vcenter': VCenterToJSON(value['vcenter']),
89
+ 'vms': VMsToJSON(value['vms']),
90
+ 'infra': InfraToJSON(value['infra']),
91
+ };
92
+ }
93
+
@@ -11,12 +11,9 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
-
15
- import { mapValues } from '../runtime';
16
14
  import type { Inventory } from './Inventory';
17
15
  import {
18
16
  InventoryFromJSON,
19
- InventoryFromJSONTyped,
20
17
  InventoryToJSON,
21
18
  } from './Inventory';
22
19
 
@@ -28,50 +25,24 @@ import {
28
25
  export interface Snapshot {
29
26
  /**
30
27
  *
31
- * @type {Date}
32
- * @memberof Snapshot
33
- */
34
- createdAt: Date;
35
- /**
36
- * Status of the snapshot processing
37
- * @type {string}
38
- * @memberof Snapshot
39
- */
40
- status: SnapshotStatusEnum;
41
- /**
42
- * Error message if snapshot processing failed
43
- * @type {string}
28
+ * @type {Inventory}
44
29
  * @memberof Snapshot
45
30
  */
46
- error?: string;
31
+ inventory: Inventory;
47
32
  /**
48
33
  *
49
- * @type {Inventory}
34
+ * @type {Date}
50
35
  * @memberof Snapshot
51
36
  */
52
- inventory?: Inventory;
37
+ createdAt: Date;
53
38
  }
54
39
 
55
-
56
- /**
57
- * @export
58
- */
59
- export const SnapshotStatusEnum = {
60
- Pending: 'pending',
61
- Parsing: 'parsing',
62
- Validating: 'validating',
63
- Ready: 'ready',
64
- Failed: 'failed'
65
- } as const;
66
- export type SnapshotStatusEnum = typeof SnapshotStatusEnum[keyof typeof SnapshotStatusEnum];
67
-
68
-
69
40
  /**
70
41
  * Check if a given object implements the Snapshot interface.
71
42
  */
72
43
  export function instanceOfSnapshot(value: object): value is Snapshot {
44
+ if (!('inventory' in value) || value['inventory'] === undefined) return false;
73
45
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
74
- if (!('status' in value) || value['status'] === undefined) return false;
75
46
  return true;
76
47
  }
77
48
 
@@ -85,10 +56,8 @@ export function SnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean):
85
56
  }
86
57
  return {
87
58
 
59
+ 'inventory': InventoryFromJSON(json['inventory']),
88
60
  'createdAt': (new Date(json['createdAt'])),
89
- 'status': json['status'],
90
- 'error': json['error'] == null ? undefined : json['error'],
91
- 'inventory': json['inventory'] == null ? undefined : InventoryFromJSON(json['inventory']),
92
61
  };
93
62
  }
94
63
 
@@ -98,10 +67,8 @@ export function SnapshotToJSON(value?: Snapshot | null): any {
98
67
  }
99
68
  return {
100
69
 
101
- 'createdAt': ((value['createdAt']).toISOString()),
102
- 'status': value['status'],
103
- 'error': value['error'],
104
70
  'inventory': InventoryToJSON(value['inventory']),
71
+ 'createdAt': ((value['createdAt']).toISOString()),
105
72
  };
106
73
  }
107
74
 
package/src/models/VMs.ts CHANGED
@@ -16,25 +16,21 @@ import { mapValues } from '../runtime';
16
16
  import type { MigrationIssue } from './MigrationIssue';
17
17
  import {
18
18
  MigrationIssueFromJSON,
19
- MigrationIssueFromJSONTyped,
20
19
  MigrationIssueToJSON,
21
20
  } from './MigrationIssue';
22
21
  import type { OsInfo } from './OsInfo';
23
22
  import {
24
23
  OsInfoFromJSON,
25
- OsInfoFromJSONTyped,
26
24
  OsInfoToJSON,
27
25
  } from './OsInfo';
28
26
  import type { DiskSizeTierSummary } from './DiskSizeTierSummary';
29
27
  import {
30
28
  DiskSizeTierSummaryFromJSON,
31
- DiskSizeTierSummaryFromJSONTyped,
32
29
  DiskSizeTierSummaryToJSON,
33
30
  } from './DiskSizeTierSummary';
34
31
  import type { VMResourceBreakdown } from './VMResourceBreakdown';
35
32
  import {
36
33
  VMResourceBreakdownFromJSON,
37
- VMResourceBreakdownFromJSONTyped,
38
34
  VMResourceBreakdownToJSON,
39
35
  } from './VMResourceBreakdown';
40
36
 
@@ -172,7 +168,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
172
168
  'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
173
169
  'notMigratableReasons': json['notMigratableReasons'] == null ? undefined : ((json['notMigratableReasons'] as Array<any>).map(MigrationIssueFromJSON)),
174
170
  'migrationWarnings': json['migrationWarnings'] == null ? undefined : ((json['migrationWarnings'] as Array<any>).map(MigrationIssueFromJSON)),
175
- };
171
+ };
176
172
  }
177
173
 
178
174
  export function VMsToJSON(value?: VMs | null): any {
@@ -12,6 +12,7 @@ export * from './Host';
12
12
  export * from './Info';
13
13
  export * from './Infra';
14
14
  export * from './Inventory';
15
+ export * from './InventoryData';
15
16
  export * from './Ipv4Config';
16
17
  export * from './Label';
17
18
  export * from './MigrationIssue';