@aws-sdk/client-migrationhubstrategy 3.186.0 → 3.190.0

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 (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/MigrationHubStrategy.js +82 -89
  3. package/dist-es/MigrationHubStrategyClient.js +22 -28
  4. package/dist-es/commands/GetApplicationComponentDetailsCommand.js +21 -28
  5. package/dist-es/commands/GetApplicationComponentStrategiesCommand.js +21 -28
  6. package/dist-es/commands/GetAssessmentCommand.js +21 -28
  7. package/dist-es/commands/GetImportFileTaskCommand.js +21 -28
  8. package/dist-es/commands/GetPortfolioPreferencesCommand.js +21 -28
  9. package/dist-es/commands/GetPortfolioSummaryCommand.js +21 -28
  10. package/dist-es/commands/GetRecommendationReportDetailsCommand.js +21 -28
  11. package/dist-es/commands/GetServerDetailsCommand.js +21 -28
  12. package/dist-es/commands/GetServerStrategiesCommand.js +21 -28
  13. package/dist-es/commands/ListApplicationComponentsCommand.js +21 -28
  14. package/dist-es/commands/ListCollectorsCommand.js +21 -28
  15. package/dist-es/commands/ListImportFileTaskCommand.js +21 -28
  16. package/dist-es/commands/ListServersCommand.js +21 -28
  17. package/dist-es/commands/PutPortfolioPreferencesCommand.js +21 -28
  18. package/dist-es/commands/StartAssessmentCommand.js +21 -28
  19. package/dist-es/commands/StartImportFileTaskCommand.js +21 -28
  20. package/dist-es/commands/StartRecommendationReportGenerationCommand.js +21 -28
  21. package/dist-es/commands/StopAssessmentCommand.js +21 -28
  22. package/dist-es/commands/UpdateApplicationComponentConfigCommand.js +21 -28
  23. package/dist-es/commands/UpdateServerConfigCommand.js +21 -28
  24. package/dist-es/endpoints.js +8 -8
  25. package/dist-es/models/MigrationHubStrategyServiceException.js +5 -10
  26. package/dist-es/models/models_0.js +338 -184
  27. package/dist-es/pagination/GetServerDetailsPaginator.js +25 -68
  28. package/dist-es/pagination/ListApplicationComponentsPaginator.js +25 -68
  29. package/dist-es/pagination/ListCollectorsPaginator.js +25 -68
  30. package/dist-es/pagination/ListImportFileTaskPaginator.js +25 -68
  31. package/dist-es/pagination/ListServersPaginator.js +25 -68
  32. package/dist-es/protocols/Aws_restJson1.js +1660 -2237
  33. package/dist-es/runtimeConfig.browser.js +26 -12
  34. package/dist-es/runtimeConfig.js +30 -12
  35. package/dist-es/runtimeConfig.native.js +8 -5
  36. package/dist-es/runtimeConfig.shared.js +8 -11
  37. package/package.json +33 -33
@@ -1,2167 +1,1608 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { MigrationHubStrategyServiceException as __BaseException } from "../models/MigrationHubStrategyServiceException";
5
4
  import { AccessDeniedException, ConflictException, DatabaseMigrationPreference, InternalServerException, ManagementPreference, ResourceNotFoundException, ServiceLinkedRoleLockClientException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- export var serializeAws_restJson1GetApplicationComponentDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
- return __generator(this, function (_c) {
9
- switch (_c.label) {
10
- case 0: return [4, context.endpoint()];
11
- case 1:
12
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
13
- headers = {};
14
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
15
- "/get-applicationcomponent-details/{applicationComponentId}";
16
- resolvedPath = __resolvedPath(resolvedPath, input, "applicationComponentId", function () { return input.applicationComponentId; }, "{applicationComponentId}", false);
17
- return [2, new __HttpRequest({
18
- protocol: protocol,
19
- hostname: hostname,
20
- port: port,
21
- method: "GET",
22
- headers: headers,
23
- path: resolvedPath,
24
- body: body,
25
- })];
26
- }
27
- });
28
- }); };
29
- export var serializeAws_restJson1GetApplicationComponentStrategiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
30
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
31
- return __generator(this, function (_c) {
32
- switch (_c.label) {
33
- case 0: return [4, context.endpoint()];
34
- case 1:
35
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
36
- headers = {};
37
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
38
- "/get-applicationcomponent-strategies/{applicationComponentId}";
39
- resolvedPath = __resolvedPath(resolvedPath, input, "applicationComponentId", function () { return input.applicationComponentId; }, "{applicationComponentId}", false);
40
- return [2, new __HttpRequest({
41
- protocol: protocol,
42
- hostname: hostname,
43
- port: port,
44
- method: "GET",
45
- headers: headers,
46
- path: resolvedPath,
47
- body: body,
48
- })];
49
- }
50
- });
51
- }); };
52
- export var serializeAws_restJson1GetAssessmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
53
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
54
- return __generator(this, function (_c) {
55
- switch (_c.label) {
56
- case 0: return [4, context.endpoint()];
57
- case 1:
58
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
59
- headers = {};
60
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-assessment/{id}";
61
- resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
62
- return [2, new __HttpRequest({
63
- protocol: protocol,
64
- hostname: hostname,
65
- port: port,
66
- method: "GET",
67
- headers: headers,
68
- path: resolvedPath,
69
- body: body,
70
- })];
71
- }
72
- });
73
- }); };
74
- export var serializeAws_restJson1GetImportFileTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
75
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
76
- return __generator(this, function (_c) {
77
- switch (_c.label) {
78
- case 0: return [4, context.endpoint()];
79
- case 1:
80
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
81
- headers = {};
82
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-import-file-task/{id}";
83
- resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
84
- return [2, new __HttpRequest({
85
- protocol: protocol,
86
- hostname: hostname,
87
- port: port,
88
- method: "GET",
89
- headers: headers,
90
- path: resolvedPath,
91
- body: body,
92
- })];
93
- }
94
- });
95
- }); };
96
- export var serializeAws_restJson1GetPortfolioPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
97
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
98
- return __generator(this, function (_c) {
99
- switch (_c.label) {
100
- case 0: return [4, context.endpoint()];
101
- case 1:
102
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
103
- headers = {
104
- "content-type": "application/json",
105
- };
106
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-portfolio-preferences";
107
- body = "";
108
- return [2, new __HttpRequest({
109
- protocol: protocol,
110
- hostname: hostname,
111
- port: port,
112
- method: "GET",
113
- headers: headers,
114
- path: resolvedPath,
115
- body: body,
116
- })];
117
- }
118
- });
119
- }); };
120
- export var serializeAws_restJson1GetPortfolioSummaryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
121
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
122
- return __generator(this, function (_c) {
123
- switch (_c.label) {
124
- case 0: return [4, context.endpoint()];
125
- case 1:
126
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
127
- headers = {
128
- "content-type": "application/json",
129
- };
130
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-portfolio-summary";
131
- body = "";
132
- return [2, new __HttpRequest({
133
- protocol: protocol,
134
- hostname: hostname,
135
- port: port,
136
- method: "GET",
137
- headers: headers,
138
- path: resolvedPath,
139
- body: body,
140
- })];
141
- }
142
- });
143
- }); };
144
- export var serializeAws_restJson1GetRecommendationReportDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
145
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
146
- return __generator(this, function (_c) {
147
- switch (_c.label) {
148
- case 0: return [4, context.endpoint()];
149
- case 1:
150
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
151
- headers = {};
152
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-recommendation-report-details/{id}";
153
- resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
154
- return [2, new __HttpRequest({
155
- protocol: protocol,
156
- hostname: hostname,
157
- port: port,
158
- method: "GET",
159
- headers: headers,
160
- path: resolvedPath,
161
- body: body,
162
- })];
163
- }
164
- });
165
- }); };
166
- export var serializeAws_restJson1GetServerDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
167
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
168
- return __generator(this, function (_c) {
169
- switch (_c.label) {
170
- case 0: return [4, context.endpoint()];
171
- case 1:
172
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
173
- headers = {};
174
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-server-details/{serverId}";
175
- resolvedPath = __resolvedPath(resolvedPath, input, "serverId", function () { return input.serverId; }, "{serverId}", false);
176
- query = map({
177
- nextToken: [, input.nextToken],
178
- maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
179
- });
180
- return [2, new __HttpRequest({
181
- protocol: protocol,
182
- hostname: hostname,
183
- port: port,
184
- method: "GET",
185
- headers: headers,
186
- path: resolvedPath,
187
- query: query,
188
- body: body,
189
- })];
190
- }
191
- });
192
- }); };
193
- export var serializeAws_restJson1GetServerStrategiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
195
- return __generator(this, function (_c) {
196
- switch (_c.label) {
197
- case 0: return [4, context.endpoint()];
198
- case 1:
199
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
200
- headers = {};
201
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/get-server-strategies/{serverId}";
202
- resolvedPath = __resolvedPath(resolvedPath, input, "serverId", function () { return input.serverId; }, "{serverId}", false);
203
- return [2, new __HttpRequest({
204
- protocol: protocol,
205
- hostname: hostname,
206
- port: port,
207
- method: "GET",
208
- headers: headers,
209
- path: resolvedPath,
210
- body: body,
211
- })];
212
- }
213
- });
214
- }); };
215
- export var serializeAws_restJson1ListApplicationComponentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
216
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
217
- return __generator(this, function (_c) {
218
- switch (_c.label) {
219
- case 0: return [4, context.endpoint()];
220
- case 1:
221
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
222
- headers = {
223
- "content-type": "application/json",
224
- };
225
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-applicationcomponents";
226
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.applicationComponentCriteria != null && {
227
- applicationComponentCriteria: input.applicationComponentCriteria,
228
- })), (input.filterValue != null && { filterValue: input.filterValue })), (input.groupIdFilter != null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sort != null && { sort: input.sort })));
229
- return [2, new __HttpRequest({
230
- protocol: protocol,
231
- hostname: hostname,
232
- port: port,
233
- method: "POST",
234
- headers: headers,
235
- path: resolvedPath,
236
- body: body,
237
- })];
238
- }
239
- });
240
- }); };
241
- export var serializeAws_restJson1ListCollectorsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
242
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
243
- return __generator(this, function (_c) {
244
- switch (_c.label) {
245
- case 0: return [4, context.endpoint()];
246
- case 1:
247
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
248
- headers = {};
249
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-collectors";
250
- query = map({
251
- nextToken: [, input.nextToken],
252
- maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
253
- });
254
- return [2, new __HttpRequest({
255
- protocol: protocol,
256
- hostname: hostname,
257
- port: port,
258
- method: "GET",
259
- headers: headers,
260
- path: resolvedPath,
261
- query: query,
262
- body: body,
263
- })];
264
- }
265
- });
266
- }); };
267
- export var serializeAws_restJson1ListImportFileTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
268
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
269
- return __generator(this, function (_c) {
270
- switch (_c.label) {
271
- case 0: return [4, context.endpoint()];
272
- case 1:
273
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
274
- headers = {};
275
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-import-file-task";
276
- query = map({
277
- nextToken: [, input.nextToken],
278
- maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
279
- });
280
- return [2, new __HttpRequest({
281
- protocol: protocol,
282
- hostname: hostname,
283
- port: port,
284
- method: "GET",
285
- headers: headers,
286
- path: resolvedPath,
287
- query: query,
288
- body: body,
289
- })];
290
- }
291
- });
292
- }); };
293
- export var serializeAws_restJson1ListServersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
294
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
295
- return __generator(this, function (_c) {
296
- switch (_c.label) {
297
- case 0: return [4, context.endpoint()];
298
- case 1:
299
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
300
- headers = {
301
- "content-type": "application/json",
302
- };
303
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-servers";
304
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.filterValue != null && { filterValue: input.filterValue })), (input.groupIdFilter != null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.serverCriteria != null && { serverCriteria: input.serverCriteria })), (input.sort != null && { sort: input.sort })));
305
- return [2, new __HttpRequest({
306
- protocol: protocol,
307
- hostname: hostname,
308
- port: port,
309
- method: "POST",
310
- headers: headers,
311
- path: resolvedPath,
312
- body: body,
313
- })];
314
- }
315
- });
316
- }); };
317
- export var serializeAws_restJson1PutPortfolioPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
318
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
319
- return __generator(this, function (_c) {
320
- switch (_c.label) {
321
- case 0: return [4, context.endpoint()];
322
- case 1:
323
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
324
- headers = {
325
- "content-type": "application/json",
326
- };
327
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/put-portfolio-preferences";
328
- body = JSON.stringify(__assign(__assign(__assign({}, (input.applicationPreferences != null && {
329
- applicationPreferences: serializeAws_restJson1ApplicationPreferences(input.applicationPreferences, context),
330
- })), (input.databasePreferences != null && {
331
- databasePreferences: serializeAws_restJson1DatabasePreferences(input.databasePreferences, context),
332
- })), (input.prioritizeBusinessGoals != null && {
333
- prioritizeBusinessGoals: serializeAws_restJson1PrioritizeBusinessGoals(input.prioritizeBusinessGoals, context),
334
- })));
335
- return [2, new __HttpRequest({
336
- protocol: protocol,
337
- hostname: hostname,
338
- port: port,
339
- method: "POST",
340
- headers: headers,
341
- path: resolvedPath,
342
- body: body,
343
- })];
344
- }
345
- });
346
- }); };
347
- export var serializeAws_restJson1StartAssessmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
348
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
349
- return __generator(this, function (_c) {
350
- switch (_c.label) {
351
- case 0: return [4, context.endpoint()];
352
- case 1:
353
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
354
- headers = {
355
- "content-type": "application/json",
356
- };
357
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/start-assessment";
358
- body = JSON.stringify(__assign(__assign({}, (input.s3bucketForAnalysisData != null && { s3bucketForAnalysisData: input.s3bucketForAnalysisData })), (input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData })));
359
- return [2, new __HttpRequest({
360
- protocol: protocol,
361
- hostname: hostname,
362
- port: port,
363
- method: "POST",
364
- headers: headers,
365
- path: resolvedPath,
366
- body: body,
367
- })];
368
- }
369
- });
370
- }); };
371
- export var serializeAws_restJson1StartImportFileTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
372
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
373
- return __generator(this, function (_c) {
374
- switch (_c.label) {
375
- case 0: return [4, context.endpoint()];
376
- case 1:
377
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
378
- headers = {
379
- "content-type": "application/json",
380
- };
381
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/start-import-file-task";
382
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.S3Bucket != null && { S3Bucket: input.S3Bucket })), (input.dataSourceType != null && { dataSourceType: input.dataSourceType })), (input.groupId != null && { groupId: serializeAws_restJson1GroupIds(input.groupId, context) })), (input.name != null && { name: input.name })), (input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData })), (input.s3key != null && { s3key: input.s3key })));
383
- return [2, new __HttpRequest({
384
- protocol: protocol,
385
- hostname: hostname,
386
- port: port,
387
- method: "POST",
388
- headers: headers,
389
- path: resolvedPath,
390
- body: body,
391
- })];
392
- }
393
- });
394
- }); };
395
- export var serializeAws_restJson1StartRecommendationReportGenerationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
396
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
397
- return __generator(this, function (_c) {
398
- switch (_c.label) {
399
- case 0: return [4, context.endpoint()];
400
- case 1:
401
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
402
- headers = {
403
- "content-type": "application/json",
404
- };
405
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/start-recommendation-report-generation";
406
- body = JSON.stringify(__assign(__assign({}, (input.groupIdFilter != null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) })), (input.outputFormat != null && { outputFormat: input.outputFormat })));
407
- return [2, new __HttpRequest({
408
- protocol: protocol,
409
- hostname: hostname,
410
- port: port,
411
- method: "POST",
412
- headers: headers,
413
- path: resolvedPath,
414
- body: body,
415
- })];
416
- }
417
- });
418
- }); };
419
- export var serializeAws_restJson1StopAssessmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
420
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
421
- return __generator(this, function (_c) {
422
- switch (_c.label) {
423
- case 0: return [4, context.endpoint()];
424
- case 1:
425
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
426
- headers = {
427
- "content-type": "application/json",
428
- };
429
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/stop-assessment";
430
- body = JSON.stringify(__assign({}, (input.assessmentId != null && { assessmentId: input.assessmentId })));
431
- return [2, new __HttpRequest({
432
- protocol: protocol,
433
- hostname: hostname,
434
- port: port,
435
- method: "POST",
436
- headers: headers,
437
- path: resolvedPath,
438
- body: body,
439
- })];
440
- }
441
- });
442
- }); };
443
- export var serializeAws_restJson1UpdateApplicationComponentConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
444
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
445
- return __generator(this, function (_c) {
446
- switch (_c.label) {
447
- case 0: return [4, context.endpoint()];
448
- case 1:
449
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
450
- headers = {
451
- "content-type": "application/json",
452
- };
453
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/update-applicationcomponent-config";
454
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.applicationComponentId != null && { applicationComponentId: input.applicationComponentId })), (input.inclusionStatus != null && { inclusionStatus: input.inclusionStatus })), (input.secretsManagerKey != null && { secretsManagerKey: input.secretsManagerKey })), (input.sourceCodeList != null && {
455
- sourceCodeList: serializeAws_restJson1SourceCodeList(input.sourceCodeList, context),
456
- })), (input.strategyOption != null && {
457
- strategyOption: serializeAws_restJson1StrategyOption(input.strategyOption, context),
458
- })));
459
- return [2, new __HttpRequest({
460
- protocol: protocol,
461
- hostname: hostname,
462
- port: port,
463
- method: "POST",
464
- headers: headers,
465
- path: resolvedPath,
466
- body: body,
467
- })];
468
- }
469
- });
470
- }); };
471
- export var serializeAws_restJson1UpdateServerConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
472
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
473
- return __generator(this, function (_c) {
474
- switch (_c.label) {
475
- case 0: return [4, context.endpoint()];
476
- case 1:
477
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
478
- headers = {
479
- "content-type": "application/json",
480
- };
481
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/update-server-config";
482
- body = JSON.stringify(__assign(__assign({}, (input.serverId != null && { serverId: input.serverId })), (input.strategyOption != null && {
483
- strategyOption: serializeAws_restJson1StrategyOption(input.strategyOption, context),
484
- })));
485
- return [2, new __HttpRequest({
486
- protocol: protocol,
487
- hostname: hostname,
488
- port: port,
489
- method: "POST",
490
- headers: headers,
491
- path: resolvedPath,
492
- body: body,
493
- })];
494
- }
495
- });
496
- }); };
497
- export var deserializeAws_restJson1GetApplicationComponentDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
498
- var contents, data, _a, _b;
499
- return __generator(this, function (_c) {
500
- switch (_c.label) {
501
- case 0:
502
- if (output.statusCode !== 200 && output.statusCode >= 300) {
503
- return [2, deserializeAws_restJson1GetApplicationComponentDetailsCommandError(output, context)];
504
- }
505
- contents = map({
506
- $metadata: deserializeMetadata(output),
507
- });
508
- _a = __expectNonNull;
509
- _b = __expectObject;
510
- return [4, parseBody(output.body, context)];
511
- case 1:
512
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
513
- if (data.applicationComponentDetail != null) {
514
- contents.applicationComponentDetail = deserializeAws_restJson1ApplicationComponentDetail(data.applicationComponentDetail, context);
515
- }
516
- if (data.associatedApplications != null) {
517
- contents.associatedApplications = deserializeAws_restJson1AssociatedApplications(data.associatedApplications, context);
518
- }
519
- if (data.associatedServerIds != null) {
520
- contents.associatedServerIds = deserializeAws_restJson1AssociatedServerIDs(data.associatedServerIds, context);
521
- }
522
- if (data.moreApplicationResource != null) {
523
- contents.moreApplicationResource = __expectBoolean(data.moreApplicationResource);
524
- }
525
- return [2, contents];
526
- }
527
- });
528
- }); };
529
- var deserializeAws_restJson1GetApplicationComponentDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
530
- var parsedOutput, _a, errorCode, _b, parsedBody;
531
- var _c;
532
- return __generator(this, function (_d) {
533
- switch (_d.label) {
534
- case 0:
535
- _a = [__assign({}, output)];
536
- _c = {};
537
- return [4, parseErrorBody(output.body, context)];
538
- case 1:
539
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
540
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
541
- _b = errorCode;
542
- switch (_b) {
543
- case "InternalServerException": return [3, 2];
544
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 2];
545
- case "ResourceNotFoundException": return [3, 4];
546
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 4];
547
- case "ThrottlingException": return [3, 6];
548
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
549
- }
550
- return [3, 8];
551
- case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
552
- case 3: throw _d.sent();
553
- case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
554
- case 5: throw _d.sent();
555
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
556
- case 7: throw _d.sent();
557
- case 8:
558
- parsedBody = parsedOutput.body;
559
- throwDefaultError({
560
- output: output,
561
- parsedBody: parsedBody,
562
- exceptionCtor: __BaseException,
563
- errorCode: errorCode,
564
- });
565
- _d.label = 9;
566
- case 9: return [2];
567
- }
568
- });
569
- }); };
570
- export var deserializeAws_restJson1GetApplicationComponentStrategiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
571
- var contents, data, _a, _b;
572
- return __generator(this, function (_c) {
573
- switch (_c.label) {
574
- case 0:
575
- if (output.statusCode !== 200 && output.statusCode >= 300) {
576
- return [2, deserializeAws_restJson1GetApplicationComponentStrategiesCommandError(output, context)];
577
- }
578
- contents = map({
579
- $metadata: deserializeMetadata(output),
580
- });
581
- _a = __expectNonNull;
582
- _b = __expectObject;
583
- return [4, parseBody(output.body, context)];
584
- case 1:
585
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
586
- if (data.applicationComponentStrategies != null) {
587
- contents.applicationComponentStrategies = deserializeAws_restJson1ApplicationComponentStrategies(data.applicationComponentStrategies, context);
588
- }
589
- return [2, contents];
590
- }
591
- });
592
- }); };
593
- var deserializeAws_restJson1GetApplicationComponentStrategiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
594
- var parsedOutput, _a, errorCode, _b, parsedBody;
595
- var _c;
596
- return __generator(this, function (_d) {
597
- switch (_d.label) {
598
- case 0:
599
- _a = [__assign({}, output)];
600
- _c = {};
601
- return [4, parseErrorBody(output.body, context)];
602
- case 1:
603
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
604
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
605
- _b = errorCode;
606
- switch (_b) {
607
- case "InternalServerException": return [3, 2];
608
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 2];
609
- case "ResourceNotFoundException": return [3, 4];
610
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 4];
611
- case "ThrottlingException": return [3, 6];
612
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
613
- }
614
- return [3, 8];
615
- case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
616
- case 3: throw _d.sent();
617
- case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
618
- case 5: throw _d.sent();
619
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
620
- case 7: throw _d.sent();
621
- case 8:
622
- parsedBody = parsedOutput.body;
623
- throwDefaultError({
624
- output: output,
625
- parsedBody: parsedBody,
626
- exceptionCtor: __BaseException,
627
- errorCode: errorCode,
628
- });
629
- _d.label = 9;
630
- case 9: return [2];
631
- }
632
- });
633
- }); };
634
- export var deserializeAws_restJson1GetAssessmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
635
- var contents, data, _a, _b;
636
- return __generator(this, function (_c) {
637
- switch (_c.label) {
638
- case 0:
639
- if (output.statusCode !== 200 && output.statusCode >= 300) {
640
- return [2, deserializeAws_restJson1GetAssessmentCommandError(output, context)];
641
- }
642
- contents = map({
643
- $metadata: deserializeMetadata(output),
644
- });
645
- _a = __expectNonNull;
646
- _b = __expectObject;
647
- return [4, parseBody(output.body, context)];
648
- case 1:
649
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
650
- if (data.dataCollectionDetails != null) {
651
- contents.dataCollectionDetails = deserializeAws_restJson1DataCollectionDetails(data.dataCollectionDetails, context);
652
- }
653
- if (data.id != null) {
654
- contents.id = __expectString(data.id);
655
- }
656
- return [2, contents];
657
- }
658
- });
659
- }); };
660
- var deserializeAws_restJson1GetAssessmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
661
- var parsedOutput, _a, errorCode, _b, parsedBody;
662
- var _c;
663
- return __generator(this, function (_d) {
664
- switch (_d.label) {
665
- case 0:
666
- _a = [__assign({}, output)];
667
- _c = {};
668
- return [4, parseErrorBody(output.body, context)];
669
- case 1:
670
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
671
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
- _b = errorCode;
673
- switch (_b) {
674
- case "AccessDeniedException": return [3, 2];
675
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
676
- case "InternalServerException": return [3, 4];
677
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
678
- case "ResourceNotFoundException": return [3, 6];
679
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 6];
680
- case "ThrottlingException": return [3, 8];
681
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
682
- }
683
- return [3, 10];
684
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
685
- case 3: throw _d.sent();
686
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
687
- case 5: throw _d.sent();
688
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
689
- case 7: throw _d.sent();
690
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
691
- case 9: throw _d.sent();
692
- case 10:
693
- parsedBody = parsedOutput.body;
694
- throwDefaultError({
695
- output: output,
696
- parsedBody: parsedBody,
697
- exceptionCtor: __BaseException,
698
- errorCode: errorCode,
699
- });
700
- _d.label = 11;
701
- case 11: return [2];
702
- }
703
- });
704
- }); };
705
- export var deserializeAws_restJson1GetImportFileTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
706
- var contents, data, _a, _b;
707
- return __generator(this, function (_c) {
708
- switch (_c.label) {
709
- case 0:
710
- if (output.statusCode !== 200 && output.statusCode >= 300) {
711
- return [2, deserializeAws_restJson1GetImportFileTaskCommandError(output, context)];
712
- }
713
- contents = map({
714
- $metadata: deserializeMetadata(output),
715
- });
716
- _a = __expectNonNull;
717
- _b = __expectObject;
718
- return [4, parseBody(output.body, context)];
719
- case 1:
720
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
721
- if (data.completionTime != null) {
722
- contents.completionTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completionTime)));
723
- }
724
- if (data.id != null) {
725
- contents.id = __expectString(data.id);
726
- }
727
- if (data.importName != null) {
728
- contents.importName = __expectString(data.importName);
729
- }
730
- if (data.inputS3Bucket != null) {
731
- contents.inputS3Bucket = __expectString(data.inputS3Bucket);
732
- }
733
- if (data.inputS3Key != null) {
734
- contents.inputS3Key = __expectString(data.inputS3Key);
735
- }
736
- if (data.numberOfRecordsFailed != null) {
737
- contents.numberOfRecordsFailed = __expectInt32(data.numberOfRecordsFailed);
738
- }
739
- if (data.numberOfRecordsSuccess != null) {
740
- contents.numberOfRecordsSuccess = __expectInt32(data.numberOfRecordsSuccess);
741
- }
742
- if (data.startTime != null) {
743
- contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
744
- }
745
- if (data.status != null) {
746
- contents.status = __expectString(data.status);
747
- }
748
- if (data.statusReportS3Bucket != null) {
749
- contents.statusReportS3Bucket = __expectString(data.statusReportS3Bucket);
750
- }
751
- if (data.statusReportS3Key != null) {
752
- contents.statusReportS3Key = __expectString(data.statusReportS3Key);
753
- }
754
- return [2, contents];
755
- }
756
- });
757
- }); };
758
- var deserializeAws_restJson1GetImportFileTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
759
- var parsedOutput, _a, errorCode, _b, parsedBody;
760
- var _c;
761
- return __generator(this, function (_d) {
762
- switch (_d.label) {
763
- case 0:
764
- _a = [__assign({}, output)];
765
- _c = {};
766
- return [4, parseErrorBody(output.body, context)];
767
- case 1:
768
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
769
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
770
- _b = errorCode;
771
- switch (_b) {
772
- case "AccessDeniedException": return [3, 2];
773
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
774
- case "InternalServerException": return [3, 4];
775
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
776
- case "ResourceNotFoundException": return [3, 6];
777
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 6];
778
- case "ThrottlingException": return [3, 8];
779
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
780
- case "ValidationException": return [3, 10];
781
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
782
- }
783
- return [3, 12];
784
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
785
- case 3: throw _d.sent();
786
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
787
- case 5: throw _d.sent();
788
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
789
- case 7: throw _d.sent();
790
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
791
- case 9: throw _d.sent();
792
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
793
- case 11: throw _d.sent();
794
- case 12:
795
- parsedBody = parsedOutput.body;
796
- throwDefaultError({
797
- output: output,
798
- parsedBody: parsedBody,
799
- exceptionCtor: __BaseException,
800
- errorCode: errorCode,
801
- });
802
- _d.label = 13;
803
- case 13: return [2];
804
- }
805
- });
806
- }); };
807
- export var deserializeAws_restJson1GetPortfolioPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
808
- var contents, data, _a, _b;
809
- return __generator(this, function (_c) {
810
- switch (_c.label) {
811
- case 0:
812
- if (output.statusCode !== 200 && output.statusCode >= 300) {
813
- return [2, deserializeAws_restJson1GetPortfolioPreferencesCommandError(output, context)];
814
- }
815
- contents = map({
816
- $metadata: deserializeMetadata(output),
817
- });
818
- _a = __expectNonNull;
819
- _b = __expectObject;
820
- return [4, parseBody(output.body, context)];
821
- case 1:
822
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
823
- if (data.applicationPreferences != null) {
824
- contents.applicationPreferences = deserializeAws_restJson1ApplicationPreferences(data.applicationPreferences, context);
825
- }
826
- if (data.databasePreferences != null) {
827
- contents.databasePreferences = deserializeAws_restJson1DatabasePreferences(data.databasePreferences, context);
828
- }
829
- if (data.prioritizeBusinessGoals != null) {
830
- contents.prioritizeBusinessGoals = deserializeAws_restJson1PrioritizeBusinessGoals(data.prioritizeBusinessGoals, context);
831
- }
832
- return [2, contents];
833
- }
834
- });
835
- }); };
836
- var deserializeAws_restJson1GetPortfolioPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
837
- var parsedOutput, _a, errorCode, _b, parsedBody;
838
- var _c;
839
- return __generator(this, function (_d) {
840
- switch (_d.label) {
841
- case 0:
842
- _a = [__assign({}, output)];
843
- _c = {};
844
- return [4, parseErrorBody(output.body, context)];
845
- case 1:
846
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
847
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
848
- _b = errorCode;
849
- switch (_b) {
850
- case "AccessDeniedException": return [3, 2];
851
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
852
- case "InternalServerException": return [3, 4];
853
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
854
- case "ResourceNotFoundException": return [3, 6];
855
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 6];
856
- case "ThrottlingException": return [3, 8];
857
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
858
- }
859
- return [3, 10];
860
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
861
- case 3: throw _d.sent();
862
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
863
- case 5: throw _d.sent();
864
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
865
- case 7: throw _d.sent();
866
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
867
- case 9: throw _d.sent();
868
- case 10:
869
- parsedBody = parsedOutput.body;
870
- throwDefaultError({
871
- output: output,
872
- parsedBody: parsedBody,
873
- exceptionCtor: __BaseException,
874
- errorCode: errorCode,
875
- });
876
- _d.label = 11;
877
- case 11: return [2];
878
- }
879
- });
880
- }); };
881
- export var deserializeAws_restJson1GetPortfolioSummaryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
882
- var contents, data, _a, _b;
883
- return __generator(this, function (_c) {
884
- switch (_c.label) {
885
- case 0:
886
- if (output.statusCode !== 200 && output.statusCode >= 300) {
887
- return [2, deserializeAws_restJson1GetPortfolioSummaryCommandError(output, context)];
888
- }
889
- contents = map({
890
- $metadata: deserializeMetadata(output),
891
- });
892
- _a = __expectNonNull;
893
- _b = __expectObject;
894
- return [4, parseBody(output.body, context)];
895
- case 1:
896
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
897
- if (data.assessmentSummary != null) {
898
- contents.assessmentSummary = deserializeAws_restJson1AssessmentSummary(data.assessmentSummary, context);
899
- }
900
- return [2, contents];
901
- }
902
- });
903
- }); };
904
- var deserializeAws_restJson1GetPortfolioSummaryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
905
- var parsedOutput, _a, errorCode, _b, parsedBody;
906
- var _c;
907
- return __generator(this, function (_d) {
908
- switch (_d.label) {
909
- case 0:
910
- _a = [__assign({}, output)];
911
- _c = {};
912
- return [4, parseErrorBody(output.body, context)];
913
- case 1:
914
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
915
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
916
- _b = errorCode;
917
- switch (_b) {
918
- case "AccessDeniedException": return [3, 2];
919
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
920
- case "InternalServerException": return [3, 4];
921
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
922
- case "ThrottlingException": return [3, 6];
923
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
924
- }
925
- return [3, 8];
926
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
927
- case 3: throw _d.sent();
928
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
929
- case 5: throw _d.sent();
930
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
931
- case 7: throw _d.sent();
932
- case 8:
933
- parsedBody = parsedOutput.body;
934
- throwDefaultError({
935
- output: output,
936
- parsedBody: parsedBody,
937
- exceptionCtor: __BaseException,
938
- errorCode: errorCode,
939
- });
940
- _d.label = 9;
941
- case 9: return [2];
942
- }
943
- });
944
- }); };
945
- export var deserializeAws_restJson1GetRecommendationReportDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
946
- var contents, data, _a, _b;
947
- return __generator(this, function (_c) {
948
- switch (_c.label) {
949
- case 0:
950
- if (output.statusCode !== 200 && output.statusCode >= 300) {
951
- return [2, deserializeAws_restJson1GetRecommendationReportDetailsCommandError(output, context)];
952
- }
953
- contents = map({
954
- $metadata: deserializeMetadata(output),
955
- });
956
- _a = __expectNonNull;
957
- _b = __expectObject;
958
- return [4, parseBody(output.body, context)];
959
- case 1:
960
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
961
- if (data.id != null) {
962
- contents.id = __expectString(data.id);
963
- }
964
- if (data.recommendationReportDetails != null) {
965
- contents.recommendationReportDetails = deserializeAws_restJson1RecommendationReportDetails(data.recommendationReportDetails, context);
966
- }
967
- return [2, contents];
968
- }
969
- });
970
- }); };
971
- var deserializeAws_restJson1GetRecommendationReportDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
972
- var parsedOutput, _a, errorCode, _b, parsedBody;
973
- var _c;
974
- return __generator(this, function (_d) {
975
- switch (_d.label) {
976
- case 0:
977
- _a = [__assign({}, output)];
978
- _c = {};
979
- return [4, parseErrorBody(output.body, context)];
980
- case 1:
981
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
982
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
983
- _b = errorCode;
984
- switch (_b) {
985
- case "AccessDeniedException": return [3, 2];
986
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
987
- case "InternalServerException": return [3, 4];
988
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
989
- case "ResourceNotFoundException": return [3, 6];
990
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 6];
991
- case "ThrottlingException": return [3, 8];
992
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
993
- case "ValidationException": return [3, 10];
994
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
995
- }
996
- return [3, 12];
997
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
998
- case 3: throw _d.sent();
999
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1000
- case 5: throw _d.sent();
1001
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1002
- case 7: throw _d.sent();
1003
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1004
- case 9: throw _d.sent();
1005
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1006
- case 11: throw _d.sent();
1007
- case 12:
1008
- parsedBody = parsedOutput.body;
1009
- throwDefaultError({
1010
- output: output,
1011
- parsedBody: parsedBody,
1012
- exceptionCtor: __BaseException,
1013
- errorCode: errorCode,
1014
- });
1015
- _d.label = 13;
1016
- case 13: return [2];
1017
- }
5
+ export const serializeAws_restJson1GetApplicationComponentDetailsCommand = async (input, context) => {
6
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const headers = {};
8
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
9
+ "/get-applicationcomponent-details/{applicationComponentId}";
10
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
11
+ let body;
12
+ return new __HttpRequest({
13
+ protocol,
14
+ hostname,
15
+ port,
16
+ method: "GET",
17
+ headers,
18
+ path: resolvedPath,
19
+ body,
20
+ });
21
+ };
22
+ export const serializeAws_restJson1GetApplicationComponentStrategiesCommand = async (input, context) => {
23
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const headers = {};
25
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
26
+ "/get-applicationcomponent-strategies/{applicationComponentId}";
27
+ resolvedPath = __resolvedPath(resolvedPath, input, "applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
28
+ let body;
29
+ return new __HttpRequest({
30
+ protocol,
31
+ hostname,
32
+ port,
33
+ method: "GET",
34
+ headers,
35
+ path: resolvedPath,
36
+ body,
37
+ });
38
+ };
39
+ export const serializeAws_restJson1GetAssessmentCommand = async (input, context) => {
40
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
41
+ const headers = {};
42
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-assessment/{id}";
43
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
44
+ let body;
45
+ return new __HttpRequest({
46
+ protocol,
47
+ hostname,
48
+ port,
49
+ method: "GET",
50
+ headers,
51
+ path: resolvedPath,
52
+ body,
53
+ });
54
+ };
55
+ export const serializeAws_restJson1GetImportFileTaskCommand = async (input, context) => {
56
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const headers = {};
58
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-import-file-task/{id}";
59
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
60
+ let body;
61
+ return new __HttpRequest({
62
+ protocol,
63
+ hostname,
64
+ port,
65
+ method: "GET",
66
+ headers,
67
+ path: resolvedPath,
68
+ body,
69
+ });
70
+ };
71
+ export const serializeAws_restJson1GetPortfolioPreferencesCommand = async (input, context) => {
72
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const headers = {
74
+ "content-type": "application/json",
75
+ };
76
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-portfolio-preferences";
77
+ let body;
78
+ body = "";
79
+ return new __HttpRequest({
80
+ protocol,
81
+ hostname,
82
+ port,
83
+ method: "GET",
84
+ headers,
85
+ path: resolvedPath,
86
+ body,
87
+ });
88
+ };
89
+ export const serializeAws_restJson1GetPortfolioSummaryCommand = async (input, context) => {
90
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const headers = {
92
+ "content-type": "application/json",
93
+ };
94
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-portfolio-summary";
95
+ let body;
96
+ body = "";
97
+ return new __HttpRequest({
98
+ protocol,
99
+ hostname,
100
+ port,
101
+ method: "GET",
102
+ headers,
103
+ path: resolvedPath,
104
+ body,
105
+ });
106
+ };
107
+ export const serializeAws_restJson1GetRecommendationReportDetailsCommand = async (input, context) => {
108
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const headers = {};
110
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-recommendation-report-details/{id}";
111
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
112
+ let body;
113
+ return new __HttpRequest({
114
+ protocol,
115
+ hostname,
116
+ port,
117
+ method: "GET",
118
+ headers,
119
+ path: resolvedPath,
120
+ body,
121
+ });
122
+ };
123
+ export const serializeAws_restJson1GetServerDetailsCommand = async (input, context) => {
124
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const headers = {};
126
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-details/{serverId}";
127
+ resolvedPath = __resolvedPath(resolvedPath, input, "serverId", () => input.serverId, "{serverId}", false);
128
+ const query = map({
129
+ nextToken: [, input.nextToken],
130
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
131
+ });
132
+ let body;
133
+ return new __HttpRequest({
134
+ protocol,
135
+ hostname,
136
+ port,
137
+ method: "GET",
138
+ headers,
139
+ path: resolvedPath,
140
+ query,
141
+ body,
142
+ });
143
+ };
144
+ export const serializeAws_restJson1GetServerStrategiesCommand = async (input, context) => {
145
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const headers = {};
147
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-strategies/{serverId}";
148
+ resolvedPath = __resolvedPath(resolvedPath, input, "serverId", () => input.serverId, "{serverId}", false);
149
+ let body;
150
+ return new __HttpRequest({
151
+ protocol,
152
+ hostname,
153
+ port,
154
+ method: "GET",
155
+ headers,
156
+ path: resolvedPath,
157
+ body,
158
+ });
159
+ };
160
+ export const serializeAws_restJson1ListApplicationComponentsCommand = async (input, context) => {
161
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const headers = {
163
+ "content-type": "application/json",
164
+ };
165
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applicationcomponents";
166
+ let body;
167
+ body = JSON.stringify({
168
+ ...(input.applicationComponentCriteria != null && {
169
+ applicationComponentCriteria: input.applicationComponentCriteria,
170
+ }),
171
+ ...(input.filterValue != null && { filterValue: input.filterValue }),
172
+ ...(input.groupIdFilter != null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) }),
173
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
174
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
175
+ ...(input.sort != null && { sort: input.sort }),
176
+ });
177
+ return new __HttpRequest({
178
+ protocol,
179
+ hostname,
180
+ port,
181
+ method: "POST",
182
+ headers,
183
+ path: resolvedPath,
184
+ body,
185
+ });
186
+ };
187
+ export const serializeAws_restJson1ListCollectorsCommand = async (input, context) => {
188
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const headers = {};
190
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-collectors";
191
+ const query = map({
192
+ nextToken: [, input.nextToken],
193
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
194
+ });
195
+ let body;
196
+ return new __HttpRequest({
197
+ protocol,
198
+ hostname,
199
+ port,
200
+ method: "GET",
201
+ headers,
202
+ path: resolvedPath,
203
+ query,
204
+ body,
205
+ });
206
+ };
207
+ export const serializeAws_restJson1ListImportFileTaskCommand = async (input, context) => {
208
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
209
+ const headers = {};
210
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-import-file-task";
211
+ const query = map({
212
+ nextToken: [, input.nextToken],
213
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
214
+ });
215
+ let body;
216
+ return new __HttpRequest({
217
+ protocol,
218
+ hostname,
219
+ port,
220
+ method: "GET",
221
+ headers,
222
+ path: resolvedPath,
223
+ query,
224
+ body,
225
+ });
226
+ };
227
+ export const serializeAws_restJson1ListServersCommand = async (input, context) => {
228
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
229
+ const headers = {
230
+ "content-type": "application/json",
231
+ };
232
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-servers";
233
+ let body;
234
+ body = JSON.stringify({
235
+ ...(input.filterValue != null && { filterValue: input.filterValue }),
236
+ ...(input.groupIdFilter != null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) }),
237
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
238
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
239
+ ...(input.serverCriteria != null && { serverCriteria: input.serverCriteria }),
240
+ ...(input.sort != null && { sort: input.sort }),
241
+ });
242
+ return new __HttpRequest({
243
+ protocol,
244
+ hostname,
245
+ port,
246
+ method: "POST",
247
+ headers,
248
+ path: resolvedPath,
249
+ body,
250
+ });
251
+ };
252
+ export const serializeAws_restJson1PutPortfolioPreferencesCommand = async (input, context) => {
253
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
254
+ const headers = {
255
+ "content-type": "application/json",
256
+ };
257
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-portfolio-preferences";
258
+ let body;
259
+ body = JSON.stringify({
260
+ ...(input.applicationPreferences != null && {
261
+ applicationPreferences: serializeAws_restJson1ApplicationPreferences(input.applicationPreferences, context),
262
+ }),
263
+ ...(input.databasePreferences != null && {
264
+ databasePreferences: serializeAws_restJson1DatabasePreferences(input.databasePreferences, context),
265
+ }),
266
+ ...(input.prioritizeBusinessGoals != null && {
267
+ prioritizeBusinessGoals: serializeAws_restJson1PrioritizeBusinessGoals(input.prioritizeBusinessGoals, context),
268
+ }),
269
+ });
270
+ return new __HttpRequest({
271
+ protocol,
272
+ hostname,
273
+ port,
274
+ method: "POST",
275
+ headers,
276
+ path: resolvedPath,
277
+ body,
278
+ });
279
+ };
280
+ export const serializeAws_restJson1StartAssessmentCommand = async (input, context) => {
281
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
282
+ const headers = {
283
+ "content-type": "application/json",
284
+ };
285
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-assessment";
286
+ let body;
287
+ body = JSON.stringify({
288
+ ...(input.s3bucketForAnalysisData != null && { s3bucketForAnalysisData: input.s3bucketForAnalysisData }),
289
+ ...(input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData }),
290
+ });
291
+ return new __HttpRequest({
292
+ protocol,
293
+ hostname,
294
+ port,
295
+ method: "POST",
296
+ headers,
297
+ path: resolvedPath,
298
+ body,
299
+ });
300
+ };
301
+ export const serializeAws_restJson1StartImportFileTaskCommand = async (input, context) => {
302
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
303
+ const headers = {
304
+ "content-type": "application/json",
305
+ };
306
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-import-file-task";
307
+ let body;
308
+ body = JSON.stringify({
309
+ ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
310
+ ...(input.dataSourceType != null && { dataSourceType: input.dataSourceType }),
311
+ ...(input.groupId != null && { groupId: serializeAws_restJson1GroupIds(input.groupId, context) }),
312
+ ...(input.name != null && { name: input.name }),
313
+ ...(input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData }),
314
+ ...(input.s3key != null && { s3key: input.s3key }),
315
+ });
316
+ return new __HttpRequest({
317
+ protocol,
318
+ hostname,
319
+ port,
320
+ method: "POST",
321
+ headers,
322
+ path: resolvedPath,
323
+ body,
324
+ });
325
+ };
326
+ export const serializeAws_restJson1StartRecommendationReportGenerationCommand = async (input, context) => {
327
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
328
+ const headers = {
329
+ "content-type": "application/json",
330
+ };
331
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-recommendation-report-generation";
332
+ let body;
333
+ body = JSON.stringify({
334
+ ...(input.groupIdFilter != null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) }),
335
+ ...(input.outputFormat != null && { outputFormat: input.outputFormat }),
336
+ });
337
+ return new __HttpRequest({
338
+ protocol,
339
+ hostname,
340
+ port,
341
+ method: "POST",
342
+ headers,
343
+ path: resolvedPath,
344
+ body,
345
+ });
346
+ };
347
+ export const serializeAws_restJson1StopAssessmentCommand = async (input, context) => {
348
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
349
+ const headers = {
350
+ "content-type": "application/json",
351
+ };
352
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stop-assessment";
353
+ let body;
354
+ body = JSON.stringify({
355
+ ...(input.assessmentId != null && { assessmentId: input.assessmentId }),
356
+ });
357
+ return new __HttpRequest({
358
+ protocol,
359
+ hostname,
360
+ port,
361
+ method: "POST",
362
+ headers,
363
+ path: resolvedPath,
364
+ body,
365
+ });
366
+ };
367
+ export const serializeAws_restJson1UpdateApplicationComponentConfigCommand = async (input, context) => {
368
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
369
+ const headers = {
370
+ "content-type": "application/json",
371
+ };
372
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-applicationcomponent-config";
373
+ let body;
374
+ body = JSON.stringify({
375
+ ...(input.applicationComponentId != null && { applicationComponentId: input.applicationComponentId }),
376
+ ...(input.inclusionStatus != null && { inclusionStatus: input.inclusionStatus }),
377
+ ...(input.secretsManagerKey != null && { secretsManagerKey: input.secretsManagerKey }),
378
+ ...(input.sourceCodeList != null && {
379
+ sourceCodeList: serializeAws_restJson1SourceCodeList(input.sourceCodeList, context),
380
+ }),
381
+ ...(input.strategyOption != null && {
382
+ strategyOption: serializeAws_restJson1StrategyOption(input.strategyOption, context),
383
+ }),
384
+ });
385
+ return new __HttpRequest({
386
+ protocol,
387
+ hostname,
388
+ port,
389
+ method: "POST",
390
+ headers,
391
+ path: resolvedPath,
392
+ body,
393
+ });
394
+ };
395
+ export const serializeAws_restJson1UpdateServerConfigCommand = async (input, context) => {
396
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
397
+ const headers = {
398
+ "content-type": "application/json",
399
+ };
400
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-server-config";
401
+ let body;
402
+ body = JSON.stringify({
403
+ ...(input.serverId != null && { serverId: input.serverId }),
404
+ ...(input.strategyOption != null && {
405
+ strategyOption: serializeAws_restJson1StrategyOption(input.strategyOption, context),
406
+ }),
407
+ });
408
+ return new __HttpRequest({
409
+ protocol,
410
+ hostname,
411
+ port,
412
+ method: "POST",
413
+ headers,
414
+ path: resolvedPath,
415
+ body,
416
+ });
417
+ };
418
+ export const deserializeAws_restJson1GetApplicationComponentDetailsCommand = async (output, context) => {
419
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
420
+ return deserializeAws_restJson1GetApplicationComponentDetailsCommandError(output, context);
421
+ }
422
+ const contents = map({
423
+ $metadata: deserializeMetadata(output),
1018
424
  });
