@aws-sdk/client-migrationhubstrategy 3.137.0 → 3.145.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.
- package/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/dist-cjs/protocols/Aws_restJson1.js +241 -426
- package/dist-es/protocols/Aws_restJson1.js +309 -425
- package/package.json +11 -6
|
@@ -10,16 +10,7 @@ const serializeAws_restJson1GetApplicationComponentDetailsCommand = async (input
|
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
12
12
|
"/get-applicationcomponent-details/{applicationComponentId}";
|
|
13
|
-
|
|
14
|
-
const labelValue = input.applicationComponentId;
|
|
15
|
-
if (labelValue.length <= 0) {
|
|
16
|
-
throw new Error("Empty value provided for input HTTP label: applicationComponentId.");
|
|
17
|
-
}
|
|
18
|
-
resolvedPath = resolvedPath.replace("{applicationComponentId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
throw new Error("No value provided for input HTTP label: applicationComponentId.");
|
|
22
|
-
}
|
|
13
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
|
|
23
14
|
let body;
|
|
24
15
|
return new protocol_http_1.HttpRequest({
|
|
25
16
|
protocol,
|
|
@@ -37,16 +28,7 @@ const serializeAws_restJson1GetApplicationComponentStrategiesCommand = async (in
|
|
|
37
28
|
const headers = {};
|
|
38
29
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
39
30
|
"/get-applicationcomponent-strategies/{applicationComponentId}";
|
|
40
|
-
|
|
41
|
-
const labelValue = input.applicationComponentId;
|
|
42
|
-
if (labelValue.length <= 0) {
|
|
43
|
-
throw new Error("Empty value provided for input HTTP label: applicationComponentId.");
|
|
44
|
-
}
|
|
45
|
-
resolvedPath = resolvedPath.replace("{applicationComponentId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
throw new Error("No value provided for input HTTP label: applicationComponentId.");
|
|
49
|
-
}
|
|
31
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
|
|
50
32
|
let body;
|
|
51
33
|
return new protocol_http_1.HttpRequest({
|
|
52
34
|
protocol,
|
|
@@ -63,16 +45,7 @@ const serializeAws_restJson1GetAssessmentCommand = async (input, context) => {
|
|
|
63
45
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
64
46
|
const headers = {};
|
|
65
47
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/get-assessment/{id}";
|
|
66
|
-
|
|
67
|
-
const labelValue = input.id;
|
|
68
|
-
if (labelValue.length <= 0) {
|
|
69
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
70
|
-
}
|
|
71
|
-
resolvedPath = resolvedPath.replace("{id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
75
|
-
}
|
|
48
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
76
49
|
let body;
|
|
77
50
|
return new protocol_http_1.HttpRequest({
|
|
78
51
|
protocol,
|
|
@@ -89,16 +62,7 @@ const serializeAws_restJson1GetImportFileTaskCommand = async (input, context) =>
|
|
|
89
62
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
90
63
|
const headers = {};
|
|
91
64
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/get-import-file-task/{id}";
|
|
92
|
-
|
|
93
|
-
const labelValue = input.id;
|
|
94
|
-
if (labelValue.length <= 0) {
|
|
95
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
96
|
-
}
|
|
97
|
-
resolvedPath = resolvedPath.replace("{id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
101
|
-
}
|
|
65
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
102
66
|
let body;
|
|
103
67
|
return new protocol_http_1.HttpRequest({
|
|
104
68
|
protocol,
|
|
@@ -153,16 +117,7 @@ const serializeAws_restJson1GetRecommendationReportDetailsCommand = async (input
|
|
|
153
117
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
154
118
|
const headers = {};
|
|
155
119
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/get-recommendation-report-details/{id}";
|
|
156
|
-
|
|
157
|
-
const labelValue = input.id;
|
|
158
|
-
if (labelValue.length <= 0) {
|
|
159
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
160
|
-
}
|
|
161
|
-
resolvedPath = resolvedPath.replace("{id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
165
|
-
}
|
|
120
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
166
121
|
let body;
|
|
167
122
|
return new protocol_http_1.HttpRequest({
|
|
168
123
|
protocol,
|
|
@@ -179,20 +134,11 @@ const serializeAws_restJson1GetServerDetailsCommand = async (input, context) =>
|
|
|
179
134
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
180
135
|
const headers = {};
|
|
181
136
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-details/{serverId}";
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
resolvedPath = resolvedPath.replace("{serverId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
throw new Error("No value provided for input HTTP label: serverId.");
|
|
191
|
-
}
|
|
192
|
-
const query = {
|
|
193
|
-
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
194
|
-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
195
|
-
};
|
|
137
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serverId", () => input.serverId, "{serverId}", false);
|
|
138
|
+
const query = map({
|
|
139
|
+
nextToken: [, input.nextToken],
|
|
140
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
141
|
+
});
|
|
196
142
|
let body;
|
|
197
143
|
return new protocol_http_1.HttpRequest({
|
|
198
144
|
protocol,
|
|
@@ -210,16 +156,7 @@ const serializeAws_restJson1GetServerStrategiesCommand = async (input, context)
|
|
|
210
156
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
211
157
|
const headers = {};
|
|
212
158
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-strategies/{serverId}";
|
|
213
|
-
|
|
214
|
-
const labelValue = input.serverId;
|
|
215
|
-
if (labelValue.length <= 0) {
|
|
216
|
-
throw new Error("Empty value provided for input HTTP label: serverId.");
|
|
217
|
-
}
|
|
218
|
-
resolvedPath = resolvedPath.replace("{serverId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
throw new Error("No value provided for input HTTP label: serverId.");
|
|
222
|
-
}
|
|
159
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serverId", () => input.serverId, "{serverId}", false);
|
|
223
160
|
let body;
|
|
224
161
|
return new protocol_http_1.HttpRequest({
|
|
225
162
|
protocol,
|
|
@@ -264,10 +201,10 @@ const serializeAws_restJson1ListCollectorsCommand = async (input, context) => {
|
|
|
264
201
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
265
202
|
const headers = {};
|
|
266
203
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-collectors";
|
|
267
|
-
const query = {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
};
|
|
204
|
+
const query = map({
|
|
205
|
+
nextToken: [, input.nextToken],
|
|
206
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
207
|
+
});
|
|
271
208
|
let body;
|
|
272
209
|
return new protocol_http_1.HttpRequest({
|
|
273
210
|
protocol,
|
|
@@ -285,10 +222,10 @@ const serializeAws_restJson1ListImportFileTaskCommand = async (input, context) =
|
|
|
285
222
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
286
223
|
const headers = {};
|
|
287
224
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-import-file-task";
|
|
288
|
-
const query = {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
};
|
|
225
|
+
const query = map({
|
|
226
|
+
nextToken: [, input.nextToken],
|
|
227
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
228
|
+
});
|
|
292
229
|
let body;
|
|
293
230
|
return new protocol_http_1.HttpRequest({
|
|
294
231
|
protocol,
|
|
@@ -505,27 +442,23 @@ const deserializeAws_restJson1GetApplicationComponentDetailsCommand = async (out
|
|
|
505
442
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
506
443
|
return deserializeAws_restJson1GetApplicationComponentDetailsCommandError(output, context);
|
|
507
444
|
}
|
|
508
|
-
const contents = {
|
|
445
|
+
const contents = map({
|
|
509
446
|
$metadata: deserializeMetadata(output),
|
|
510
|
-
|
|
511
|
-
associatedApplications: undefined,
|
|
512
|
-
associatedServerIds: undefined,
|
|
513
|
-
moreApplicationResource: undefined,
|
|
514
|
-
};
|
|
447
|
+
});
|
|
515
448
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
516
|
-
if (data.applicationComponentDetail
|
|
449
|
+
if (data.applicationComponentDetail != null) {
|
|
517
450
|
contents.applicationComponentDetail = deserializeAws_restJson1ApplicationComponentDetail(data.applicationComponentDetail, context);
|
|
518
451
|
}
|
|
519
|
-
if (data.associatedApplications
|
|
452
|
+
if (data.associatedApplications != null) {
|
|
520
453
|
contents.associatedApplications = deserializeAws_restJson1AssociatedApplications(data.associatedApplications, context);
|
|
521
454
|
}
|
|
522
|
-
if (data.associatedServerIds
|
|
455
|
+
if (data.associatedServerIds != null) {
|
|
523
456
|
contents.associatedServerIds = deserializeAws_restJson1AssociatedServerIDs(data.associatedServerIds, context);
|
|
524
457
|
}
|
|
525
|
-
if (data.moreApplicationResource
|
|
458
|
+
if (data.moreApplicationResource != null) {
|
|
526
459
|
contents.moreApplicationResource = (0, smithy_client_1.expectBoolean)(data.moreApplicationResource);
|
|
527
460
|
}
|
|
528
|
-
return
|
|
461
|
+
return contents;
|
|
529
462
|
};
|
|
530
463
|
exports.deserializeAws_restJson1GetApplicationComponentDetailsCommand = deserializeAws_restJson1GetApplicationComponentDetailsCommand;
|
|
531
464
|
const deserializeAws_restJson1GetApplicationComponentDetailsCommandError = async (output, context) => {
|
|
@@ -533,7 +466,6 @@ const deserializeAws_restJson1GetApplicationComponentDetailsCommandError = async
|
|
|
533
466
|
...output,
|
|
534
467
|
body: await parseBody(output.body, context),
|
|
535
468
|
};
|
|
536
|
-
let response;
|
|
537
469
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
538
470
|
switch (errorCode) {
|
|
539
471
|
case "InternalServerException":
|
|
@@ -547,29 +479,26 @@ const deserializeAws_restJson1GetApplicationComponentDetailsCommandError = async
|
|
|
547
479
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
548
480
|
default:
|
|
549
481
|
const parsedBody = parsedOutput.body;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
$metadata,
|
|
482
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
483
|
+
output,
|
|
484
|
+
parsedBody,
|
|
485
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
486
|
+
errorCode,
|
|
556
487
|
});
|
|
557
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
558
488
|
}
|
|
559
489
|
};
|
|
560
490
|
const deserializeAws_restJson1GetApplicationComponentStrategiesCommand = async (output, context) => {
|
|
561
491
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
562
492
|
return deserializeAws_restJson1GetApplicationComponentStrategiesCommandError(output, context);
|
|
563
493
|
}
|
|
564
|
-
const contents = {
|
|
494
|
+
const contents = map({
|
|
565
495
|
$metadata: deserializeMetadata(output),
|
|
566
|
-
|
|
567
|
-
};
|
|
496
|
+
});
|
|
568
497
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
569
|
-
if (data.applicationComponentStrategies
|
|
498
|
+
if (data.applicationComponentStrategies != null) {
|
|
570
499
|
contents.applicationComponentStrategies = deserializeAws_restJson1ApplicationComponentStrategies(data.applicationComponentStrategies, context);
|
|
571
500
|
}
|
|
572
|
-
return
|
|
501
|
+
return contents;
|
|
573
502
|
};
|
|
574
503
|
exports.deserializeAws_restJson1GetApplicationComponentStrategiesCommand = deserializeAws_restJson1GetApplicationComponentStrategiesCommand;
|
|
575
504
|
const deserializeAws_restJson1GetApplicationComponentStrategiesCommandError = async (output, context) => {
|
|
@@ -577,7 +506,6 @@ const deserializeAws_restJson1GetApplicationComponentStrategiesCommandError = as
|
|
|
577
506
|
...output,
|
|
578
507
|
body: await parseBody(output.body, context),
|
|
579
508
|
};
|
|
580
|
-
let response;
|
|
581
509
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
582
510
|
switch (errorCode) {
|
|
583
511
|
case "InternalServerException":
|
|
@@ -591,33 +519,29 @@ const deserializeAws_restJson1GetApplicationComponentStrategiesCommandError = as
|
|
|
591
519
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
592
520
|
default:
|
|
593
521
|
const parsedBody = parsedOutput.body;
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
$metadata,
|
|
522
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
523
|
+
output,
|
|
524
|
+
parsedBody,
|
|
525
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
526
|
+
errorCode,
|
|
600
527
|
});
|
|
601
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
602
528
|
}
|
|
603
529
|
};
|
|
604
530
|
const deserializeAws_restJson1GetAssessmentCommand = async (output, context) => {
|
|
605
531
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
606
532
|
return deserializeAws_restJson1GetAssessmentCommandError(output, context);
|
|
607
533
|
}
|
|
608
|
-
const contents = {
|
|
534
|
+
const contents = map({
|
|
609
535
|
$metadata: deserializeMetadata(output),
|
|
610
|
-
|
|
611
|
-
id: undefined,
|
|
612
|
-
};
|
|
536
|
+
});
|
|
613
537
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
614
|
-
if (data.dataCollectionDetails
|
|
538
|
+
if (data.dataCollectionDetails != null) {
|
|
615
539
|
contents.dataCollectionDetails = deserializeAws_restJson1DataCollectionDetails(data.dataCollectionDetails, context);
|
|
616
540
|
}
|
|
617
|
-
if (data.id
|
|
541
|
+
if (data.id != null) {
|
|
618
542
|
contents.id = (0, smithy_client_1.expectString)(data.id);
|
|
619
543
|
}
|
|
620
|
-
return
|
|
544
|
+
return contents;
|
|
621
545
|
};
|
|
622
546
|
exports.deserializeAws_restJson1GetAssessmentCommand = deserializeAws_restJson1GetAssessmentCommand;
|
|
623
547
|
const deserializeAws_restJson1GetAssessmentCommandError = async (output, context) => {
|
|
@@ -625,7 +549,6 @@ const deserializeAws_restJson1GetAssessmentCommandError = async (output, context
|
|
|
625
549
|
...output,
|
|
626
550
|
body: await parseBody(output.body, context),
|
|
627
551
|
};
|
|
628
|
-
let response;
|
|
629
552
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
630
553
|
switch (errorCode) {
|
|
631
554
|
case "AccessDeniedException":
|
|
@@ -642,69 +565,56 @@ const deserializeAws_restJson1GetAssessmentCommandError = async (output, context
|
|
|
642
565
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
643
566
|
default:
|
|
644
567
|
const parsedBody = parsedOutput.body;
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
$metadata,
|
|
568
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
569
|
+
output,
|
|
570
|
+
parsedBody,
|
|
571
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
572
|
+
errorCode,
|
|
651
573
|
});
|
|
652
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
653
574
|
}
|
|
654
575
|
};
|
|
655
576
|
const deserializeAws_restJson1GetImportFileTaskCommand = async (output, context) => {
|
|
656
577
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
657
578
|
return deserializeAws_restJson1GetImportFileTaskCommandError(output, context);
|
|
658
579
|
}
|
|
659
|
-
const contents = {
|
|
580
|
+
const contents = map({
|
|
660
581
|
$metadata: deserializeMetadata(output),
|
|
661
|
-
|
|
662
|
-
id: undefined,
|
|
663
|
-
importName: undefined,
|
|
664
|
-
inputS3Bucket: undefined,
|
|
665
|
-
inputS3Key: undefined,
|
|
666
|
-
numberOfRecordsFailed: undefined,
|
|
667
|
-
numberOfRecordsSuccess: undefined,
|
|
668
|
-
startTime: undefined,
|
|
669
|
-
status: undefined,
|
|
670
|
-
statusReportS3Bucket: undefined,
|
|
671
|
-
statusReportS3Key: undefined,
|
|
672
|
-
};
|
|
582
|
+
});
|
|
673
583
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
674
|
-
if (data.completionTime
|
|
584
|
+
if (data.completionTime != null) {
|
|
675
585
|
contents.completionTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.completionTime)));
|
|
676
586
|
}
|
|
677
|
-
if (data.id
|
|
587
|
+
if (data.id != null) {
|
|
678
588
|
contents.id = (0, smithy_client_1.expectString)(data.id);
|
|
679
589
|
}
|
|
680
|
-
if (data.importName
|
|
590
|
+
if (data.importName != null) {
|
|
681
591
|
contents.importName = (0, smithy_client_1.expectString)(data.importName);
|
|
682
592
|
}
|
|
683
|
-
if (data.inputS3Bucket
|
|
593
|
+
if (data.inputS3Bucket != null) {
|
|
684
594
|
contents.inputS3Bucket = (0, smithy_client_1.expectString)(data.inputS3Bucket);
|
|
685
595
|
}
|
|
686
|
-
if (data.inputS3Key
|
|
596
|
+
if (data.inputS3Key != null) {
|
|
687
597
|
contents.inputS3Key = (0, smithy_client_1.expectString)(data.inputS3Key);
|
|
688
598
|
}
|
|
689
|
-
if (data.numberOfRecordsFailed
|
|
599
|
+
if (data.numberOfRecordsFailed != null) {
|
|
690
600
|
contents.numberOfRecordsFailed = (0, smithy_client_1.expectInt32)(data.numberOfRecordsFailed);
|
|
691
601
|
}
|
|
692
|
-
if (data.numberOfRecordsSuccess
|
|
602
|
+
if (data.numberOfRecordsSuccess != null) {
|
|
693
603
|
contents.numberOfRecordsSuccess = (0, smithy_client_1.expectInt32)(data.numberOfRecordsSuccess);
|
|
694
604
|
}
|
|
695
|
-
if (data.startTime
|
|
605
|
+
if (data.startTime != null) {
|
|
696
606
|
contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.startTime)));
|
|
697
607
|
}
|
|
698
|
-
if (data.status
|
|
608
|
+
if (data.status != null) {
|
|
699
609
|
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
700
610
|
}
|
|
701
|
-
if (data.statusReportS3Bucket
|
|
611
|
+
if (data.statusReportS3Bucket != null) {
|
|
702
612
|
contents.statusReportS3Bucket = (0, smithy_client_1.expectString)(data.statusReportS3Bucket);
|
|
703
613
|
}
|
|
704
|
-
if (data.statusReportS3Key
|
|
614
|
+
if (data.statusReportS3Key != null) {
|
|
705
615
|
contents.statusReportS3Key = (0, smithy_client_1.expectString)(data.statusReportS3Key);
|
|
706
616
|
}
|
|
707
|
-
return
|
|
617
|
+
return contents;
|
|
708
618
|
};
|
|
709
619
|
exports.deserializeAws_restJson1GetImportFileTaskCommand = deserializeAws_restJson1GetImportFileTaskCommand;
|
|
710
620
|
const deserializeAws_restJson1GetImportFileTaskCommandError = async (output, context) => {
|
|
@@ -712,7 +622,6 @@ const deserializeAws_restJson1GetImportFileTaskCommandError = async (output, con
|
|
|
712
622
|
...output,
|
|
713
623
|
body: await parseBody(output.body, context),
|
|
714
624
|
};
|
|
715
|
-
let response;
|
|
716
625
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
717
626
|
switch (errorCode) {
|
|
718
627
|
case "AccessDeniedException":
|
|
@@ -732,37 +641,32 @@ const deserializeAws_restJson1GetImportFileTaskCommandError = async (output, con
|
|
|
732
641
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
733
642
|
default:
|
|
734
643
|
const parsedBody = parsedOutput.body;
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
$metadata,
|
|
644
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
645
|
+
output,
|
|
646
|
+
parsedBody,
|
|
647
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
648
|
+
errorCode,
|
|
741
649
|
});
|
|
742
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
743
650
|
}
|
|
744
651
|
};
|
|
745
652
|
const deserializeAws_restJson1GetPortfolioPreferencesCommand = async (output, context) => {
|
|
746
653
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
747
654
|
return deserializeAws_restJson1GetPortfolioPreferencesCommandError(output, context);
|
|
748
655
|
}
|
|
749
|
-
const contents = {
|
|
656
|
+
const contents = map({
|
|
750
657
|
$metadata: deserializeMetadata(output),
|
|
751
|
-
|
|
752
|
-
databasePreferences: undefined,
|
|
753
|
-
prioritizeBusinessGoals: undefined,
|
|
754
|
-
};
|
|
658
|
+
});
|
|
755
659
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
756
|
-
if (data.applicationPreferences
|
|
660
|
+
if (data.applicationPreferences != null) {
|
|
757
661
|
contents.applicationPreferences = deserializeAws_restJson1ApplicationPreferences(data.applicationPreferences, context);
|
|
758
662
|
}
|
|
759
|
-
if (data.databasePreferences
|
|
663
|
+
if (data.databasePreferences != null) {
|
|
760
664
|
contents.databasePreferences = deserializeAws_restJson1DatabasePreferences(data.databasePreferences, context);
|
|
761
665
|
}
|
|
762
|
-
if (data.prioritizeBusinessGoals
|
|
666
|
+
if (data.prioritizeBusinessGoals != null) {
|
|
763
667
|
contents.prioritizeBusinessGoals = deserializeAws_restJson1PrioritizeBusinessGoals(data.prioritizeBusinessGoals, context);
|
|
764
668
|
}
|
|
765
|
-
return
|
|
669
|
+
return contents;
|
|
766
670
|
};
|
|
767
671
|
exports.deserializeAws_restJson1GetPortfolioPreferencesCommand = deserializeAws_restJson1GetPortfolioPreferencesCommand;
|
|
768
672
|
const deserializeAws_restJson1GetPortfolioPreferencesCommandError = async (output, context) => {
|
|
@@ -770,7 +674,6 @@ const deserializeAws_restJson1GetPortfolioPreferencesCommandError = async (outpu
|
|
|
770
674
|
...output,
|
|
771
675
|
body: await parseBody(output.body, context),
|
|
772
676
|
};
|
|
773
|
-
let response;
|
|
774
677
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
775
678
|
switch (errorCode) {
|
|
776
679
|
case "AccessDeniedException":
|
|
@@ -787,29 +690,26 @@ const deserializeAws_restJson1GetPortfolioPreferencesCommandError = async (outpu
|
|
|
787
690
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
788
691
|
default:
|
|
789
692
|
const parsedBody = parsedOutput.body;
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
$metadata,
|
|
693
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
694
|
+
output,
|
|
695
|
+
parsedBody,
|
|
696
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
697
|
+
errorCode,
|
|
796
698
|
});
|
|
797
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
798
699
|
}
|
|
799
700
|
};
|
|
800
701
|
const deserializeAws_restJson1GetPortfolioSummaryCommand = async (output, context) => {
|
|
801
702
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
802
703
|
return deserializeAws_restJson1GetPortfolioSummaryCommandError(output, context);
|
|
803
704
|
}
|
|
804
|
-
const contents = {
|
|
705
|
+
const contents = map({
|
|
805
706
|
$metadata: deserializeMetadata(output),
|
|
806
|
-
|
|
807
|
-
};
|
|
707
|
+
});
|
|
808
708
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
809
|
-
if (data.assessmentSummary
|
|
709
|
+
if (data.assessmentSummary != null) {
|
|
810
710
|
contents.assessmentSummary = deserializeAws_restJson1AssessmentSummary(data.assessmentSummary, context);
|
|
811
711
|
}
|
|
812
|
-
return
|
|
712
|
+
return contents;
|
|
813
713
|
};
|
|
814
714
|
exports.deserializeAws_restJson1GetPortfolioSummaryCommand = deserializeAws_restJson1GetPortfolioSummaryCommand;
|
|
815
715
|
const deserializeAws_restJson1GetPortfolioSummaryCommandError = async (output, context) => {
|
|
@@ -817,7 +717,6 @@ const deserializeAws_restJson1GetPortfolioSummaryCommandError = async (output, c
|
|
|
817
717
|
...output,
|
|
818
718
|
body: await parseBody(output.body, context),
|
|
819
719
|
};
|
|
820
|
-
let response;
|
|
821
720
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
822
721
|
switch (errorCode) {
|
|
823
722
|
case "AccessDeniedException":
|
|
@@ -831,33 +730,29 @@ const deserializeAws_restJson1GetPortfolioSummaryCommandError = async (output, c
|
|
|
831
730
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
832
731
|
default:
|
|
833
732
|
const parsedBody = parsedOutput.body;
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
$metadata,
|
|
733
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
734
|
+
output,
|
|
735
|
+
parsedBody,
|
|
736
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
737
|
+
errorCode,
|
|
840
738
|
});
|
|
841
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
842
739
|
}
|
|
843
740
|
};
|
|
844
741
|
const deserializeAws_restJson1GetRecommendationReportDetailsCommand = async (output, context) => {
|
|
845
742
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
846
743
|
return deserializeAws_restJson1GetRecommendationReportDetailsCommandError(output, context);
|
|
847
744
|
}
|
|
848
|
-
const contents = {
|
|
745
|
+
const contents = map({
|
|
849
746
|
$metadata: deserializeMetadata(output),
|
|
850
|
-
|
|
851
|
-
recommendationReportDetails: undefined,
|
|
852
|
-
};
|
|
747
|
+
});
|
|
853
748
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
854
|
-
if (data.id
|
|
749
|
+
if (data.id != null) {
|
|
855
750
|
contents.id = (0, smithy_client_1.expectString)(data.id);
|
|
856
751
|
}
|
|
857
|
-
if (data.recommendationReportDetails
|
|
752
|
+
if (data.recommendationReportDetails != null) {
|
|
858
753
|
contents.recommendationReportDetails = deserializeAws_restJson1RecommendationReportDetails(data.recommendationReportDetails, context);
|
|
859
754
|
}
|
|
860
|
-
return
|
|
755
|
+
return contents;
|
|
861
756
|
};
|
|
862
757
|
exports.deserializeAws_restJson1GetRecommendationReportDetailsCommand = deserializeAws_restJson1GetRecommendationReportDetailsCommand;
|
|
863
758
|
const deserializeAws_restJson1GetRecommendationReportDetailsCommandError = async (output, context) => {
|
|
@@ -865,7 +760,6 @@ const deserializeAws_restJson1GetRecommendationReportDetailsCommandError = async
|
|
|
865
760
|
...output,
|
|
866
761
|
body: await parseBody(output.body, context),
|
|
867
762
|
};
|
|
868
|
-
let response;
|
|
869
763
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
870
764
|
switch (errorCode) {
|
|
871
765
|
case "AccessDeniedException":
|
|
@@ -885,37 +779,32 @@ const deserializeAws_restJson1GetRecommendationReportDetailsCommandError = async
|
|
|
885
779
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
886
780
|
default:
|
|
887
781
|
const parsedBody = parsedOutput.body;
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
$metadata,
|
|
782
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
783
|
+
output,
|
|
784
|
+
parsedBody,
|
|
785
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
786
|
+
errorCode,
|
|
894
787
|
});
|
|
895
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
896
788
|
}
|
|
897
789
|
};
|
|
898
790
|
const deserializeAws_restJson1GetServerDetailsCommand = async (output, context) => {
|
|
899
791
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
900
792
|
return deserializeAws_restJson1GetServerDetailsCommandError(output, context);
|
|
901
793
|
}
|
|
902
|
-
const contents = {
|
|
794
|
+
const contents = map({
|
|
903
795
|
$metadata: deserializeMetadata(output),
|
|
904
|
-
|
|
905
|
-
nextToken: undefined,
|
|
906
|
-
serverDetail: undefined,
|
|
907
|
-
};
|
|
796
|
+
});
|
|
908
797
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
909
|
-
if (data.associatedApplications
|
|
798
|
+
if (data.associatedApplications != null) {
|
|
910
799
|
contents.associatedApplications = deserializeAws_restJson1AssociatedApplications(data.associatedApplications, context);
|
|
911
800
|
}
|
|
912
|
-
if (data.nextToken
|
|
801
|
+
if (data.nextToken != null) {
|
|
913
802
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
914
803
|
}
|
|
915
|
-
if (data.serverDetail
|
|
804
|
+
if (data.serverDetail != null) {
|
|
916
805
|
contents.serverDetail = deserializeAws_restJson1ServerDetail(data.serverDetail, context);
|
|
917
806
|
}
|
|
918
|
-
return
|
|
807
|
+
return contents;
|
|
919
808
|
};
|
|
920
809
|
exports.deserializeAws_restJson1GetServerDetailsCommand = deserializeAws_restJson1GetServerDetailsCommand;
|
|
921
810
|
const deserializeAws_restJson1GetServerDetailsCommandError = async (output, context) => {
|
|
@@ -923,7 +812,6 @@ const deserializeAws_restJson1GetServerDetailsCommandError = async (output, cont
|
|
|
923
812
|
...output,
|
|
924
813
|
body: await parseBody(output.body, context),
|
|
925
814
|
};
|
|
926
|
-
let response;
|
|
927
815
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
928
816
|
switch (errorCode) {
|
|
929
817
|
case "AccessDeniedException":
|
|
@@ -943,29 +831,26 @@ const deserializeAws_restJson1GetServerDetailsCommandError = async (output, cont
|
|
|
943
831
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
944
832
|
default:
|
|
945
833
|
const parsedBody = parsedOutput.body;
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
$metadata,
|
|
834
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
835
|
+
output,
|
|
836
|
+
parsedBody,
|
|
837
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
838
|
+
errorCode,
|
|
952
839
|
});
|
|
953
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
954
840
|
}
|
|
955
841
|
};
|
|
956
842
|
const deserializeAws_restJson1GetServerStrategiesCommand = async (output, context) => {
|
|
957
843
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
958
844
|
return deserializeAws_restJson1GetServerStrategiesCommandError(output, context);
|
|
959
845
|
}
|
|
960
|
-
const contents = {
|
|
846
|
+
const contents = map({
|
|
961
847
|
$metadata: deserializeMetadata(output),
|
|
962
|
-
|
|
963
|
-
};
|
|
848
|
+
});
|
|
964
849
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
965
|
-
if (data.serverStrategies
|
|
850
|
+
if (data.serverStrategies != null) {
|
|
966
851
|
contents.serverStrategies = deserializeAws_restJson1ServerStrategies(data.serverStrategies, context);
|
|
967
852
|
}
|
|
968
|
-
return
|
|
853
|
+
return contents;
|
|
969
854
|
};
|
|
970
855
|
exports.deserializeAws_restJson1GetServerStrategiesCommand = deserializeAws_restJson1GetServerStrategiesCommand;
|
|
971
856
|
const deserializeAws_restJson1GetServerStrategiesCommandError = async (output, context) => {
|
|
@@ -973,7 +858,6 @@ const deserializeAws_restJson1GetServerStrategiesCommandError = async (output, c
|
|
|
973
858
|
...output,
|
|
974
859
|
body: await parseBody(output.body, context),
|
|
975
860
|
};
|
|
976
|
-
let response;
|
|
977
861
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
978
862
|
switch (errorCode) {
|
|
979
863
|
case "AccessDeniedException":
|
|
@@ -993,33 +877,29 @@ const deserializeAws_restJson1GetServerStrategiesCommandError = async (output, c
|
|
|
993
877
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
994
878
|
default:
|
|
995
879
|
const parsedBody = parsedOutput.body;
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
$metadata,
|
|
880
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
881
|
+
output,
|
|
882
|
+
parsedBody,
|
|
883
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
884
|
+
errorCode,
|
|
1002
885
|
});
|
|
1003
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1004
886
|
}
|
|
1005
887
|
};
|
|
1006
888
|
const deserializeAws_restJson1ListApplicationComponentsCommand = async (output, context) => {
|
|
1007
889
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1008
890
|
return deserializeAws_restJson1ListApplicationComponentsCommandError(output, context);
|
|
1009
891
|
}
|
|
1010
|
-
const contents = {
|
|
892
|
+
const contents = map({
|
|
1011
893
|
$metadata: deserializeMetadata(output),
|
|
1012
|
-
|
|
1013
|
-
nextToken: undefined,
|
|
1014
|
-
};
|
|
894
|
+
});
|
|
1015
895
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1016
|
-
if (data.applicationComponentInfos
|
|
896
|
+
if (data.applicationComponentInfos != null) {
|
|
1017
897
|
contents.applicationComponentInfos = deserializeAws_restJson1ApplicationComponentDetails(data.applicationComponentInfos, context);
|
|
1018
898
|
}
|
|
1019
|
-
if (data.nextToken
|
|
899
|
+
if (data.nextToken != null) {
|
|
1020
900
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1021
901
|
}
|
|
1022
|
-
return
|
|
902
|
+
return contents;
|
|
1023
903
|
};
|
|
1024
904
|
exports.deserializeAws_restJson1ListApplicationComponentsCommand = deserializeAws_restJson1ListApplicationComponentsCommand;
|
|
1025
905
|
const deserializeAws_restJson1ListApplicationComponentsCommandError = async (output, context) => {
|
|
@@ -1027,7 +907,6 @@ const deserializeAws_restJson1ListApplicationComponentsCommandError = async (out
|
|
|
1027
907
|
...output,
|
|
1028
908
|
body: await parseBody(output.body, context),
|
|
1029
909
|
};
|
|
1030
|
-
let response;
|
|
1031
910
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1032
911
|
switch (errorCode) {
|
|
1033
912
|
case "AccessDeniedException":
|
|
@@ -1044,33 +923,29 @@ const deserializeAws_restJson1ListApplicationComponentsCommandError = async (out
|
|
|
1044
923
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1045
924
|
default:
|
|
1046
925
|
const parsedBody = parsedOutput.body;
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
$metadata,
|
|
926
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
927
|
+
output,
|
|
928
|
+
parsedBody,
|
|
929
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
930
|
+
errorCode,
|
|
1053
931
|
});
|
|
1054
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1055
932
|
}
|
|
1056
933
|
};
|
|
1057
934
|
const deserializeAws_restJson1ListCollectorsCommand = async (output, context) => {
|
|
1058
935
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1059
936
|
return deserializeAws_restJson1ListCollectorsCommandError(output, context);
|
|
1060
937
|
}
|
|
1061
|
-
const contents = {
|
|
938
|
+
const contents = map({
|
|
1062
939
|
$metadata: deserializeMetadata(output),
|
|
1063
|
-
|
|
1064
|
-
nextToken: undefined,
|
|
1065
|
-
};
|
|
940
|
+
});
|
|
1066
941
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1067
|
-
if (data.Collectors
|
|
942
|
+
if (data.Collectors != null) {
|
|
1068
943
|
contents.Collectors = deserializeAws_restJson1Collectors(data.Collectors, context);
|
|
1069
944
|
}
|
|
1070
|
-
if (data.nextToken
|
|
945
|
+
if (data.nextToken != null) {
|
|
1071
946
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1072
947
|
}
|
|
1073
|
-
return
|
|
948
|
+
return contents;
|
|
1074
949
|
};
|
|
1075
950
|
exports.deserializeAws_restJson1ListCollectorsCommand = deserializeAws_restJson1ListCollectorsCommand;
|
|
1076
951
|
const deserializeAws_restJson1ListCollectorsCommandError = async (output, context) => {
|
|
@@ -1078,7 +953,6 @@ const deserializeAws_restJson1ListCollectorsCommandError = async (output, contex
|
|
|
1078
953
|
...output,
|
|
1079
954
|
body: await parseBody(output.body, context),
|
|
1080
955
|
};
|
|
1081
|
-
let response;
|
|
1082
956
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1083
957
|
switch (errorCode) {
|
|
1084
958
|
case "AccessDeniedException":
|
|
@@ -1095,33 +969,29 @@ const deserializeAws_restJson1ListCollectorsCommandError = async (output, contex
|
|
|
1095
969
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1096
970
|
default:
|
|
1097
971
|
const parsedBody = parsedOutput.body;
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
$metadata,
|
|
972
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
973
|
+
output,
|
|
974
|
+
parsedBody,
|
|
975
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
976
|
+
errorCode,
|
|
1104
977
|
});
|
|
1105
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1106
978
|
}
|
|
1107
979
|
};
|
|
1108
980
|
const deserializeAws_restJson1ListImportFileTaskCommand = async (output, context) => {
|
|
1109
981
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1110
982
|
return deserializeAws_restJson1ListImportFileTaskCommandError(output, context);
|
|
1111
983
|
}
|
|
1112
|
-
const contents = {
|
|
984
|
+
const contents = map({
|
|
1113
985
|
$metadata: deserializeMetadata(output),
|
|
1114
|
-
|
|
1115
|
-
taskInfos: undefined,
|
|
1116
|
-
};
|
|
986
|
+
});
|
|
1117
987
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1118
|
-
if (data.nextToken
|
|
988
|
+
if (data.nextToken != null) {
|
|
1119
989
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1120
990
|
}
|
|
1121
|
-
if (data.taskInfos
|
|
991
|
+
if (data.taskInfos != null) {
|
|
1122
992
|
contents.taskInfos = deserializeAws_restJson1ListImportFileTaskInformation(data.taskInfos, context);
|
|
1123
993
|
}
|
|
1124
|
-
return
|
|
994
|
+
return contents;
|
|
1125
995
|
};
|
|
1126
996
|
exports.deserializeAws_restJson1ListImportFileTaskCommand = deserializeAws_restJson1ListImportFileTaskCommand;
|
|
1127
997
|
const deserializeAws_restJson1ListImportFileTaskCommandError = async (output, context) => {
|
|
@@ -1129,7 +999,6 @@ const deserializeAws_restJson1ListImportFileTaskCommandError = async (output, co
|
|
|
1129
999
|
...output,
|
|
1130
1000
|
body: await parseBody(output.body, context),
|
|
1131
1001
|
};
|
|
1132
|
-
let response;
|
|
1133
1002
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1134
1003
|
switch (errorCode) {
|
|
1135
1004
|
case "AccessDeniedException":
|
|
@@ -1146,33 +1015,29 @@ const deserializeAws_restJson1ListImportFileTaskCommandError = async (output, co
|
|
|
1146
1015
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1147
1016
|
default:
|
|
1148
1017
|
const parsedBody = parsedOutput.body;
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
$metadata,
|
|
1018
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1019
|
+
output,
|
|
1020
|
+
parsedBody,
|
|
1021
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1022
|
+
errorCode,
|
|
1155
1023
|
});
|
|
1156
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1157
1024
|
}
|
|
1158
1025
|
};
|
|
1159
1026
|
const deserializeAws_restJson1ListServersCommand = async (output, context) => {
|
|
1160
1027
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1161
1028
|
return deserializeAws_restJson1ListServersCommandError(output, context);
|
|
1162
1029
|
}
|
|
1163
|
-
const contents = {
|
|
1030
|
+
const contents = map({
|
|
1164
1031
|
$metadata: deserializeMetadata(output),
|
|
1165
|
-
|
|
1166
|
-
serverInfos: undefined,
|
|
1167
|
-
};
|
|
1032
|
+
});
|
|
1168
1033
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1169
|
-
if (data.nextToken
|
|
1034
|
+
if (data.nextToken != null) {
|
|
1170
1035
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1171
1036
|
}
|
|
1172
|
-
if (data.serverInfos
|
|
1037
|
+
if (data.serverInfos != null) {
|
|
1173
1038
|
contents.serverInfos = deserializeAws_restJson1ServerDetails(data.serverInfos, context);
|
|
1174
1039
|
}
|
|
1175
|
-
return
|
|
1040
|
+
return contents;
|
|
1176
1041
|
};
|
|
1177
1042
|
exports.deserializeAws_restJson1ListServersCommand = deserializeAws_restJson1ListServersCommand;
|
|
1178
1043
|
const deserializeAws_restJson1ListServersCommandError = async (output, context) => {
|
|
@@ -1180,7 +1045,6 @@ const deserializeAws_restJson1ListServersCommandError = async (output, context)
|
|
|
1180
1045
|
...output,
|
|
1181
1046
|
body: await parseBody(output.body, context),
|
|
1182
1047
|
};
|
|
1183
|
-
let response;
|
|
1184
1048
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1185
1049
|
switch (errorCode) {
|
|
1186
1050
|
case "AccessDeniedException":
|
|
@@ -1197,25 +1061,23 @@ const deserializeAws_restJson1ListServersCommandError = async (output, context)
|
|
|
1197
1061
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1198
1062
|
default:
|
|
1199
1063
|
const parsedBody = parsedOutput.body;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
$metadata,
|
|
1064
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1065
|
+
output,
|
|
1066
|
+
parsedBody,
|
|
1067
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1068
|
+
errorCode,
|
|
1206
1069
|
});
|
|
1207
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1208
1070
|
}
|
|
1209
1071
|
};
|
|
1210
1072
|
const deserializeAws_restJson1PutPortfolioPreferencesCommand = async (output, context) => {
|
|
1211
1073
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1212
1074
|
return deserializeAws_restJson1PutPortfolioPreferencesCommandError(output, context);
|
|
1213
1075
|
}
|
|
1214
|
-
const contents = {
|
|
1076
|
+
const contents = map({
|
|
1215
1077
|
$metadata: deserializeMetadata(output),
|
|
1216
|
-
};
|
|
1078
|
+
});
|
|
1217
1079
|
await collectBody(output.body, context);
|
|
1218
|
-
return
|
|
1080
|
+
return contents;
|
|
1219
1081
|
};
|
|
1220
1082
|
exports.deserializeAws_restJson1PutPortfolioPreferencesCommand = deserializeAws_restJson1PutPortfolioPreferencesCommand;
|
|
1221
1083
|
const deserializeAws_restJson1PutPortfolioPreferencesCommandError = async (output, context) => {
|
|
@@ -1223,7 +1085,6 @@ const deserializeAws_restJson1PutPortfolioPreferencesCommandError = async (outpu
|
|
|
1223
1085
|
...output,
|
|
1224
1086
|
body: await parseBody(output.body, context),
|
|
1225
1087
|
};
|
|
1226
|
-
let response;
|
|
1227
1088
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1228
1089
|
switch (errorCode) {
|
|
1229
1090
|
case "AccessDeniedException":
|
|
@@ -1243,29 +1104,26 @@ const deserializeAws_restJson1PutPortfolioPreferencesCommandError = async (outpu
|
|
|
1243
1104
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1244
1105
|
default:
|
|
1245
1106
|
const parsedBody = parsedOutput.body;
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
$metadata,
|
|
1107
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1108
|
+
output,
|
|
1109
|
+
parsedBody,
|
|
1110
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1111
|
+
errorCode,
|
|
1252
1112
|
});
|
|
1253
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1254
1113
|
}
|
|
1255
1114
|
};
|
|
1256
1115
|
const deserializeAws_restJson1StartAssessmentCommand = async (output, context) => {
|
|
1257
1116
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1258
1117
|
return deserializeAws_restJson1StartAssessmentCommandError(output, context);
|
|
1259
1118
|
}
|
|
1260
|
-
const contents = {
|
|
1119
|
+
const contents = map({
|
|
1261
1120
|
$metadata: deserializeMetadata(output),
|
|
1262
|
-
|
|
1263
|
-
};
|
|
1121
|
+
});
|
|
1264
1122
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1265
|
-
if (data.assessmentId
|
|
1123
|
+
if (data.assessmentId != null) {
|
|
1266
1124
|
contents.assessmentId = (0, smithy_client_1.expectString)(data.assessmentId);
|
|
1267
1125
|
}
|
|
1268
|
-
return
|
|
1126
|
+
return contents;
|
|
1269
1127
|
};
|
|
1270
1128
|
exports.deserializeAws_restJson1StartAssessmentCommand = deserializeAws_restJson1StartAssessmentCommand;
|
|
1271
1129
|
const deserializeAws_restJson1StartAssessmentCommandError = async (output, context) => {
|
|
@@ -1273,7 +1131,6 @@ const deserializeAws_restJson1StartAssessmentCommandError = async (output, conte
|
|
|
1273
1131
|
...output,
|
|
1274
1132
|
body: await parseBody(output.body, context),
|
|
1275
1133
|
};
|
|
1276
|
-
let response;
|
|
1277
1134
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1278
1135
|
switch (errorCode) {
|
|
1279
1136
|
case "AccessDeniedException":
|
|
@@ -1290,29 +1147,26 @@ const deserializeAws_restJson1StartAssessmentCommandError = async (output, conte
|
|
|
1290
1147
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1291
1148
|
default:
|
|
1292
1149
|
const parsedBody = parsedOutput.body;
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
$metadata,
|
|
1150
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1151
|
+
output,
|
|
1152
|
+
parsedBody,
|
|
1153
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1154
|
+
errorCode,
|
|
1299
1155
|
});
|
|
1300
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1301
1156
|
}
|
|
1302
1157
|
};
|
|
1303
1158
|
const deserializeAws_restJson1StartImportFileTaskCommand = async (output, context) => {
|
|
1304
1159
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1305
1160
|
return deserializeAws_restJson1StartImportFileTaskCommandError(output, context);
|
|
1306
1161
|
}
|
|
1307
|
-
const contents = {
|
|
1162
|
+
const contents = map({
|
|
1308
1163
|
$metadata: deserializeMetadata(output),
|
|
1309
|
-
|
|
1310
|
-
};
|
|
1164
|
+
});
|
|
1311
1165
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1312
|
-
if (data.id
|
|
1166
|
+
if (data.id != null) {
|
|
1313
1167
|
contents.id = (0, smithy_client_1.expectString)(data.id);
|
|
1314
1168
|
}
|
|
1315
|
-
return
|
|
1169
|
+
return contents;
|
|
1316
1170
|
};
|
|
1317
1171
|
exports.deserializeAws_restJson1StartImportFileTaskCommand = deserializeAws_restJson1StartImportFileTaskCommand;
|
|
1318
1172
|
const deserializeAws_restJson1StartImportFileTaskCommandError = async (output, context) => {
|
|
@@ -1320,7 +1174,6 @@ const deserializeAws_restJson1StartImportFileTaskCommandError = async (output, c
|
|
|
1320
1174
|
...output,
|
|
1321
1175
|
body: await parseBody(output.body, context),
|
|
1322
1176
|
};
|
|
1323
|
-
let response;
|
|
1324
1177
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1325
1178
|
switch (errorCode) {
|
|
1326
1179
|
case "AccessDeniedException":
|
|
@@ -1340,29 +1193,26 @@ const deserializeAws_restJson1StartImportFileTaskCommandError = async (output, c
|
|
|
1340
1193
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1341
1194
|
default:
|
|
1342
1195
|
const parsedBody = parsedOutput.body;
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
$metadata,
|
|
1196
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1197
|
+
output,
|
|
1198
|
+
parsedBody,
|
|
1199
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1200
|
+
errorCode,
|
|
1349
1201
|
});
|
|
1350
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1351
1202
|
}
|
|
1352
1203
|
};
|
|
1353
1204
|
const deserializeAws_restJson1StartRecommendationReportGenerationCommand = async (output, context) => {
|
|
1354
1205
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1355
1206
|
return deserializeAws_restJson1StartRecommendationReportGenerationCommandError(output, context);
|
|
1356
1207
|
}
|
|
1357
|
-
const contents = {
|
|
1208
|
+
const contents = map({
|
|
1358
1209
|
$metadata: deserializeMetadata(output),
|
|
1359
|
-
|
|
1360
|
-
};
|
|
1210
|
+
});
|
|
1361
1211
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1362
|
-
if (data.id
|
|
1212
|
+
if (data.id != null) {
|
|
1363
1213
|
contents.id = (0, smithy_client_1.expectString)(data.id);
|
|
1364
1214
|
}
|
|
1365
|
-
return
|
|
1215
|
+
return contents;
|
|
1366
1216
|
};
|
|
1367
1217
|
exports.deserializeAws_restJson1StartRecommendationReportGenerationCommand = deserializeAws_restJson1StartRecommendationReportGenerationCommand;
|
|
1368
1218
|
const deserializeAws_restJson1StartRecommendationReportGenerationCommandError = async (output, context) => {
|
|
@@ -1370,7 +1220,6 @@ const deserializeAws_restJson1StartRecommendationReportGenerationCommandError =
|
|
|
1370
1220
|
...output,
|
|
1371
1221
|
body: await parseBody(output.body, context),
|
|
1372
1222
|
};
|
|
1373
|
-
let response;
|
|
1374
1223
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1375
1224
|
switch (errorCode) {
|
|
1376
1225
|
case "AccessDeniedException":
|
|
@@ -1390,25 +1239,23 @@ const deserializeAws_restJson1StartRecommendationReportGenerationCommandError =
|
|
|
1390
1239
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1391
1240
|
default:
|
|
1392
1241
|
const parsedBody = parsedOutput.body;
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
$metadata,
|
|
1242
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1243
|
+
output,
|
|
1244
|
+
parsedBody,
|
|
1245
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1246
|
+
errorCode,
|
|
1399
1247
|
});
|
|
1400
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1401
1248
|
}
|
|
1402
1249
|
};
|
|
1403
1250
|
const deserializeAws_restJson1StopAssessmentCommand = async (output, context) => {
|
|
1404
1251
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1405
1252
|
return deserializeAws_restJson1StopAssessmentCommandError(output, context);
|
|
1406
1253
|
}
|
|
1407
|
-
const contents = {
|
|
1254
|
+
const contents = map({
|
|
1408
1255
|
$metadata: deserializeMetadata(output),
|
|
1409
|
-
};
|
|
1256
|
+
});
|
|
1410
1257
|
await collectBody(output.body, context);
|
|
1411
|
-
return
|
|
1258
|
+
return contents;
|
|
1412
1259
|
};
|
|
1413
1260
|
exports.deserializeAws_restJson1StopAssessmentCommand = deserializeAws_restJson1StopAssessmentCommand;
|
|
1414
1261
|
const deserializeAws_restJson1StopAssessmentCommandError = async (output, context) => {
|
|
@@ -1416,7 +1263,6 @@ const deserializeAws_restJson1StopAssessmentCommandError = async (output, contex
|
|
|
1416
1263
|
...output,
|
|
1417
1264
|
body: await parseBody(output.body, context),
|
|
1418
1265
|
};
|
|
1419
|
-
let response;
|
|
1420
1266
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1421
1267
|
switch (errorCode) {
|
|
1422
1268
|
case "AccessDeniedException":
|
|
@@ -1433,25 +1279,23 @@ const deserializeAws_restJson1StopAssessmentCommandError = async (output, contex
|
|
|
1433
1279
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1434
1280
|
default:
|
|
1435
1281
|
const parsedBody = parsedOutput.body;
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
$metadata,
|
|
1282
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1283
|
+
output,
|
|
1284
|
+
parsedBody,
|
|
1285
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1286
|
+
errorCode,
|
|
1442
1287
|
});
|
|
1443
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1444
1288
|
}
|
|
1445
1289
|
};
|
|
1446
1290
|
const deserializeAws_restJson1UpdateApplicationComponentConfigCommand = async (output, context) => {
|
|
1447
1291
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1448
1292
|
return deserializeAws_restJson1UpdateApplicationComponentConfigCommandError(output, context);
|
|
1449
1293
|
}
|
|
1450
|
-
const contents = {
|
|
1294
|
+
const contents = map({
|
|
1451
1295
|
$metadata: deserializeMetadata(output),
|
|
1452
|
-
};
|
|
1296
|
+
});
|
|
1453
1297
|
await collectBody(output.body, context);
|
|
1454
|
-
return
|
|
1298
|
+
return contents;
|
|
1455
1299
|
};
|
|
1456
1300
|
exports.deserializeAws_restJson1UpdateApplicationComponentConfigCommand = deserializeAws_restJson1UpdateApplicationComponentConfigCommand;
|
|
1457
1301
|
const deserializeAws_restJson1UpdateApplicationComponentConfigCommandError = async (output, context) => {
|
|
@@ -1459,7 +1303,6 @@ const deserializeAws_restJson1UpdateApplicationComponentConfigCommandError = asy
|
|
|
1459
1303
|
...output,
|
|
1460
1304
|
body: await parseBody(output.body, context),
|
|
1461
1305
|
};
|
|
1462
|
-
let response;
|
|
1463
1306
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1464
1307
|
switch (errorCode) {
|
|
1465
1308
|
case "InternalServerException":
|
|
@@ -1476,25 +1319,23 @@ const deserializeAws_restJson1UpdateApplicationComponentConfigCommandError = asy
|
|
|
1476
1319
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1477
1320
|
default:
|
|
1478
1321
|
const parsedBody = parsedOutput.body;
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
$metadata,
|
|
1322
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1323
|
+
output,
|
|
1324
|
+
parsedBody,
|
|
1325
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1326
|
+
errorCode,
|
|
1485
1327
|
});
|
|
1486
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1487
1328
|
}
|
|
1488
1329
|
};
|
|
1489
1330
|
const deserializeAws_restJson1UpdateServerConfigCommand = async (output, context) => {
|
|
1490
1331
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1491
1332
|
return deserializeAws_restJson1UpdateServerConfigCommandError(output, context);
|
|
1492
1333
|
}
|
|
1493
|
-
const contents = {
|
|
1334
|
+
const contents = map({
|
|
1494
1335
|
$metadata: deserializeMetadata(output),
|
|
1495
|
-
};
|
|
1336
|
+
});
|
|
1496
1337
|
await collectBody(output.body, context);
|
|
1497
|
-
return
|
|
1338
|
+
return contents;
|
|
1498
1339
|
};
|
|
1499
1340
|
exports.deserializeAws_restJson1UpdateServerConfigCommand = deserializeAws_restJson1UpdateServerConfigCommand;
|
|
1500
1341
|
const deserializeAws_restJson1UpdateServerConfigCommandError = async (output, context) => {
|
|
@@ -1502,7 +1343,6 @@ const deserializeAws_restJson1UpdateServerConfigCommandError = async (output, co
|
|
|
1502
1343
|
...output,
|
|
1503
1344
|
body: await parseBody(output.body, context),
|
|
1504
1345
|
};
|
|
1505
|
-
let response;
|
|
1506
1346
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1507
1347
|
switch (errorCode) {
|
|
1508
1348
|
case "InternalServerException":
|
|
@@ -1519,20 +1359,19 @@ const deserializeAws_restJson1UpdateServerConfigCommandError = async (output, co
|
|
|
1519
1359
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1520
1360
|
default:
|
|
1521
1361
|
const parsedBody = parsedOutput.body;
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
$metadata,
|
|
1362
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1363
|
+
output,
|
|
1364
|
+
parsedBody,
|
|
1365
|
+
exceptionCtor: MigrationHubStrategyServiceException_1.MigrationHubStrategyServiceException,
|
|
1366
|
+
errorCode,
|
|
1528
1367
|
});
|
|
1529
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1530
1368
|
}
|
|
1531
1369
|
};
|
|
1370
|
+
const map = smithy_client_1.map;
|
|
1532
1371
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1533
|
-
const contents = {};
|
|
1372
|
+
const contents = map({});
|
|
1534
1373
|
const data = parsedOutput.body;
|
|
1535
|
-
if (data.message
|
|
1374
|
+
if (data.message != null) {
|
|
1536
1375
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1537
1376
|
}
|
|
1538
1377
|
const exception = new models_0_1.AccessDeniedException({
|
|
@@ -1542,9 +1381,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
1542
1381
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1543
1382
|
};
|
|
1544
1383
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1545
|
-
const contents = {};
|
|
1384
|
+
const contents = map({});
|
|
1546
1385
|
const data = parsedOutput.body;
|
|
1547
|
-
if (data.message
|
|
1386
|
+
if (data.message != null) {
|
|
1548
1387
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1549
1388
|
}
|
|
1550
1389
|
const exception = new models_0_1.ConflictException({
|
|
@@ -1554,9 +1393,9 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
1554
1393
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1555
1394
|
};
|
|
1556
1395
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1557
|
-
const contents = {};
|
|
1396
|
+
const contents = map({});
|
|
1558
1397
|
const data = parsedOutput.body;
|
|
1559
|
-
if (data.message
|
|
1398
|
+
if (data.message != null) {
|
|
1560
1399
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1561
1400
|
}
|
|
1562
1401
|
const exception = new models_0_1.InternalServerException({
|
|
@@ -1566,9 +1405,9 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
1566
1405
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1567
1406
|
};
|
|
1568
1407
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1569
|
-
const contents = {};
|
|
1408
|
+
const contents = map({});
|
|
1570
1409
|
const data = parsedOutput.body;
|
|
1571
|
-
if (data.message
|
|
1410
|
+
if (data.message != null) {
|
|
1572
1411
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1573
1412
|
}
|
|
1574
1413
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -1578,9 +1417,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
1578
1417
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1579
1418
|
};
|
|
1580
1419
|
const deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse = async (parsedOutput, context) => {
|
|
1581
|
-
const contents = {};
|
|
1420
|
+
const contents = map({});
|
|
1582
1421
|
const data = parsedOutput.body;
|
|
1583
|
-
if (data.message
|
|
1422
|
+
if (data.message != null) {
|
|
1584
1423
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1585
1424
|
}
|
|
1586
1425
|
const exception = new models_0_1.ServiceLinkedRoleLockClientException({
|
|
@@ -1590,9 +1429,9 @@ const deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse = asy
|
|
|
1590
1429
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1591
1430
|
};
|
|
1592
1431
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1593
|
-
const contents = {};
|
|
1432
|
+
const contents = map({});
|
|
1594
1433
|
const data = parsedOutput.body;
|
|
1595
|
-
if (data.message
|
|
1434
|
+
if (data.message != null) {
|
|
1596
1435
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1597
1436
|
}
|
|
1598
1437
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
@@ -1602,9 +1441,9 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
1602
1441
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1603
1442
|
};
|
|
1604
1443
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1605
|
-
const contents = {};
|
|
1444
|
+
const contents = map({});
|
|
1606
1445
|
const data = parsedOutput.body;
|
|
1607
|
-
if (data.message
|
|
1446
|
+
if (data.message != null) {
|
|
1608
1447
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1609
1448
|
}
|
|
1610
1449
|
const exception = new models_0_1.ThrottlingException({
|
|
@@ -1614,9 +1453,9 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
1614
1453
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1615
1454
|
};
|
|
1616
1455
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1617
|
-
const contents = {};
|
|
1456
|
+
const contents = map({});
|
|
1618
1457
|
const data = parsedOutput.body;
|
|
1619
|
-
if (data.message
|
|
1458
|
+
if (data.message != null) {
|
|
1620
1459
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1621
1460
|
}
|
|
1622
1461
|
const exception = new models_0_1.ValidationException({
|
|
@@ -1643,9 +1482,6 @@ const serializeAws_restJson1AwsManagedTargetDestinations = (input, context) => {
|
|
|
1643
1482
|
return input
|
|
1644
1483
|
.filter((e) => e != null)
|
|
1645
1484
|
.map((entry) => {
|
|
1646
|
-
if (entry === null) {
|
|
1647
|
-
return null;
|
|
1648
|
-
}
|
|
1649
1485
|
return entry;
|
|
1650
1486
|
});
|
|
1651
1487
|
};
|
|
@@ -1689,9 +1525,6 @@ const serializeAws_restJson1GroupIds = (input, context) => {
|
|
|
1689
1525
|
return input
|
|
1690
1526
|
.filter((e) => e != null)
|
|
1691
1527
|
.map((entry) => {
|
|
1692
|
-
if (entry === null) {
|
|
1693
|
-
return null;
|
|
1694
|
-
}
|
|
1695
1528
|
return serializeAws_restJson1Group(entry, context);
|
|
1696
1529
|
});
|
|
1697
1530
|
};
|
|
@@ -1706,9 +1539,6 @@ const serializeAws_restJson1HeterogeneousTargetDatabaseEngines = (input, context
|
|
|
1706
1539
|
return input
|
|
1707
1540
|
.filter((e) => e != null)
|
|
1708
1541
|
.map((entry) => {
|
|
1709
|
-
if (entry === null) {
|
|
1710
|
-
return null;
|
|
1711
|
-
}
|
|
1712
1542
|
return entry;
|
|
1713
1543
|
});
|
|
1714
1544
|
};
|
|
@@ -1723,9 +1553,6 @@ const serializeAws_restJson1HomogeneousTargetDatabaseEngines = (input, context)
|
|
|
1723
1553
|
return input
|
|
1724
1554
|
.filter((e) => e != null)
|
|
1725
1555
|
.map((entry) => {
|
|
1726
|
-
if (entry === null) {
|
|
1727
|
-
return null;
|
|
1728
|
-
}
|
|
1729
1556
|
return entry;
|
|
1730
1557
|
});
|
|
1731
1558
|
};
|
|
@@ -1759,9 +1586,6 @@ const serializeAws_restJson1NoPreferenceTargetDestinations = (input, context) =>
|
|
|
1759
1586
|
return input
|
|
1760
1587
|
.filter((e) => e != null)
|
|
1761
1588
|
.map((entry) => {
|
|
1762
|
-
if (entry === null) {
|
|
1763
|
-
return null;
|
|
1764
|
-
}
|
|
1765
1589
|
return entry;
|
|
1766
1590
|
});
|
|
1767
1591
|
};
|
|
@@ -1783,9 +1607,6 @@ const serializeAws_restJson1SelfManageTargetDestinations = (input, context) => {
|
|
|
1783
1607
|
return input
|
|
1784
1608
|
.filter((e) => e != null)
|
|
1785
1609
|
.map((entry) => {
|
|
1786
|
-
if (entry === null) {
|
|
1787
|
-
return null;
|
|
1788
|
-
}
|
|
1789
1610
|
return entry;
|
|
1790
1611
|
});
|
|
1791
1612
|
};
|
|
@@ -1800,9 +1621,6 @@ const serializeAws_restJson1SourceCodeList = (input, context) => {
|
|
|
1800
1621
|
return input
|
|
1801
1622
|
.filter((e) => e != null)
|
|
1802
1623
|
.map((entry) => {
|
|
1803
|
-
if (entry === null) {
|
|
1804
|
-
return null;
|
|
1805
|
-
}
|
|
1806
1624
|
return serializeAws_restJson1SourceCode(entry, context);
|
|
1807
1625
|
});
|
|
1808
1626
|
};
|
|
@@ -1818,9 +1636,6 @@ const serializeAws_restJson1TargetDatabaseEngines = (input, context) => {
|
|
|
1818
1636
|
return input
|
|
1819
1637
|
.filter((e) => e != null)
|
|
1820
1638
|
.map((entry) => {
|
|
1821
|
-
if (entry === null) {
|
|
1822
|
-
return null;
|
|
1823
|
-
}
|
|
1824
1639
|
return entry;
|
|
1825
1640
|
});
|
|
1826
1641
|
};
|
|
@@ -2018,17 +1833,17 @@ const deserializeAws_restJson1DatabaseConfigDetail = (output, context) => {
|
|
|
2018
1833
|
};
|
|
2019
1834
|
};
|
|
2020
1835
|
const deserializeAws_restJson1DatabaseMigrationPreference = (output, context) => {
|
|
2021
|
-
if (output.heterogeneous
|
|
1836
|
+
if (output.heterogeneous != null) {
|
|
2022
1837
|
return {
|
|
2023
1838
|
heterogeneous: deserializeAws_restJson1Heterogeneous(output.heterogeneous, context),
|
|
2024
1839
|
};
|
|
2025
1840
|
}
|
|
2026
|
-
if (output.homogeneous
|
|
1841
|
+
if (output.homogeneous != null) {
|
|
2027
1842
|
return {
|
|
2028
1843
|
homogeneous: deserializeAws_restJson1Homogeneous(output.homogeneous, context),
|
|
2029
1844
|
};
|
|
2030
1845
|
}
|
|
2031
|
-
if (output.noPreference
|
|
1846
|
+
if (output.noPreference != null) {
|
|
2032
1847
|
return {
|
|
2033
1848
|
noPreference: deserializeAws_restJson1NoDatabaseMigrationPreference(output.noPreference, context),
|
|
2034
1849
|
};
|
|
@@ -2165,17 +1980,17 @@ const deserializeAws_restJson1ListStrategySummary = (output, context) => {
|
|
|
2165
1980
|
return retVal;
|
|
2166
1981
|
};
|
|
2167
1982
|
const deserializeAws_restJson1ManagementPreference = (output, context) => {
|
|
2168
|
-
if (output.awsManagedResources
|
|
1983
|
+
if (output.awsManagedResources != null) {
|
|
2169
1984
|
return {
|
|
2170
1985
|
awsManagedResources: deserializeAws_restJson1AwsManagedResources(output.awsManagedResources, context),
|
|
2171
1986
|
};
|
|
2172
1987
|
}
|
|
2173
|
-
if (output.noPreference
|
|
1988
|
+
if (output.noPreference != null) {
|
|
2174
1989
|
return {
|
|
2175
1990
|
noPreference: deserializeAws_restJson1NoManagementPreference(output.noPreference, context),
|
|
2176
1991
|
};
|
|
2177
1992
|
}
|
|
2178
|
-
if (output.selfManageResources
|
|
1993
|
+
if (output.selfManageResources != null) {
|
|
2179
1994
|
return {
|
|
2180
1995
|
selfManageResources: deserializeAws_restJson1SelfManageResources(output.selfManageResources, context),
|
|
2181
1996
|
};
|