@migration-planner-ui/api-client 0.0.11 → 0.0.13

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,8 +17,9 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  Source,
19
19
  SourceCreate,
20
- SourceUpdateOnPrem,
20
+ SourceUpdate,
21
21
  Status,
22
+ UpdateInventory,
22
23
  UploadRvtoolsFile200Response,
23
24
  } from '../models/index';
24
25
  import {
@@ -26,10 +27,12 @@ import {
26
27
  SourceToJSON,
27
28
  SourceCreateFromJSON,
28
29
  SourceCreateToJSON,
29
- SourceUpdateOnPremFromJSON,
30
- SourceUpdateOnPremToJSON,
30
+ SourceUpdateFromJSON,
31
+ SourceUpdateToJSON,
31
32
  StatusFromJSON,
32
33
  StatusToJSON,
34
+ UpdateInventoryFromJSON,
35
+ UpdateInventoryToJSON,
33
36
  UploadRvtoolsFile200ResponseFromJSON,
34
37
  UploadRvtoolsFile200ResponseToJSON,
35
38
  } from '../models/index';
@@ -50,9 +53,14 @@ export interface ListSourcesRequest {
50
53
  includeDefault?: boolean;
51
54
  }
52
55
 
56
+ export interface UpdateInventoryRequest {
57
+ id: string;
58
+ updateInventory: UpdateInventory;
59
+ }
60
+
53
61
  export interface UpdateSourceRequest {
54
62
  id: string;
55
- sourceUpdateOnPrem: SourceUpdateOnPrem;
63
+ sourceUpdate: SourceUpdate;
56
64
  }
57
65
 
58
66
  export interface UploadRvtoolsFileRequest {
@@ -137,9 +145,24 @@ export interface SourceApiInterface {
137
145
  listSources(requestParameters: ListSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Source>>;
138
146
 
139
147
  /**
140
- * Update a source from inventory file
148
+ * Update inventory
141
149
  * @param {string} id ID of the source
142
- * @param {SourceUpdateOnPrem} sourceUpdateOnPrem
150
+ * @param {UpdateInventory} updateInventory
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ * @memberof SourceApiInterface
154
+ */
155
+ updateInventoryRaw(requestParameters: UpdateInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>>;
156
+
157
+ /**
158
+ * Update inventory
159
+ */
160
+ updateInventory(requestParameters: UpdateInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source>;
161
+
162
+ /**
163
+ * Update source
164
+ * @param {string} id ID of the source
165
+ * @param {SourceUpdate} sourceUpdate
143
166
  * @param {*} [options] Override http request option.
144
167
  * @throws {RequiredError}
145
168
  * @memberof SourceApiInterface
@@ -147,7 +170,7 @@ export interface SourceApiInterface {
147
170
  updateSourceRaw(requestParameters: UpdateSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>>;
148
171
 
149
172
  /**
150
- * Update a source from inventory file
173
+ * Update source
151
174
  */
152
175
  updateSource(requestParameters: UpdateSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source>;
153
176
 
@@ -332,7 +355,50 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
332
355
  }
333
356
 
334
357
  /**
335
- * Update a source from inventory file
358
+ * Update inventory
359
+ */
360
+ async updateInventoryRaw(requestParameters: UpdateInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>> {
361
+ if (requestParameters['id'] == null) {
362
+ throw new runtime.RequiredError(
363
+ 'id',
364
+ 'Required parameter "id" was null or undefined when calling updateInventory().'
365
+ );
366
+ }
367
+
368
+ if (requestParameters['updateInventory'] == null) {
369
+ throw new runtime.RequiredError(
370
+ 'updateInventory',
371
+ 'Required parameter "updateInventory" was null or undefined when calling updateInventory().'
372
+ );
373
+ }
374
+
375
+ const queryParameters: any = {};
376
+
377
+ const headerParameters: runtime.HTTPHeaders = {};
378
+
379
+ headerParameters['Content-Type'] = 'application/json';
380
+
381
+ const response = await this.request({
382
+ path: `/api/v1/sources/{id}/inventory`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
383
+ method: 'PUT',
384
+ headers: headerParameters,
385
+ query: queryParameters,
386
+ body: UpdateInventoryToJSON(requestParameters['updateInventory']),
387
+ }, initOverrides);
388
+
389
+ return new runtime.JSONApiResponse(response, (jsonValue) => SourceFromJSON(jsonValue));
390
+ }
391
+
392
+ /**
393
+ * Update inventory
394
+ */
395
+ async updateInventory(requestParameters: UpdateInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source> {
396
+ const response = await this.updateInventoryRaw(requestParameters, initOverrides);
397
+ return await response.value();
398
+ }
399
+
400
+ /**
401
+ * Update source
336
402
  */
337
403
  async updateSourceRaw(requestParameters: UpdateSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Source>> {
338
404
  if (requestParameters['id'] == null) {
@@ -342,10 +408,10 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
342
408
  );
343
409
  }
344
410
 
345
- if (requestParameters['sourceUpdateOnPrem'] == null) {
411
+ if (requestParameters['sourceUpdate'] == null) {
346
412
  throw new runtime.RequiredError(
347
- 'sourceUpdateOnPrem',
348
- 'Required parameter "sourceUpdateOnPrem" was null or undefined when calling updateSource().'
413
+ 'sourceUpdate',
414
+ 'Required parameter "sourceUpdate" was null or undefined when calling updateSource().'
349
415
  );
350
416
  }
351
417
 
@@ -360,14 +426,14 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
360
426
  method: 'PUT',
361
427
  headers: headerParameters,
362
428
  query: queryParameters,
363
- body: SourceUpdateOnPremToJSON(requestParameters['sourceUpdateOnPrem']),
429
+ body: SourceUpdateToJSON(requestParameters['sourceUpdate']),
364
430
  }, initOverrides);
365
431
 
366
432
  return new runtime.JSONApiResponse(response, (jsonValue) => SourceFromJSON(jsonValue));
367
433
  }
368
434
 
369
435
  /**
370
- * Update a source from inventory file
436
+ * Update source
371
437
  */
372
438
  async updateSource(requestParameters: UpdateSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source> {
373
439
  const response = await this.updateSourceRaw(requestParameters, initOverrides);
package/src/apis/index.ts CHANGED
@@ -14,6 +14,7 @@ export {
14
14
  type SourceApiInterface,
15
15
  SourceApi,
16
16
  type UpdateSourceRequest,
17
+ type UpdateInventoryRequest
17
18
  } from "./SourceApi";
18
19
 
19
20
  export {
@@ -0,0 +1,104 @@
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 { mapValues } from '../runtime';
16
+ import type { Inventory } from './Inventory';
17
+ import {
18
+ InventoryFromJSON,
19
+ InventoryFromJSONTyped,
20
+ InventoryToJSON,
21
+ } from './Inventory';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface Assessment
27
+ */
28
+ export interface Assessment {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof Assessment
33
+ */
34
+ id: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof Assessment
39
+ */
40
+ name: string;
41
+ /**
42
+ *
43
+ * @type {Date}
44
+ * @memberof Assessment
45
+ */
46
+ createdAt: Date;
47
+ /**
48
+ *
49
+ * @type {Inventory}
50
+ * @memberof Assessment
51
+ */
52
+ inventory: Inventory;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof Assessment
57
+ */
58
+ sourceID: string;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the Assessment interface.
63
+ */
64
+ export function instanceOfAssessment(value: object): value is Assessment {
65
+ if (!('id' in value) || value['id'] === undefined) return false;
66
+ if (!('name' in value) || value['name'] === undefined) return false;
67
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
68
+ if (!('inventory' in value) || value['inventory'] === undefined) return false;
69
+ if (!('sourceID' in value) || value['sourceID'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function AssessmentFromJSON(json: any): Assessment {
74
+ return AssessmentFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function AssessmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Assessment {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'id': json['id'],
84
+ 'name': json['name'],
85
+ 'createdAt': (new Date(json['createdAt'])),
86
+ 'inventory': InventoryFromJSON(json['inventory']),
87
+ 'sourceID': json['sourceID'],
88
+ };
89
+ }
90
+
91
+ export function AssessmentToJSON(value?: Assessment | null): any {
92
+ if (value == null) {
93
+ return value;
94
+ }
95
+ return {
96
+
97
+ 'id': value['id'],
98
+ 'name': value['name'],
99
+ 'createdAt': ((value['createdAt']).toISOString()),
100
+ 'inventory': InventoryToJSON(value['inventory']),
101
+ 'sourceID': value['sourceID'],
102
+ };
103
+ }
104
+
@@ -0,0 +1,70 @@
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AssessmentForm
20
+ */
21
+ export interface AssessmentForm {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AssessmentForm
26
+ */
27
+ name: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AssessmentForm
32
+ */
33
+ sourceID: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the AssessmentForm interface.
38
+ */
39
+ export function instanceOfAssessmentForm(value: object): value is AssessmentForm {
40
+ if (!('name' in value) || value['name'] === undefined) return false;
41
+ if (!('sourceID' in value) || value['sourceID'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function AssessmentFormFromJSON(json: any): AssessmentForm {
46
+ return AssessmentFormFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function AssessmentFormFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssessmentForm {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'name': json['name'],
56
+ 'sourceID': json['sourceID'],
57
+ };
58
+ }
59
+
60
+ export function AssessmentFormToJSON(value?: AssessmentForm | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'name': value['name'],
67
+ 'sourceID': value['sourceID'],
68
+ };
69
+ }
70
+
@@ -49,7 +49,7 @@ export interface Infra {
49
49
  * @type {number}
50
50
  * @memberof Infra
51
51
  */
52
- totalDatacenters: number;
52
+ totalDatacenters?: number;
53
53
  /**
54
54
  *
55
55
  * @type {number}
@@ -61,13 +61,13 @@ export interface Infra {
61
61
  * @type {Array<number>}
62
62
  * @memberof Infra
63
63
  */
64
- clustersPerDatacenter: Array<number>;
64
+ clustersPerDatacenter?: Array<number>;
65
65
  /**
66
66
  *
67
67
  * @type {Array<Host>}
68
68
  * @memberof Infra
69
69
  */
70
- hosts: Array<Host>;
70
+ hosts?: Array<Host>;
71
71
  /**
72
72
  *
73
73
  * @type {Array<number>}
@@ -99,10 +99,7 @@ export interface Infra {
99
99
  */
100
100
  export function instanceOfInfra(value: object): value is Infra {
101
101
  if (!('totalHosts' in value) || value['totalHosts'] === undefined) return false;
102
- if (!('totalDatacenters' in value) || value['totalDatacenters'] === undefined) return false;
103
102
  if (!('totalClusters' in value) || value['totalClusters'] === undefined) return false;
104
- if (!('clustersPerDatacenter' in value) || value['clustersPerDatacenter'] === undefined) return false;
105
- if (!('hosts' in value) || value['hosts'] === undefined) return false;
106
103
  if (!('hostsPerCluster' in value) || value['hostsPerCluster'] === undefined) return false;
107
104
  if (!('hostPowerStates' in value) || value['hostPowerStates'] === undefined) return false;
108
105
  if (!('networks' in value) || value['networks'] === undefined) return false;
@@ -120,15 +117,15 @@ export function InfraFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inf
120
117
  }
121
118
  return {
122
119
 
123
- 'totalHosts': json['totalHosts'] || 0,
124
- 'totalDatacenters': json['totalDatacenters'] || 0,
125
- 'totalClusters': json['totalClusters'] || 0,
126
- 'clustersPerDatacenter': json['clustersPerDatacenter'] || [],
127
- 'hosts': ((json['hosts'] as Array<any>) || []).map(HostFromJSON),
128
- 'hostsPerCluster': json['hostsPerCluster'] || [],
129
- 'hostPowerStates': json['hostPowerStates'] || {},
130
- 'networks': ((json['networks'] as Array<any>) || []).map(NetworkFromJSON),
131
- 'datastores': ((json['datastores'] as Array<any>) || []).map(DatastoreFromJSON),
120
+ 'totalHosts': json['totalHosts'],
121
+ 'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
122
+ 'totalClusters': json['totalClusters'],
123
+ 'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
124
+ 'hosts': json['hosts'] == null ? undefined : ((json['hosts'] as Array<any>).map(HostFromJSON)),
125
+ 'hostsPerCluster': json['hostsPerCluster'],
126
+ 'hostPowerStates': json['hostPowerStates'],
127
+ 'networks': ((json['networks'] as Array<any>).map(NetworkFromJSON)),
128
+ 'datastores': ((json['datastores'] as Array<any>).map(DatastoreFromJSON)),
132
129
  };
133
130
  }
134
131
 
@@ -142,7 +139,7 @@ export function InfraToJSON(value?: Infra | null): any {
142
139
  'totalDatacenters': value['totalDatacenters'],
143
140
  'totalClusters': value['totalClusters'],
144
141
  'clustersPerDatacenter': value['clustersPerDatacenter'],
145
- 'hosts': ((value['hosts'] as Array<any>).map(HostToJSON)),
142
+ 'hosts': value['hosts'] == null ? undefined : ((value['hosts'] as Array<any>).map(HostToJSON)),
146
143
  'hostsPerCluster': value['hostsPerCluster'],
147
144
  'hostPowerStates': value['hostPowerStates'],
148
145
  'networks': ((value['networks'] as Array<any>).map(NetworkToJSON)),
@@ -19,6 +19,12 @@ import {
19
19
  AgentProxyFromJSONTyped,
20
20
  AgentProxyToJSON,
21
21
  } from './AgentProxy';
22
+ import type { Label } from './Label';
23
+ import {
24
+ LabelFromJSON,
25
+ LabelFromJSONTyped,
26
+ LabelToJSON,
27
+ } from './Label';
22
28
 
23
29
  /**
24
30
  *
@@ -50,6 +56,12 @@ export interface SourceCreate {
50
56
  * @memberof SourceCreate
51
57
  */
52
58
  certificateChain?: string | null;
59
+ /**
60
+ *
61
+ * @type {Array<Label>}
62
+ * @memberof SourceCreate
63
+ */
64
+ labels?: Array<Label>;
53
65
  }
54
66
 
55
67
  /**
@@ -74,6 +86,7 @@ export function SourceCreateFromJSONTyped(json: any, ignoreDiscriminator: boolea
74
86
  'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
75
87
  'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
76
88
  'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
89
+ 'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
77
90
  };
78
91
  }
79
92
 
@@ -87,6 +100,6 @@ export function SourceCreateToJSON(value?: SourceCreate | null): any {
87
100
  'sshPublicKey': value['sshPublicKey'],
88
101
  'proxy': AgentProxyToJSON(value['proxy']),
89
102
  'certificateChain': value['certificateChain'],
103
+ 'labels': value['labels'] == null ? undefined : ((value['labels'] as Array<any>).map(LabelToJSON)),
90
104
  };
91
- }
92
-
105
+ }
@@ -0,0 +1,105 @@
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 { mapValues } from '../runtime';
16
+ import type { AgentProxy } from './AgentProxy';
17
+ import {
18
+ AgentProxyFromJSON,
19
+ AgentProxyFromJSONTyped,
20
+ AgentProxyToJSON,
21
+ } from './AgentProxy';
22
+ import type { Label } from './Label';
23
+ import {
24
+ LabelFromJSON,
25
+ LabelFromJSONTyped,
26
+ LabelToJSON,
27
+ } from './Label';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface SourceUpdate
33
+ */
34
+ export interface SourceUpdate {
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof SourceUpdate
39
+ */
40
+ name?: string;
41
+ /**
42
+ *
43
+ * @type {Array<Label>}
44
+ * @memberof SourceUpdate
45
+ */
46
+ labels?: Array<Label>;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof SourceUpdate
51
+ */
52
+ sshPublicKey?: string | null;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof SourceUpdate
57
+ */
58
+ certificateChain?: string | null;
59
+ /**
60
+ *
61
+ * @type {AgentProxy}
62
+ * @memberof SourceUpdate
63
+ */
64
+ proxy?: AgentProxy;
65
+ }
66
+
67
+ /**
68
+ * Check if a given object implements the SourceUpdate interface.
69
+ */
70
+ export function instanceOfSourceUpdate(value: object): value is SourceUpdate {
71
+ return true;
72
+ }
73
+
74
+ export function SourceUpdateFromJSON(json: any): SourceUpdate {
75
+ return SourceUpdateFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function SourceUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceUpdate {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'name': json['name'] == null ? undefined : json['name'],
85
+ 'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
86
+ 'sshPublicKey': json['sshPublicKey'] == null ? undefined : json['sshPublicKey'],
87
+ 'certificateChain': json['certificateChain'] == null ? undefined : json['certificateChain'],
88
+ 'proxy': json['proxy'] == null ? undefined : AgentProxyFromJSON(json['proxy']),
89
+ };
90
+ }
91
+
92
+ export function SourceUpdateToJSON(value?: SourceUpdate | null): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+ return {
97
+
98
+ 'name': value['name'],
99
+ 'labels': value['labels'] == null ? undefined : ((value['labels'] as Array<any>).map(LabelToJSON)),
100
+ 'sshPublicKey': value['sshPublicKey'],
101
+ 'certificateChain': value['certificateChain'],
102
+ 'proxy': AgentProxyToJSON(value['proxy']),
103
+ };
104
+ }
105
+
@@ -0,0 +1,77 @@
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 { mapValues } from '../runtime';
16
+ import type { Inventory } from './Inventory';
17
+ import {
18
+ InventoryFromJSON,
19
+ InventoryFromJSONTyped,
20
+ InventoryToJSON,
21
+ } from './Inventory';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface UpdateInventory
27
+ */
28
+ export interface UpdateInventory {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof UpdateInventory
33
+ */
34
+ agentId: string;
35
+ /**
36
+ *
37
+ * @type {Inventory}
38
+ * @memberof UpdateInventory
39
+ */
40
+ inventory: Inventory;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the UpdateInventory interface.
45
+ */
46
+ export function instanceOfUpdateInventory(value: object): value is UpdateInventory {
47
+ if (!('agentId' in value) || value['agentId'] === undefined) return false;
48
+ if (!('inventory' in value) || value['inventory'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function UpdateInventoryFromJSON(json: any): UpdateInventory {
53
+ return UpdateInventoryFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function UpdateInventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateInventory {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'agentId': json['agentId'],
63
+ 'inventory': InventoryFromJSON(json['inventory']),
64
+ };
65
+ }
66
+
67
+ export function UpdateInventoryToJSON(value?: UpdateInventory | null): any {
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+ return {
72
+
73
+ 'agentId': value['agentId'],
74
+ 'inventory': InventoryToJSON(value['inventory']),
75
+ };
76
+ }
77
+
package/src/models/VMs.ts CHANGED
@@ -80,6 +80,12 @@ export interface VMs {
80
80
  * @memberof VMs
81
81
  */
82
82
  diskCount: VMResourceBreakdown;
83
+ /**
84
+ *
85
+ * @type {VMResourceBreakdown}
86
+ * @memberof VMs
87
+ */
88
+ nicCount?: VMResourceBreakdown;
83
89
  /**
84
90
  *
85
91
  * @type {{ [key: string]: number; }}
@@ -147,6 +153,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
147
153
  'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
148
154
  'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
149
155
  'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
156
+ 'nicCount': json['nicCount'] == null ? undefined : VMResourceBreakdownFromJSON(json['nicCount']),
150
157
  'powerStates': json['powerStates'],
151
158
  'os': json['os'],
152
159
  'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
@@ -168,6 +175,7 @@ export function VMsToJSON(value?: VMs | null): any {
168
175
  'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
169
176
  'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
170
177
  'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
178
+ 'nicCount': VMResourceBreakdownToJSON(value['nicCount']),
171
179
  'powerStates': value['powerStates'],
172
180
  'os': value['os'],
173
181
  'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)),