1019
- }); };
1020
- export var deserializeAws_restJson1GetServerDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1021
- var contents, data, _a, _b;
1022
- return __generator(this, function (_c) {
1023
- switch (_c.label) {
1024
- case 0:
1025
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1026
- return [2, deserializeAws_restJson1GetServerDetailsCommandError(output, context)];
1027
- }
1028
- contents = map({
1029
- $metadata: deserializeMetadata(output),
1030
- });
1031
- _a = __expectNonNull;
1032
- _b = __expectObject;
1033
- return [4, parseBody(output.body, context)];
1034
- case 1:
1035
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1036
- if (data.associatedApplications != null) {
1037
- contents.associatedApplications = deserializeAws_restJson1AssociatedApplications(data.associatedApplications, context);
1038
- }
1039
- if (data.nextToken != null) {
1040
- contents.nextToken = __expectString(data.nextToken);
1041
- }
1042
- if (data.serverDetail != null) {
1043
- contents.serverDetail = deserializeAws_restJson1ServerDetail(data.serverDetail, context);
1044
- }
1045
- return [2, contents];
1046
- }
425
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
426
+ if (data.applicationComponentDetail != null) {
427
+ contents.applicationComponentDetail = deserializeAws_restJson1ApplicationComponentDetail(data.applicationComponentDetail, context);
428
+ }
429
+ if (data.associatedApplications != null) {
430
+ contents.associatedApplications = deserializeAws_restJson1AssociatedApplications(data.associatedApplications, context);
431
+ }
432
+ if (data.associatedServerIds != null) {
433
+ contents.associatedServerIds = deserializeAws_restJson1AssociatedServerIDs(data.associatedServerIds, context);
434
+ }
435
+ if (data.moreApplicationResource != null) {
436
+ contents.moreApplicationResource = __expectBoolean(data.moreApplicationResource);
437
+ }
438
+ return contents;
439
+ };
440
+ const deserializeAws_restJson1GetApplicationComponentDetailsCommandError = async (output, context) => {
441
+ const parsedOutput = {
442
+ ...output,
443
+ body: await parseErrorBody(output.body, context),
444
+ };
445
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
446
+ switch (errorCode) {
447
+ case "InternalServerException":
448
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
449
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
450
+ case "ResourceNotFoundException":
451
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
452
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
453
+ case "ThrottlingException":
454
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
455
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
456
+ default:
457
+ const parsedBody = parsedOutput.body;
458
+ throwDefaultError({
459
+ output,
460
+ parsedBody,
461
+ exceptionCtor: __BaseException,
462
+ errorCode,
463
+ });
464
+ }
465
+ };
466
+ export const deserializeAws_restJson1GetApplicationComponentStrategiesCommand = async (output, context) => {
467
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
468
+ return deserializeAws_restJson1GetApplicationComponentStrategiesCommandError(output, context);
469
+ }
470
+ const contents = map({
471
+ $metadata: deserializeMetadata(output),
1047
472
  });
