@openshift-migration-advisor/agent-sdk 0.33.1-84c734aba511 → 0.33.1-d086ee06be70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +26 -0
- package/README.md +20 -2
- package/dist/apis/AppliancesApi.d.ts +194 -0
- package/dist/apis/AppliancesApi.js +201 -0
- package/dist/apis/GroupsApi.d.ts +6 -6
- package/dist/apis/RecommendationsApi.d.ts +64 -0
- package/dist/apis/RecommendationsApi.js +74 -0
- package/dist/apis/VirtualMachinesApi.d.ts +6 -6
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AppliancesApi.d.ts +194 -0
- package/dist/esm/apis/AppliancesApi.js +201 -0
- package/dist/esm/apis/GroupsApi.d.ts +6 -6
- package/dist/esm/apis/RecommendationsApi.d.ts +64 -0
- package/dist/esm/apis/RecommendationsApi.js +70 -0
- package/dist/esm/apis/VirtualMachinesApi.d.ts +6 -6
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ApplianceRule.d.ts +90 -0
- package/dist/esm/models/ApplianceRule.js +98 -0
- package/dist/esm/models/ApplianceRuleCondition.d.ts +42 -0
- package/dist/esm/models/ApplianceRuleCondition.js +48 -0
- package/dist/esm/models/ApplianceRuleFunction.d.ts +37 -0
- package/dist/esm/models/ApplianceRuleFunction.js +46 -0
- package/dist/esm/models/ApplianceRuleListResponse.d.ts +31 -0
- package/dist/esm/models/ApplianceRuleListResponse.js +44 -0
- package/dist/esm/models/ApplianceRuleRequest.d.ts +74 -0
- package/dist/esm/models/ApplianceRuleRequest.js +85 -0
- package/dist/esm/models/ComplexityDiskScoreEntry.d.ts +39 -0
- package/dist/esm/models/ComplexityDiskScoreEntry.js +51 -0
- package/dist/esm/models/ComplexityOSNameEntry.d.ts +40 -0
- package/dist/esm/models/ComplexityOSNameEntry.js +51 -0
- package/dist/esm/models/ComplexityOSScoreEntry.d.ts +35 -0
- package/dist/esm/models/ComplexityOSScoreEntry.js +47 -0
- package/dist/esm/models/Datastore.d.ts +9 -0
- package/dist/esm/models/Datastore.js +5 -0
- package/dist/esm/models/DiskGeometryCondition.d.ts +47 -0
- package/dist/esm/models/DiskGeometryCondition.js +58 -0
- package/dist/esm/models/MigrationComplexityRequest.d.ts +30 -0
- package/dist/esm/models/MigrationComplexityRequest.js +41 -0
- package/dist/esm/models/MigrationComplexityResponse.d.ts +58 -0
- package/dist/esm/models/MigrationComplexityResponse.js +62 -0
- package/dist/esm/models/StorageArray.d.ts +42 -0
- package/dist/esm/models/StorageArray.js +47 -0
- package/dist/esm/models/VirtualMachineDatastore.d.ts +9 -0
- package/dist/esm/models/VirtualMachineDatastore.js +5 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/esm/runtime.d.ts +3 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ApplianceRule.d.ts +90 -0
- package/dist/models/ApplianceRule.js +106 -0
- package/dist/models/ApplianceRuleCondition.d.ts +42 -0
- package/dist/models/ApplianceRuleCondition.js +55 -0
- package/dist/models/ApplianceRuleFunction.d.ts +37 -0
- package/dist/models/ApplianceRuleFunction.js +53 -0
- package/dist/models/ApplianceRuleListResponse.d.ts +31 -0
- package/dist/models/ApplianceRuleListResponse.js +51 -0
- package/dist/models/ApplianceRuleRequest.d.ts +74 -0
- package/dist/models/ApplianceRuleRequest.js +93 -0
- package/dist/models/ComplexityDiskScoreEntry.d.ts +39 -0
- package/dist/models/ComplexityDiskScoreEntry.js +58 -0
- package/dist/models/ComplexityOSNameEntry.d.ts +40 -0
- package/dist/models/ComplexityOSNameEntry.js +58 -0
- package/dist/models/ComplexityOSScoreEntry.d.ts +35 -0
- package/dist/models/ComplexityOSScoreEntry.js +54 -0
- package/dist/models/Datastore.d.ts +9 -0
- package/dist/models/Datastore.js +5 -0
- package/dist/models/DiskGeometryCondition.d.ts +47 -0
- package/dist/models/DiskGeometryCondition.js +66 -0
- package/dist/models/MigrationComplexityRequest.d.ts +30 -0
- package/dist/models/MigrationComplexityRequest.js +48 -0
- package/dist/models/MigrationComplexityResponse.d.ts +58 -0
- package/dist/models/MigrationComplexityResponse.js +69 -0
- package/dist/models/StorageArray.d.ts +42 -0
- package/dist/models/StorageArray.js +54 -0
- package/dist/models/VirtualMachineDatastore.d.ts +9 -0
- package/dist/models/VirtualMachineDatastore.js +5 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/dist/runtime.d.ts +3 -1
- package/dist/runtime.js +1 -1
- package/docs/ApplianceRule.md +50 -0
- package/docs/ApplianceRuleCondition.md +39 -0
- package/docs/ApplianceRuleFunction.md +37 -0
- package/docs/ApplianceRuleListResponse.md +34 -0
- package/docs/ApplianceRuleRequest.md +46 -0
- package/docs/AppliancesApi.md +338 -0
- package/docs/ComplexityDiskScoreEntry.md +39 -0
- package/docs/ComplexityOSNameEntry.md +39 -0
- package/docs/ComplexityOSScoreEntry.md +37 -0
- package/docs/Datastore.md +4 -0
- package/docs/DiskGeometryCondition.md +38 -0
- package/docs/GroupsApi.md +4 -4
- package/docs/MigrationComplexityRequest.md +35 -0
- package/docs/MigrationComplexityResponse.md +43 -0
- package/docs/RecommendationsApi.md +79 -0
- package/docs/StorageArray.md +41 -0
- package/docs/VirtualMachineDatastore.md +4 -0
- package/docs/VirtualMachinesApi.md +4 -4
- package/package.json +1 -1
- package/src/apis/AppliancesApi.ts +393 -0
- package/src/apis/GroupsApi.ts +6 -6
- package/src/apis/RecommendationsApi.ts +117 -0
- package/src/apis/VirtualMachinesApi.ts +6 -6
- package/src/apis/index.ts +1 -0
- package/src/models/ApplianceRule.ts +159 -0
- package/src/models/ApplianceRuleCondition.ts +87 -0
- package/src/models/ApplianceRuleFunction.ts +80 -0
- package/src/models/ApplianceRuleListResponse.ts +72 -0
- package/src/models/ApplianceRuleRequest.ts +137 -0
- package/src/models/ComplexityDiskScoreEntry.ts +79 -0
- package/src/models/ComplexityOSNameEntry.ts +80 -0
- package/src/models/ComplexityOSScoreEntry.ts +72 -0
- package/src/models/Datastore.ts +19 -0
- package/src/models/DiskGeometryCondition.ts +90 -0
- package/src/models/MigrationComplexityRequest.ts +63 -0
- package/src/models/MigrationComplexityResponse.ts +119 -0
- package/src/models/StorageArray.ts +81 -0
- package/src/models/VirtualMachineDatastore.ts +20 -0
- package/src/models/index.ts +12 -0
- package/src/runtime.ts +8 -1
|
@@ -22,10 +22,165 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime.js';
|
|
24
24
|
import { ApplianceListResponseFromJSON, } from '../models/ApplianceListResponse.js';
|
|
25
|
+
import { ApplianceRuleFromJSON, } from '../models/ApplianceRule.js';
|
|
26
|
+
import { ApplianceRuleListResponseFromJSON, } from '../models/ApplianceRuleListResponse.js';
|
|
27
|
+
import { ApplianceRuleRequestToJSON, } from '../models/ApplianceRuleRequest.js';
|
|
25
28
|
/**
|
|
26
29
|
*
|
|
27
30
|
*/
|
|
28
31
|
export class AppliancesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for createApplianceRule without sending the request
|
|
34
|
+
*/
|
|
35
|
+
createApplianceRuleRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['applianceRuleRequest'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('applianceRuleRequest', 'Required parameter "applianceRuleRequest" was null or undefined when calling createApplianceRule().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
let urlPath = `/appliances/rules`;
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
body: ApplianceRuleRequestToJSON(requestParameters['applianceRuleRequest']),
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create an appliance rule
|
|
55
|
+
*/
|
|
56
|
+
createApplianceRuleRaw(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = yield this.createApplianceRuleRequestOpts(requestParameters);
|
|
59
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleFromJSON(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Create an appliance rule
|
|
65
|
+
*/
|
|
66
|
+
createApplianceRule(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const response = yield this.createApplianceRuleRaw(requestParameters, initOverrides);
|
|
69
|
+
return yield response.value();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Creates request options for deleteApplianceRule without sending the request
|
|
74
|
+
*/
|
|
75
|
+
deleteApplianceRuleRequestOpts(requestParameters) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (requestParameters['ruleId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('ruleId', 'Required parameter "ruleId" was null or undefined when calling deleteApplianceRule().');
|
|
79
|
+
}
|
|
80
|
+
const queryParameters = {};
|
|
81
|
+
const headerParameters = {};
|
|
82
|
+
let urlPath = `/appliances/rules/{ruleId}`;
|
|
83
|
+
urlPath = urlPath.replace('{ruleId}', encodeURIComponent(String(requestParameters['ruleId'])));
|
|
84
|
+
return {
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'DELETE',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Delete an appliance rule
|
|
94
|
+
*/
|
|
95
|
+
deleteApplianceRuleRaw(requestParameters, initOverrides) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const requestOptions = yield this.deleteApplianceRuleRequestOpts(requestParameters);
|
|
98
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
99
|
+
return new runtime.VoidApiResponse(response);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Delete an appliance rule
|
|
104
|
+
*/
|
|
105
|
+
deleteApplianceRule(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
yield this.deleteApplianceRuleRaw(requestParameters, initOverrides);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates request options for getApplianceRule without sending the request
|
|
112
|
+
*/
|
|
113
|
+
getApplianceRuleRequestOpts(requestParameters) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
if (requestParameters['ruleId'] == null) {
|
|
116
|
+
throw new runtime.RequiredError('ruleId', 'Required parameter "ruleId" was null or undefined when calling getApplianceRule().');
|
|
117
|
+
}
|
|
118
|
+
const queryParameters = {};
|
|
119
|
+
const headerParameters = {};
|
|
120
|
+
let urlPath = `/appliances/rules/{ruleId}`;
|
|
121
|
+
urlPath = urlPath.replace('{ruleId}', encodeURIComponent(String(requestParameters['ruleId'])));
|
|
122
|
+
return {
|
|
123
|
+
path: urlPath,
|
|
124
|
+
method: 'GET',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get an appliance rule
|
|
132
|
+
*/
|
|
133
|
+
getApplianceRuleRaw(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const requestOptions = yield this.getApplianceRuleRequestOpts(requestParameters);
|
|
136
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleFromJSON(jsonValue));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get an appliance rule
|
|
142
|
+
*/
|
|
143
|
+
getApplianceRule(requestParameters, initOverrides) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
const response = yield this.getApplianceRuleRaw(requestParameters, initOverrides);
|
|
146
|
+
return yield response.value();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Creates request options for listApplianceRules without sending the request
|
|
151
|
+
*/
|
|
152
|
+
listApplianceRulesRequestOpts() {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const queryParameters = {};
|
|
155
|
+
const headerParameters = {};
|
|
156
|
+
let urlPath = `/appliances/rules`;
|
|
157
|
+
return {
|
|
158
|
+
path: urlPath,
|
|
159
|
+
method: 'GET',
|
|
160
|
+
headers: headerParameters,
|
|
161
|
+
query: queryParameters,
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* List appliance rules
|
|
167
|
+
*/
|
|
168
|
+
listApplianceRulesRaw(initOverrides) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const requestOptions = yield this.listApplianceRulesRequestOpts();
|
|
171
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleListResponseFromJSON(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* List appliance rules
|
|
177
|
+
*/
|
|
178
|
+
listApplianceRules(initOverrides) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
const response = yield this.listApplianceRulesRaw(initOverrides);
|
|
181
|
+
return yield response.value();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
29
184
|
/**
|
|
30
185
|
* Creates request options for listAppliances without sending the request
|
|
31
186
|
*/
|
|
@@ -65,4 +220,50 @@ export class AppliancesApi extends runtime.BaseAPI {
|
|
|
65
220
|
return yield response.value();
|
|
66
221
|
});
|
|
67
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Creates request options for updateApplianceRule without sending the request
|
|
225
|
+
*/
|
|
226
|
+
updateApplianceRuleRequestOpts(requestParameters) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
if (requestParameters['ruleId'] == null) {
|
|
229
|
+
throw new runtime.RequiredError('ruleId', 'Required parameter "ruleId" was null or undefined when calling updateApplianceRule().');
|
|
230
|
+
}
|
|
231
|
+
if (requestParameters['applianceRuleRequest'] == null) {
|
|
232
|
+
throw new runtime.RequiredError('applianceRuleRequest', 'Required parameter "applianceRuleRequest" was null or undefined when calling updateApplianceRule().');
|
|
233
|
+
}
|
|
234
|
+
const queryParameters = {};
|
|
235
|
+
const headerParameters = {};
|
|
236
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
237
|
+
let urlPath = `/appliances/rules/{ruleId}`;
|
|
238
|
+
urlPath = urlPath.replace('{ruleId}', encodeURIComponent(String(requestParameters['ruleId'])));
|
|
239
|
+
return {
|
|
240
|
+
path: urlPath,
|
|
241
|
+
method: 'PUT',
|
|
242
|
+
headers: headerParameters,
|
|
243
|
+
query: queryParameters,
|
|
244
|
+
body: ApplianceRuleRequestToJSON(requestParameters['applianceRuleRequest']),
|
|
245
|
+
};
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
250
|
+
* Replace an appliance rule
|
|
251
|
+
*/
|
|
252
|
+
updateApplianceRuleRaw(requestParameters, initOverrides) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
const requestOptions = yield this.updateApplianceRuleRequestOpts(requestParameters);
|
|
255
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
256
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleFromJSON(jsonValue));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
261
|
+
* Replace an appliance rule
|
|
262
|
+
*/
|
|
263
|
+
updateApplianceRule(requestParameters, initOverrides) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
const response = yield this.updateApplianceRuleRaw(requestParameters, initOverrides);
|
|
266
|
+
return yield response.value();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
68
269
|
}
|
|
@@ -39,7 +39,7 @@ export interface GetGroupRequest {
|
|
|
39
39
|
*/
|
|
40
40
|
groupId: string;
|
|
41
41
|
/**
|
|
42
|
-
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
42
|
+
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
43
43
|
*/
|
|
44
44
|
sort?: Array<string>;
|
|
45
45
|
/**
|
|
@@ -57,7 +57,7 @@ export interface GetLatestGroupRequest {
|
|
|
57
57
|
*/
|
|
58
58
|
groupId: string;
|
|
59
59
|
/**
|
|
60
|
-
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
60
|
+
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
61
61
|
*/
|
|
62
62
|
sort?: Array<string>;
|
|
63
63
|
/**
|
|
@@ -174,7 +174,7 @@ export interface GroupsApiInterface {
|
|
|
174
174
|
* Creates request options for getGroup without sending the request
|
|
175
175
|
* @param {string} id Collection ID
|
|
176
176
|
* @param {string} groupId Group ID
|
|
177
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
177
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
178
178
|
* @param {number} [page] Page number for pagination
|
|
179
179
|
* @param {number} [pageSize] Number of items per page
|
|
180
180
|
* @throws {RequiredError}
|
|
@@ -186,7 +186,7 @@ export interface GroupsApiInterface {
|
|
|
186
186
|
* @summary Get group by ID with its VirtualMachines
|
|
187
187
|
* @param {string} id Collection ID
|
|
188
188
|
* @param {string} groupId Group ID
|
|
189
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
189
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
190
190
|
* @param {number} [page] Page number for pagination
|
|
191
191
|
* @param {number} [pageSize] Number of items per page
|
|
192
192
|
* @param {*} [options] Override http request option.
|
|
@@ -201,7 +201,7 @@ export interface GroupsApiInterface {
|
|
|
201
201
|
/**
|
|
202
202
|
* Creates request options for getLatestGroup without sending the request
|
|
203
203
|
* @param {string} groupId Group ID
|
|
204
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
204
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
205
205
|
* @param {number} [page] Page number for pagination
|
|
206
206
|
* @param {number} [pageSize] Number of items per page
|
|
207
207
|
* @throws {RequiredError}
|
|
@@ -212,7 +212,7 @@ export interface GroupsApiInterface {
|
|
|
212
212
|
*
|
|
213
213
|
* @summary Get group by ID from the latest collection
|
|
214
214
|
* @param {string} groupId Group ID
|
|
215
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
215
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
216
216
|
* @param {number} [page] Page number for pagination
|
|
217
217
|
* @param {number} [pageSize] Number of items per page
|
|
218
218
|
* @param {*} [options] Override http request option.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assisted Migration Agent API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v2
|
|
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 * as runtime from '../runtime.js';
|
|
13
|
+
import { type MigrationComplexityRequest } from '../models/MigrationComplexityRequest.js';
|
|
14
|
+
import { type MigrationComplexityResponse } from '../models/MigrationComplexityResponse.js';
|
|
15
|
+
export interface CalculateMigrationComplexityRequest {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
migrationComplexityRequest: MigrationComplexityRequest;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* RecommendationsApi - interface
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
* @interface RecommendationsApiInterface
|
|
26
|
+
*/
|
|
27
|
+
export interface RecommendationsApiInterface {
|
|
28
|
+
/**
|
|
29
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
30
|
+
* @param {MigrationComplexityRequest} migrationComplexityRequest
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
* @memberof RecommendationsApiInterface
|
|
33
|
+
*/
|
|
34
|
+
calculateMigrationComplexityRequestOpts(requestParameters: CalculateMigrationComplexityRequest): Promise<runtime.RequestOpts>;
|
|
35
|
+
/**
|
|
36
|
+
* Calculate migration complexity estimation for the latest collection
|
|
37
|
+
* @param {MigrationComplexityRequest} migrationComplexityRequest
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
* @memberof RecommendationsApiInterface
|
|
41
|
+
*/
|
|
42
|
+
calculateMigrationComplexityRaw(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationComplexityResponse>>;
|
|
43
|
+
/**
|
|
44
|
+
* Calculate migration complexity estimation for the latest collection
|
|
45
|
+
*/
|
|
46
|
+
calculateMigrationComplexity(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationComplexityResponse>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export declare class RecommendationsApi extends runtime.BaseAPI implements RecommendationsApiInterface {
|
|
52
|
+
/**
|
|
53
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
54
|
+
*/
|
|
55
|
+
calculateMigrationComplexityRequestOpts(requestParameters: CalculateMigrationComplexityRequest): Promise<runtime.RequestOpts>;
|
|
56
|
+
/**
|
|
57
|
+
* Calculate migration complexity estimation for the latest collection
|
|
58
|
+
*/
|
|
59
|
+
calculateMigrationComplexityRaw(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationComplexityResponse>>;
|
|
60
|
+
/**
|
|
61
|
+
* Calculate migration complexity estimation for the latest collection
|
|
62
|
+
*/
|
|
63
|
+
calculateMigrationComplexity(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationComplexityResponse>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Assisted Migration Agent API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v2
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime.js';
|
|
24
|
+
import { MigrationComplexityRequestToJSON, } from '../models/MigrationComplexityRequest.js';
|
|
25
|
+
import { MigrationComplexityResponseFromJSON, } from '../models/MigrationComplexityResponse.js';
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export class RecommendationsApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
32
|
+
*/
|
|
33
|
+
calculateMigrationComplexityRequestOpts(requestParameters) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['migrationComplexityRequest'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('migrationComplexityRequest', 'Required parameter "migrationComplexityRequest" was null or undefined when calling calculateMigrationComplexity().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
41
|
+
let urlPath = `/complexity-estimation`;
|
|
42
|
+
return {
|
|
43
|
+
path: urlPath,
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: headerParameters,
|
|
46
|
+
query: queryParameters,
|
|
47
|
+
body: MigrationComplexityRequestToJSON(requestParameters['migrationComplexityRequest']),
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Calculate migration complexity estimation for the latest collection
|
|
53
|
+
*/
|
|
54
|
+
calculateMigrationComplexityRaw(requestParameters, initOverrides) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const requestOptions = yield this.calculateMigrationComplexityRequestOpts(requestParameters);
|
|
57
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MigrationComplexityResponseFromJSON(jsonValue));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Calculate migration complexity estimation for the latest collection
|
|
63
|
+
*/
|
|
64
|
+
calculateMigrationComplexity(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.calculateMigrationComplexityRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -81,7 +81,7 @@ export interface ListLatestVirtualMachinesRequest {
|
|
|
81
81
|
*/
|
|
82
82
|
byExpression?: string;
|
|
83
83
|
/**
|
|
84
|
-
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
84
|
+
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
85
85
|
*/
|
|
86
86
|
sort?: Array<string>;
|
|
87
87
|
/**
|
|
@@ -103,7 +103,7 @@ export interface ListVirtualMachinesRequest {
|
|
|
103
103
|
*/
|
|
104
104
|
byExpression?: string;
|
|
105
105
|
/**
|
|
106
|
-
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
106
|
+
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
107
107
|
*/
|
|
108
108
|
sort?: Array<string>;
|
|
109
109
|
/**
|
|
@@ -345,7 +345,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
345
345
|
/**
|
|
346
346
|
* Creates request options for listLatestVirtualMachines without sending the request
|
|
347
347
|
* @param {string} [byExpression] Filter by expression
|
|
348
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
348
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
349
349
|
* @param {number} [page] Page number for pagination
|
|
350
350
|
* @param {number} [pageSize] Number of items per page
|
|
351
351
|
* @throws {RequiredError}
|
|
@@ -356,7 +356,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
356
356
|
*
|
|
357
357
|
* @summary List VirtualMachines from the latest collection
|
|
358
358
|
* @param {string} [byExpression] Filter by expression
|
|
359
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
359
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
360
360
|
* @param {number} [page] Page number for pagination
|
|
361
361
|
* @param {number} [pageSize] Number of items per page
|
|
362
362
|
* @param {*} [options] Override http request option.
|
|
@@ -372,7 +372,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
372
372
|
* Creates request options for listVirtualMachines without sending the request
|
|
373
373
|
* @param {string} id Collection ID
|
|
374
374
|
* @param {string} [byExpression] Filter by expression
|
|
375
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
375
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
376
376
|
* @param {number} [page] Page number for pagination
|
|
377
377
|
* @param {number} [pageSize] Number of items per page
|
|
378
378
|
* @throws {RequiredError}
|
|
@@ -384,7 +384,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
384
384
|
* @summary List VirtualMachines in a collection
|
|
385
385
|
* @param {string} id Collection ID
|
|
386
386
|
* @param {string} [byExpression] Filter by expression
|
|
387
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
387
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
388
388
|
* @param {number} [page] Page number for pagination
|
|
389
389
|
* @param {number} [pageSize] Number of items per page
|
|
390
390
|
* @param {*} [options] Override http request option.
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './GroupsApi.js';
|
|
|
9
9
|
export * from './ImageUpgradeApi.js';
|
|
10
10
|
export * from './InspectorApi.js';
|
|
11
11
|
export * from './InventoriesApi.js';
|
|
12
|
+
export * from './RecommendationsApi.js';
|
|
12
13
|
export * from './RightsizingApi.js';
|
|
13
14
|
export * from './VersionApi.js';
|
|
14
15
|
export * from './VirtualMachinesApi.js';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from './GroupsApi.js';
|
|
|
11
11
|
export * from './ImageUpgradeApi.js';
|
|
12
12
|
export * from './InspectorApi.js';
|
|
13
13
|
export * from './InventoriesApi.js';
|
|
14
|
+
export * from './RecommendationsApi.js';
|
|
14
15
|
export * from './RightsizingApi.js';
|
|
15
16
|
export * from './VersionApi.js';
|
|
16
17
|
export * from './VirtualMachinesApi.js';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assisted Migration Agent API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v2
|
|
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 { ApplianceRuleCondition } from './ApplianceRuleCondition.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ApplianceRule
|
|
17
|
+
*/
|
|
18
|
+
export interface ApplianceRule {
|
|
19
|
+
/**
|
|
20
|
+
* Rule ID
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Appliance product name
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* Appliance vendor
|
|
29
|
+
*/
|
|
30
|
+
vendor: string;
|
|
31
|
+
/**
|
|
32
|
+
* Appliance category
|
|
33
|
+
*/
|
|
34
|
+
category: string;
|
|
35
|
+
/**
|
|
36
|
+
* OSV migration verdict
|
|
37
|
+
*/
|
|
38
|
+
osv_verdict: ApplianceRuleOsvVerdictEnum;
|
|
39
|
+
/**
|
|
40
|
+
* Confidence ceiling for this rule
|
|
41
|
+
*/
|
|
42
|
+
max_confidence: ApplianceRuleMaxConfidenceEnum;
|
|
43
|
+
/**
|
|
44
|
+
* Kind of rules either default or custom
|
|
45
|
+
*/
|
|
46
|
+
kind: ApplianceRuleKindEnum;
|
|
47
|
+
/**
|
|
48
|
+
* Number of conditions that must match before the rule fires
|
|
49
|
+
*/
|
|
50
|
+
min_matched: number;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
conditions: Array<ApplianceRuleCondition>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @export
|
|
58
|
+
*/
|
|
59
|
+
export declare const ApplianceRuleOsvVerdictEnum: {
|
|
60
|
+
readonly Blocked: "blocked";
|
|
61
|
+
readonly Conditional: "conditional";
|
|
62
|
+
readonly Supported: "supported";
|
|
63
|
+
readonly Unknown: "unknown";
|
|
64
|
+
};
|
|
65
|
+
export type ApplianceRuleOsvVerdictEnum = typeof ApplianceRuleOsvVerdictEnum[keyof typeof ApplianceRuleOsvVerdictEnum];
|
|
66
|
+
/**
|
|
67
|
+
* @export
|
|
68
|
+
*/
|
|
69
|
+
export declare const ApplianceRuleMaxConfidenceEnum: {
|
|
70
|
+
readonly High: "high";
|
|
71
|
+
readonly Medium: "medium";
|
|
72
|
+
readonly Low: "low";
|
|
73
|
+
};
|
|
74
|
+
export type ApplianceRuleMaxConfidenceEnum = typeof ApplianceRuleMaxConfidenceEnum[keyof typeof ApplianceRuleMaxConfidenceEnum];
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export declare const ApplianceRuleKindEnum: {
|
|
79
|
+
readonly Default: "default";
|
|
80
|
+
readonly Custom: "custom";
|
|
81
|
+
};
|
|
82
|
+
export type ApplianceRuleKindEnum = typeof ApplianceRuleKindEnum[keyof typeof ApplianceRuleKindEnum];
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the ApplianceRule interface.
|
|
85
|
+
*/
|
|
86
|
+
export declare function instanceOfApplianceRule(value: object): value is ApplianceRule;
|
|
87
|
+
export declare function ApplianceRuleFromJSON(json: any): ApplianceRule;
|
|
88
|
+
export declare function ApplianceRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRule;
|
|
89
|
+
export declare function ApplianceRuleToJSON(json: any): ApplianceRule;
|
|
90
|
+
export declare function ApplianceRuleToJSONTyped(value?: ApplianceRule | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Assisted Migration Agent API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v2
|
|
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 { ApplianceRuleConditionFromJSON, ApplianceRuleConditionToJSON, } from './ApplianceRuleCondition.js';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ApplianceRuleOsvVerdictEnum = {
|
|
19
|
+
Blocked: 'blocked',
|
|
20
|
+
Conditional: 'conditional',
|
|
21
|
+
Supported: 'supported',
|
|
22
|
+
Unknown: 'unknown',
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const ApplianceRuleMaxConfidenceEnum = {
|
|
28
|
+
High: 'high',
|
|
29
|
+
Medium: 'medium',
|
|
30
|
+
Low: 'low',
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const ApplianceRuleKindEnum = {
|
|
36
|
+
Default: 'default',
|
|
37
|
+
Custom: 'custom',
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the ApplianceRule interface.
|
|
41
|
+
*/
|
|
42
|
+
export function instanceOfApplianceRule(value) {
|
|
43
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('vendor' in value) || value['vendor'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('category' in value) || value['category'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('osv_verdict' in value) || value['osv_verdict'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('max_confidence' in value) || value['max_confidence'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
if (!('kind' in value) || value['kind'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
if (!('min_matched' in value) || value['min_matched'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('conditions' in value) || value['conditions'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
export function ApplianceRuleFromJSON(json) {
|
|
62
|
+
return ApplianceRuleFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
export function ApplianceRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
70
|
+
'name': json['name'],
|
|
71
|
+
'vendor': json['vendor'],
|
|
72
|
+
'category': json['category'],
|
|
73
|
+
'osv_verdict': json['osv_verdict'],
|
|
74
|
+
'max_confidence': json['max_confidence'],
|
|
75
|
+
'kind': json['kind'],
|
|
76
|
+
'min_matched': json['min_matched'],
|
|
77
|
+
'conditions': (json['conditions'].map(ApplianceRuleConditionFromJSON)),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function ApplianceRuleToJSON(json) {
|
|
81
|
+
return ApplianceRuleToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
export function ApplianceRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
'id': value['id'],
|
|
89
|
+
'name': value['name'],
|
|
90
|
+
'vendor': value['vendor'],
|
|
91
|
+
'category': value['category'],
|
|
92
|
+
'osv_verdict': value['osv_verdict'],
|
|
93
|
+
'max_confidence': value['max_confidence'],
|
|
94
|
+
'kind': value['kind'],
|
|
95
|
+
'min_matched': value['min_matched'],
|
|
96
|
+
'conditions': (value['conditions'].map(ApplianceRuleConditionToJSON)),
|
|
97
|
+
};
|
|
98
|
+
}
|