1048
- }); };
1049
- var deserializeAws_restJson1GetServerDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1050
- var parsedOutput, _a, errorCode, _b, parsedBody;
1051
- var _c;
1052
- return __generator(this, function (_d) {
1053
- switch (_d.label) {
1054
- case 0:
1055
- _a = [__assign({}, output)];
1056
- _c = {};
1057
- return [4, parseErrorBody(output.body, context)];
1058
- case 1:
1059
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1060
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
- _b = errorCode;
1062
- switch (_b) {
1063
- case "AccessDeniedException": return [3, 2];
1064
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1065
- case "InternalServerException": return [3, 4];
1066
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1067
- case "ResourceNotFoundException": return [3, 6];
1068
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 6];
1069
- case "ThrottlingException": return [3, 8];
1070
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
1071
- case "ValidationException": return [3, 10];
1072
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
1073
- }
1074
- return [3, 12];
1075
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1076
- case 3: throw _d.sent();
1077
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1078
- case 5: throw _d.sent();
1079
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1080
- case 7: throw _d.sent();
1081
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1082
- case 9: throw _d.sent();
1083
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1084
- case 11: throw _d.sent();
1085
- case 12:
1086
- parsedBody = parsedOutput.body;
1087
- throwDefaultError({
1088
- output: output,
1089
- parsedBody: parsedBody,
1090
- exceptionCtor: __BaseException,
1091
- errorCode: errorCode,
1092
- });
1093
- _d.label = 13;
1094
- case 13: return [2];
1095
- }
473
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
474
+ if (data.applicationComponentStrategies != null) {
475
+ contents.applicationComponentStrategies = deserializeAws_restJson1ApplicationComponentStrategies(data.applicationComponentStrategies, context);
476
+ }
477
+ return contents;
478
+ };
479
+ const deserializeAws_restJson1GetApplicationComponentStrategiesCommandError = async (output, context) => {
480
+ const parsedOutput = {
481
+ ...output,
482
+ body: await parseErrorBody(output.body, context),
483
+ };
484
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
485
+ switch (errorCode) {
486
+ case "InternalServerException":
487
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
488
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
489
+ case "ResourceNotFoundException":
490
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
491
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
492
+ case "ThrottlingException":
493
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
494
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
495
+ default:
496
+ const parsedBody = parsedOutput.body;
497
+ throwDefaultError({
498
+ output,
499
+ parsedBody,
500
+ exceptionCtor: __BaseException,
501
+ errorCode,
502
+ });
503
+ }
504
+ };
505
+ export const deserializeAws_restJson1GetAssessmentCommand = async (output, context) => {
506
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
507
+ return deserializeAws_restJson1GetAssessmentCommandError(output, context);
508
+ }
509
+ const contents = map({
510
+ $metadata: deserializeMetadata(output),
1096
511
  });
1097
- }); };
1098
- export var deserializeAws_restJson1GetServerStrategiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1099
- var contents, data, _a, _b;
1100
- return __generator(this, function (_c) {
1101
- switch (_c.label) {
1102
- case 0:
1103
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1104
- return [2, deserializeAws_restJson1GetServerStrategiesCommandError(output, context)];
1105
- }
1106
- contents = map({
1107
- $metadata: deserializeMetadata(output),
1108
- });
1109
- _a = __expectNonNull;
1110
- _b = __expectObject;
1111
- return [4, parseBody(output.body, context)];
1112
- case 1:
1113
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1114
- if (data.serverStrategies != null) {
1115
- contents.serverStrategies = deserializeAws_restJson1ServerStrategies(data.serverStrategies, context);
1116
- }
1117
- return [2, contents];
1118
- }
512
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
513
+ if (data.dataCollectionDetails != null) {
514
+ contents.dataCollectionDetails = deserializeAws_restJson1DataCollectionDetails(data.dataCollectionDetails, context);
515
+ }
516
+ if (data.id != null) {
517
+ contents.id = __expectString(data.id);
518
+ }
519
+ return contents;
520
+ };
521
+ const deserializeAws_restJson1GetAssessmentCommandError = async (output, context) => {
522
+ const parsedOutput = {
523
+ ...output,
524
+ body: await parseErrorBody(output.body, context),
525
+ };
526
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
527
+ switch (errorCode) {
528
+ case "AccessDeniedException":
529
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
530
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
531
+ case "InternalServerException":
532
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
533
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
534
+ case "ResourceNotFoundException":
535
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
536
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
537
+ case "ThrottlingException":
538
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
539
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
540
+ default:
541
+ const parsedBody = parsedOutput.body;
542
+ throwDefaultError({
543
+ output,
544
+ parsedBody,
545
+ exceptionCtor: __BaseException,
546
+ errorCode,
547
+ });
548
+ }
549
+ };
550
+ export const deserializeAws_restJson1GetImportFileTaskCommand = async (output, context) => {
551
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
552
+ return deserializeAws_restJson1GetImportFileTaskCommandError(output, context);
553
+ }
554
+ const contents = map({
555
+ $metadata: deserializeMetadata(output),
1119
556
  });
1120
- }); };
1121
- var deserializeAws_restJson1GetServerStrategiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1122
- var parsedOutput, _a, errorCode, _b, parsedBody;
1123
- var _c;
1124
- return __generator(this, function (_d) {
1125
- switch (_d.label) {
1126
- case 0:
1127
- _a = [__assign({}, output)];
1128
- _c = {};
1129
- return [4, parseErrorBody(output.body, context)];
1130
- case 1:
1131
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1132
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1133
- _b = errorCode;
1134
- switch (_b) {
1135
- case "AccessDeniedException": return [3, 2];
1136
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1137
- case "InternalServerException": return [3, 4];
1138
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1139
- case "ResourceNotFoundException": return [3, 6];
1140
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 6];
1141
- case "ThrottlingException": return [3, 8];
1142
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
1143
- case "ValidationException": return [3, 10];
1144
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
1145
- }
1146
- return [3, 12];
1147
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1148
- case 3: throw _d.sent();
1149
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1150
- case 5: throw _d.sent();
1151
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1152
- case 7: throw _d.sent();
1153
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1154
- case 9: throw _d.sent();
1155
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1156
- case 11: throw _d.sent();
1157
- case 12:
1158
- parsedBody = parsedOutput.body;
1159
- throwDefaultError({
1160
- output: output,
1161
- parsedBody: parsedBody,
1162
- exceptionCtor: __BaseException,
1163
- errorCode: errorCode,
1164
- });
1165
- _d.label = 13;
1166
- case 13: return [2];
1167
- }
557
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
558
+ if (data.completionTime != null) {
559
+ contents.completionTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completionTime)));
560
+ }
561
+ if (data.id != null) {
562
+ contents.id = __expectString(data.id);
563
+ }
564
+ if (data.importName != null) {
565
+ contents.importName = __expectString(data.importName);
566
+ }
567
+ if (data.inputS3Bucket != null) {
568
+ contents.inputS3Bucket = __expectString(data.inputS3Bucket);
569
+ }
570
+ if (data.inputS3Key != null) {
571
+ contents.inputS3Key = __expectString(data.inputS3Key);
572
+ }
573
+ if (data.numberOfRecordsFailed != null) {
574
+ contents.numberOfRecordsFailed = __expectInt32(data.numberOfRecordsFailed);
575
+ }
576
+ if (data.numberOfRecordsSuccess != null) {
577
+ contents.numberOfRecordsSuccess = __expectInt32(data.numberOfRecordsSuccess);
578
+ }
579
+ if (data.startTime != null) {
580
+ contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
581
+ }
582
+ if (data.status != null) {
583
+ contents.status = __expectString(data.status);
584
+ }
585
+ if (data.statusReportS3Bucket != null) {
586
+ contents.statusReportS3Bucket = __expectString(data.statusReportS3Bucket);
587
+ }
588
+ if (data.statusReportS3Key != null) {
589
+ contents.statusReportS3Key = __expectString(data.statusReportS3Key);
590
+ }
591
+ return contents;
592
+ };
593
+ const deserializeAws_restJson1GetImportFileTaskCommandError = async (output, context) => {
594
+ const parsedOutput = {
595
+ ...output,
596
+ body: await parseErrorBody(output.body, context),
597
+ };
598
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
599
+ switch (errorCode) {
600
+ case "AccessDeniedException":
601
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
602
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
603
+ case "InternalServerException":
604
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
605
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
606
+ case "ResourceNotFoundException":
607
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
608
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
609
+ case "ThrottlingException":
610
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
611
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
612
+ case "ValidationException":
613
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
614
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
615
+ default:
616
+ const parsedBody = parsedOutput.body;
617
+ throwDefaultError({
618
+ output,
619
+ parsedBody,
620
+ exceptionCtor: __BaseException,
621
+ errorCode,
622
+ });
623
+ }
624
+ };
625
+ export const deserializeAws_restJson1GetPortfolioPreferencesCommand = async (output, context) => {
626
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
627
+ return deserializeAws_restJson1GetPortfolioPreferencesCommandError(output, context);
628
+ }
629
+ const contents = map({
630
+ $metadata: deserializeMetadata(output),
1168
631
  });
1169
- }); };
1170
- export var deserializeAws_restJson1ListApplicationComponentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1171
- var contents, data, _a, _b;
1172
- return __generator(this, function (_c) {
1173
- switch (_c.label) {
1174
- case 0:
1175
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1176
- return [2, deserializeAws_restJson1ListApplicationComponentsCommandError(output, context)];
1177
- }
1178
- contents = map({
1179
- $metadata: deserializeMetadata(output),
1180
- });
1181
- _a = __expectNonNull;
1182
- _b = __expectObject;
1183
- return [4, parseBody(output.body, context)];
1184
- case 1:
1185
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1186
- if (data.applicationComponentInfos != null) {
1187
- contents.applicationComponentInfos = deserializeAws_restJson1ApplicationComponentDetails(data.applicationComponentInfos, context);
1188
- }
1189
- if (data.nextToken != null) {
1190
- contents.nextToken = __expectString(data.nextToken);
1191
- }
1192
- return [2, contents];
1193
- }
632
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
633
+ if (data.applicationPreferences != null) {
634
+ contents.applicationPreferences = deserializeAws_restJson1ApplicationPreferences(data.applicationPreferences, context);
635
+ }
636
+ if (data.databasePreferences != null) {
637
+ contents.databasePreferences = deserializeAws_restJson1DatabasePreferences(data.databasePreferences, context);
638
+ }
639
+ if (data.prioritizeBusinessGoals != null) {
640
+ contents.prioritizeBusinessGoals = deserializeAws_restJson1PrioritizeBusinessGoals(data.prioritizeBusinessGoals, context);
641
+ }
642
+ return contents;
643
+ };
644
+ const deserializeAws_restJson1GetPortfolioPreferencesCommandError = async (output, context) => {
645
+ const parsedOutput = {
646
+ ...output,
647
+ body: await parseErrorBody(output.body, context),
648
+ };
649
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
650
+ switch (errorCode) {
651
+ case "AccessDeniedException":
652
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
653
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
654
+ case "InternalServerException":
655
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
656
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
657
+ case "ResourceNotFoundException":
658
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
659
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
660
+ case "ThrottlingException":
661
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
662
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
663
+ default:
664
+ const parsedBody = parsedOutput.body;
665
+ throwDefaultError({
666
+ output,
667
+ parsedBody,
668
+ exceptionCtor: __BaseException,
669
+ errorCode,
670
+ });
671
+ }
672
+ };
673
+ export const deserializeAws_restJson1GetPortfolioSummaryCommand = async (output, context) => {
674
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
675
+ return deserializeAws_restJson1GetPortfolioSummaryCommandError(output, context);
676
+ }
677
+ const contents = map({
678
+ $metadata: deserializeMetadata(output),
1194
679
  });
1195
- }); };
1196
- var deserializeAws_restJson1ListApplicationComponentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1197
- var parsedOutput, _a, errorCode, _b, parsedBody;
1198
- var _c;
1199
- return __generator(this, function (_d) {
1200
- switch (_d.label) {
1201
- case 0:
1202
- _a = [__assign({}, output)];
1203
- _c = {};
1204
- return [4, parseErrorBody(output.body, context)];
1205
- case 1:
1206
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1207
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1208
- _b = errorCode;
1209
- switch (_b) {
1210
- case "AccessDeniedException": return [3, 2];
1211
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1212
- case "InternalServerException": return [3, 4];
1213
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1214
- case "ServiceLinkedRoleLockClientException": return [3, 6];
1215
- case "com.amazonaws.migrationhubstrategy#ServiceLinkedRoleLockClientException": return [3, 6];
1216
- case "ValidationException": return [3, 8];
1217
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1218
- }
1219
- return [3, 10];
1220
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1221
- case 3: throw _d.sent();
1222
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1223
- case 5: throw _d.sent();
1224
- case 6: return [4, deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse(parsedOutput, context)];
1225
- case 7: throw _d.sent();
1226
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1227
- case 9: throw _d.sent();
1228
- case 10:
1229
- parsedBody = parsedOutput.body;
1230
- throwDefaultError({
1231
- output: output,
1232
- parsedBody: parsedBody,
1233
- exceptionCtor: __BaseException,
1234
- errorCode: errorCode,
1235
- });
1236
- _d.label = 11;
1237
- case 11: return [2];
1238
- }
680
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
681
+ if (data.assessmentSummary != null) {
682
+ contents.assessmentSummary = deserializeAws_restJson1AssessmentSummary(data.assessmentSummary, context);
683
+ }
684
+ return contents;
685
+ };
686
+ const deserializeAws_restJson1GetPortfolioSummaryCommandError = async (output, context) => {
687
+ const parsedOutput = {
688
+ ...output,
689
+ body: await parseErrorBody(output.body, context),
690
+ };
691
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
692
+ switch (errorCode) {
693
+ case "AccessDeniedException":
694
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
695
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
696
+ case "InternalServerException":
697
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
698
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
699
+ case "ThrottlingException":
700
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
701
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
702
+ default:
703
+ const parsedBody = parsedOutput.body;
704
+ throwDefaultError({
705
+ output,
706
+ parsedBody,
707
+ exceptionCtor: __BaseException,
708
+ errorCode,
709
+ });
710
+ }
711
+ };
712
+ export const deserializeAws_restJson1GetRecommendationReportDetailsCommand = async (output, context) => {
713
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
714
+ return deserializeAws_restJson1GetRecommendationReportDetailsCommandError(output, context);
715
+ }
716
+ const contents = map({
717
+ $metadata: deserializeMetadata(output),
1239
718
  });
1240
- }); };
1241
- export var deserializeAws_restJson1ListCollectorsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1242
- var contents, data, _a, _b;
1243
- return __generator(this, function (_c) {
1244
- switch (_c.label) {
1245
- case 0:
1246
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1247
- return [2, deserializeAws_restJson1ListCollectorsCommandError(output, context)];
1248
- }
1249
- contents = map({
1250
- $metadata: deserializeMetadata(output),
1251
- });
1252
- _a = __expectNonNull;
1253
- _b = __expectObject;
1254
- return [4, parseBody(output.body, context)];
1255
- case 1:
1256
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1257
- if (data.Collectors != null) {
1258
- contents.Collectors = deserializeAws_restJson1Collectors(data.Collectors, context);
1259
- }
1260
- if (data.nextToken != null) {
1261
- contents.nextToken = __expectString(data.nextToken);
1262
- }
1263
- return [2, contents];
1264
- }
719
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
720
+ if (data.id != null) {
721
+ contents.id = __expectString(data.id);
722
+ }
723
+ if (data.recommendationReportDetails != null) {
724
+ contents.recommendationReportDetails = deserializeAws_restJson1RecommendationReportDetails(data.recommendationReportDetails, context);
725
+ }
726
+ return contents;
727
+ };
728
+ const deserializeAws_restJson1GetRecommendationReportDetailsCommandError = async (output, context) => {
729
+ const parsedOutput = {
730
+ ...output,
731
+ body: await parseErrorBody(output.body, context),
732
+ };
733
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
734
+ switch (errorCode) {
735
+ case "AccessDeniedException":
736
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
737
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
738
+ case "InternalServerException":
739
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
740
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
741
+ case "ResourceNotFoundException":
742
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
743
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
744
+ case "ThrottlingException":
745
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
746
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
747
+ case "ValidationException":
748
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
749
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
750
+ default:
751
+ const parsedBody = parsedOutput.body;
752
+ throwDefaultError({
753
+ output,
754
+ parsedBody,
755
+ exceptionCtor: __BaseException,
756
+ errorCode,
757
+ });
758
+ }
759
+ };
760
+ export const deserializeAws_restJson1GetServerDetailsCommand = async (output, context) => {
761
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
762
+ return deserializeAws_restJson1GetServerDetailsCommandError(output, context);
763
+ }
764
+ const contents = map({
765
+ $metadata: deserializeMetadata(output),
1265
766
  });
1266
- }); };
1267
- var deserializeAws_restJson1ListCollectorsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1268
- var parsedOutput, _a, errorCode, _b, parsedBody;
1269
- var _c;
1270
- return __generator(this, function (_d) {
1271
- switch (_d.label) {
1272
- case 0:
1273
- _a = [__assign({}, output)];
1274
- _c = {};
1275
- return [4, parseErrorBody(output.body, context)];
1276
- case 1:
1277
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1278
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1279
- _b = errorCode;
1280
- switch (_b) {
1281
- case "AccessDeniedException": return [3, 2];
1282
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1283
- case "InternalServerException": return [3, 4];
1284
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1285
- case "ThrottlingException": return [3, 6];
1286
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
1287
- case "ValidationException": return [3, 8];
1288
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1289
- }
1290
- return [3, 10];
1291
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1292
- case 3: throw _d.sent();
1293
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1294
- case 5: throw _d.sent();
1295
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1296
- case 7: throw _d.sent();
1297
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1298
- case 9: throw _d.sent();
1299
- case 10:
1300
- parsedBody = parsedOutput.body;
1301
- throwDefaultError({
1302
- output: output,
1303
- parsedBody: parsedBody,
1304
- exceptionCtor: __BaseException,
1305
- errorCode: errorCode,
1306
- });
1307
- _d.label = 11;
1308
- case 11: return [2];
1309
- }
767
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
768
+ if (data.associatedApplications != null) {
769
+ contents.associatedApplications = deserializeAws_restJson1AssociatedApplications(data.associatedApplications, context);
770
+ }
771
+ if (data.nextToken != null) {
772
+ contents.nextToken = __expectString(data.nextToken);
773
+ }
774
+ if (data.serverDetail != null) {
775
+ contents.serverDetail = deserializeAws_restJson1ServerDetail(data.serverDetail, context);
776
+ }
777
+ return contents;
778
+ };
779
+ const deserializeAws_restJson1GetServerDetailsCommandError = async (output, context) => {
780
+ const parsedOutput = {
781
+ ...output,
782
+ body: await parseErrorBody(output.body, context),
783
+ };
784
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
785
+ switch (errorCode) {
786
+ case "AccessDeniedException":
787
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
788
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
789
+ case "InternalServerException":
790
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
791
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
792
+ case "ResourceNotFoundException":
793
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
794
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
795
+ case "ThrottlingException":
796
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
797
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
798
+ case "ValidationException":
799
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
800
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
801
+ default:
802
+ const parsedBody = parsedOutput.body;
803
+ throwDefaultError({
804
+ output,
805
+ parsedBody,
806
+ exceptionCtor: __BaseException,
807
+ errorCode,
808
+ });
809
+ }
810
+ };
811
+ export const deserializeAws_restJson1GetServerStrategiesCommand = async (output, context) => {
812
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
813
+ return deserializeAws_restJson1GetServerStrategiesCommandError(output, context);
814
+ }
815
+ const contents = map({
816
+ $metadata: deserializeMetadata(output),
1310
817
  });
1311
- }); };
1312
- export var deserializeAws_restJson1ListImportFileTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1313
- var contents, data, _a, _b;
1314
- return __generator(this, function (_c) {
1315
- switch (_c.label) {
1316
- case 0:
1317
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1318
- return [2, deserializeAws_restJson1ListImportFileTaskCommandError(output, context)];
1319
- }
1320
- contents = map({
1321
- $metadata: deserializeMetadata(output),
1322
- });
1323
- _a = __expectNonNull;
1324
- _b = __expectObject;
1325
- return [4, parseBody(output.body, context)];
1326
- case 1:
1327
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1328
- if (data.nextToken != null) {
1329
- contents.nextToken = __expectString(data.nextToken);
1330
- }
1331
- if (data.taskInfos != null) {
1332
- contents.taskInfos = deserializeAws_restJson1ListImportFileTaskInformation(data.taskInfos, context);
1333
- }
1334
- return [2, contents];
1335
- }
818
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
819
+ if (data.serverStrategies != null) {
820
+ contents.serverStrategies = deserializeAws_restJson1ServerStrategies(data.serverStrategies, context);
821
+ }
822
+ return contents;
823
+ };
824
+ const deserializeAws_restJson1GetServerStrategiesCommandError = async (output, context) => {
825
+ const parsedOutput = {
826
+ ...output,
827
+ body: await parseErrorBody(output.body, context),
828
+ };
829
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
830
+ switch (errorCode) {
831
+ case "AccessDeniedException":
832
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
833
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
834
+ case "InternalServerException":
835
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
836
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
837
+ case "ResourceNotFoundException":
838
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
839
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
840
+ case "ThrottlingException":
841
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
842
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
843
+ case "ValidationException":
844
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
845
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
846
+ default:
847
+ const parsedBody = parsedOutput.body;
848
+ throwDefaultError({
849
+ output,
850
+ parsedBody,
851
+ exceptionCtor: __BaseException,
852
+ errorCode,
853
+ });
854
+ }
855
+ };
856
+ export const deserializeAws_restJson1ListApplicationComponentsCommand = async (output, context) => {
857
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
858
+ return deserializeAws_restJson1ListApplicationComponentsCommandError(output, context);
859
+ }
860
+ const contents = map({
861
+ $metadata: deserializeMetadata(output),
1336
862
  });
1337
- }); };
1338
- var deserializeAws_restJson1ListImportFileTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1339
- var parsedOutput, _a, errorCode, _b, parsedBody;
1340
- var _c;
1341
- return __generator(this, function (_d) {
1342
- switch (_d.label) {
1343
- case 0:
1344
- _a = [__assign({}, output)];
1345
- _c = {};
1346
- return [4, parseErrorBody(output.body, context)];
1347
- case 1:
1348
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1349
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1350
- _b = errorCode;
1351
- switch (_b) {
1352
- case "AccessDeniedException": return [3, 2];
1353
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1354
- case "InternalServerException": return [3, 4];
1355
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1356
- case "ThrottlingException": return [3, 6];
1357
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
1358
- case "ValidationException": return [3, 8];
1359
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1360
- }
1361
- return [3, 10];
1362
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1363
- case 3: throw _d.sent();
1364
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1365
- case 5: throw _d.sent();
1366
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1367
- case 7: throw _d.sent();
1368
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1369
- case 9: throw _d.sent();
1370
- case 10:
1371
- parsedBody = parsedOutput.body;
1372
- throwDefaultError({
1373
- output: output,
1374
- parsedBody: parsedBody,
1375
- exceptionCtor: __BaseException,
1376
- errorCode: errorCode,
1377
- });
1378
- _d.label = 11;
1379
- case 11: return [2];
1380
- }
863
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
864
+ if (data.applicationComponentInfos != null) {
865
+ contents.applicationComponentInfos = deserializeAws_restJson1ApplicationComponentDetails(data.applicationComponentInfos, context);
866
+ }
867
+ if (data.nextToken != null) {
868
+ contents.nextToken = __expectString(data.nextToken);
869
+ }
870
+ return contents;
871
+ };
872
+ const deserializeAws_restJson1ListApplicationComponentsCommandError = async (output, context) => {
873
+ const parsedOutput = {
874
+ ...output,
875
+ body: await parseErrorBody(output.body, context),
876
+ };
877
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
878
+ switch (errorCode) {
879
+ case "AccessDeniedException":
880
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
881
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
882
+ case "InternalServerException":
883
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
884
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
885
+ case "ServiceLinkedRoleLockClientException":
886
+ case "com.amazonaws.migrationhubstrategy#ServiceLinkedRoleLockClientException":
887
+ throw await deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse(parsedOutput, context);
888
+ case "ValidationException":
889
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
890
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
891
+ default:
892
+ const parsedBody = parsedOutput.body;
893
+ throwDefaultError({
894
+ output,
895
+ parsedBody,
896
+ exceptionCtor: __BaseException,
897
+ errorCode,
898
+ });
899
+ }
900
+ };
901
+ export const deserializeAws_restJson1ListCollectorsCommand = async (output, context) => {
902
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
903
+ return deserializeAws_restJson1ListCollectorsCommandError(output, context);
904
+ }
905
+ const contents = map({
906
+ $metadata: deserializeMetadata(output),
1381
907
  });
1382
- }); };
1383
- export var deserializeAws_restJson1ListServersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1384
- var contents, data, _a, _b;
1385
- return __generator(this, function (_c) {
1386
- switch (_c.label) {
1387
- case 0:
1388
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1389
- return [2, deserializeAws_restJson1ListServersCommandError(output, context)];
1390
- }
1391
- contents = map({
1392
- $metadata: deserializeMetadata(output),
1393
- });
1394
- _a = __expectNonNull;
1395
- _b = __expectObject;
1396
- return [4, parseBody(output.body, context)];
1397
- case 1:
1398
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1399
- if (data.nextToken != null) {
1400
- contents.nextToken = __expectString(data.nextToken);
1401
- }
1402
- if (data.serverInfos != null) {
1403
- contents.serverInfos = deserializeAws_restJson1ServerDetails(data.serverInfos, context);
1404
- }
1405
- return [2, contents];
1406
- }
908
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
909
+ if (data.Collectors != null) {
910
+ contents.Collectors = deserializeAws_restJson1Collectors(data.Collectors, context);
911
+ }
912
+ if (data.nextToken != null) {
913
+ contents.nextToken = __expectString(data.nextToken);
914
+ }
915
+ return contents;
916
+ };
917
+ const deserializeAws_restJson1ListCollectorsCommandError = async (output, context) => {
918
+ const parsedOutput = {
919
+ ...output,
920
+ body: await parseErrorBody(output.body, context),
921
+ };
922
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
923
+ switch (errorCode) {
924
+ case "AccessDeniedException":
925
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
926
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
927
+ case "InternalServerException":
928
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
929
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
930
+ case "ThrottlingException":
931
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
932
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
933
+ case "ValidationException":
934
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
935
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
936
+ default:
937
+ const parsedBody = parsedOutput.body;
938
+ throwDefaultError({
939
+ output,
940
+ parsedBody,
941
+ exceptionCtor: __BaseException,
942
+ errorCode,
943
+ });
944
+ }
945
+ };
946
+ export const deserializeAws_restJson1ListImportFileTaskCommand = async (output, context) => {
947
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
948
+ return deserializeAws_restJson1ListImportFileTaskCommandError(output, context);
949
+ }
950
+ const contents = map({
951
+ $metadata: deserializeMetadata(output),
1407
952
  });
1408
- }); };
1409
- var deserializeAws_restJson1ListServersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1410
- var parsedOutput, _a, errorCode, _b, parsedBody;
1411
- var _c;
1412
- return __generator(this, function (_d) {
1413
- switch (_d.label) {
1414
- case 0:
1415
- _a = [__assign({}, output)];
1416
- _c = {};
1417
- return [4, parseErrorBody(output.body, context)];
1418
- case 1:
1419
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1420
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1421
- _b = errorCode;
1422
- switch (_b) {
1423
- case "AccessDeniedException": return [3, 2];
1424
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1425
- case "InternalServerException": return [3, 4];
1426
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1427
- case "ThrottlingException": return [3, 6];
1428
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
1429
- case "ValidationException": return [3, 8];
1430
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1431
- }
1432
- return [3, 10];
1433
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1434
- case 3: throw _d.sent();
1435
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1436
- case 5: throw _d.sent();
1437
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1438
- case 7: throw _d.sent();
1439
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1440
- case 9: throw _d.sent();
1441
- case 10:
1442
- parsedBody = parsedOutput.body;
1443
- throwDefaultError({
1444
- output: output,
1445
- parsedBody: parsedBody,
1446
- exceptionCtor: __BaseException,
1447
- errorCode: errorCode,
1448
- });
1449
- _d.label = 11;
1450
- case 11: return [2];
1451
- }
953
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
954
+ if (data.nextToken != null) {
955
+ contents.nextToken = __expectString(data.nextToken);
956
+ }
957
+ if (data.taskInfos != null) {
958
+ contents.taskInfos = deserializeAws_restJson1ListImportFileTaskInformation(data.taskInfos, context);
959
+ }
960
+ return contents;
961
+ };
962
+ const deserializeAws_restJson1ListImportFileTaskCommandError = async (output, context) => {
963
+ const parsedOutput = {
964
+ ...output,
965
+ body: await parseErrorBody(output.body, context),
966
+ };
967
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
968
+ switch (errorCode) {
969
+ case "AccessDeniedException":
970
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
971
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
972
+ case "InternalServerException":
973
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
974
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
975
+ case "ThrottlingException":
976
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
977
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
978
+ case "ValidationException":
979
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
980
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
981
+ default:
982
+ const parsedBody = parsedOutput.body;
983
+ throwDefaultError({
984
+ output,
985
+ parsedBody,
986
+ exceptionCtor: __BaseException,
987
+ errorCode,
988
+ });
989
+ }
990
+ };
991
+ export const deserializeAws_restJson1ListServersCommand = async (output, context) => {
992
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
993
+ return deserializeAws_restJson1ListServersCommandError(output, context);
994
+ }
995
+ const contents = map({
996
+ $metadata: deserializeMetadata(output),
1452
997
  });
1453
- }); };
1454
- export var deserializeAws_restJson1PutPortfolioPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1455
- var contents;
1456
- return __generator(this, function (_a) {
1457
- switch (_a.label) {
1458
- case 0:
1459
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1460
- return [2, deserializeAws_restJson1PutPortfolioPreferencesCommandError(output, context)];
1461
- }
1462
- contents = map({
1463
- $metadata: deserializeMetadata(output),
1464
- });
1465
- return [4, collectBody(output.body, context)];
1466
- case 1:
1467
- _a.sent();
1468
- return [2, contents];
1469
- }
998
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
999
+ if (data.nextToken != null) {
1000
+ contents.nextToken = __expectString(data.nextToken);
1001
+ }
1002
+ if (data.serverInfos != null) {
1003
+ contents.serverInfos = deserializeAws_restJson1ServerDetails(data.serverInfos, context);
1004
+ }
1005
+ return contents;
1006
+ };
1007
+ const deserializeAws_restJson1ListServersCommandError = async (output, context) => {
1008
+ const parsedOutput = {
1009
+ ...output,
1010
+ body: await parseErrorBody(output.body, context),
1011
+ };
1012
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1013
+ switch (errorCode) {
1014
+ case "AccessDeniedException":
1015
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
1016
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1017
+ case "InternalServerException":
1018
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1019
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1020
+ case "ThrottlingException":
1021
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1022
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1023
+ case "ValidationException":
1024
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1025
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1026
+ default:
1027
+ const parsedBody = parsedOutput.body;
1028
+ throwDefaultError({
1029
+ output,
1030
+ parsedBody,
1031
+ exceptionCtor: __BaseException,
1032
+ errorCode,
1033
+ });
1034
+ }
1035
+ };
1036
+ export const deserializeAws_restJson1PutPortfolioPreferencesCommand = async (output, context) => {
1037
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1038
+ return deserializeAws_restJson1PutPortfolioPreferencesCommandError(output, context);
1039
+ }
1040
+ const contents = map({
1041
+ $metadata: deserializeMetadata(output),
1470
1042
  });
1471
- }); };
1472
- var deserializeAws_restJson1PutPortfolioPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1473
- var parsedOutput, _a, errorCode, _b, parsedBody;
1474
- var _c;
1475
- return __generator(this, function (_d) {
1476
- switch (_d.label) {
1477
- case 0:
1478
- _a = [__assign({}, output)];
1479
- _c = {};
1480
- return [4, parseErrorBody(output.body, context)];
1481
- case 1:
1482
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1483
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1484
- _b = errorCode;
1485
- switch (_b) {
1486
- case "AccessDeniedException": return [3, 2];
1487
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1488
- case "ConflictException": return [3, 4];
1489
- case "com.amazonaws.migrationhubstrategy#ConflictException": return [3, 4];
1490
- case "InternalServerException": return [3, 6];
1491
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 6];
1492
- case "ThrottlingException": return [3, 8];
1493
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
1494
- case "ValidationException": return [3, 10];
1495
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
1496
- }
1497
- return [3, 12];
1498
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1499
- case 3: throw _d.sent();
1500
- case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
1501
- case 5: throw _d.sent();
1502
- case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1503
- case 7: throw _d.sent();
1504
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1505
- case 9: throw _d.sent();
1506
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1507
- case 11: throw _d.sent();
1508
- case 12:
1509
- parsedBody = parsedOutput.body;
1510
- throwDefaultError({
1511
- output: output,
1512
- parsedBody: parsedBody,
1513
- exceptionCtor: __BaseException,
1514
- errorCode: errorCode,
1515
- });
1516
- _d.label = 13;
1517
- case 13: return [2];
1518
- }
1043
+ await collectBody(output.body, context);
1044
+ return contents;
1045
+ };
1046
+ const deserializeAws_restJson1PutPortfolioPreferencesCommandError = async (output, context) => {
1047
+ const parsedOutput = {
1048
+ ...output,
1049
+ body: await parseErrorBody(output.body, context),
1050
+ };
1051
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1052
+ switch (errorCode) {
1053
+ case "AccessDeniedException":
1054
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
1055
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1056
+ case "ConflictException":
1057
+ case "com.amazonaws.migrationhubstrategy#ConflictException":
1058
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1059
+ case "InternalServerException":
1060
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1061
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1062
+ case "ThrottlingException":
1063
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1064
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1065
+ case "ValidationException":
1066
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1067
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1068
+ default:
1069
+ const parsedBody = parsedOutput.body;
1070
+ throwDefaultError({
1071
+ output,
1072
+ parsedBody,
1073
+ exceptionCtor: __BaseException,
1074
+ errorCode,
1075
+ });
1076
+ }
1077
+ };
1078
+ export const deserializeAws_restJson1StartAssessmentCommand = async (output, context) => {
1079
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1080
+ return deserializeAws_restJson1StartAssessmentCommandError(output, context);
1081
+ }
1082
+ const contents = map({
1083
+ $metadata: deserializeMetadata(output),
1519
1084
  });
1520
- }); };
1521
- export var deserializeAws_restJson1StartAssessmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1522
- var contents, data, _a, _b;
1523
- return __generator(this, function (_c) {
1524
- switch (_c.label) {
1525
- case 0:
1526
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1527
- return [2, deserializeAws_restJson1StartAssessmentCommandError(output, context)];
1528
- }
1529
- contents = map({
1530
- $metadata: deserializeMetadata(output),
1531
- });
1532
- _a = __expectNonNull;
1533
- _b = __expectObject;
1534
- return [4, parseBody(output.body, context)];
1535
- case 1:
1536
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1537
- if (data.assessmentId != null) {
1538
- contents.assessmentId = __expectString(data.assessmentId);
1539
- }
1540
- return [2, contents];
1541
- }
1085
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1086
+ if (data.assessmentId != null) {
1087
+ contents.assessmentId = __expectString(data.assessmentId);
1088
+ }
1089
+ return contents;
1090
+ };
1091
+ const deserializeAws_restJson1StartAssessmentCommandError = async (output, context) => {
1092
+ const parsedOutput = {
1093
+ ...output,
1094
+ body: await parseErrorBody(output.body, context),
1095
+ };
1096
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1097
+ switch (errorCode) {
1098
+ case "AccessDeniedException":
1099
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
1100
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1101
+ case "InternalServerException":
1102
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1103
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1104
+ case "ServiceQuotaExceededException":
1105
+ case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException":
1106
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1107
+ case "ThrottlingException":
1108
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1109
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1110
+ default:
1111
+ const parsedBody = parsedOutput.body;
1112
+ throwDefaultError({
1113
+ output,
1114
+ parsedBody,
1115
+ exceptionCtor: __BaseException,
1116
+ errorCode,
1117
+ });
1118
+ }
1119
+ };
1120
+ export const deserializeAws_restJson1StartImportFileTaskCommand = async (output, context) => {
1121
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1122
+ return deserializeAws_restJson1StartImportFileTaskCommandError(output, context);
1123
+ }
1124
+ const contents = map({
1125
+ $metadata: deserializeMetadata(output),
1542
1126
  });
1543
- }); };
1544
- var deserializeAws_restJson1StartAssessmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1545
- var parsedOutput, _a, errorCode, _b, parsedBody;
1546
- var _c;
1547
- return __generator(this, function (_d) {
1548
- switch (_d.label) {
1549
- case 0:
1550
- _a = [__assign({}, output)];
1551
- _c = {};
1552
- return [4, parseErrorBody(output.body, context)];
1553
- case 1:
1554
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1555
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1556
- _b = errorCode;
1557
- switch (_b) {
1558
- case "AccessDeniedException": return [3, 2];
1559
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1560
- case "InternalServerException": return [3, 4];
1561
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1562
- case "ServiceQuotaExceededException": return [3, 6];
1563
- case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException": return [3, 6];
1564
- case "ThrottlingException": return [3, 8];
1565
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
1566
- }
1567
- return [3, 10];
1568
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1569
- case 3: throw _d.sent();
1570
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1571
- case 5: throw _d.sent();
1572
- case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1573
- case 7: throw _d.sent();
1574
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1575
- case 9: throw _d.sent();
1576
- case 10:
1577
- parsedBody = parsedOutput.body;
1578
- throwDefaultError({
1579
- output: output,
1580
- parsedBody: parsedBody,
1581
- exceptionCtor: __BaseException,
1582
- errorCode: errorCode,
1583
- });
1584
- _d.label = 11;
1585
- case 11: return [2];
1586
- }
1127
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1128
+ if (data.id != null) {
1129
+ contents.id = __expectString(data.id);
1130
+ }
1131
+ return contents;
1132
+ };
1133
+ const deserializeAws_restJson1StartImportFileTaskCommandError = async (output, context) => {
1134
+ const parsedOutput = {
1135
+ ...output,
1136
+ body: await parseErrorBody(output.body, context),
1137
+ };
1138
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1139
+ switch (errorCode) {
1140
+ case "AccessDeniedException":
1141
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
1142
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1143
+ case "InternalServerException":
1144
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1145
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1146
+ case "ServiceQuotaExceededException":
1147
+ case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException":
1148
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1149
+ case "ThrottlingException":
1150
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1151
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1152
+ case "ValidationException":
1153
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1154
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1155
+ default:
1156
+ const parsedBody = parsedOutput.body;
1157
+ throwDefaultError({
1158
+ output,
1159
+ parsedBody,
1160
+ exceptionCtor: __BaseException,
1161
+ errorCode,
1162
+ });
1163
+ }
1164
+ };
1165
+ export const deserializeAws_restJson1StartRecommendationReportGenerationCommand = async (output, context) => {
1166
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1167
+ return deserializeAws_restJson1StartRecommendationReportGenerationCommandError(output, context);
1168
+ }
1169
+ const contents = map({
1170
+ $metadata: deserializeMetadata(output),
1587
1171
  });
1588
- }); };
1589
- export var deserializeAws_restJson1StartImportFileTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1590
- var contents, data, _a, _b;
1591
- return __generator(this, function (_c) {
1592
- switch (_c.label) {
1593
- case 0:
1594
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1595
- return [2, deserializeAws_restJson1StartImportFileTaskCommandError(output, context)];
1596
- }
1597
- contents = map({
1598
- $metadata: deserializeMetadata(output),
1599
- });
1600
- _a = __expectNonNull;
1601
- _b = __expectObject;
1602
- return [4, parseBody(output.body, context)];
1603
- case 1:
1604
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1605
- if (data.id != null) {
1606
- contents.id = __expectString(data.id);
1607
- }
1608
- return [2, contents];
1609
- }
1172
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1173
+ if (data.id != null) {
1174
+ contents.id = __expectString(data.id);
1175
+ }
1176
+ return contents;
1177
+ };
1178
+ const deserializeAws_restJson1StartRecommendationReportGenerationCommandError = async (output, context) => {
1179
+ const parsedOutput = {
1180
+ ...output,
1181
+ body: await parseErrorBody(output.body, context),
1182
+ };
1183
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1184
+ switch (errorCode) {
1185
+ case "AccessDeniedException":
1186
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
1187
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1188
+ case "ConflictException":
1189
+ case "com.amazonaws.migrationhubstrategy#ConflictException":
1190
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1191
+ case "InternalServerException":
1192
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1193
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1194
+ case "ThrottlingException":
1195
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1196
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1197
+ case "ValidationException":
1198
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1199
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1200
+ default:
1201
+ const parsedBody = parsedOutput.body;
1202
+ throwDefaultError({
1203
+ output,
1204
+ parsedBody,
1205
+ exceptionCtor: __BaseException,
1206
+ errorCode,
1207
+ });
1208
+ }
1209
+ };
1210
+ export const deserializeAws_restJson1StopAssessmentCommand = async (output, context) => {
1211
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1212
+ return deserializeAws_restJson1StopAssessmentCommandError(output, context);
1213
+ }
1214
+ const contents = map({
1215
+ $metadata: deserializeMetadata(output),
1610
1216
  });
1611
- }); };
1612
- var deserializeAws_restJson1StartImportFileTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1613
- var parsedOutput, _a, errorCode, _b, parsedBody;
1614
- var _c;
1615
- return __generator(this, function (_d) {
1616
- switch (_d.label) {
1617
- case 0:
1618
- _a = [__assign({}, output)];
1619
- _c = {};
1620
- return [4, parseErrorBody(output.body, context)];
1621
- case 1:
1622
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1623
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1624
- _b = errorCode;
1625
- switch (_b) {
1626
- case "AccessDeniedException": return [3, 2];
1627
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1628
- case "InternalServerException": return [3, 4];
1629
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1630
- case "ServiceQuotaExceededException": return [3, 6];
1631
- case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException": return [3, 6];
1632
- case "ThrottlingException": return [3, 8];
1633
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
1634
- case "ValidationException": return [3, 10];
1635
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
1636
- }
1637
- return [3, 12];
1638
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1639
- case 3: throw _d.sent();
1640
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1641
- case 5: throw _d.sent();
1642
- case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1643
- case 7: throw _d.sent();
1644
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1645
- case 9: throw _d.sent();
1646
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1647
- case 11: throw _d.sent();
1648
- case 12:
1649
- parsedBody = parsedOutput.body;
1650
- throwDefaultError({
1651
- output: output,
1652
- parsedBody: parsedBody,
1653
- exceptionCtor: __BaseException,
1654
- errorCode: errorCode,
1655
- });
1656
- _d.label = 13;
1657
- case 13: return [2];
1658
- }
1217
+ await collectBody(output.body, context);
1218
+ return contents;
1219
+ };
1220
+ const deserializeAws_restJson1StopAssessmentCommandError = async (output, context) => {
1221
+ const parsedOutput = {
1222
+ ...output,
1223
+ body: await parseErrorBody(output.body, context),
1224
+ };
1225
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1226
+ switch (errorCode) {
1227
+ case "AccessDeniedException":
1228
+ case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
1229
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1230
+ case "InternalServerException":
1231
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1232
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1233
+ case "ThrottlingException":
1234
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1235
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1236
+ case "ValidationException":
1237
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1238
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1239
+ default:
1240
+ const parsedBody = parsedOutput.body;
1241
+ throwDefaultError({
1242
+ output,
1243
+ parsedBody,
1244
+ exceptionCtor: __BaseException,
1245
+ errorCode,
1246
+ });
1247
+ }
1248
+ };
1249
+ export const deserializeAws_restJson1UpdateApplicationComponentConfigCommand = async (output, context) => {
1250
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1251
+ return deserializeAws_restJson1UpdateApplicationComponentConfigCommandError(output, context);
1252
+ }
1253
+ const contents = map({
1254
+ $metadata: deserializeMetadata(output),
1659
1255
  });
1660
- }); };
1661
- export var deserializeAws_restJson1StartRecommendationReportGenerationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1662
- var contents, data, _a, _b;
1663
- return __generator(this, function (_c) {
1664
- switch (_c.label) {
1665
- case 0:
1666
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1667
- return [2, deserializeAws_restJson1StartRecommendationReportGenerationCommandError(output, context)];
1668
- }
1669
- contents = map({
1670
- $metadata: deserializeMetadata(output),
1671
- });
1672
- _a = __expectNonNull;
1673
- _b = __expectObject;
1674
- return [4, parseBody(output.body, context)];
1675
- case 1:
1676
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1677
- if (data.id != null) {
1678
- contents.id = __expectString(data.id);
1679
- }
1680
- return [2, contents];
1681
- }
1256
+ await collectBody(output.body, context);
1257
+ return contents;
1258
+ };
1259
+ const deserializeAws_restJson1UpdateApplicationComponentConfigCommandError = async (output, context) => {
1260
+ const parsedOutput = {
1261
+ ...output,
1262
+ body: await parseErrorBody(output.body, context),
1263
+ };
1264
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1265
+ switch (errorCode) {
1266
+ case "InternalServerException":
1267
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1268
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1269
+ case "ResourceNotFoundException":
1270
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
1271
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1272
+ case "ThrottlingException":
1273
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1274
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1275
+ case "ValidationException":
1276
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1277
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1278
+ default:
1279
+ const parsedBody = parsedOutput.body;
1280
+ throwDefaultError({
1281
+ output,
1282
+ parsedBody,
1283
+ exceptionCtor: __BaseException,
1284
+ errorCode,
1285
+ });
1286
+ }
1287
+ };
1288
+ export const deserializeAws_restJson1UpdateServerConfigCommand = async (output, context) => {
1289
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1290
+ return deserializeAws_restJson1UpdateServerConfigCommandError(output, context);
1291
+ }
1292
+ const contents = map({
1293
+ $metadata: deserializeMetadata(output),
1682
1294
  });
1683
- }); };
1684
- var deserializeAws_restJson1StartRecommendationReportGenerationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1685
- var parsedOutput, _a, errorCode, _b, parsedBody;
1686
- var _c;
1687
- return __generator(this, function (_d) {
1688
- switch (_d.label) {
1689
- case 0:
1690
- _a = [__assign({}, output)];
1691
- _c = {};
1692
- return [4, parseErrorBody(output.body, context)];
1693
- case 1:
1694
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1695
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1696
- _b = errorCode;
1697
- switch (_b) {
1698
- case "AccessDeniedException": return [3, 2];
1699
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1700
- case "ConflictException": return [3, 4];
1701
- case "com.amazonaws.migrationhubstrategy#ConflictException": return [3, 4];
1702
- case "InternalServerException": return [3, 6];
1703
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 6];
1704
- case "ThrottlingException": return [3, 8];
1705
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 8];
1706
- case "ValidationException": return [3, 10];
1707
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 10];
1708
- }
1709
- return [3, 12];
1710
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1711
- case 3: throw _d.sent();
1712
- case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
1713
- case 5: throw _d.sent();
1714
- case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1715
- case 7: throw _d.sent();
1716
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1717
- case 9: throw _d.sent();
1718
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1719
- case 11: throw _d.sent();
1720
- case 12:
1721
- parsedBody = parsedOutput.body;
1722
- throwDefaultError({
1723
- output: output,
1724
- parsedBody: parsedBody,
1725
- exceptionCtor: __BaseException,
1726
- errorCode: errorCode,
1727
- });
1728
- _d.label = 13;
1729
- case 13: return [2];
1730
- }
1295
+ await collectBody(output.body, context);
1296
+ return contents;
1297
+ };
1298
+ const deserializeAws_restJson1UpdateServerConfigCommandError = async (output, context) => {
1299
+ const parsedOutput = {
1300
+ ...output,
1301
+ body: await parseErrorBody(output.body, context),
1302
+ };
1303
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1304
+ switch (errorCode) {
1305
+ case "InternalServerException":
1306
+ case "com.amazonaws.migrationhubstrategy#InternalServerException":
1307
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1308
+ case "ResourceNotFoundException":
1309
+ case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
1310
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1311
+ case "ThrottlingException":
1312
+ case "com.amazonaws.migrationhubstrategy#ThrottlingException":
1313
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1314
+ case "ValidationException":
1315
+ case "com.amazonaws.migrationhubstrategy#ValidationException":
1316
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1317
+ default:
1318
+ const parsedBody = parsedOutput.body;
1319
+ throwDefaultError({
1320
+ output,
1321
+ parsedBody,
1322
+ exceptionCtor: __BaseException,
1323
+ errorCode,
1324
+ });
1325
+ }
1326
+ };
1327
+ const map = __map;
1328
+ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1329
+ const contents = map({});
1330
+ const data = parsedOutput.body;
1331
+ if (data.message != null) {
1332
+ contents.message = __expectString(data.message);
1333
+ }
1334
+ const exception = new AccessDeniedException({
1335
+ $metadata: deserializeMetadata(parsedOutput),
1336
+ ...contents,
1731
1337
  });
1732
- }); };
1733
- export var deserializeAws_restJson1StopAssessmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1734
- var contents;
1735
- return __generator(this, function (_a) {
1736
- switch (_a.label) {
1737
- case 0:
1738
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1739
- return [2, deserializeAws_restJson1StopAssessmentCommandError(output, context)];
1740
- }
1741
- contents = map({
1742
- $metadata: deserializeMetadata(output),
1743
- });
1744
- return [4, collectBody(output.body, context)];
1745
- case 1:
1746
- _a.sent();
1747
- return [2, contents];
1748
- }
1338
+ return __decorateServiceException(exception, parsedOutput.body);
1339
+ };
1340
+ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
1341
+ const contents = map({});
1342
+ const data = parsedOutput.body;
1343
+ if (data.message != null) {
1344
+ contents.message = __expectString(data.message);
1345
+ }
1346
+ const exception = new ConflictException({
1347
+ $metadata: deserializeMetadata(parsedOutput),
1348
+ ...contents,
1749
1349
  });
1750
- }); };
1751
- var deserializeAws_restJson1StopAssessmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1752
- var parsedOutput, _a, errorCode, _b, parsedBody;
1753
- var _c;
1754
- return __generator(this, function (_d) {
1755
- switch (_d.label) {
1756
- case 0:
1757
- _a = [__assign({}, output)];
1758
- _c = {};
1759
- return [4, parseErrorBody(output.body, context)];
1760
- case 1:
1761
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1762
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1763
- _b = errorCode;
1764
- switch (_b) {
1765
- case "AccessDeniedException": return [3, 2];
1766
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException": return [3, 2];
1767
- case "InternalServerException": return [3, 4];
1768
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 4];
1769
- case "ThrottlingException": return [3, 6];
1770
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
1771
- case "ValidationException": return [3, 8];
1772
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1773
- }
1774
- return [3, 10];
1775
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1776
- case 3: throw _d.sent();
1777
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1778
- case 5: throw _d.sent();
1779
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1780
- case 7: throw _d.sent();
1781
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1782
- case 9: throw _d.sent();
1783
- case 10:
1784
- parsedBody = parsedOutput.body;
1785
- throwDefaultError({
1786
- output: output,
1787
- parsedBody: parsedBody,
1788
- exceptionCtor: __BaseException,
1789
- errorCode: errorCode,
1790
- });
1791
- _d.label = 11;
1792
- case 11: return [2];
1793
- }
1350
+ return __decorateServiceException(exception, parsedOutput.body);
1351
+ };
1352
+ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
1353
+ const contents = map({});
1354
+ const data = parsedOutput.body;
1355
+ if (data.message != null) {
1356
+ contents.message = __expectString(data.message);
1357
+ }
1358
+ const exception = new InternalServerException({
1359
+ $metadata: deserializeMetadata(parsedOutput),
1360
+ ...contents,
1794
1361
  });
1795
- }); };
1796
- export var deserializeAws_restJson1UpdateApplicationComponentConfigCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1797
- var contents;
1798
- return __generator(this, function (_a) {
1799
- switch (_a.label) {
1800
- case 0:
1801
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1802
- return [2, deserializeAws_restJson1UpdateApplicationComponentConfigCommandError(output, context)];
1803
- }
1804
- contents = map({
1805
- $metadata: deserializeMetadata(output),
1806
- });
1807
- return [4, collectBody(output.body, context)];
1808
- case 1:
1809
- _a.sent();
1810
- return [2, contents];
1811
- }
1362
+ return __decorateServiceException(exception, parsedOutput.body);
1363
+ };
1364
+ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1365
+ const contents = map({});
1366
+ const data = parsedOutput.body;
1367
+ if (data.message != null) {
1368
+ contents.message = __expectString(data.message);
1369
+ }
1370
+ const exception = new ResourceNotFoundException({
1371
+ $metadata: deserializeMetadata(parsedOutput),
1372
+ ...contents,
1812
1373
  });
1813
- }); };
1814
- var deserializeAws_restJson1UpdateApplicationComponentConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1815
- var parsedOutput, _a, errorCode, _b, parsedBody;
1816
- var _c;
1817
- return __generator(this, function (_d) {
1818
- switch (_d.label) {
1819
- case 0:
1820
- _a = [__assign({}, output)];
1821
- _c = {};
1822
- return [4, parseErrorBody(output.body, context)];
1823
- case 1:
1824
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1825
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1826
- _b = errorCode;
1827
- switch (_b) {
1828
- case "InternalServerException": return [3, 2];
1829
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 2];
1830
- case "ResourceNotFoundException": return [3, 4];
1831
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 4];
1832
- case "ThrottlingException": return [3, 6];
1833
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
1834
- case "ValidationException": return [3, 8];
1835
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1836
- }
1837
- return [3, 10];
1838
- case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1839
- case 3: throw _d.sent();
1840
- case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1841
- case 5: throw _d.sent();
1842
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1843
- case 7: throw _d.sent();
1844
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1845
- case 9: throw _d.sent();
1846
- case 10:
1847
- parsedBody = parsedOutput.body;
1848
- throwDefaultError({
1849
- output: output,
1850
- parsedBody: parsedBody,
1851
- exceptionCtor: __BaseException,
1852
- errorCode: errorCode,
1853
- });
1854
- _d.label = 11;
1855
- case 11: return [2];
1856
- }
1374
+ return __decorateServiceException(exception, parsedOutput.body);
1375
+ };
1376
+ const deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse = async (parsedOutput, context) => {
1377
+ const contents = map({});
1378
+ const data = parsedOutput.body;
1379
+ if (data.message != null) {
1380
+ contents.message = __expectString(data.message);
1381
+ }
1382
+ const exception = new ServiceLinkedRoleLockClientException({
1383
+ $metadata: deserializeMetadata(parsedOutput),
1384
+ ...contents,
1857
1385
  });
1858
- }); };
1859
- export var deserializeAws_restJson1UpdateServerConfigCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1860
- var contents;
1861
- return __generator(this, function (_a) {
1862
- switch (_a.label) {
1863
- case 0:
1864
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1865
- return [2, deserializeAws_restJson1UpdateServerConfigCommandError(output, context)];
1866
- }
1867
- contents = map({
1868
- $metadata: deserializeMetadata(output),
1869
- });
1870
- return [4, collectBody(output.body, context)];
1871
- case 1:
1872
- _a.sent();
1873
- return [2, contents];
1874
- }
1386
+ return __decorateServiceException(exception, parsedOutput.body);
1387
+ };
1388
+ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
1389
+ const contents = map({});
1390
+ const data = parsedOutput.body;
1391
+ if (data.message != null) {
1392
+ contents.message = __expectString(data.message);
1393
+ }
1394
+ const exception = new ServiceQuotaExceededException({
1395
+ $metadata: deserializeMetadata(parsedOutput),
1396
+ ...contents,
1875
1397
  });
1876
- }); };
1877
- var deserializeAws_restJson1UpdateServerConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1878
- var parsedOutput, _a, errorCode, _b, parsedBody;
1879
- var _c;
1880
- return __generator(this, function (_d) {
1881
- switch (_d.label) {
1882
- case 0:
1883
- _a = [__assign({}, output)];
1884
- _c = {};
1885
- return [4, parseErrorBody(output.body, context)];
1886
- case 1:
1887
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1888
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1889
- _b = errorCode;
1890
- switch (_b) {
1891
- case "InternalServerException": return [3, 2];
1892
- case "com.amazonaws.migrationhubstrategy#InternalServerException": return [3, 2];
1893
- case "ResourceNotFoundException": return [3, 4];
1894
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": return [3, 4];
1895
- case "ThrottlingException": return [3, 6];
1896
- case "com.amazonaws.migrationhubstrategy#ThrottlingException": return [3, 6];
1897
- case "ValidationException": return [3, 8];
1898
- case "com.amazonaws.migrationhubstrategy#ValidationException": return [3, 8];
1899
- }
1900
- return [3, 10];
1901
- case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1902
- case 3: throw _d.sent();
1903
- case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1904
- case 5: throw _d.sent();
1905
- case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1906
- case 7: throw _d.sent();
1907
- case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1908
- case 9: throw _d.sent();
1909
- case 10:
1910
- parsedBody = parsedOutput.body;
1911
- throwDefaultError({
1912
- output: output,
1913
- parsedBody: parsedBody,
1914
- exceptionCtor: __BaseException,
1915
- errorCode: errorCode,
1916
- });
1917
- _d.label = 11;
1918
- case 11: return [2];
1919
- }
1398
+ return __decorateServiceException(exception, parsedOutput.body);
1399
+ };
1400
+ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1401
+ const contents = map({});
1402
+ const data = parsedOutput.body;
1403
+ if (data.message != null) {
1404
+ contents.message = __expectString(data.message);
1405
+ }
1406
+ const exception = new ThrottlingException({
1407
+ $metadata: deserializeMetadata(parsedOutput),
1408
+ ...contents,
1920
1409
  });
1921
- }); };
1922
- var map = __map;
1923
- var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1924
- var contents, data, exception;
1925
- return __generator(this, function (_a) {
1926
- contents = map({});
1927
- data = parsedOutput.body;
1928
- if (data.message != null) {
1929
- contents.message = __expectString(data.message);
1930
- }
1931
- exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1932
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1933
- });
1934
- }); };
1935
- var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1936
- var contents, data, exception;
1937
- return __generator(this, function (_a) {
1938
- contents = map({});
1939
- data = parsedOutput.body;
1940
- if (data.message != null) {
1941
- contents.message = __expectString(data.message);
1942
- }
1943
- exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1944
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1945
- });
1946
- }); };
1947
- var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1948
- var contents, data, exception;
1949
- return __generator(this, function (_a) {
1950
- contents = map({});
1951
- data = parsedOutput.body;
1952
- if (data.message != null) {
1953
- contents.message = __expectString(data.message);
1954
- }
1955
- exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1956
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1957
- });
1958
- }); };
1959
- var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1960
- var contents, data, exception;
1961
- return __generator(this, function (_a) {
1962
- contents = map({});
1963
- data = parsedOutput.body;
1964
- if (data.message != null) {
1965
- contents.message = __expectString(data.message);
1966
- }
1967
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1968
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1969
- });
1970
- }); };
1971
- var deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1972
- var contents, data, exception;
1973
- return __generator(this, function (_a) {
1974
- contents = map({});
1975
- data = parsedOutput.body;
1976
- if (data.message != null) {
1977
- contents.message = __expectString(data.message);
1978
- }
1979
- exception = new ServiceLinkedRoleLockClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1980
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1981
- });
1982
- }); };
1983
- var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1984
- var contents, data, exception;
1985
- return __generator(this, function (_a) {
1986
- contents = map({});
1987
- data = parsedOutput.body;
1988
- if (data.message != null) {
1989
- contents.message = __expectString(data.message);
1990
- }
1991
- exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1992
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1993
- });
1994
- }); };
1995
- var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1996
- var contents, data, exception;
1997
- return __generator(this, function (_a) {
1998
- contents = map({});
1999
- data = parsedOutput.body;
2000
- if (data.message != null) {
2001
- contents.message = __expectString(data.message);
2002
- }
2003
- exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2004
- return [2, __decorateServiceException(exception, parsedOutput.body)];
2005
- });
2006
- }); };
2007
- var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2008
- var contents, data, exception;
2009
- return __generator(this, function (_a) {
2010
- contents = map({});
2011
- data = parsedOutput.body;
2012
- if (data.message != null) {
2013
- contents.message = __expectString(data.message);
2014
- }
2015
- exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2016
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1410
+ return __decorateServiceException(exception, parsedOutput.body);
1411
+ };
1412
+ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
1413
+ const contents = map({});
1414
+ const data = parsedOutput.body;
1415
+ if (data.message != null) {
1416
+ contents.message = __expectString(data.message);
1417
+ }
1418
+ const exception = new ValidationException({
1419
+ $metadata: deserializeMetadata(parsedOutput),
1420
+ ...contents,
2017
1421
  });
2018
- }); };
2019
- var serializeAws_restJson1ApplicationPreferences = function (input, context) {
2020
- return __assign({}, (input.managementPreference != null && {
2021
- managementPreference: serializeAws_restJson1ManagementPreference(input.managementPreference, context),
2022
- }));
1422
+ return __decorateServiceException(exception, parsedOutput.body);
1423
+ };
1424
+ const serializeAws_restJson1ApplicationPreferences = (input, context) => {
1425
+ return {
1426
+ ...(input.managementPreference != null && {
1427
+ managementPreference: serializeAws_restJson1ManagementPreference(input.managementPreference, context),
1428
+ }),
1429
+ };
2023
1430
  };
2024
- var serializeAws_restJson1AwsManagedResources = function (input, context) {
2025
- return __assign({}, (input.targetDestination != null && {
2026
- targetDestination: serializeAws_restJson1AwsManagedTargetDestinations(input.targetDestination, context),
2027
- }));
1431
+ const serializeAws_restJson1AwsManagedResources = (input, context) => {
1432
+ return {
1433
+ ...(input.targetDestination != null && {
1434
+ targetDestination: serializeAws_restJson1AwsManagedTargetDestinations(input.targetDestination, context),
1435
+ }),
1436
+ };
2028
1437
  };
2029
- var serializeAws_restJson1AwsManagedTargetDestinations = function (input, context) {
1438
+ const serializeAws_restJson1AwsManagedTargetDestinations = (input, context) => {
2030
1439
  return input
2031
- .filter(function (e) { return e != null; })
2032
- .map(function (entry) {
1440
+ .filter((e) => e != null)
1441
+ .map((entry) => {
2033
1442
  return entry;
2034
1443
  });
2035
1444
  };
2036
- var serializeAws_restJson1BusinessGoals = function (input, context) {
2037
- return __assign(__assign(__assign(__assign({}, (input.licenseCostReduction != null && { licenseCostReduction: input.licenseCostReduction })), (input.modernizeInfrastructureWithCloudNativeTechnologies != null && {
2038
- modernizeInfrastructureWithCloudNativeTechnologies: input.modernizeInfrastructureWithCloudNativeTechnologies,
2039
- })), (input.reduceOperationalOverheadWithManagedServices != null && {
2040
- reduceOperationalOverheadWithManagedServices: input.reduceOperationalOverheadWithManagedServices,
2041
- })), (input.speedOfMigration != null && { speedOfMigration: input.speedOfMigration }));
1445
+ const serializeAws_restJson1BusinessGoals = (input, context) => {
1446
+ return {
1447
+ ...(input.licenseCostReduction != null && { licenseCostReduction: input.licenseCostReduction }),
1448
+ ...(input.modernizeInfrastructureWithCloudNativeTechnologies != null && {
1449
+ modernizeInfrastructureWithCloudNativeTechnologies: input.modernizeInfrastructureWithCloudNativeTechnologies,
1450
+ }),
1451
+ ...(input.reduceOperationalOverheadWithManagedServices != null && {
1452
+ reduceOperationalOverheadWithManagedServices: input.reduceOperationalOverheadWithManagedServices,
1453
+ }),
1454
+ ...(input.speedOfMigration != null && { speedOfMigration: input.speedOfMigration }),
1455
+ };
2042
1456
  };
2043
- var serializeAws_restJson1DatabaseMigrationPreference = function (input, context) {
1457
+ const serializeAws_restJson1DatabaseMigrationPreference = (input, context) => {
2044
1458
  return DatabaseMigrationPreference.visit(input, {
2045
- heterogeneous: function (value) { return ({ heterogeneous: serializeAws_restJson1Heterogeneous(value, context) }); },
2046
- homogeneous: function (value) { return ({ homogeneous: serializeAws_restJson1Homogeneous(value, context) }); },
2047
- noPreference: function (value) { return ({ noPreference: serializeAws_restJson1NoDatabaseMigrationPreference(value, context) }); },
2048
- _: function (name, value) { return ({ name: value }); },
1459
+ heterogeneous: (value) => ({ heterogeneous: serializeAws_restJson1Heterogeneous(value, context) }),
1460
+ homogeneous: (value) => ({ homogeneous: serializeAws_restJson1Homogeneous(value, context) }),
1461
+ noPreference: (value) => ({ noPreference: serializeAws_restJson1NoDatabaseMigrationPreference(value, context) }),
1462
+ _: (name, value) => ({ name: value }),
2049
1463
  });
2050
1464
  };
2051
- var serializeAws_restJson1DatabasePreferences = function (input, context) {
2052
- return __assign(__assign({}, (input.databaseManagementPreference != null && {
2053
- databaseManagementPreference: input.databaseManagementPreference,
2054
- })), (input.databaseMigrationPreference != null && {
2055
- databaseMigrationPreference: serializeAws_restJson1DatabaseMigrationPreference(input.databaseMigrationPreference, context),
2056
- }));
1465
+ const serializeAws_restJson1DatabasePreferences = (input, context) => {
1466
+ return {
1467
+ ...(input.databaseManagementPreference != null && {
1468
+ databaseManagementPreference: input.databaseManagementPreference,
1469
+ }),
1470
+ ...(input.databaseMigrationPreference != null && {
1471
+ databaseMigrationPreference: serializeAws_restJson1DatabaseMigrationPreference(input.databaseMigrationPreference, context),
1472
+ }),
1473
+ };
2057
1474
  };
2058
- var serializeAws_restJson1Group = function (input, context) {
2059
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.value != null && { value: input.value }));
1475
+ const serializeAws_restJson1Group = (input, context) => {
1476
+ return {
1477
+ ...(input.name != null && { name: input.name }),
1478
+ ...(input.value != null && { value: input.value }),
1479
+ };
2060
1480
  };
2061
- var serializeAws_restJson1GroupIds = function (input, context) {
1481
+ const serializeAws_restJson1GroupIds = (input, context) => {
2062
1482
  return input
2063
- .filter(function (e) { return e != null; })
2064
- .map(function (entry) {
1483
+ .filter((e) => e != null)
1484
+ .map((entry) => {
2065
1485
  return serializeAws_restJson1Group(entry, context);
2066
1486
  });
2067
1487
  };
2068
- var serializeAws_restJson1Heterogeneous = function (input, context) {
2069
- return __assign({}, (input.targetDatabaseEngine != null && {
2070
- targetDatabaseEngine: serializeAws_restJson1HeterogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context),
2071
- }));
1488
+ const serializeAws_restJson1Heterogeneous = (input, context) => {
1489
+ return {
1490
+ ...(input.targetDatabaseEngine != null && {
1491
+ targetDatabaseEngine: serializeAws_restJson1HeterogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context),
1492
+ }),
1493
+ };
2072
1494
  };
2073
- var serializeAws_restJson1HeterogeneousTargetDatabaseEngines = function (input, context) {
1495
+ const serializeAws_restJson1HeterogeneousTargetDatabaseEngines = (input, context) => {
2074
1496
  return input
2075
- .filter(function (e) { return e != null; })
2076
- .map(function (entry) {
1497
+ .filter((e) => e != null)
1498
+ .map((entry) => {
2077
1499
  return entry;
2078
1500
  });
2079
1501
  };
2080
- var serializeAws_restJson1Homogeneous = function (input, context) {
2081
- return __assign({}, (input.targetDatabaseEngine != null && {
2082
- targetDatabaseEngine: serializeAws_restJson1HomogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context),
2083
- }));
1502
+ const serializeAws_restJson1Homogeneous = (input, context) => {
1503
+ return {
1504
+ ...(input.targetDatabaseEngine != null && {
1505
+ targetDatabaseEngine: serializeAws_restJson1HomogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context),
1506
+ }),
1507
+ };
2084
1508
  };
2085
- var serializeAws_restJson1HomogeneousTargetDatabaseEngines = function (input, context) {
1509
+ const serializeAws_restJson1HomogeneousTargetDatabaseEngines = (input, context) => {
2086
1510
  return input
2087
- .filter(function (e) { return e != null; })
2088
- .map(function (entry) {
1511
+ .filter((e) => e != null)
1512
+ .map((entry) => {
2089
1513
  return entry;
2090
1514
  });
2091
1515
  };
2092
- var serializeAws_restJson1ManagementPreference = function (input, context) {
1516
+ const serializeAws_restJson1ManagementPreference = (input, context) => {
2093
1517
  return ManagementPreference.visit(input, {
2094
- awsManagedResources: function (value) { return ({
1518
+ awsManagedResources: (value) => ({
2095
1519
  awsManagedResources: serializeAws_restJson1AwsManagedResources(value, context),
2096
- }); },
2097
- noPreference: function (value) { return ({ noPreference: serializeAws_restJson1NoManagementPreference(value, context) }); },
2098
- selfManageResources: function (value) { return ({
1520
+ }),
1521
+ noPreference: (value) => ({ noPreference: serializeAws_restJson1NoManagementPreference(value, context) }),
1522
+ selfManageResources: (value) => ({
2099
1523
  selfManageResources: serializeAws_restJson1SelfManageResources(value, context),
2100
- }); },
2101
- _: function (name, value) { return ({ name: value }); },
1524
+ }),
1525
+ _: (name, value) => ({ name: value }),
2102
1526
  });
2103
1527
  };
2104
- var serializeAws_restJson1NoDatabaseMigrationPreference = function (input, context) {
2105
- return __assign({}, (input.targetDatabaseEngine != null && {
2106
- targetDatabaseEngine: serializeAws_restJson1TargetDatabaseEngines(input.targetDatabaseEngine, context),
2107
- }));
1528
+ const serializeAws_restJson1NoDatabaseMigrationPreference = (input, context) => {
1529
+ return {
1530
+ ...(input.targetDatabaseEngine != null && {
1531
+ targetDatabaseEngine: serializeAws_restJson1TargetDatabaseEngines(input.targetDatabaseEngine, context),
1532
+ }),
1533
+ };
2108
1534
  };
2109
- var serializeAws_restJson1NoManagementPreference = function (input, context) {
2110
- return __assign({}, (input.targetDestination != null && {
2111
- targetDestination: serializeAws_restJson1NoPreferenceTargetDestinations(input.targetDestination, context),
2112
- }));
1535
+ const serializeAws_restJson1NoManagementPreference = (input, context) => {
1536
+ return {
1537
+ ...(input.targetDestination != null && {
1538
+ targetDestination: serializeAws_restJson1NoPreferenceTargetDestinations(input.targetDestination, context),
1539
+ }),
1540
+ };
2113
1541
  };
2114
- var serializeAws_restJson1NoPreferenceTargetDestinations = function (input, context) {
1542
+ const serializeAws_restJson1NoPreferenceTargetDestinations = (input, context) => {
2115
1543
  return input
2116
- .filter(function (e) { return e != null; })
2117
- .map(function (entry) {
1544
+ .filter((e) => e != null)
1545
+ .map((entry) => {
2118
1546
  return entry;
2119
1547
  });
2120
1548
  };
2121
- var serializeAws_restJson1PrioritizeBusinessGoals = function (input, context) {
2122
- return __assign({}, (input.businessGoals != null && {
2123
- businessGoals: serializeAws_restJson1BusinessGoals(input.businessGoals, context),
2124
- }));
1549
+ const serializeAws_restJson1PrioritizeBusinessGoals = (input, context) => {
1550
+ return {
1551
+ ...(input.businessGoals != null && {
1552
+ businessGoals: serializeAws_restJson1BusinessGoals(input.businessGoals, context),
1553
+ }),
1554
+ };
2125
1555
  };
2126
- var serializeAws_restJson1SelfManageResources = function (input, context) {
2127
- return __assign({}, (input.targetDestination != null && {
2128
- targetDestination: serializeAws_restJson1SelfManageTargetDestinations(input.targetDestination, context),
2129
- }));
1556
+ const serializeAws_restJson1SelfManageResources = (input, context) => {
1557
+ return {
1558
+ ...(input.targetDestination != null && {
1559
+ targetDestination: serializeAws_restJson1SelfManageTargetDestinations(input.targetDestination, context),
1560
+ }),
1561
+ };
2130
1562
  };
2131
- var serializeAws_restJson1SelfManageTargetDestinations = function (input, context) {
1563
+ const serializeAws_restJson1SelfManageTargetDestinations = (input, context) => {
2132
1564
  return input
2133
- .filter(function (e) { return e != null; })
2134
- .map(function (entry) {
1565
+ .filter((e) => e != null)
1566
+ .map((entry) => {
2135
1567
  return entry;
2136
1568
  });
2137
1569
  };
2138
- var serializeAws_restJson1SourceCode = function (input, context) {
2139
- return __assign(__assign(__assign({}, (input.location != null && { location: input.location })), (input.sourceVersion != null && { sourceVersion: input.sourceVersion })), (input.versionControl != null && { versionControl: input.versionControl }));
1570
+ const serializeAws_restJson1SourceCode = (input, context) => {
1571
+ return {
1572
+ ...(input.location != null && { location: input.location }),
1573
+ ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }),
1574
+ ...(input.versionControl != null && { versionControl: input.versionControl }),
1575
+ };
2140
1576
  };
2141
- var serializeAws_restJson1SourceCodeList = function (input, context) {
1577
+ const serializeAws_restJson1SourceCodeList = (input, context) => {
2142
1578
  return input
2143
- .filter(function (e) { return e != null; })
2144
- .map(function (entry) {
1579
+ .filter((e) => e != null)
1580
+ .map((entry) => {
2145
1581
  return serializeAws_restJson1SourceCode(entry, context);
2146
1582
  });
2147
1583
  };
2148
- var serializeAws_restJson1StrategyOption = function (input, context) {
2149
- return __assign(__assign(__assign(__assign({}, (input.isPreferred != null && { isPreferred: input.isPreferred })), (input.strategy != null && { strategy: input.strategy })), (input.targetDestination != null && { targetDestination: input.targetDestination })), (input.toolName != null && { toolName: input.toolName }));
1584
+ const serializeAws_restJson1StrategyOption = (input, context) => {
1585
+ return {
1586
+ ...(input.isPreferred != null && { isPreferred: input.isPreferred }),
1587
+ ...(input.strategy != null && { strategy: input.strategy }),
1588
+ ...(input.targetDestination != null && { targetDestination: input.targetDestination }),
1589
+ ...(input.toolName != null && { toolName: input.toolName }),
1590
+ };
2150
1591
  };
2151
- var serializeAws_restJson1TargetDatabaseEngines = function (input, context) {
1592
+ const serializeAws_restJson1TargetDatabaseEngines = (input, context) => {
2152
1593
  return input
2153
- .filter(function (e) { return e != null; })
2154
- .map(function (entry) {
1594
+ .filter((e) => e != null)
1595
+ .map((entry) => {
2155
1596
  return entry;
2156
1597
  });
2157
1598
  };
2158
- var deserializeAws_restJson1AntipatternSeveritySummary = function (output, context) {
1599
+ const deserializeAws_restJson1AntipatternSeveritySummary = (output, context) => {
2159
1600
  return {
2160
1601
  count: __expectInt32(output.count),
2161
1602
  severity: __expectString(output.severity),
2162
1603
  };
2163
1604
  };
2164
- var deserializeAws_restJson1ApplicationComponentDetail = function (output, context) {
1605
+ const deserializeAws_restJson1ApplicationComponentDetail = (output, context) => {
2165
1606
  return {
2166
1607
  analysisStatus: __expectString(output.analysisStatus),
2167
1608
  antipatternReportS3Object: output.antipatternReportS3Object != null
@@ -2196,10 +1637,10 @@ var deserializeAws_restJson1ApplicationComponentDetail = function (output, conte
2196
1637
  statusMessage: __expectString(output.statusMessage),
2197
1638
  };
2198
1639
  };
2199
- var deserializeAws_restJson1ApplicationComponentDetails = function (output, context) {
2200
- var retVal = (output || [])
2201
- .filter(function (e) { return e != null; })
2202
- .map(function (entry) {
1640
+ const deserializeAws_restJson1ApplicationComponentDetails = (output, context) => {
1641
+ const retVal = (output || [])
1642
+ .filter((e) => e != null)
1643
+ .map((entry) => {
2203
1644
  if (entry === null) {
2204
1645
  return null;
2205
1646
  }
@@ -2207,10 +1648,10 @@ var deserializeAws_restJson1ApplicationComponentDetails = function (output, cont
2207
1648
  });
2208
1649
  return retVal;
2209
1650
  };
2210
- var deserializeAws_restJson1ApplicationComponentStrategies = function (output, context) {
2211
- var retVal = (output || [])
2212
- .filter(function (e) { return e != null; })
2213
- .map(function (entry) {
1651
+ const deserializeAws_restJson1ApplicationComponentStrategies = (output, context) => {
1652
+ const retVal = (output || [])
1653
+ .filter((e) => e != null)
1654
+ .map((entry) => {
2214
1655
  if (entry === null) {
2215
1656
  return null;
2216
1657
  }
@@ -2218,7 +1659,7 @@ var deserializeAws_restJson1ApplicationComponentStrategies = function (output, c
2218
1659
  });
2219
1660
  return retVal;
2220
1661
  };
2221
- var deserializeAws_restJson1ApplicationComponentStrategy = function (output, context) {
1662
+ const deserializeAws_restJson1ApplicationComponentStrategy = (output, context) => {
2222
1663
  return {
2223
1664
  isPreferred: __expectBoolean(output.isPreferred),
2224
1665
  recommendation: output.recommendation != null
@@ -2227,20 +1668,20 @@ var deserializeAws_restJson1ApplicationComponentStrategy = function (output, con
2227
1668
  status: __expectString(output.status),
2228
1669
  };
2229
1670
  };
2230
- var deserializeAws_restJson1ApplicationComponentSummary = function (output, context) {
1671
+ const deserializeAws_restJson1ApplicationComponentSummary = (output, context) => {
2231
1672
  return {
2232
1673
  appType: __expectString(output.appType),
2233
1674
  count: __expectInt32(output.count),
2234
1675
  };
2235
1676
  };
2236
- var deserializeAws_restJson1ApplicationPreferences = function (output, context) {
1677
+ const deserializeAws_restJson1ApplicationPreferences = (output, context) => {
2237
1678
  return {
2238
1679
  managementPreference: output.managementPreference != null
2239
1680
  ? deserializeAws_restJson1ManagementPreference(__expectUnion(output.managementPreference), context)
2240
1681
  : undefined,
2241
1682
  };
2242
1683
  };
2243
- var deserializeAws_restJson1AssessmentSummary = function (output, context) {
1684
+ const deserializeAws_restJson1AssessmentSummary = (output, context) => {
2244
1685
  return {
2245
1686
  antipatternReportS3Object: output.antipatternReportS3Object != null
2246
1687
  ? deserializeAws_restJson1S3Object(output.antipatternReportS3Object, context)
@@ -2267,16 +1708,16 @@ var deserializeAws_restJson1AssessmentSummary = function (output, context) {
2267
1708
  : undefined,
2268
1709
  };
2269
1710
  };
2270
- var deserializeAws_restJson1AssociatedApplication = function (output, context) {
1711
+ const deserializeAws_restJson1AssociatedApplication = (output, context) => {
2271
1712
  return {
2272
1713
  id: __expectString(output.id),
2273
1714
  name: __expectString(output.name),
2274
1715
  };
2275
1716
  };
2276
- var deserializeAws_restJson1AssociatedApplications = function (output, context) {
2277
- var retVal = (output || [])
2278
- .filter(function (e) { return e != null; })
2279
- .map(function (entry) {
1717
+ const deserializeAws_restJson1AssociatedApplications = (output, context) => {
1718
+ const retVal = (output || [])
1719
+ .filter((e) => e != null)
1720
+ .map((entry) => {
2280
1721
  if (entry === null) {
2281
1722
  return null;
2282
1723
  }
@@ -2284,10 +1725,10 @@ var deserializeAws_restJson1AssociatedApplications = function (output, context)
2284
1725
  });
2285
1726
  return retVal;
2286
1727
  };
2287
- var deserializeAws_restJson1AssociatedServerIDs = function (output, context) {
2288
- var retVal = (output || [])
2289
- .filter(function (e) { return e != null; })
2290
- .map(function (entry) {
1728
+ const deserializeAws_restJson1AssociatedServerIDs = (output, context) => {
1729
+ const retVal = (output || [])
1730
+ .filter((e) => e != null)
1731
+ .map((entry) => {
2291
1732
  if (entry === null) {
2292
1733
  return null;
2293
1734
  }
@@ -2295,17 +1736,17 @@ var deserializeAws_restJson1AssociatedServerIDs = function (output, context) {
2295
1736
  });
2296
1737
  return retVal;
2297
1738
  };
2298
- var deserializeAws_restJson1AwsManagedResources = function (output, context) {
1739
+ const deserializeAws_restJson1AwsManagedResources = (output, context) => {
2299
1740
  return {
2300
1741
  targetDestination: output.targetDestination != null
2301
1742
  ? deserializeAws_restJson1AwsManagedTargetDestinations(output.targetDestination, context)
2302
1743
  : undefined,
2303
1744
  };
2304
1745
  };
2305
- var deserializeAws_restJson1AwsManagedTargetDestinations = function (output, context) {
2306
- var retVal = (output || [])
2307
- .filter(function (e) { return e != null; })
2308
- .map(function (entry) {
1746
+ const deserializeAws_restJson1AwsManagedTargetDestinations = (output, context) => {
1747
+ const retVal = (output || [])
1748
+ .filter((e) => e != null)
1749
+ .map((entry) => {
2309
1750
  if (entry === null) {
2310
1751
  return null;
2311
1752
  }
@@ -2313,7 +1754,7 @@ var deserializeAws_restJson1AwsManagedTargetDestinations = function (output, con
2313
1754
  });
2314
1755
  return retVal;
2315
1756
  };
2316
- var deserializeAws_restJson1BusinessGoals = function (output, context) {
1757
+ const deserializeAws_restJson1BusinessGoals = (output, context) => {
2317
1758
  return {
2318
1759
  licenseCostReduction: __expectInt32(output.licenseCostReduction),
2319
1760
  modernizeInfrastructureWithCloudNativeTechnologies: __expectInt32(output.modernizeInfrastructureWithCloudNativeTechnologies),
@@ -2321,7 +1762,7 @@ var deserializeAws_restJson1BusinessGoals = function (output, context) {
2321
1762
  speedOfMigration: __expectInt32(output.speedOfMigration),
2322
1763
  };
2323
1764
  };
2324
- var deserializeAws_restJson1Collector = function (output, context) {
1765
+ const deserializeAws_restJson1Collector = (output, context) => {
2325
1766
  return {
2326
1767
  collectorHealth: __expectString(output.collectorHealth),
2327
1768
  collectorId: __expectString(output.collectorId),
@@ -2332,10 +1773,10 @@ var deserializeAws_restJson1Collector = function (output, context) {
2332
1773
  registeredTimeStamp: __expectString(output.registeredTimeStamp),
2333
1774
  };
2334
1775
  };
2335
- var deserializeAws_restJson1Collectors = function (output, context) {
2336
- var retVal = (output || [])
2337
- .filter(function (e) { return e != null; })
2338
- .map(function (entry) {
1776
+ const deserializeAws_restJson1Collectors = (output, context) => {
1777
+ const retVal = (output || [])
1778
+ .filter((e) => e != null)
1779
+ .map((entry) => {
2339
1780
  if (entry === null) {
2340
1781
  return null;
2341
1782
  }
@@ -2343,12 +1784,12 @@ var deserializeAws_restJson1Collectors = function (output, context) {
2343
1784
  });
2344
1785
  return retVal;
2345
1786
  };
2346
- var deserializeAws_restJson1DatabaseConfigDetail = function (output, context) {
1787
+ const deserializeAws_restJson1DatabaseConfigDetail = (output, context) => {
2347
1788
  return {
2348
1789
  secretName: __expectString(output.secretName),
2349
1790
  };
2350
1791
  };
2351
- var deserializeAws_restJson1DatabaseMigrationPreference = function (output, context) {
1792
+ const deserializeAws_restJson1DatabaseMigrationPreference = (output, context) => {
2352
1793
  if (output.heterogeneous != null) {
2353
1794
  return {
2354
1795
  heterogeneous: deserializeAws_restJson1Heterogeneous(output.heterogeneous, context),
@@ -2366,7 +1807,7 @@ var deserializeAws_restJson1DatabaseMigrationPreference = function (output, cont
2366
1807
  }
2367
1808
  return { $unknown: Object.entries(output)[0] };
2368
1809
  };
2369
- var deserializeAws_restJson1DatabasePreferences = function (output, context) {
1810
+ const deserializeAws_restJson1DatabasePreferences = (output, context) => {
2370
1811
  return {
2371
1812
  databaseManagementPreference: __expectString(output.databaseManagementPreference),
2372
1813
  databaseMigrationPreference: output.databaseMigrationPreference != null
@@ -2374,7 +1815,7 @@ var deserializeAws_restJson1DatabasePreferences = function (output, context) {
2374
1815
  : undefined,
2375
1816
  };
2376
1817
  };
2377
- var deserializeAws_restJson1DataCollectionDetails = function (output, context) {
1818
+ const deserializeAws_restJson1DataCollectionDetails = (output, context) => {
2378
1819
  return {
2379
1820
  completionTime: output.completionTime != null
2380
1821
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime)))
@@ -2387,17 +1828,17 @@ var deserializeAws_restJson1DataCollectionDetails = function (output, context) {
2387
1828
  success: __expectInt32(output.success),
2388
1829
  };
2389
1830
  };
2390
- var deserializeAws_restJson1Heterogeneous = function (output, context) {
1831
+ const deserializeAws_restJson1Heterogeneous = (output, context) => {
2391
1832
  return {
2392
1833
  targetDatabaseEngine: output.targetDatabaseEngine != null
2393
1834
  ? deserializeAws_restJson1HeterogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context)
2394
1835
  : undefined,
2395
1836
  };
2396
1837
  };
2397
- var deserializeAws_restJson1HeterogeneousTargetDatabaseEngines = function (output, context) {
2398
- var retVal = (output || [])
2399
- .filter(function (e) { return e != null; })
2400
- .map(function (entry) {
1838
+ const deserializeAws_restJson1HeterogeneousTargetDatabaseEngines = (output, context) => {
1839
+ const retVal = (output || [])
1840
+ .filter((e) => e != null)
1841
+ .map((entry) => {
2401
1842
  if (entry === null) {
2402
1843
  return null;
2403
1844
  }
@@ -2405,17 +1846,17 @@ var deserializeAws_restJson1HeterogeneousTargetDatabaseEngines = function (outpu
2405
1846
  });
2406
1847
  return retVal;
2407
1848
  };
2408
- var deserializeAws_restJson1Homogeneous = function (output, context) {
1849
+ const deserializeAws_restJson1Homogeneous = (output, context) => {
2409
1850
  return {
2410
1851
  targetDatabaseEngine: output.targetDatabaseEngine != null
2411
1852
  ? deserializeAws_restJson1HomogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context)
2412
1853
  : undefined,
2413
1854
  };
2414
1855
  };
2415
- var deserializeAws_restJson1HomogeneousTargetDatabaseEngines = function (output, context) {
2416
- var retVal = (output || [])
2417
- .filter(function (e) { return e != null; })
2418
- .map(function (entry) {
1856
+ const deserializeAws_restJson1HomogeneousTargetDatabaseEngines = (output, context) => {
1857
+ const retVal = (output || [])
1858
+ .filter((e) => e != null)
1859
+ .map((entry) => {
2419
1860
  if (entry === null) {
2420
1861
  return null;
2421
1862
  }
@@ -2423,7 +1864,7 @@ var deserializeAws_restJson1HomogeneousTargetDatabaseEngines = function (output,
2423
1864
  });
2424
1865
  return retVal;
2425
1866
  };
2426
- var deserializeAws_restJson1ImportFileTaskInformation = function (output, context) {
1867
+ const deserializeAws_restJson1ImportFileTaskInformation = (output, context) => {
2427
1868
  return {
2428
1869
  completionTime: output.completionTime != null
2429
1870
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime)))
@@ -2440,10 +1881,10 @@ var deserializeAws_restJson1ImportFileTaskInformation = function (output, contex
2440
1881
  statusReportS3Key: __expectString(output.statusReportS3Key),
2441
1882
  };
2442
1883
  };
2443
- var deserializeAws_restJson1ListAntipatternSeveritySummary = function (output, context) {
2444
- var retVal = (output || [])
2445
- .filter(function (e) { return e != null; })
2446
- .map(function (entry) {
1884
+ const deserializeAws_restJson1ListAntipatternSeveritySummary = (output, context) => {
1885
+ const retVal = (output || [])
1886
+ .filter((e) => e != null)
1887
+ .map((entry) => {
2447
1888
  if (entry === null) {
2448
1889
  return null;
2449
1890
  }
@@ -2451,10 +1892,10 @@ var deserializeAws_restJson1ListAntipatternSeveritySummary = function (output, c
2451
1892
  });
2452
1893
  return retVal;
2453
1894
  };
2454
- var deserializeAws_restJson1ListApplicationComponentSummary = function (output, context) {
2455
- var retVal = (output || [])
2456
- .filter(function (e) { return e != null; })
2457
- .map(function (entry) {
1895
+ const deserializeAws_restJson1ListApplicationComponentSummary = (output, context) => {
1896
+ const retVal = (output || [])
1897
+ .filter((e) => e != null)
1898
+ .map((entry) => {
2458
1899
  if (entry === null) {
2459
1900
  return null;
2460
1901
  }
@@ -2462,10 +1903,10 @@ var deserializeAws_restJson1ListApplicationComponentSummary = function (output,
2462
1903
  });
2463
1904
  return retVal;
2464
1905
  };
2465
- var deserializeAws_restJson1ListImportFileTaskInformation = function (output, context) {
2466
- var retVal = (output || [])
2467
- .filter(function (e) { return e != null; })
2468
- .map(function (entry) {
1906
+ const deserializeAws_restJson1ListImportFileTaskInformation = (output, context) => {
1907
+ const retVal = (output || [])
1908
+ .filter((e) => e != null)
1909
+ .map((entry) => {
2469
1910
  if (entry === null) {
2470
1911
  return null;
2471
1912
  }
@@ -2473,10 +1914,10 @@ var deserializeAws_restJson1ListImportFileTaskInformation = function (output, co
2473
1914
  });
2474
1915
  return retVal;
2475
1916
  };
2476
- var deserializeAws_restJson1ListServerSummary = function (output, context) {
2477
- var retVal = (output || [])
2478
- .filter(function (e) { return e != null; })
2479
- .map(function (entry) {
1917
+ const deserializeAws_restJson1ListServerSummary = (output, context) => {
1918
+ const retVal = (output || [])
1919
+ .filter((e) => e != null)
1920
+ .map((entry) => {
2480
1921
  if (entry === null) {
2481
1922
  return null;
2482
1923
  }
@@ -2484,10 +1925,10 @@ var deserializeAws_restJson1ListServerSummary = function (output, context) {
2484
1925
  });
2485
1926
  return retVal;
2486
1927
  };
2487
- var deserializeAws_restJson1ListStrategySummary = function (output, context) {
2488
- var retVal = (output || [])
2489
- .filter(function (e) { return e != null; })
2490
- .map(function (entry) {
1928
+ const deserializeAws_restJson1ListStrategySummary = (output, context) => {
1929
+ const retVal = (output || [])
1930
+ .filter((e) => e != null)
1931
+ .map((entry) => {
2491
1932
  if (entry === null) {
2492
1933
  return null;
2493
1934
  }
@@ -2495,7 +1936,7 @@ var deserializeAws_restJson1ListStrategySummary = function (output, context) {
2495
1936
  });
2496
1937
  return retVal;
2497
1938
  };
2498
- var deserializeAws_restJson1ManagementPreference = function (output, context) {
1939
+ const deserializeAws_restJson1ManagementPreference = (output, context) => {
2499
1940
  if (output.awsManagedResources != null) {
2500
1941
  return {
2501
1942
  awsManagedResources: deserializeAws_restJson1AwsManagedResources(output.awsManagedResources, context),
@@ -2513,7 +1954,7 @@ var deserializeAws_restJson1ManagementPreference = function (output, context) {
2513
1954
  }
2514
1955
  return { $unknown: Object.entries(output)[0] };
2515
1956
  };
2516
- var deserializeAws_restJson1NetworkInfo = function (output, context) {
1957
+ const deserializeAws_restJson1NetworkInfo = (output, context) => {
2517
1958
  return {
2518
1959
  interfaceName: __expectString(output.interfaceName),
2519
1960
  ipAddress: __expectString(output.ipAddress),
@@ -2521,10 +1962,10 @@ var deserializeAws_restJson1NetworkInfo = function (output, context) {
2521
1962
  netMask: __expectString(output.netMask),
2522
1963
  };
2523
1964
  };
2524
- var deserializeAws_restJson1NetworkInfoList = function (output, context) {
2525
- var retVal = (output || [])
2526
- .filter(function (e) { return e != null; })
2527
- .map(function (entry) {
1965
+ const deserializeAws_restJson1NetworkInfoList = (output, context) => {
1966
+ const retVal = (output || [])
1967
+ .filter((e) => e != null)
1968
+ .map((entry) => {
2528
1969
  if (entry === null) {
2529
1970
  return null;
2530
1971
  }
@@ -2532,24 +1973,24 @@ var deserializeAws_restJson1NetworkInfoList = function (output, context) {
2532
1973
  });
2533
1974
  return retVal;
2534
1975
  };
2535
- var deserializeAws_restJson1NoDatabaseMigrationPreference = function (output, context) {
1976
+ const deserializeAws_restJson1NoDatabaseMigrationPreference = (output, context) => {
2536
1977
  return {
2537
1978
  targetDatabaseEngine: output.targetDatabaseEngine != null
2538
1979
  ? deserializeAws_restJson1TargetDatabaseEngines(output.targetDatabaseEngine, context)
2539
1980
  : undefined,
2540
1981
  };
2541
1982
  };
2542
- var deserializeAws_restJson1NoManagementPreference = function (output, context) {
1983
+ const deserializeAws_restJson1NoManagementPreference = (output, context) => {
2543
1984
  return {
2544
1985
  targetDestination: output.targetDestination != null
2545
1986
  ? deserializeAws_restJson1NoPreferenceTargetDestinations(output.targetDestination, context)
2546
1987
  : undefined,
2547
1988
  };
2548
1989
  };
2549
- var deserializeAws_restJson1NoPreferenceTargetDestinations = function (output, context) {
2550
- var retVal = (output || [])
2551
- .filter(function (e) { return e != null; })
2552
- .map(function (entry) {
1990
+ const deserializeAws_restJson1NoPreferenceTargetDestinations = (output, context) => {
1991
+ const retVal = (output || [])
1992
+ .filter((e) => e != null)
1993
+ .map((entry) => {
2553
1994
  if (entry === null) {
2554
1995
  return null;
2555
1996
  }
@@ -2557,18 +1998,18 @@ var deserializeAws_restJson1NoPreferenceTargetDestinations = function (output, c
2557
1998
  });
2558
1999
  return retVal;
2559
2000
  };
2560
- var deserializeAws_restJson1OSInfo = function (output, context) {
2001
+ const deserializeAws_restJson1OSInfo = (output, context) => {
2561
2002
  return {
2562
2003
  type: __expectString(output.type),
2563
2004
  version: __expectString(output.version),
2564
2005
  };
2565
2006
  };
2566
- var deserializeAws_restJson1PrioritizeBusinessGoals = function (output, context) {
2007
+ const deserializeAws_restJson1PrioritizeBusinessGoals = (output, context) => {
2567
2008
  return {
2568
2009
  businessGoals: output.businessGoals != null ? deserializeAws_restJson1BusinessGoals(output.businessGoals, context) : undefined,
2569
2010
  };
2570
2011
  };
2571
- var deserializeAws_restJson1RecommendationReportDetails = function (output, context) {
2012
+ const deserializeAws_restJson1RecommendationReportDetails = (output, context) => {
2572
2013
  return {
2573
2014
  completionTime: output.completionTime != null
2574
2015
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime)))
@@ -2580,7 +2021,7 @@ var deserializeAws_restJson1RecommendationReportDetails = function (output, cont
2580
2021
  statusMessage: __expectString(output.statusMessage),
2581
2022
  };
2582
2023
  };
2583
- var deserializeAws_restJson1RecommendationSet = function (output, context) {
2024
+ const deserializeAws_restJson1RecommendationSet = (output, context) => {
2584
2025
  return {
2585
2026
  strategy: __expectString(output.strategy),
2586
2027
  targetDestination: __expectString(output.targetDestination),
@@ -2589,10 +2030,10 @@ var deserializeAws_restJson1RecommendationSet = function (output, context) {
2589
2030
  : undefined,
2590
2031
  };
2591
2032
  };
2592
- var deserializeAws_restJson1S3Keys = function (output, context) {
2593
- var retVal = (output || [])
2594
- .filter(function (e) { return e != null; })
2595
- .map(function (entry) {
2033
+ const deserializeAws_restJson1S3Keys = (output, context) => {
2034
+ const retVal = (output || [])
2035
+ .filter((e) => e != null)
2036
+ .map((entry) => {
2596
2037
  if (entry === null) {
2597
2038
  return null;
2598
2039
  }
@@ -2600,23 +2041,23 @@ var deserializeAws_restJson1S3Keys = function (output, context) {
2600
2041
  });
2601
2042
  return retVal;
2602
2043
  };
2603
- var deserializeAws_restJson1S3Object = function (output, context) {
2044
+ const deserializeAws_restJson1S3Object = (output, context) => {
2604
2045
  return {
2605
2046
  s3Bucket: __expectString(output.s3Bucket),
2606
2047
  s3key: __expectString(output.s3key),
2607
2048
  };
2608
2049
  };
2609
- var deserializeAws_restJson1SelfManageResources = function (output, context) {
2050
+ const deserializeAws_restJson1SelfManageResources = (output, context) => {
2610
2051
  return {
2611
2052
  targetDestination: output.targetDestination != null
2612
2053
  ? deserializeAws_restJson1SelfManageTargetDestinations(output.targetDestination, context)
2613
2054
  : undefined,
2614
2055
  };
2615
2056
  };
2616
- var deserializeAws_restJson1SelfManageTargetDestinations = function (output, context) {
2617
- var retVal = (output || [])
2618
- .filter(function (e) { return e != null; })
2619
- .map(function (entry) {
2057
+ const deserializeAws_restJson1SelfManageTargetDestinations = (output, context) => {
2058
+ const retVal = (output || [])
2059
+ .filter((e) => e != null)
2060
+ .map((entry) => {
2620
2061
  if (entry === null) {
2621
2062
  return null;
2622
2063
  }
@@ -2624,7 +2065,7 @@ var deserializeAws_restJson1SelfManageTargetDestinations = function (output, con
2624
2065
  });
2625
2066
  return retVal;
2626
2067
  };
2627
- var deserializeAws_restJson1ServerDetail = function (output, context) {
2068
+ const deserializeAws_restJson1ServerDetail = (output, context) => {
2628
2069
  return {
2629
2070
  antipatternReportS3Object: output.antipatternReportS3Object != null
2630
2071
  ? deserializeAws_restJson1S3Object(output.antipatternReportS3Object, context)
@@ -2651,10 +2092,10 @@ var deserializeAws_restJson1ServerDetail = function (output, context) {
2651
2092
  systemInfo: output.systemInfo != null ? deserializeAws_restJson1SystemInfo(output.systemInfo, context) : undefined,
2652
2093
  };
2653
2094
  };
2654
- var deserializeAws_restJson1ServerDetails = function (output, context) {
2655
- var retVal = (output || [])
2656
- .filter(function (e) { return e != null; })
2657
- .map(function (entry) {
2095
+ const deserializeAws_restJson1ServerDetails = (output, context) => {
2096
+ const retVal = (output || [])
2097
+ .filter((e) => e != null)
2098
+ .map((entry) => {
2658
2099
  if (entry === null) {
2659
2100
  return null;
2660
2101
  }
@@ -2662,10 +2103,10 @@ var deserializeAws_restJson1ServerDetails = function (output, context) {
2662
2103
  });
2663
2104
  return retVal;
2664
2105
  };
2665
- var deserializeAws_restJson1ServerStrategies = function (output, context) {
2666
- var retVal = (output || [])
2667
- .filter(function (e) { return e != null; })
2668
- .map(function (entry) {
2106
+ const deserializeAws_restJson1ServerStrategies = (output, context) => {
2107
+ const retVal = (output || [])
2108
+ .filter((e) => e != null)
2109
+ .map((entry) => {
2669
2110
  if (entry === null) {
2670
2111
  return null;
2671
2112
  }
@@ -2673,7 +2114,7 @@ var deserializeAws_restJson1ServerStrategies = function (output, context) {
2673
2114
  });
2674
2115
  return retVal;
2675
2116
  };
2676
- var deserializeAws_restJson1ServerStrategy = function (output, context) {
2117
+ const deserializeAws_restJson1ServerStrategy = (output, context) => {
2677
2118
  return {
2678
2119
  isPreferred: __expectBoolean(output.isPreferred),
2679
2120
  numberOfApplicationComponents: __expectInt32(output.numberOfApplicationComponents),
@@ -2683,16 +2124,16 @@ var deserializeAws_restJson1ServerStrategy = function (output, context) {
2683
2124
  status: __expectString(output.status),
2684
2125
  };
2685
2126
  };
2686
- var deserializeAws_restJson1ServerSummary = function (output, context) {
2127
+ const deserializeAws_restJson1ServerSummary = (output, context) => {
2687
2128
  return {
2688
2129
  ServerOsType: __expectString(output.ServerOsType),
2689
2130
  count: __expectInt32(output.count),
2690
2131
  };
2691
2132
  };
2692
- var deserializeAws_restJson1SourceCodeRepositories = function (output, context) {
2693
- var retVal = (output || [])
2694
- .filter(function (e) { return e != null; })
2695
- .map(function (entry) {
2133
+ const deserializeAws_restJson1SourceCodeRepositories = (output, context) => {
2134
+ const retVal = (output || [])
2135
+ .filter((e) => e != null)
2136
+ .map((entry) => {
2696
2137
  if (entry === null) {
2697
2138
  return null;
2698
2139
  }
@@ -2700,20 +2141,20 @@ var deserializeAws_restJson1SourceCodeRepositories = function (output, context)
2700
2141
  });
2701
2142
  return retVal;
2702
2143
  };
2703
- var deserializeAws_restJson1SourceCodeRepository = function (output, context) {
2144
+ const deserializeAws_restJson1SourceCodeRepository = (output, context) => {
2704
2145
  return {
2705
2146
  branch: __expectString(output.branch),
2706
2147
  repository: __expectString(output.repository),
2707
2148
  versionControlType: __expectString(output.versionControlType),
2708
2149
  };
2709
2150
  };
2710
- var deserializeAws_restJson1StrategySummary = function (output, context) {
2151
+ const deserializeAws_restJson1StrategySummary = (output, context) => {
2711
2152
  return {
2712
2153
  count: __expectInt32(output.count),
2713
2154
  strategy: __expectString(output.strategy),
2714
2155
  };
2715
2156
  };
2716
- var deserializeAws_restJson1SystemInfo = function (output, context) {
2157
+ const deserializeAws_restJson1SystemInfo = (output, context) => {
2717
2158
  return {
2718
2159
  cpuArchitecture: __expectString(output.cpuArchitecture),
2719
2160
  fileSystemType: __expectString(output.fileSystemType),
@@ -2723,10 +2164,10 @@ var deserializeAws_restJson1SystemInfo = function (output, context) {
2723
2164
  osInfo: output.osInfo != null ? deserializeAws_restJson1OSInfo(output.osInfo, context) : undefined,
2724
2165
  };
2725
2166
  };
2726
- var deserializeAws_restJson1TargetDatabaseEngines = function (output, context) {
2727
- var retVal = (output || [])
2728
- .filter(function (e) { return e != null; })
2729
- .map(function (entry) {
2167
+ const deserializeAws_restJson1TargetDatabaseEngines = (output, context) => {
2168
+ const retVal = (output || [])
2169
+ .filter((e) => e != null)
2170
+ .map((entry) => {
2730
2171
  if (entry === null) {
2731
2172
  return null;
2732
2173
  }
@@ -2734,64 +2175,46 @@ var deserializeAws_restJson1TargetDatabaseEngines = function (output, context) {
2734
2175
  });
2735
2176
  return retVal;
2736
2177
  };
2737
- var deserializeAws_restJson1TransformationTool = function (output, context) {
2178
+ const deserializeAws_restJson1TransformationTool = (output, context) => {
2738
2179
  return {
2739
2180
  description: __expectString(output.description),
2740
2181
  name: __expectString(output.name),
2741
2182
  tranformationToolInstallationLink: __expectString(output.tranformationToolInstallationLink),
2742
2183
  };
2743
2184
  };
2744
- var deserializeMetadata = function (output) {
2745
- var _a, _b;
2746
- return ({
2747
- httpStatusCode: output.statusCode,
2748
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2749
- extendedRequestId: output.headers["x-amz-id-2"],
2750
- cfId: output.headers["x-amz-cf-id"],
2751
- });
2752
- };
2753
- var collectBody = function (streamBody, context) {
2754
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
2185
+ const deserializeMetadata = (output) => ({
2186
+ httpStatusCode: output.statusCode,
2187
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2188
+ extendedRequestId: output.headers["x-amz-id-2"],
2189
+ cfId: output.headers["x-amz-cf-id"],
2190
+ });
2191
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2755
2192
  if (streamBody instanceof Uint8Array) {
2756
2193
  return Promise.resolve(streamBody);
2757
2194
  }
2758
2195
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2759
2196
  };
2760
- var collectBodyString = function (streamBody, context) {
2761
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2762
- };
2763
- var isSerializableHeaderValue = function (value) {
2764
- return value !== undefined &&
2765
- value !== null &&
2766
- value !== "" &&
2767
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2768
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2769
- };
2770
- var parseBody = function (streamBody, context) {
2771
- return collectBodyString(streamBody, context).then(function (encoded) {
2772
- if (encoded.length) {
2773
- return JSON.parse(encoded);
2774
- }
2775
- return {};
2776
- });
2777
- };
2778
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2779
- var value;
2780
- var _a;
2781
- return __generator(this, function (_b) {
2782
- switch (_b.label) {
2783
- case 0: return [4, parseBody(errorBody, context)];
2784
- case 1:
2785
- value = _b.sent();
2786
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2787
- return [2, value];
2788
- }
2789
- });
2790
- }); };
2791
- var loadRestJsonErrorCode = function (output, data) {
2792
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2793
- var sanitizeErrorCode = function (rawValue) {
2794
- var cleanValue = rawValue;
2197
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2198
+ const isSerializableHeaderValue = (value) => value !== undefined &&
2199
+ value !== null &&
2200
+ value !== "" &&
2201
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2202
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2203
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2204
+ if (encoded.length) {
2205
+ return JSON.parse(encoded);
2206
+ }
2207
+ return {};
2208
+ });
2209
+ const parseErrorBody = async (errorBody, context) => {
2210
+ const value = await parseBody(errorBody, context);
2211
+ value.message = value.message ?? value.Message;
2212
+ return value;
2213
+ };
2214
+ const loadRestJsonErrorCode = (output, data) => {
2215
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2216
+ const sanitizeErrorCode = (rawValue) => {
2217
+ let cleanValue = rawValue;
2795
2218
  if (typeof cleanValue === "number") {
2796
2219
  cleanValue = cleanValue.toString();
2797
2220
  }
@@ -2806,7 +2229,7 @@ var loadRestJsonErrorCode = function (output, data) {
2806
2229
  }
2807
2230
  return cleanValue;
2808
2231
  };
2809
- var headerKey = findKey(output.headers, "x-amzn-errortype");
2232
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2810
2233
  if (headerKey !== undefined) {
2811
2234
  return sanitizeErrorCode(output.headers[headerKey]);
2812
2235
  }