@aws-sdk/client-macie2 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.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { Macie2ServiceException as __BaseException } from "../models/Macie2ServiceException";
6
6
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UnprocessableEntityException, ValidationException, } from "../models/models_0";
@@ -242,7 +242,7 @@ export var serializeAws_restJson1DeclineInvitationsCommand = function (input, co
242
242
  });
243
243
  }); };
244
244
  export var serializeAws_restJson1DeleteCustomDataIdentifierCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
245
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
245
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
246
246
  return __generator(this, function (_c) {
247
247
  switch (_c.label) {
248
248
  case 0: return [4, context.endpoint()];
@@ -250,16 +250,7 @@ export var serializeAws_restJson1DeleteCustomDataIdentifierCommand = function (i
250
250
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
251
251
  headers = {};
252
252
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/custom-data-identifiers/{id}";
253
- if (input.id !== undefined) {
254
- labelValue = input.id;
255
- if (labelValue.length <= 0) {
256
- throw new Error("Empty value provided for input HTTP label: id.");
257
- }
258
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
259
- }
260
- else {
261
- throw new Error("No value provided for input HTTP label: id.");
262
- }
253
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
263
254
  return [2, new __HttpRequest({
264
255
  protocol: protocol,
265
256
  hostname: hostname,
@@ -273,7 +264,7 @@ export var serializeAws_restJson1DeleteCustomDataIdentifierCommand = function (i
273
264
  });
274
265
  }); };
275
266
  export var serializeAws_restJson1DeleteFindingsFilterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
276
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
267
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
277
268
  return __generator(this, function (_c) {
278
269
  switch (_c.label) {
279
270
  case 0: return [4, context.endpoint()];
@@ -281,16 +272,7 @@ export var serializeAws_restJson1DeleteFindingsFilterCommand = function (input,
281
272
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
282
273
  headers = {};
283
274
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/findingsfilters/{id}";
284
- if (input.id !== undefined) {
285
- labelValue = input.id;
286
- if (labelValue.length <= 0) {
287
- throw new Error("Empty value provided for input HTTP label: id.");
288
- }
289
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
290
- }
291
- else {
292
- throw new Error("No value provided for input HTTP label: id.");
293
- }
275
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
294
276
  return [2, new __HttpRequest({
295
277
  protocol: protocol,
296
278
  hostname: hostname,
@@ -328,7 +310,7 @@ export var serializeAws_restJson1DeleteInvitationsCommand = function (input, con
328
310
  });
329
311
  }); };
330
312
  export var serializeAws_restJson1DeleteMemberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
331
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
313
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
332
314
  return __generator(this, function (_c) {
333
315
  switch (_c.label) {
334
316
  case 0: return [4, context.endpoint()];
@@ -336,16 +318,7 @@ export var serializeAws_restJson1DeleteMemberCommand = function (input, context)
336
318
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
337
319
  headers = {};
338
320
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/members/{id}";
339
- if (input.id !== undefined) {
340
- labelValue = input.id;
341
- if (labelValue.length <= 0) {
342
- throw new Error("Empty value provided for input HTTP label: id.");
343
- }
344
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
345
- }
346
- else {
347
- throw new Error("No value provided for input HTTP label: id.");
348
- }
321
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
349
322
  return [2, new __HttpRequest({
350
323
  protocol: protocol,
351
324
  hostname: hostname,
@@ -385,7 +358,7 @@ export var serializeAws_restJson1DescribeBucketsCommand = function (input, conte
385
358
  });
386
359
  }); };
387
360
  export var serializeAws_restJson1DescribeClassificationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
388
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
361
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
389
362
  return __generator(this, function (_c) {
390
363
  switch (_c.label) {
391
364
  case 0: return [4, context.endpoint()];
@@ -393,16 +366,7 @@ export var serializeAws_restJson1DescribeClassificationJobCommand = function (in
393
366
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
394
367
  headers = {};
395
368
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{jobId}";
396
- if (input.jobId !== undefined) {
397
- labelValue = input.jobId;
398
- if (labelValue.length <= 0) {
399
- throw new Error("Empty value provided for input HTTP label: jobId.");
400
- }
401
- resolvedPath = resolvedPath.replace("{jobId}", __extendedEncodeURIComponent(labelValue));
402
- }
403
- else {
404
- throw new Error("No value provided for input HTTP label: jobId.");
405
- }
369
+ resolvedPath = __resolvedPath(resolvedPath, input, "jobId", function () { return input.jobId; }, "{jobId}", false);
406
370
  return [2, new __HttpRequest({
407
371
  protocol: protocol,
408
372
  hostname: hostname,
@@ -472,7 +436,9 @@ export var serializeAws_restJson1DisableOrganizationAdminAccountCommand = functi
472
436
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
473
437
  headers = {};
474
438
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/admin";
475
- query = __assign({}, (input.adminAccountId !== undefined && { adminAccountId: input.adminAccountId }));
439
+ query = map({
440
+ adminAccountId: [, input.adminAccountId],
441
+ });
476
442
  return [2, new __HttpRequest({
477
443
  protocol: protocol,
478
444
  hostname: hostname,
@@ -535,7 +501,7 @@ export var serializeAws_restJson1DisassociateFromMasterAccountCommand = function
535
501
  });
536
502
  }); };
537
503
  export var serializeAws_restJson1DisassociateMemberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
538
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
504
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
539
505
  return __generator(this, function (_c) {
540
506
  switch (_c.label) {
541
507
  case 0: return [4, context.endpoint()];
@@ -543,16 +509,7 @@ export var serializeAws_restJson1DisassociateMemberCommand = function (input, co
543
509
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
544
510
  headers = {};
545
511
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/members/disassociate/{id}";
546
- if (input.id !== undefined) {
547
- labelValue = input.id;
548
- if (labelValue.length <= 0) {
549
- throw new Error("Empty value provided for input HTTP label: id.");
550
- }
551
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
552
- }
553
- else {
554
- throw new Error("No value provided for input HTTP label: id.");
555
- }
512
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
556
513
  return [2, new __HttpRequest({
557
514
  protocol: protocol,
558
515
  hostname: hostname,
@@ -688,7 +645,7 @@ export var serializeAws_restJson1GetClassificationExportConfigurationCommand = f
688
645
  });
689
646
  }); };
690
647
  export var serializeAws_restJson1GetCustomDataIdentifierCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
691
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
648
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
692
649
  return __generator(this, function (_c) {
693
650
  switch (_c.label) {
694
651
  case 0: return [4, context.endpoint()];
@@ -696,16 +653,7 @@ export var serializeAws_restJson1GetCustomDataIdentifierCommand = function (inpu
696
653
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
697
654
  headers = {};
698
655
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/custom-data-identifiers/{id}";
699
- if (input.id !== undefined) {
700
- labelValue = input.id;
701
- if (labelValue.length <= 0) {
702
- throw new Error("Empty value provided for input HTTP label: id.");
703
- }
704
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
705
- }
706
- else {
707
- throw new Error("No value provided for input HTTP label: id.");
708
- }
656
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
709
657
  return [2, new __HttpRequest({
710
658
  protocol: protocol,
711
659
  hostname: hostname,
@@ -745,7 +693,7 @@ export var serializeAws_restJson1GetFindingsCommand = function (input, context)
745
693
  });
746
694
  }); };
747
695
  export var serializeAws_restJson1GetFindingsFilterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
748
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
696
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
749
697
  return __generator(this, function (_c) {
750
698
  switch (_c.label) {
751
699
  case 0: return [4, context.endpoint()];
@@ -753,16 +701,7 @@ export var serializeAws_restJson1GetFindingsFilterCommand = function (input, con
753
701
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
754
702
  headers = {};
755
703
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/findingsfilters/{id}";
756
- if (input.id !== undefined) {
757
- labelValue = input.id;
758
- if (labelValue.length <= 0) {
759
- throw new Error("Empty value provided for input HTTP label: id.");
760
- }
761
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
762
- }
763
- else {
764
- throw new Error("No value provided for input HTTP label: id.");
765
- }
704
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
766
705
  return [2, new __HttpRequest({
767
706
  protocol: protocol,
768
707
  hostname: hostname,
@@ -900,7 +839,7 @@ export var serializeAws_restJson1GetMasterAccountCommand = function (input, cont
900
839
  });
901
840
  }); };
902
841
  export var serializeAws_restJson1GetMemberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
903
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
842
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
904
843
  return __generator(this, function (_c) {
905
844
  switch (_c.label) {
906
845
  case 0: return [4, context.endpoint()];
@@ -908,16 +847,7 @@ export var serializeAws_restJson1GetMemberCommand = function (input, context) {
908
847
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
909
848
  headers = {};
910
849
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/members/{id}";
911
- if (input.id !== undefined) {
912
- labelValue = input.id;
913
- if (labelValue.length <= 0) {
914
- throw new Error("Empty value provided for input HTTP label: id.");
915
- }
916
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
917
- }
918
- else {
919
- throw new Error("No value provided for input HTTP label: id.");
920
- }
850
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
921
851
  return [2, new __HttpRequest({
922
852
  protocol: protocol,
923
853
  hostname: hostname,
@@ -955,7 +885,7 @@ export var serializeAws_restJson1GetRevealConfigurationCommand = function (input
955
885
  });
956
886
  }); };
957
887
  export var serializeAws_restJson1GetSensitiveDataOccurrencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
958
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
888
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
959
889
  return __generator(this, function (_c) {
960
890
  switch (_c.label) {
961
891
  case 0: return [4, context.endpoint()];
@@ -963,16 +893,7 @@ export var serializeAws_restJson1GetSensitiveDataOccurrencesCommand = function (
963
893
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
964
894
  headers = {};
965
895
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/findings/{findingId}/reveal";
966
- if (input.findingId !== undefined) {
967
- labelValue = input.findingId;
968
- if (labelValue.length <= 0) {
969
- throw new Error("Empty value provided for input HTTP label: findingId.");
970
- }
971
- resolvedPath = resolvedPath.replace("{findingId}", __extendedEncodeURIComponent(labelValue));
972
- }
973
- else {
974
- throw new Error("No value provided for input HTTP label: findingId.");
975
- }
896
+ resolvedPath = __resolvedPath(resolvedPath, input, "findingId", function () { return input.findingId; }, "{findingId}", false);
976
897
  return [2, new __HttpRequest({
977
898
  protocol: protocol,
978
899
  hostname: hostname,
@@ -986,7 +907,7 @@ export var serializeAws_restJson1GetSensitiveDataOccurrencesCommand = function (
986
907
  });
987
908
  }); };
988
909
  export var serializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
989
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
910
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
990
911
  return __generator(this, function (_c) {
991
912
  switch (_c.label) {
992
913
  case 0: return [4, context.endpoint()];
@@ -994,16 +915,7 @@ export var serializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommand
994
915
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
995
916
  headers = {};
996
917
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/findings/{findingId}/reveal/availability";
997
- if (input.findingId !== undefined) {
998
- labelValue = input.findingId;
999
- if (labelValue.length <= 0) {
1000
- throw new Error("Empty value provided for input HTTP label: findingId.");
1001
- }
1002
- resolvedPath = resolvedPath.replace("{findingId}", __extendedEncodeURIComponent(labelValue));
1003
- }
1004
- else {
1005
- throw new Error("No value provided for input HTTP label: findingId.");
1006
- }
918
+ resolvedPath = __resolvedPath(resolvedPath, input, "findingId", function () { return input.findingId; }, "{findingId}", false);
1007
919
  return [2, new __HttpRequest({
1008
920
  protocol: protocol,
1009
921
  hostname: hostname,
@@ -1051,7 +963,9 @@ export var serializeAws_restJson1GetUsageTotalsCommand = function (input, contex
1051
963
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1052
964
  headers = {};
1053
965
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/usage";
1054
- query = __assign({}, (input.timeRange !== undefined && { timeRange: input.timeRange }));
966
+ query = map({
967
+ timeRange: [, input.timeRange],
968
+ });
1055
969
  return [2, new __HttpRequest({
1056
970
  protocol: protocol,
1057
971
  hostname: hostname,
@@ -1154,7 +1068,10 @@ export var serializeAws_restJson1ListFindingsFiltersCommand = function (input, c
1154
1068
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1155
1069
  headers = {};
1156
1070
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/findingsfilters";
1157
- query = __assign(__assign({}, (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
1071
+ query = map({
1072
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
1073
+ nextToken: [, input.nextToken],
1074
+ });
1158
1075
  return [2, new __HttpRequest({
1159
1076
  protocol: protocol,
1160
1077
  hostname: hostname,
@@ -1177,7 +1094,10 @@ export var serializeAws_restJson1ListInvitationsCommand = function (input, conte
1177
1094
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1178
1095
  headers = {};
1179
1096
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/invitations";
1180
- query = __assign(__assign({}, (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
1097
+ query = map({
1098
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
1099
+ nextToken: [, input.nextToken],
1100
+ });
1181
1101
  return [2, new __HttpRequest({
1182
1102
  protocol: protocol,
1183
1103
  hostname: hostname,
@@ -1224,7 +1144,11 @@ export var serializeAws_restJson1ListMembersCommand = function (input, context)
1224
1144
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1225
1145
  headers = {};
1226
1146
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/members";
1227
- query = __assign(__assign(__assign({}, (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.onlyAssociated !== undefined && { onlyAssociated: input.onlyAssociated }));
1147
+ query = map({
1148
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
1149
+ nextToken: [, input.nextToken],
1150
+ onlyAssociated: [, input.onlyAssociated],
1151
+ });
1228
1152
  return [2, new __HttpRequest({
1229
1153
  protocol: protocol,
1230
1154
  hostname: hostname,
@@ -1247,7 +1171,10 @@ export var serializeAws_restJson1ListOrganizationAdminAccountsCommand = function
1247
1171
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1248
1172
  headers = {};
1249
1173
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/admin";
1250
- query = __assign(__assign({}, (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
1174
+ query = map({
1175
+ maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
1176
+ nextToken: [, input.nextToken],
1177
+ });
1251
1178
  return [2, new __HttpRequest({
1252
1179
  protocol: protocol,
1253
1180
  hostname: hostname,
@@ -1262,7 +1189,7 @@ export var serializeAws_restJson1ListOrganizationAdminAccountsCommand = function
1262
1189
  });
1263
1190
  }); };
1264
1191
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1265
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1192
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1266
1193
  return __generator(this, function (_c) {
1267
1194
  switch (_c.label) {
1268
1195
  case 0: return [4, context.endpoint()];
@@ -1270,16 +1197,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
1270
1197
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1271
1198
  headers = {};
1272
1199
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
1273
- if (input.resourceArn !== undefined) {
1274
- labelValue = input.resourceArn;
1275
- if (labelValue.length <= 0) {
1276
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
1277
- }
1278
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
1279
- }
1280
- else {
1281
- throw new Error("No value provided for input HTTP label: resourceArn.");
1282
- }
1200
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
1283
1201
  return [2, new __HttpRequest({
1284
1202
  protocol: protocol,
1285
1203
  hostname: hostname,
@@ -1374,7 +1292,7 @@ export var serializeAws_restJson1SearchResourcesCommand = function (input, conte
1374
1292
  });
1375
1293
  }); };
1376
1294
  export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1377
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1295
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1378
1296
  return __generator(this, function (_c) {
1379
1297
  switch (_c.label) {
1380
1298
  case 0: return [4, context.endpoint()];
@@ -1384,16 +1302,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
1384
1302
  "content-type": "application/json",
1385
1303
  };
1386
1304
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
1387
- if (input.resourceArn !== undefined) {
1388
- labelValue = input.resourceArn;
1389
- if (labelValue.length <= 0) {
1390
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
1391
- }
1392
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
1393
- }
1394
- else {
1395
- throw new Error("No value provided for input HTTP label: resourceArn.");
1396
- }
1305
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
1397
1306
  body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
1398
1307
  return [2, new __HttpRequest({
1399
1308
  protocol: protocol,
@@ -1434,7 +1343,7 @@ export var serializeAws_restJson1TestCustomDataIdentifierCommand = function (inp
1434
1343
  });
1435
1344
  }); };
1436
1345
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1437
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
1346
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
1438
1347
  return __generator(this, function (_c) {
1439
1348
  switch (_c.label) {
1440
1349
  case 0: return [4, context.endpoint()];
@@ -1442,17 +1351,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
1442
1351
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1443
1352
  headers = {};
1444
1353
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
1445
- if (input.resourceArn !== undefined) {
1446
- labelValue = input.resourceArn;
1447
- if (labelValue.length <= 0) {
1448
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
1449
- }
1450
- resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
1451
- }
1452
- else {
1453
- throw new Error("No value provided for input HTTP label: resourceArn.");
1454
- }
1455
- query = __assign({}, (input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map(function (_entry) { return _entry; }) }));
1354
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
1355
+ query = map({
1356
+ tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
1357
+ });
1456
1358
  return [2, new __HttpRequest({
1457
1359
  protocol: protocol,
1458
1360
  hostname: hostname,
@@ -1467,7 +1369,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
1467
1369
  });
1468
1370
  }); };
1469
1371
  export var serializeAws_restJson1UpdateClassificationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1470
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1372
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1471
1373
  return __generator(this, function (_c) {
1472
1374
  switch (_c.label) {
1473
1375
  case 0: return [4, context.endpoint()];
@@ -1477,16 +1379,7 @@ export var serializeAws_restJson1UpdateClassificationJobCommand = function (inpu
1477
1379
  "content-type": "application/json",
1478
1380
  };
1479
1381
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/jobs/{jobId}";
1480
- if (input.jobId !== undefined) {
1481
- labelValue = input.jobId;
1482
- if (labelValue.length <= 0) {
1483
- throw new Error("Empty value provided for input HTTP label: jobId.");
1484
- }
1485
- resolvedPath = resolvedPath.replace("{jobId}", __extendedEncodeURIComponent(labelValue));
1486
- }
1487
- else {
1488
- throw new Error("No value provided for input HTTP label: jobId.");
1489
- }
1382
+ resolvedPath = __resolvedPath(resolvedPath, input, "jobId", function () { return input.jobId; }, "{jobId}", false);
1490
1383
  body = JSON.stringify(__assign({}, (input.jobStatus != null && { jobStatus: input.jobStatus })));
1491
1384
  return [2, new __HttpRequest({
1492
1385
  protocol: protocol,
@@ -1501,7 +1394,7 @@ export var serializeAws_restJson1UpdateClassificationJobCommand = function (inpu
1501
1394
  });
1502
1395
  }); };
1503
1396
  export var serializeAws_restJson1UpdateFindingsFilterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1504
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1397
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1505
1398
  var _c;
1506
1399
  return __generator(this, function (_d) {
1507
1400
  switch (_d.label) {
@@ -1512,16 +1405,7 @@ export var serializeAws_restJson1UpdateFindingsFilterCommand = function (input,
1512
1405
  "content-type": "application/json",
1513
1406
  };
1514
1407
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/findingsfilters/{id}";
1515
- if (input.id !== undefined) {
1516
- labelValue = input.id;
1517
- if (labelValue.length <= 0) {
1518
- throw new Error("Empty value provided for input HTTP label: id.");
1519
- }
1520
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
1521
- }
1522
- else {
1523
- throw new Error("No value provided for input HTTP label: id.");
1524
- }
1408
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
1525
1409
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: input.action })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.description != null && { description: input.description })), (input.findingCriteria != null && {
1526
1410
  findingCriteria: serializeAws_restJson1FindingCriteria(input.findingCriteria, context),
1527
1411
  })), (input.name != null && { name: input.name })), (input.position != null && { position: input.position })));
@@ -1562,7 +1446,7 @@ export var serializeAws_restJson1UpdateMacieSessionCommand = function (input, co
1562
1446
  });
1563
1447
  }); };
1564
1448
  export var serializeAws_restJson1UpdateMemberSessionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1565
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1449
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
1566
1450
  return __generator(this, function (_c) {
1567
1451
  switch (_c.label) {
1568
1452
  case 0: return [4, context.endpoint()];
@@ -1572,16 +1456,7 @@ export var serializeAws_restJson1UpdateMemberSessionCommand = function (input, c
1572
1456
  "content-type": "application/json",
1573
1457
  };
1574
1458
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/macie/members/{id}";
1575
- if (input.id !== undefined) {
1576
- labelValue = input.id;
1577
- if (labelValue.length <= 0) {
1578
- throw new Error("Empty value provided for input HTTP label: id.");
1579
- }
1580
- resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
1581
- }
1582
- else {
1583
- throw new Error("No value provided for input HTTP label: id.");
1584
- }
1459
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
1585
1460
  body = JSON.stringify(__assign({}, (input.status != null && { status: input.status })));
1586
1461
  return [2, new __HttpRequest({
1587
1462
  protocol: protocol,
@@ -1653,18 +1528,18 @@ export var deserializeAws_restJson1AcceptInvitationCommand = function (output, c
1653
1528
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1654
1529
  return [2, deserializeAws_restJson1AcceptInvitationCommandError(output, context)];
1655
1530
  }
1656
- contents = {
1531
+ contents = map({
1657
1532
  $metadata: deserializeMetadata(output),
1658
- };
1533
+ });
1659
1534
  return [4, collectBody(output.body, context)];
1660
1535
  case 1:
1661
1536
  _a.sent();
1662
- return [2, Promise.resolve(contents)];
1537
+ return [2, contents];
1663
1538
  }
1664
1539
  });
1665
1540
  }); };
1666
1541
  var deserializeAws_restJson1AcceptInvitationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1667
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1542
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1668
1543
  var _c;
1669
1544
  return __generator(this, function (_d) {
1670
1545
  switch (_d.label) {
@@ -1709,14 +1584,14 @@ var deserializeAws_restJson1AcceptInvitationCommandError = function (output, con
1709
1584
  case 15: throw _d.sent();
1710
1585
  case 16:
1711
1586
  parsedBody = parsedOutput.body;
1712
- $metadata = deserializeMetadata(output);
1713
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1714
- response = new __BaseException({
1715
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1716
- $fault: "client",
1717
- $metadata: $metadata,
1587
+ throwDefaultError({
1588
+ output: output,
1589
+ parsedBody: parsedBody,
1590
+ exceptionCtor: __BaseException,
1591
+ errorCode: errorCode,
1718
1592
  });
1719
- throw __decorateServiceException(response, parsedBody);
1593
+ _d.label = 17;
1594
+ case 17: return [2];
1720
1595
  }
1721
1596
  });
1722
1597
  }); };
@@ -1728,28 +1603,26 @@ export var deserializeAws_restJson1BatchGetCustomDataIdentifiersCommand = functi
1728
1603
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1729
1604
  return [2, deserializeAws_restJson1BatchGetCustomDataIdentifiersCommandError(output, context)];
1730
1605
  }
1731
- contents = {
1606
+ contents = map({
1732
1607
  $metadata: deserializeMetadata(output),
1733
- customDataIdentifiers: undefined,
1734
- notFoundIdentifierIds: undefined,
1735
- };
1608
+ });
1736
1609
  _a = __expectNonNull;
1737
1610
  _b = __expectObject;
1738
1611
  return [4, parseBody(output.body, context)];
1739
1612
  case 1:
1740
1613
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1741
- if (data.customDataIdentifiers !== undefined && data.customDataIdentifiers !== null) {
1614
+ if (data.customDataIdentifiers != null) {
1742
1615
  contents.customDataIdentifiers = deserializeAws_restJson1__listOfBatchGetCustomDataIdentifierSummary(data.customDataIdentifiers, context);
1743
1616
  }
1744
- if (data.notFoundIdentifierIds !== undefined && data.notFoundIdentifierIds !== null) {
1617
+ if (data.notFoundIdentifierIds != null) {
1745
1618
  contents.notFoundIdentifierIds = deserializeAws_restJson1__listOf__string(data.notFoundIdentifierIds, context);
1746
1619
  }
1747
- return [2, Promise.resolve(contents)];
1620
+ return [2, contents];
1748
1621
  }
1749
1622
  });
1750
1623
  }); };
1751
1624
  var deserializeAws_restJson1BatchGetCustomDataIdentifiersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1752
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1625
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1753
1626
  var _c;
1754
1627
  return __generator(this, function (_d) {
1755
1628
  switch (_d.label) {
@@ -1794,14 +1667,14 @@ var deserializeAws_restJson1BatchGetCustomDataIdentifiersCommandError = function
1794
1667
  case 15: throw _d.sent();
1795
1668
  case 16:
1796
1669
  parsedBody = parsedOutput.body;
1797
- $metadata = deserializeMetadata(output);
1798
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1799
- response = new __BaseException({
1800
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1801
- $fault: "client",
1802
- $metadata: $metadata,
1670
+ throwDefaultError({
1671
+ output: output,
1672
+ parsedBody: parsedBody,
1673
+ exceptionCtor: __BaseException,
1674
+ errorCode: errorCode,
1803
1675
  });
1804
- throw __decorateServiceException(response, parsedBody);
1676
+ _d.label = 17;
1677
+ case 17: return [2];
1805
1678
  }
1806
1679
  });
1807
1680
  }); };
@@ -1813,28 +1686,26 @@ export var deserializeAws_restJson1CreateClassificationJobCommand = function (ou
1813
1686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1814
1687
  return [2, deserializeAws_restJson1CreateClassificationJobCommandError(output, context)];
1815
1688
  }
1816
- contents = {
1689
+ contents = map({
1817
1690
  $metadata: deserializeMetadata(output),
1818
- jobArn: undefined,
1819
- jobId: undefined,
1820
- };
1691
+ });
1821
1692
  _a = __expectNonNull;
1822
1693
  _b = __expectObject;
1823
1694
  return [4, parseBody(output.body, context)];
1824
1695
  case 1:
1825
1696
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1826
- if (data.jobArn !== undefined && data.jobArn !== null) {
1697
+ if (data.jobArn != null) {
1827
1698
  contents.jobArn = __expectString(data.jobArn);
1828
1699
  }
1829
- if (data.jobId !== undefined && data.jobId !== null) {
1700
+ if (data.jobId != null) {
1830
1701
  contents.jobId = __expectString(data.jobId);
1831
1702
  }
1832
- return [2, Promise.resolve(contents)];
1703
+ return [2, contents];
1833
1704
  }
1834
1705
  });
1835
1706
  }); };
1836
1707
  var deserializeAws_restJson1CreateClassificationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1837
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1708
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1838
1709
  var _c;
1839
1710
  return __generator(this, function (_d) {
1840
1711
  switch (_d.label) {
@@ -1879,14 +1750,14 @@ var deserializeAws_restJson1CreateClassificationJobCommandError = function (outp
1879
1750
  case 15: throw _d.sent();
1880
1751
  case 16:
1881
1752
  parsedBody = parsedOutput.body;
1882
- $metadata = deserializeMetadata(output);
1883
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1884
- response = new __BaseException({
1885
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1886
- $fault: "client",
1887
- $metadata: $metadata,
1753
+ throwDefaultError({
1754
+ output: output,
1755
+ parsedBody: parsedBody,
1756
+ exceptionCtor: __BaseException,
1757
+ errorCode: errorCode,
1888
1758
  });
1889
- throw __decorateServiceException(response, parsedBody);
1759
+ _d.label = 17;
1760
+ case 17: return [2];
1890
1761
  }
1891
1762
  });
1892
1763
  }); };
@@ -1898,24 +1769,23 @@ export var deserializeAws_restJson1CreateCustomDataIdentifierCommand = function
1898
1769
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1899
1770
  return [2, deserializeAws_restJson1CreateCustomDataIdentifierCommandError(output, context)];
1900
1771
  }
1901
- contents = {
1772
+ contents = map({
1902
1773
  $metadata: deserializeMetadata(output),
1903
- customDataIdentifierId: undefined,
1904
- };
1774
+ });
1905
1775
  _a = __expectNonNull;
1906
1776
  _b = __expectObject;
1907
1777
  return [4, parseBody(output.body, context)];
1908
1778
  case 1:
1909
1779
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1910
- if (data.customDataIdentifierId !== undefined && data.customDataIdentifierId !== null) {
1780
+ if (data.customDataIdentifierId != null) {
1911
1781
  contents.customDataIdentifierId = __expectString(data.customDataIdentifierId);
1912
1782
  }
1913
- return [2, Promise.resolve(contents)];
1783
+ return [2, contents];
1914
1784
  }
1915
1785
  });
1916
1786
  }); };
1917
1787
  var deserializeAws_restJson1CreateCustomDataIdentifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1918
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1788
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1919
1789
  var _c;
1920
1790
  return __generator(this, function (_d) {
1921
1791
  switch (_d.label) {
@@ -1960,14 +1830,14 @@ var deserializeAws_restJson1CreateCustomDataIdentifierCommandError = function (o
1960
1830
  case 15: throw _d.sent();
1961
1831
  case 16:
1962
1832
  parsedBody = parsedOutput.body;
1963
- $metadata = deserializeMetadata(output);
1964
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1965
- response = new __BaseException({
1966
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1967
- $fault: "client",
1968
- $metadata: $metadata,
1833
+ throwDefaultError({
1834
+ output: output,
1835
+ parsedBody: parsedBody,
1836
+ exceptionCtor: __BaseException,
1837
+ errorCode: errorCode,
1969
1838
  });
1970
- throw __decorateServiceException(response, parsedBody);
1839
+ _d.label = 17;
1840
+ case 17: return [2];
1971
1841
  }
1972
1842
  });
1973
1843
  }); };
@@ -1979,28 +1849,26 @@ export var deserializeAws_restJson1CreateFindingsFilterCommand = function (outpu
1979
1849
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1980
1850
  return [2, deserializeAws_restJson1CreateFindingsFilterCommandError(output, context)];
1981
1851
  }
1982
- contents = {
1852
+ contents = map({
1983
1853
  $metadata: deserializeMetadata(output),
1984
- arn: undefined,
1985
- id: undefined,
1986
- };
1854
+ });
1987
1855
  _a = __expectNonNull;
1988
1856
  _b = __expectObject;
1989
1857
  return [4, parseBody(output.body, context)];
1990
1858
  case 1:
1991
1859
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1992
- if (data.arn !== undefined && data.arn !== null) {
1860
+ if (data.arn != null) {
1993
1861
  contents.arn = __expectString(data.arn);
1994
1862
  }
1995
- if (data.id !== undefined && data.id !== null) {
1863
+ if (data.id != null) {
1996
1864
  contents.id = __expectString(data.id);
1997
1865
  }
1998
- return [2, Promise.resolve(contents)];
1866
+ return [2, contents];
1999
1867
  }
2000
1868
  });
2001
1869
  }); };
2002
1870
  var deserializeAws_restJson1CreateFindingsFilterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2003
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1871
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2004
1872
  var _c;
2005
1873
  return __generator(this, function (_d) {
2006
1874
  switch (_d.label) {
@@ -2045,14 +1913,14 @@ var deserializeAws_restJson1CreateFindingsFilterCommandError = function (output,
2045
1913
  case 15: throw _d.sent();
2046
1914
  case 16:
2047
1915
  parsedBody = parsedOutput.body;
2048
- $metadata = deserializeMetadata(output);
2049
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2050
- response = new __BaseException({
2051
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2052
- $fault: "client",
2053
- $metadata: $metadata,
1916
+ throwDefaultError({
1917
+ output: output,
1918
+ parsedBody: parsedBody,
1919
+ exceptionCtor: __BaseException,
1920
+ errorCode: errorCode,
2054
1921
  });
2055
- throw __decorateServiceException(response, parsedBody);
1922
+ _d.label = 17;
1923
+ case 17: return [2];
2056
1924
  }
2057
1925
  });
2058
1926
  }); };
@@ -2064,24 +1932,23 @@ export var deserializeAws_restJson1CreateInvitationsCommand = function (output,
2064
1932
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2065
1933
  return [2, deserializeAws_restJson1CreateInvitationsCommandError(output, context)];
2066
1934
  }
2067
- contents = {
1935
+ contents = map({
2068
1936
  $metadata: deserializeMetadata(output),
2069
- unprocessedAccounts: undefined,
2070
- };
1937
+ });
2071
1938
  _a = __expectNonNull;
2072
1939
  _b = __expectObject;
2073
1940
  return [4, parseBody(output.body, context)];
2074
1941
  case 1:
2075
1942
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2076
- if (data.unprocessedAccounts !== undefined && data.unprocessedAccounts !== null) {
1943
+ if (data.unprocessedAccounts != null) {
2077
1944
  contents.unprocessedAccounts = deserializeAws_restJson1__listOfUnprocessedAccount(data.unprocessedAccounts, context);
2078
1945
  }
2079
- return [2, Promise.resolve(contents)];
1946
+ return [2, contents];
2080
1947
  }
2081
1948
  });
2082
1949
  }); };
2083
1950
  var deserializeAws_restJson1CreateInvitationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2084
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1951
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2085
1952
  var _c;
2086
1953
  return __generator(this, function (_d) {
2087
1954
  switch (_d.label) {
@@ -2126,14 +1993,14 @@ var deserializeAws_restJson1CreateInvitationsCommandError = function (output, co
2126
1993
  case 15: throw _d.sent();
2127
1994
  case 16:
2128
1995
  parsedBody = parsedOutput.body;
2129
- $metadata = deserializeMetadata(output);
2130
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2131
- response = new __BaseException({
2132
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2133
- $fault: "client",
2134
- $metadata: $metadata,
1996
+ throwDefaultError({
1997
+ output: output,
1998
+ parsedBody: parsedBody,
1999
+ exceptionCtor: __BaseException,
2000
+ errorCode: errorCode,
2135
2001
  });
2136
- throw __decorateServiceException(response, parsedBody);
2002
+ _d.label = 17;
2003
+ case 17: return [2];
2137
2004
  }
2138
2005
  });
2139
2006
  }); };
@@ -2145,24 +2012,23 @@ export var deserializeAws_restJson1CreateMemberCommand = function (output, conte
2145
2012
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2146
2013
  return [2, deserializeAws_restJson1CreateMemberCommandError(output, context)];
2147
2014
  }
2148
- contents = {
2015
+ contents = map({
2149
2016
  $metadata: deserializeMetadata(output),
2150
- arn: undefined,
2151
- };
2017
+ });
2152
2018
  _a = __expectNonNull;
2153
2019
  _b = __expectObject;
2154
2020
  return [4, parseBody(output.body, context)];
2155
2021
  case 1:
2156
2022
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2157
- if (data.arn !== undefined && data.arn !== null) {
2023
+ if (data.arn != null) {
2158
2024
  contents.arn = __expectString(data.arn);
2159
2025
  }
2160
- return [2, Promise.resolve(contents)];
2026
+ return [2, contents];
2161
2027
  }
2162
2028
  });
2163
2029
  }); };
2164
2030
  var deserializeAws_restJson1CreateMemberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2165
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2031
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2166
2032
  var _c;
2167
2033
  return __generator(this, function (_d) {
2168
2034
  switch (_d.label) {
@@ -2207,14 +2073,14 @@ var deserializeAws_restJson1CreateMemberCommandError = function (output, context
2207
2073
  case 15: throw _d.sent();
2208
2074
  case 16:
2209
2075
  parsedBody = parsedOutput.body;
2210
- $metadata = deserializeMetadata(output);
2211
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2212
- response = new __BaseException({
2213
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2214
- $fault: "client",
2215
- $metadata: $metadata,
2076
+ throwDefaultError({
2077
+ output: output,
2078
+ parsedBody: parsedBody,
2079
+ exceptionCtor: __BaseException,
2080
+ errorCode: errorCode,
2216
2081
  });
2217
- throw __decorateServiceException(response, parsedBody);
2082
+ _d.label = 17;
2083
+ case 17: return [2];
2218
2084
  }
2219
2085
  });
2220
2086
  }); };
@@ -2226,18 +2092,18 @@ export var deserializeAws_restJson1CreateSampleFindingsCommand = function (outpu
2226
2092
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2227
2093
  return [2, deserializeAws_restJson1CreateSampleFindingsCommandError(output, context)];
2228
2094
  }
2229
- contents = {
2095
+ contents = map({
2230
2096
  $metadata: deserializeMetadata(output),
2231
- };
2097
+ });
2232
2098
  return [4, collectBody(output.body, context)];
2233
2099
  case 1:
2234
2100
  _a.sent();
2235
- return [2, Promise.resolve(contents)];
2101
+ return [2, contents];
2236
2102
  }
2237
2103
  });
2238
2104
  }); };
2239
2105
  var deserializeAws_restJson1CreateSampleFindingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2240
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2106
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2241
2107
  var _c;
2242
2108
  return __generator(this, function (_d) {
2243
2109
  switch (_d.label) {
@@ -2282,14 +2148,14 @@ var deserializeAws_restJson1CreateSampleFindingsCommandError = function (output,
2282
2148
  case 15: throw _d.sent();
2283
2149
  case 16:
2284
2150
  parsedBody = parsedOutput.body;
2285
- $metadata = deserializeMetadata(output);
2286
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2287
- response = new __BaseException({
2288
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2289
- $fault: "client",
2290
- $metadata: $metadata,
2151
+ throwDefaultError({
2152
+ output: output,
2153
+ parsedBody: parsedBody,
2154
+ exceptionCtor: __BaseException,
2155
+ errorCode: errorCode,
2291
2156
  });
2292
- throw __decorateServiceException(response, parsedBody);
2157
+ _d.label = 17;
2158
+ case 17: return [2];
2293
2159
  }
2294
2160
  });
2295
2161
  }); };
@@ -2301,24 +2167,23 @@ export var deserializeAws_restJson1DeclineInvitationsCommand = function (output,
2301
2167
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2302
2168
  return [2, deserializeAws_restJson1DeclineInvitationsCommandError(output, context)];
2303
2169
  }
2304
- contents = {
2170
+ contents = map({
2305
2171
  $metadata: deserializeMetadata(output),
2306
- unprocessedAccounts: undefined,
2307
- };
2172
+ });
2308
2173
  _a = __expectNonNull;
2309
2174
  _b = __expectObject;
2310
2175
  return [4, parseBody(output.body, context)];
2311
2176
  case 1:
2312
2177
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2313
- if (data.unprocessedAccounts !== undefined && data.unprocessedAccounts !== null) {
2178
+ if (data.unprocessedAccounts != null) {
2314
2179
  contents.unprocessedAccounts = deserializeAws_restJson1__listOfUnprocessedAccount(data.unprocessedAccounts, context);
2315
2180
  }
2316
- return [2, Promise.resolve(contents)];
2181
+ return [2, contents];
2317
2182
  }
2318
2183
  });
2319
2184
  }); };
2320
2185
  var deserializeAws_restJson1DeclineInvitationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2321
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2186
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2322
2187
  var _c;
2323
2188
  return __generator(this, function (_d) {
2324
2189
  switch (_d.label) {
@@ -2363,14 +2228,14 @@ var deserializeAws_restJson1DeclineInvitationsCommandError = function (output, c
2363
2228
  case 15: throw _d.sent();
2364
2229
  case 16:
2365
2230
  parsedBody = parsedOutput.body;
2366
- $metadata = deserializeMetadata(output);
2367
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2368
- response = new __BaseException({
2369
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2370
- $fault: "client",
2371
- $metadata: $metadata,
2231
+ throwDefaultError({
2232
+ output: output,
2233
+ parsedBody: parsedBody,
2234
+ exceptionCtor: __BaseException,
2235
+ errorCode: errorCode,
2372
2236
  });
2373
- throw __decorateServiceException(response, parsedBody);
2237
+ _d.label = 17;
2238
+ case 17: return [2];
2374
2239
  }
2375
2240
  });
2376
2241
  }); };
@@ -2382,18 +2247,18 @@ export var deserializeAws_restJson1DeleteCustomDataIdentifierCommand = function
2382
2247
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2383
2248
  return [2, deserializeAws_restJson1DeleteCustomDataIdentifierCommandError(output, context)];
2384
2249
  }
2385
- contents = {
2250
+ contents = map({
2386
2251
  $metadata: deserializeMetadata(output),
2387
- };
2252
+ });
2388
2253
  return [4, collectBody(output.body, context)];
2389
2254
  case 1:
2390
2255
  _a.sent();
2391
- return [2, Promise.resolve(contents)];
2256
+ return [2, contents];
2392
2257
  }
2393
2258
  });
2394
2259
  }); };
2395
2260
  var deserializeAws_restJson1DeleteCustomDataIdentifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2396
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2261
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2397
2262
  var _c;
2398
2263
  return __generator(this, function (_d) {
2399
2264
  switch (_d.label) {
@@ -2438,14 +2303,14 @@ var deserializeAws_restJson1DeleteCustomDataIdentifierCommandError = function (o
2438
2303
  case 15: throw _d.sent();
2439
2304
  case 16:
2440
2305
  parsedBody = parsedOutput.body;
2441
- $metadata = deserializeMetadata(output);
2442
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2443
- response = new __BaseException({
2444
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2445
- $fault: "client",
2446
- $metadata: $metadata,
2306
+ throwDefaultError({
2307
+ output: output,
2308
+ parsedBody: parsedBody,
2309
+ exceptionCtor: __BaseException,
2310
+ errorCode: errorCode,
2447
2311
  });
2448
- throw __decorateServiceException(response, parsedBody);
2312
+ _d.label = 17;
2313
+ case 17: return [2];
2449
2314
  }
2450
2315
  });
2451
2316
  }); };
@@ -2457,18 +2322,18 @@ export var deserializeAws_restJson1DeleteFindingsFilterCommand = function (outpu
2457
2322
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2458
2323
  return [2, deserializeAws_restJson1DeleteFindingsFilterCommandError(output, context)];
2459
2324
  }
2460
- contents = {
2325
+ contents = map({
2461
2326
  $metadata: deserializeMetadata(output),
2462
- };
2327
+ });
2463
2328
  return [4, collectBody(output.body, context)];
2464
2329
  case 1:
2465
2330
  _a.sent();
2466
- return [2, Promise.resolve(contents)];
2331
+ return [2, contents];
2467
2332
  }
2468
2333
  });
2469
2334
  }); };
2470
2335
  var deserializeAws_restJson1DeleteFindingsFilterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2471
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2336
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2472
2337
  var _c;
2473
2338
  return __generator(this, function (_d) {
2474
2339
  switch (_d.label) {
@@ -2513,14 +2378,14 @@ var deserializeAws_restJson1DeleteFindingsFilterCommandError = function (output,
2513
2378
  case 15: throw _d.sent();
2514
2379
  case 16:
2515
2380
  parsedBody = parsedOutput.body;
2516
- $metadata = deserializeMetadata(output);
2517
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2518
- response = new __BaseException({
2519
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2520
- $fault: "client",
2521
- $metadata: $metadata,
2381
+ throwDefaultError({
2382
+ output: output,
2383
+ parsedBody: parsedBody,
2384
+ exceptionCtor: __BaseException,
2385
+ errorCode: errorCode,
2522
2386
  });
2523
- throw __decorateServiceException(response, parsedBody);
2387
+ _d.label = 17;
2388
+ case 17: return [2];
2524
2389
  }
2525
2390
  });
2526
2391
  }); };
@@ -2532,24 +2397,23 @@ export var deserializeAws_restJson1DeleteInvitationsCommand = function (output,
2532
2397
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2533
2398
  return [2, deserializeAws_restJson1DeleteInvitationsCommandError(output, context)];
2534
2399
  }
2535
- contents = {
2400
+ contents = map({
2536
2401
  $metadata: deserializeMetadata(output),
2537
- unprocessedAccounts: undefined,
2538
- };
2402
+ });
2539
2403
  _a = __expectNonNull;
2540
2404
  _b = __expectObject;
2541
2405
  return [4, parseBody(output.body, context)];
2542
2406
  case 1:
2543
2407
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2544
- if (data.unprocessedAccounts !== undefined && data.unprocessedAccounts !== null) {
2408
+ if (data.unprocessedAccounts != null) {
2545
2409
  contents.unprocessedAccounts = deserializeAws_restJson1__listOfUnprocessedAccount(data.unprocessedAccounts, context);
2546
2410
  }
2547
- return [2, Promise.resolve(contents)];
2411
+ return [2, contents];
2548
2412
  }
2549
2413
  });
2550
2414
  }); };
2551
2415
  var deserializeAws_restJson1DeleteInvitationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2552
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2416
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2553
2417
  var _c;
2554
2418
  return __generator(this, function (_d) {
2555
2419
  switch (_d.label) {
@@ -2594,14 +2458,14 @@ var deserializeAws_restJson1DeleteInvitationsCommandError = function (output, co
2594
2458
  case 15: throw _d.sent();
2595
2459
  case 16:
2596
2460
  parsedBody = parsedOutput.body;
2597
- $metadata = deserializeMetadata(output);
2598
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2599
- response = new __BaseException({
2600
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2601
- $fault: "client",
2602
- $metadata: $metadata,
2461
+ throwDefaultError({
2462
+ output: output,
2463
+ parsedBody: parsedBody,
2464
+ exceptionCtor: __BaseException,
2465
+ errorCode: errorCode,
2603
2466
  });
2604
- throw __decorateServiceException(response, parsedBody);
2467
+ _d.label = 17;
2468
+ case 17: return [2];
2605
2469
  }
2606
2470
  });
2607
2471
  }); };
@@ -2613,18 +2477,18 @@ export var deserializeAws_restJson1DeleteMemberCommand = function (output, conte
2613
2477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2614
2478
  return [2, deserializeAws_restJson1DeleteMemberCommandError(output, context)];
2615
2479
  }
2616
- contents = {
2480
+ contents = map({
2617
2481
  $metadata: deserializeMetadata(output),
2618
- };
2482
+ });
2619
2483
  return [4, collectBody(output.body, context)];
2620
2484
  case 1:
2621
2485
  _a.sent();
2622
- return [2, Promise.resolve(contents)];
2486
+ return [2, contents];
2623
2487
  }
2624
2488
  });
2625
2489
  }); };
2626
2490
  var deserializeAws_restJson1DeleteMemberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2627
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2491
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2628
2492
  var _c;
2629
2493
  return __generator(this, function (_d) {
2630
2494
  switch (_d.label) {
@@ -2669,14 +2533,14 @@ var deserializeAws_restJson1DeleteMemberCommandError = function (output, context
2669
2533
  case 15: throw _d.sent();
2670
2534
  case 16:
2671
2535
  parsedBody = parsedOutput.body;
2672
- $metadata = deserializeMetadata(output);
2673
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2674
- response = new __BaseException({
2675
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2676
- $fault: "client",
2677
- $metadata: $metadata,
2536
+ throwDefaultError({
2537
+ output: output,
2538
+ parsedBody: parsedBody,
2539
+ exceptionCtor: __BaseException,
2540
+ errorCode: errorCode,
2678
2541
  });
2679
- throw __decorateServiceException(response, parsedBody);
2542
+ _d.label = 17;
2543
+ case 17: return [2];
2680
2544
  }
2681
2545
  });
2682
2546
  }); };
@@ -2688,28 +2552,26 @@ export var deserializeAws_restJson1DescribeBucketsCommand = function (output, co
2688
2552
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2689
2553
  return [2, deserializeAws_restJson1DescribeBucketsCommandError(output, context)];
2690
2554
  }
2691
- contents = {
2555
+ contents = map({
2692
2556
  $metadata: deserializeMetadata(output),
2693
- buckets: undefined,
2694
- nextToken: undefined,
2695
- };
2557
+ });
2696
2558
  _a = __expectNonNull;
2697
2559
  _b = __expectObject;
2698
2560
  return [4, parseBody(output.body, context)];
2699
2561
  case 1:
2700
2562
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2701
- if (data.buckets !== undefined && data.buckets !== null) {
2563
+ if (data.buckets != null) {
2702
2564
  contents.buckets = deserializeAws_restJson1__listOfBucketMetadata(data.buckets, context);
2703
2565
  }
2704
- if (data.nextToken !== undefined && data.nextToken !== null) {
2566
+ if (data.nextToken != null) {
2705
2567
  contents.nextToken = __expectString(data.nextToken);
2706
2568
  }
2707
- return [2, Promise.resolve(contents)];
2569
+ return [2, contents];
2708
2570
  }
2709
2571
  });
2710
2572
  }); };
2711
2573
  var deserializeAws_restJson1DescribeBucketsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2712
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2574
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2713
2575
  var _c;
2714
2576
  return __generator(this, function (_d) {
2715
2577
  switch (_d.label) {
@@ -2754,14 +2616,14 @@ var deserializeAws_restJson1DescribeBucketsCommandError = function (output, cont
2754
2616
  case 15: throw _d.sent();
2755
2617
  case 16:
2756
2618
  parsedBody = parsedOutput.body;
2757
- $metadata = deserializeMetadata(output);
2758
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2759
- response = new __BaseException({
2760
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2761
- $fault: "client",
2762
- $metadata: $metadata,
2619
+ throwDefaultError({
2620
+ output: output,
2621
+ parsedBody: parsedBody,
2622
+ exceptionCtor: __BaseException,
2623
+ errorCode: errorCode,
2763
2624
  });
2764
- throw __decorateServiceException(response, parsedBody);
2625
+ _d.label = 17;
2626
+ case 17: return [2];
2765
2627
  }
2766
2628
  });
2767
2629
  }); };
@@ -2773,100 +2635,80 @@ export var deserializeAws_restJson1DescribeClassificationJobCommand = function (
2773
2635
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2774
2636
  return [2, deserializeAws_restJson1DescribeClassificationJobCommandError(output, context)];
2775
2637
  }
2776
- contents = {
2638
+ contents = map({
2777
2639
  $metadata: deserializeMetadata(output),
2778
- clientToken: undefined,
2779
- createdAt: undefined,
2780
- customDataIdentifierIds: undefined,
2781
- description: undefined,
2782
- initialRun: undefined,
2783
- jobArn: undefined,
2784
- jobId: undefined,
2785
- jobStatus: undefined,
2786
- jobType: undefined,
2787
- lastRunErrorStatus: undefined,
2788
- lastRunTime: undefined,
2789
- managedDataIdentifierIds: undefined,
2790
- managedDataIdentifierSelector: undefined,
2791
- name: undefined,
2792
- s3JobDefinition: undefined,
2793
- samplingPercentage: undefined,
2794
- scheduleFrequency: undefined,
2795
- statistics: undefined,
2796
- tags: undefined,
2797
- userPausedDetails: undefined,
2798
- };
2640
+ });
2799
2641
  _a = __expectNonNull;
2800
2642
  _b = __expectObject;
2801
2643
  return [4, parseBody(output.body, context)];
2802
2644
  case 1:
2803
2645
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2804
- if (data.clientToken !== undefined && data.clientToken !== null) {
2646
+ if (data.clientToken != null) {
2805
2647
  contents.clientToken = __expectString(data.clientToken);
2806
2648
  }
2807
- if (data.createdAt !== undefined && data.createdAt !== null) {
2649
+ if (data.createdAt != null) {
2808
2650
  contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
2809
2651
  }
2810
- if (data.customDataIdentifierIds !== undefined && data.customDataIdentifierIds !== null) {
2652
+ if (data.customDataIdentifierIds != null) {
2811
2653
  contents.customDataIdentifierIds = deserializeAws_restJson1__listOf__string(data.customDataIdentifierIds, context);
2812
2654
  }
2813
- if (data.description !== undefined && data.description !== null) {
2655
+ if (data.description != null) {
2814
2656
  contents.description = __expectString(data.description);
2815
2657
  }
2816
- if (data.initialRun !== undefined && data.initialRun !== null) {
2658
+ if (data.initialRun != null) {
2817
2659
  contents.initialRun = __expectBoolean(data.initialRun);
2818
2660
  }
2819
- if (data.jobArn !== undefined && data.jobArn !== null) {
2661
+ if (data.jobArn != null) {
2820
2662
  contents.jobArn = __expectString(data.jobArn);
2821
2663
  }
2822
- if (data.jobId !== undefined && data.jobId !== null) {
2664
+ if (data.jobId != null) {
2823
2665
  contents.jobId = __expectString(data.jobId);
2824
2666
  }
2825
- if (data.jobStatus !== undefined && data.jobStatus !== null) {
2667
+ if (data.jobStatus != null) {
2826
2668
  contents.jobStatus = __expectString(data.jobStatus);
2827
2669
  }
2828
- if (data.jobType !== undefined && data.jobType !== null) {
2670
+ if (data.jobType != null) {
2829
2671
  contents.jobType = __expectString(data.jobType);
2830
2672
  }
2831
- if (data.lastRunErrorStatus !== undefined && data.lastRunErrorStatus !== null) {
2673
+ if (data.lastRunErrorStatus != null) {
2832
2674
  contents.lastRunErrorStatus = deserializeAws_restJson1LastRunErrorStatus(data.lastRunErrorStatus, context);
2833
2675
  }
2834
- if (data.lastRunTime !== undefined && data.lastRunTime !== null) {
2676
+ if (data.lastRunTime != null) {
2835
2677
  contents.lastRunTime = __expectNonNull(__parseRfc3339DateTime(data.lastRunTime));
2836
2678
  }
2837
- if (data.managedDataIdentifierIds !== undefined && data.managedDataIdentifierIds !== null) {
2679
+ if (data.managedDataIdentifierIds != null) {
2838
2680
  contents.managedDataIdentifierIds = deserializeAws_restJson1__listOf__string(data.managedDataIdentifierIds, context);
2839
2681
  }
2840
- if (data.managedDataIdentifierSelector !== undefined && data.managedDataIdentifierSelector !== null) {
2682
+ if (data.managedDataIdentifierSelector != null) {
2841
2683
  contents.managedDataIdentifierSelector = __expectString(data.managedDataIdentifierSelector);
2842
2684
  }
2843
- if (data.name !== undefined && data.name !== null) {
2685
+ if (data.name != null) {
2844
2686
  contents.name = __expectString(data.name);
2845
2687
  }
2846
- if (data.s3JobDefinition !== undefined && data.s3JobDefinition !== null) {
2688
+ if (data.s3JobDefinition != null) {
2847
2689
  contents.s3JobDefinition = deserializeAws_restJson1S3JobDefinition(data.s3JobDefinition, context);
2848
2690
  }
2849
- if (data.samplingPercentage !== undefined && data.samplingPercentage !== null) {
2691
+ if (data.samplingPercentage != null) {
2850
2692
  contents.samplingPercentage = __expectInt32(data.samplingPercentage);
2851
2693
  }
2852
- if (data.scheduleFrequency !== undefined && data.scheduleFrequency !== null) {
2694
+ if (data.scheduleFrequency != null) {
2853
2695
  contents.scheduleFrequency = deserializeAws_restJson1JobScheduleFrequency(data.scheduleFrequency, context);
2854
2696
  }
2855
- if (data.statistics !== undefined && data.statistics !== null) {
2697
+ if (data.statistics != null) {
2856
2698
  contents.statistics = deserializeAws_restJson1Statistics(data.statistics, context);
2857
2699
  }
2858
- if (data.tags !== undefined && data.tags !== null) {
2700
+ if (data.tags != null) {
2859
2701
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
2860
2702
  }
2861
- if (data.userPausedDetails !== undefined && data.userPausedDetails !== null) {
2703
+ if (data.userPausedDetails != null) {
2862
2704
  contents.userPausedDetails = deserializeAws_restJson1UserPausedDetails(data.userPausedDetails, context);
2863
2705
  }
2864
- return [2, Promise.resolve(contents)];
2706
+ return [2, contents];
2865
2707
  }
2866
2708
  });
2867
2709
  }); };
2868
2710
  var deserializeAws_restJson1DescribeClassificationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2869
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2711
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2870
2712
  var _c;
2871
2713
  return __generator(this, function (_d) {
2872
2714
  switch (_d.label) {
@@ -2911,14 +2753,14 @@ var deserializeAws_restJson1DescribeClassificationJobCommandError = function (ou
2911
2753
  case 15: throw _d.sent();
2912
2754
  case 16:
2913
2755
  parsedBody = parsedOutput.body;
2914
- $metadata = deserializeMetadata(output);
2915
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2916
- response = new __BaseException({
2917
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2918
- $fault: "client",
2919
- $metadata: $metadata,
2756
+ throwDefaultError({
2757
+ output: output,
2758
+ parsedBody: parsedBody,
2759
+ exceptionCtor: __BaseException,
2760
+ errorCode: errorCode,
2920
2761
  });
2921
- throw __decorateServiceException(response, parsedBody);
2762
+ _d.label = 17;
2763
+ case 17: return [2];
2922
2764
  }
2923
2765
  });
2924
2766
  }); };
@@ -2930,28 +2772,26 @@ export var deserializeAws_restJson1DescribeOrganizationConfigurationCommand = fu
2930
2772
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2931
2773
  return [2, deserializeAws_restJson1DescribeOrganizationConfigurationCommandError(output, context)];
2932
2774
  }
2933
- contents = {
2775
+ contents = map({
2934
2776
  $metadata: deserializeMetadata(output),
2935
- autoEnable: undefined,
2936
- maxAccountLimitReached: undefined,
2937
- };
2777
+ });
2938
2778
  _a = __expectNonNull;
2939
2779
  _b = __expectObject;
2940
2780
  return [4, parseBody(output.body, context)];
2941
2781
  case 1:
2942
2782
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2943
- if (data.autoEnable !== undefined && data.autoEnable !== null) {
2783
+ if (data.autoEnable != null) {
2944
2784
  contents.autoEnable = __expectBoolean(data.autoEnable);
2945
2785
  }
2946
- if (data.maxAccountLimitReached !== undefined && data.maxAccountLimitReached !== null) {
2786
+ if (data.maxAccountLimitReached != null) {
2947
2787
  contents.maxAccountLimitReached = __expectBoolean(data.maxAccountLimitReached);
2948
2788
  }
2949
- return [2, Promise.resolve(contents)];
2789
+ return [2, contents];
2950
2790
  }
2951
2791
  });
2952
2792
  }); };
2953
2793
  var deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2954
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2794
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2955
2795
  var _c;
2956
2796
  return __generator(this, function (_d) {
2957
2797
  switch (_d.label) {
@@ -2996,14 +2836,14 @@ var deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = func
2996
2836
  case 15: throw _d.sent();
2997
2837
  case 16:
2998
2838
  parsedBody = parsedOutput.body;
2999
- $metadata = deserializeMetadata(output);
3000
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3001
- response = new __BaseException({
3002
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3003
- $fault: "client",
3004
- $metadata: $metadata,
2839
+ throwDefaultError({
2840
+ output: output,
2841
+ parsedBody: parsedBody,
2842
+ exceptionCtor: __BaseException,
2843
+ errorCode: errorCode,
3005
2844
  });
3006
- throw __decorateServiceException(response, parsedBody);
2845
+ _d.label = 17;
2846
+ case 17: return [2];
3007
2847
  }
3008
2848
  });
3009
2849
  }); };
@@ -3015,18 +2855,18 @@ export var deserializeAws_restJson1DisableMacieCommand = function (output, conte
3015
2855
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3016
2856
  return [2, deserializeAws_restJson1DisableMacieCommandError(output, context)];
3017
2857
  }
3018
- contents = {
2858
+ contents = map({
3019
2859
  $metadata: deserializeMetadata(output),
3020
- };
2860
+ });
3021
2861
  return [4, collectBody(output.body, context)];
3022
2862
  case 1:
3023
2863
  _a.sent();
3024
- return [2, Promise.resolve(contents)];
2864
+ return [2, contents];
3025
2865
  }
3026
2866
  });
3027
2867
  }); };
3028
2868
  var deserializeAws_restJson1DisableMacieCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3029
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2869
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3030
2870
  var _c;
3031
2871
  return __generator(this, function (_d) {
3032
2872
  switch (_d.label) {
@@ -3071,14 +2911,14 @@ var deserializeAws_restJson1DisableMacieCommandError = function (output, context
3071
2911
  case 15: throw _d.sent();
3072
2912
  case 16:
3073
2913
  parsedBody = parsedOutput.body;
3074
- $metadata = deserializeMetadata(output);
3075
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3076
- response = new __BaseException({
3077
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3078
- $fault: "client",
3079
- $metadata: $metadata,
2914
+ throwDefaultError({
2915
+ output: output,
2916
+ parsedBody: parsedBody,
2917
+ exceptionCtor: __BaseException,
2918
+ errorCode: errorCode,
3080
2919
  });
3081
- throw __decorateServiceException(response, parsedBody);
2920
+ _d.label = 17;
2921
+ case 17: return [2];
3082
2922
  }
3083
2923
  });
3084
2924
  }); };
@@ -3090,18 +2930,18 @@ export var deserializeAws_restJson1DisableOrganizationAdminAccountCommand = func
3090
2930
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3091
2931
  return [2, deserializeAws_restJson1DisableOrganizationAdminAccountCommandError(output, context)];
3092
2932
  }
3093
- contents = {
2933
+ contents = map({
3094
2934
  $metadata: deserializeMetadata(output),
3095
- };
2935
+ });
3096
2936
  return [4, collectBody(output.body, context)];
3097
2937
  case 1:
3098
2938
  _a.sent();
3099
- return [2, Promise.resolve(contents)];
2939
+ return [2, contents];
3100
2940
  }
3101
2941
  });
3102
2942
  }); };
3103
2943
  var deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3104
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2944
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3105
2945
  var _c;
3106
2946
  return __generator(this, function (_d) {
3107
2947
  switch (_d.label) {
@@ -3146,14 +2986,14 @@ var deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = functi
3146
2986
  case 15: throw _d.sent();
3147
2987
  case 16:
3148
2988
  parsedBody = parsedOutput.body;
3149
- $metadata = deserializeMetadata(output);
3150
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3151
- response = new __BaseException({
3152
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3153
- $fault: "client",
3154
- $metadata: $metadata,
2989
+ throwDefaultError({
2990
+ output: output,
2991
+ parsedBody: parsedBody,
2992
+ exceptionCtor: __BaseException,
2993
+ errorCode: errorCode,
3155
2994
  });
3156
- throw __decorateServiceException(response, parsedBody);
2995
+ _d.label = 17;
2996
+ case 17: return [2];
3157
2997
  }
3158
2998
  });
3159
2999
  }); };
@@ -3165,18 +3005,18 @@ export var deserializeAws_restJson1DisassociateFromAdministratorAccountCommand =
3165
3005
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3166
3006
  return [2, deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError(output, context)];
3167
3007
  }
3168
- contents = {
3008
+ contents = map({
3169
3009
  $metadata: deserializeMetadata(output),
3170
- };
3010
+ });
3171
3011
  return [4, collectBody(output.body, context)];
3172
3012
  case 1:
3173
3013
  _a.sent();
3174
- return [2, Promise.resolve(contents)];
3014
+ return [2, contents];
3175
3015
  }
3176
3016
  });
3177
3017
  }); };
3178
3018
  var deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3179
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3019
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3180
3020
  var _c;
3181
3021
  return __generator(this, function (_d) {
3182
3022
  switch (_d.label) {
@@ -3221,14 +3061,14 @@ var deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError = f
3221
3061
  case 15: throw _d.sent();
3222
3062
  case 16:
3223
3063
  parsedBody = parsedOutput.body;
3224
- $metadata = deserializeMetadata(output);
3225
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3226
- response = new __BaseException({
3227
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3228
- $fault: "client",
3229
- $metadata: $metadata,
3064
+ throwDefaultError({
3065
+ output: output,
3066
+ parsedBody: parsedBody,
3067
+ exceptionCtor: __BaseException,
3068
+ errorCode: errorCode,
3230
3069
  });
3231
- throw __decorateServiceException(response, parsedBody);
3070
+ _d.label = 17;
3071
+ case 17: return [2];
3232
3072
  }
3233
3073
  });
3234
3074
  }); };
@@ -3240,18 +3080,18 @@ export var deserializeAws_restJson1DisassociateFromMasterAccountCommand = functi
3240
3080
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3241
3081
  return [2, deserializeAws_restJson1DisassociateFromMasterAccountCommandError(output, context)];
3242
3082
  }
3243
- contents = {
3083
+ contents = map({
3244
3084
  $metadata: deserializeMetadata(output),
3245
- };
3085
+ });
3246
3086
  return [4, collectBody(output.body, context)];
3247
3087
  case 1:
3248
3088
  _a.sent();
3249
- return [2, Promise.resolve(contents)];
3089
+ return [2, contents];
3250
3090
  }
3251
3091
  });
3252
3092
  }); };
3253
3093
  var deserializeAws_restJson1DisassociateFromMasterAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3254
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3094
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3255
3095
  var _c;
3256
3096
  return __generator(this, function (_d) {
3257
3097
  switch (_d.label) {
@@ -3296,14 +3136,14 @@ var deserializeAws_restJson1DisassociateFromMasterAccountCommandError = function
3296
3136
  case 15: throw _d.sent();
3297
3137
  case 16:
3298
3138
  parsedBody = parsedOutput.body;
3299
- $metadata = deserializeMetadata(output);
3300
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3301
- response = new __BaseException({
3302
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3303
- $fault: "client",
3304
- $metadata: $metadata,
3139
+ throwDefaultError({
3140
+ output: output,
3141
+ parsedBody: parsedBody,
3142
+ exceptionCtor: __BaseException,
3143
+ errorCode: errorCode,
3305
3144
  });
3306
- throw __decorateServiceException(response, parsedBody);
3145
+ _d.label = 17;
3146
+ case 17: return [2];
3307
3147
  }
3308
3148
  });
3309
3149
  }); };
@@ -3315,18 +3155,18 @@ export var deserializeAws_restJson1DisassociateMemberCommand = function (output,
3315
3155
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3316
3156
  return [2, deserializeAws_restJson1DisassociateMemberCommandError(output, context)];
3317
3157
  }
3318
- contents = {
3158
+ contents = map({
3319
3159
  $metadata: deserializeMetadata(output),
3320
- };
3160
+ });
3321
3161
  return [4, collectBody(output.body, context)];
3322
3162
  case 1:
3323
3163
  _a.sent();
3324
- return [2, Promise.resolve(contents)];
3164
+ return [2, contents];
3325
3165
  }
3326
3166
  });
3327
3167
  }); };
3328
3168
  var deserializeAws_restJson1DisassociateMemberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3329
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3169
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3330
3170
  var _c;
3331
3171
  return __generator(this, function (_d) {
3332
3172
  switch (_d.label) {
@@ -3371,14 +3211,14 @@ var deserializeAws_restJson1DisassociateMemberCommandError = function (output, c
3371
3211
  case 15: throw _d.sent();
3372
3212
  case 16:
3373
3213
  parsedBody = parsedOutput.body;
3374
- $metadata = deserializeMetadata(output);
3375
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3376
- response = new __BaseException({
3377
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3378
- $fault: "client",
3379
- $metadata: $metadata,
3214
+ throwDefaultError({
3215
+ output: output,
3216
+ parsedBody: parsedBody,
3217
+ exceptionCtor: __BaseException,
3218
+ errorCode: errorCode,
3380
3219
  });
3381
- throw __decorateServiceException(response, parsedBody);
3220
+ _d.label = 17;
3221
+ case 17: return [2];
3382
3222
  }
3383
3223
  });
3384
3224
  }); };
@@ -3390,18 +3230,18 @@ export var deserializeAws_restJson1EnableMacieCommand = function (output, contex
3390
3230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3391
3231
  return [2, deserializeAws_restJson1EnableMacieCommandError(output, context)];
3392
3232
  }
3393
- contents = {
3233
+ contents = map({
3394
3234
  $metadata: deserializeMetadata(output),
3395
- };
3235
+ });
3396
3236
  return [4, collectBody(output.body, context)];
3397
3237
  case 1:
3398
3238
  _a.sent();
3399
- return [2, Promise.resolve(contents)];
3239
+ return [2, contents];
3400
3240
  }
3401
3241
  });
3402
3242
  }); };
3403
3243
  var deserializeAws_restJson1EnableMacieCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3404
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3244
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3405
3245
  var _c;
3406
3246
  return __generator(this, function (_d) {
3407
3247
  switch (_d.label) {
@@ -3446,14 +3286,14 @@ var deserializeAws_restJson1EnableMacieCommandError = function (output, context)
3446
3286
  case 15: throw _d.sent();
3447
3287
  case 16:
3448
3288
  parsedBody = parsedOutput.body;
3449
- $metadata = deserializeMetadata(output);
3450
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3451
- response = new __BaseException({
3452
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3453
- $fault: "client",
3454
- $metadata: $metadata,
3289
+ throwDefaultError({
3290
+ output: output,
3291
+ parsedBody: parsedBody,
3292
+ exceptionCtor: __BaseException,
3293
+ errorCode: errorCode,
3455
3294
  });
3456
- throw __decorateServiceException(response, parsedBody);
3295
+ _d.label = 17;
3296
+ case 17: return [2];
3457
3297
  }
3458
3298
  });
3459
3299
  }); };
@@ -3465,18 +3305,18 @@ export var deserializeAws_restJson1EnableOrganizationAdminAccountCommand = funct
3465
3305
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3466
3306
  return [2, deserializeAws_restJson1EnableOrganizationAdminAccountCommandError(output, context)];
3467
3307
  }
3468
- contents = {
3308
+ contents = map({
3469
3309
  $metadata: deserializeMetadata(output),
3470
- };
3310
+ });
3471
3311
  return [4, collectBody(output.body, context)];
3472
3312
  case 1:
3473
3313
  _a.sent();
3474
- return [2, Promise.resolve(contents)];
3314
+ return [2, contents];
3475
3315
  }
3476
3316
  });
3477
3317
  }); };
3478
3318
  var deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3479
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3319
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3480
3320
  var _c;
3481
3321
  return __generator(this, function (_d) {
3482
3322
  switch (_d.label) {
@@ -3521,14 +3361,14 @@ var deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = functio
3521
3361
  case 15: throw _d.sent();
3522
3362
  case 16:
3523
3363
  parsedBody = parsedOutput.body;
3524
- $metadata = deserializeMetadata(output);
3525
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3526
- response = new __BaseException({
3527
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3528
- $fault: "client",
3529
- $metadata: $metadata,
3364
+ throwDefaultError({
3365
+ output: output,
3366
+ parsedBody: parsedBody,
3367
+ exceptionCtor: __BaseException,
3368
+ errorCode: errorCode,
3530
3369
  });
3531
- throw __decorateServiceException(response, parsedBody);
3370
+ _d.label = 17;
3371
+ case 17: return [2];
3532
3372
  }
3533
3373
  });
3534
3374
  }); };
@@ -3540,24 +3380,23 @@ export var deserializeAws_restJson1GetAdministratorAccountCommand = function (ou
3540
3380
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3541
3381
  return [2, deserializeAws_restJson1GetAdministratorAccountCommandError(output, context)];
3542
3382
  }
3543
- contents = {
3383
+ contents = map({
3544
3384
  $metadata: deserializeMetadata(output),
3545
- administrator: undefined,
3546
- };
3385
+ });
3547
3386
  _a = __expectNonNull;
3548
3387
  _b = __expectObject;
3549
3388
  return [4, parseBody(output.body, context)];
3550
3389
  case 1:
3551
3390
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3552
- if (data.administrator !== undefined && data.administrator !== null) {
3391
+ if (data.administrator != null) {
3553
3392
  contents.administrator = deserializeAws_restJson1Invitation(data.administrator, context);
3554
3393
  }
3555
- return [2, Promise.resolve(contents)];
3394
+ return [2, contents];
3556
3395
  }
3557
3396
  });
3558
3397
  }); };
3559
3398
  var deserializeAws_restJson1GetAdministratorAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3560
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3399
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3561
3400
  var _c;
3562
3401
  return __generator(this, function (_d) {
3563
3402
  switch (_d.label) {
@@ -3602,14 +3441,14 @@ var deserializeAws_restJson1GetAdministratorAccountCommandError = function (outp
3602
3441
  case 15: throw _d.sent();
3603
3442
  case 16:
3604
3443
  parsedBody = parsedOutput.body;
3605
- $metadata = deserializeMetadata(output);
3606
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3607
- response = new __BaseException({
3608
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3609
- $fault: "client",
3610
- $metadata: $metadata,
3444
+ throwDefaultError({
3445
+ output: output,
3446
+ parsedBody: parsedBody,
3447
+ exceptionCtor: __BaseException,
3448
+ errorCode: errorCode,
3611
3449
  });
3612
- throw __decorateServiceException(response, parsedBody);
3450
+ _d.label = 17;
3451
+ case 17: return [2];
3613
3452
  }
3614
3453
  });
3615
3454
  }); };
@@ -3621,74 +3460,60 @@ export var deserializeAws_restJson1GetBucketStatisticsCommand = function (output
3621
3460
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3622
3461
  return [2, deserializeAws_restJson1GetBucketStatisticsCommandError(output, context)];
3623
3462
  }
3624
- contents = {
3463
+ contents = map({
3625
3464
  $metadata: deserializeMetadata(output),
3626
- bucketCount: undefined,
3627
- bucketCountByEffectivePermission: undefined,
3628
- bucketCountByEncryptionType: undefined,
3629
- bucketCountByObjectEncryptionRequirement: undefined,
3630
- bucketCountBySharedAccessType: undefined,
3631
- classifiableObjectCount: undefined,
3632
- classifiableSizeInBytes: undefined,
3633
- lastUpdated: undefined,
3634
- objectCount: undefined,
3635
- sizeInBytes: undefined,
3636
- sizeInBytesCompressed: undefined,
3637
- unclassifiableObjectCount: undefined,
3638
- unclassifiableObjectSizeInBytes: undefined,
3639
- };
3465
+ });
3640
3466
  _a = __expectNonNull;
3641
3467
  _b = __expectObject;
3642
3468
  return [4, parseBody(output.body, context)];
3643
3469
  case 1:
3644
3470
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3645
- if (data.bucketCount !== undefined && data.bucketCount !== null) {
3471
+ if (data.bucketCount != null) {
3646
3472
  contents.bucketCount = __expectLong(data.bucketCount);
3647
3473
  }
3648
- if (data.bucketCountByEffectivePermission !== undefined && data.bucketCountByEffectivePermission !== null) {
3474
+ if (data.bucketCountByEffectivePermission != null) {
3649
3475
  contents.bucketCountByEffectivePermission = deserializeAws_restJson1BucketCountByEffectivePermission(data.bucketCountByEffectivePermission, context);
3650
3476
  }
3651
- if (data.bucketCountByEncryptionType !== undefined && data.bucketCountByEncryptionType !== null) {
3477
+ if (data.bucketCountByEncryptionType != null) {
3652
3478
  contents.bucketCountByEncryptionType = deserializeAws_restJson1BucketCountByEncryptionType(data.bucketCountByEncryptionType, context);
3653
3479
  }
3654
- if (data.bucketCountByObjectEncryptionRequirement !== undefined &&
3655
- data.bucketCountByObjectEncryptionRequirement !== null) {
3480
+ if (data.bucketCountByObjectEncryptionRequirement != null) {
3656
3481
  contents.bucketCountByObjectEncryptionRequirement =
3657
3482
  deserializeAws_restJson1BucketCountPolicyAllowsUnencryptedObjectUploads(data.bucketCountByObjectEncryptionRequirement, context);
3658
3483
  }
3659
- if (data.bucketCountBySharedAccessType !== undefined && data.bucketCountBySharedAccessType !== null) {
3484
+ if (data.bucketCountBySharedAccessType != null) {
3660
3485
  contents.bucketCountBySharedAccessType = deserializeAws_restJson1BucketCountBySharedAccessType(data.bucketCountBySharedAccessType, context);
3661
3486
  }
3662
- if (data.classifiableObjectCount !== undefined && data.classifiableObjectCount !== null) {
3487
+ if (data.classifiableObjectCount != null) {
3663
3488
  contents.classifiableObjectCount = __expectLong(data.classifiableObjectCount);
3664
3489
  }
3665
- if (data.classifiableSizeInBytes !== undefined && data.classifiableSizeInBytes !== null) {
3490
+ if (data.classifiableSizeInBytes != null) {
3666
3491
  contents.classifiableSizeInBytes = __expectLong(data.classifiableSizeInBytes);
3667
3492
  }
3668
- if (data.lastUpdated !== undefined && data.lastUpdated !== null) {
3493
+ if (data.lastUpdated != null) {
3669
3494
  contents.lastUpdated = __expectNonNull(__parseRfc3339DateTime(data.lastUpdated));
3670
3495
  }
3671
- if (data.objectCount !== undefined && data.objectCount !== null) {
3496
+ if (data.objectCount != null) {
3672
3497
  contents.objectCount = __expectLong(data.objectCount);
3673
3498
  }
3674
- if (data.sizeInBytes !== undefined && data.sizeInBytes !== null) {
3499
+ if (data.sizeInBytes != null) {
3675
3500
  contents.sizeInBytes = __expectLong(data.sizeInBytes);
3676
3501
  }
3677
- if (data.sizeInBytesCompressed !== undefined && data.sizeInBytesCompressed !== null) {
3502
+ if (data.sizeInBytesCompressed != null) {
3678
3503
  contents.sizeInBytesCompressed = __expectLong(data.sizeInBytesCompressed);
3679
3504
  }
3680
- if (data.unclassifiableObjectCount !== undefined && data.unclassifiableObjectCount !== null) {
3505
+ if (data.unclassifiableObjectCount != null) {
3681
3506
  contents.unclassifiableObjectCount = deserializeAws_restJson1ObjectLevelStatistics(data.unclassifiableObjectCount, context);
3682
3507
  }
3683
- if (data.unclassifiableObjectSizeInBytes !== undefined && data.unclassifiableObjectSizeInBytes !== null) {
3508
+ if (data.unclassifiableObjectSizeInBytes != null) {
3684
3509
  contents.unclassifiableObjectSizeInBytes = deserializeAws_restJson1ObjectLevelStatistics(data.unclassifiableObjectSizeInBytes, context);
3685
3510
  }
3686
- return [2, Promise.resolve(contents)];
3511
+ return [2, contents];
3687
3512
  }
3688
3513
  });
3689
3514
  }); };
3690
3515
  var deserializeAws_restJson1GetBucketStatisticsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3691
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3516
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3692
3517
  var _c;
3693
3518
  return __generator(this, function (_d) {
3694
3519
  switch (_d.label) {
@@ -3733,14 +3558,14 @@ var deserializeAws_restJson1GetBucketStatisticsCommandError = function (output,
3733
3558
  case 15: throw _d.sent();
3734
3559
  case 16:
3735
3560
  parsedBody = parsedOutput.body;
3736
- $metadata = deserializeMetadata(output);
3737
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3738
- response = new __BaseException({
3739
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3740
- $fault: "client",
3741
- $metadata: $metadata,
3561
+ throwDefaultError({
3562
+ output: output,
3563
+ parsedBody: parsedBody,
3564
+ exceptionCtor: __BaseException,
3565
+ errorCode: errorCode,
3742
3566
  });
3743
- throw __decorateServiceException(response, parsedBody);
3567
+ _d.label = 17;
3568
+ case 17: return [2];
3744
3569
  }
3745
3570
  });
3746
3571
  }); };
@@ -3752,24 +3577,23 @@ export var deserializeAws_restJson1GetClassificationExportConfigurationCommand =
3752
3577
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3753
3578
  return [2, deserializeAws_restJson1GetClassificationExportConfigurationCommandError(output, context)];
3754
3579
  }
3755
- contents = {
3580
+ contents = map({
3756
3581
  $metadata: deserializeMetadata(output),
3757
- configuration: undefined,
3758
- };
3582
+ });
3759
3583
  _a = __expectNonNull;
3760
3584
  _b = __expectObject;
3761
3585
  return [4, parseBody(output.body, context)];
3762
3586
  case 1:
3763
3587
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3764
- if (data.configuration !== undefined && data.configuration !== null) {
3588
+ if (data.configuration != null) {
3765
3589
  contents.configuration = deserializeAws_restJson1ClassificationExportConfiguration(data.configuration, context);
3766
3590
  }
3767
- return [2, Promise.resolve(contents)];
3591
+ return [2, contents];
3768
3592
  }
3769
3593
  });
3770
3594
  }); };
3771
3595
  var deserializeAws_restJson1GetClassificationExportConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3772
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3596
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3773
3597
  var _c;
3774
3598
  return __generator(this, function (_d) {
3775
3599
  switch (_d.label) {
@@ -3814,14 +3638,14 @@ var deserializeAws_restJson1GetClassificationExportConfigurationCommandError = f
3814
3638
  case 15: throw _d.sent();
3815
3639
  case 16:
3816
3640
  parsedBody = parsedOutput.body;
3817
- $metadata = deserializeMetadata(output);
3818
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3819
- response = new __BaseException({
3820
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3821
- $fault: "client",
3822
- $metadata: $metadata,
3641
+ throwDefaultError({
3642
+ output: output,
3643
+ parsedBody: parsedBody,
3644
+ exceptionCtor: __BaseException,
3645
+ errorCode: errorCode,
3823
3646
  });
3824
- throw __decorateServiceException(response, parsedBody);
3647
+ _d.label = 17;
3648
+ case 17: return [2];
3825
3649
  }
3826
3650
  });
3827
3651
  }); };
@@ -3833,68 +3657,56 @@ export var deserializeAws_restJson1GetCustomDataIdentifierCommand = function (ou
3833
3657
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3834
3658
  return [2, deserializeAws_restJson1GetCustomDataIdentifierCommandError(output, context)];
3835
3659
  }
3836
- contents = {
3660
+ contents = map({
3837
3661
  $metadata: deserializeMetadata(output),
3838
- arn: undefined,
3839
- createdAt: undefined,
3840
- deleted: undefined,
3841
- description: undefined,
3842
- id: undefined,
3843
- ignoreWords: undefined,
3844
- keywords: undefined,
3845
- maximumMatchDistance: undefined,
3846
- name: undefined,
3847
- regex: undefined,
3848
- severityLevels: undefined,
3849
- tags: undefined,
3850
- };
3662
+ });
3851
3663
  _a = __expectNonNull;
3852
3664
  _b = __expectObject;
3853
3665
  return [4, parseBody(output.body, context)];
3854
3666
  case 1:
3855
3667
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3856
- if (data.arn !== undefined && data.arn !== null) {
3668
+ if (data.arn != null) {
3857
3669
  contents.arn = __expectString(data.arn);
3858
3670
  }
3859
- if (data.createdAt !== undefined && data.createdAt !== null) {
3671
+ if (data.createdAt != null) {
3860
3672
  contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
3861
3673
  }
3862
- if (data.deleted !== undefined && data.deleted !== null) {
3674
+ if (data.deleted != null) {
3863
3675
  contents.deleted = __expectBoolean(data.deleted);
3864
3676
  }
3865
- if (data.description !== undefined && data.description !== null) {
3677
+ if (data.description != null) {
3866
3678
  contents.description = __expectString(data.description);
3867
3679
  }
3868
- if (data.id !== undefined && data.id !== null) {
3680
+ if (data.id != null) {
3869
3681
  contents.id = __expectString(data.id);
3870
3682
  }
3871
- if (data.ignoreWords !== undefined && data.ignoreWords !== null) {
3683
+ if (data.ignoreWords != null) {
3872
3684
  contents.ignoreWords = deserializeAws_restJson1__listOf__string(data.ignoreWords, context);
3873
3685
  }
3874
- if (data.keywords !== undefined && data.keywords !== null) {
3686
+ if (data.keywords != null) {
3875
3687
  contents.keywords = deserializeAws_restJson1__listOf__string(data.keywords, context);
3876
3688
  }
3877
- if (data.maximumMatchDistance !== undefined && data.maximumMatchDistance !== null) {
3689
+ if (data.maximumMatchDistance != null) {
3878
3690
  contents.maximumMatchDistance = __expectInt32(data.maximumMatchDistance);
3879
3691
  }
3880
- if (data.name !== undefined && data.name !== null) {
3692
+ if (data.name != null) {
3881
3693
  contents.name = __expectString(data.name);
3882
3694
  }
3883
- if (data.regex !== undefined && data.regex !== null) {
3695
+ if (data.regex != null) {
3884
3696
  contents.regex = __expectString(data.regex);
3885
3697
  }
3886
- if (data.severityLevels !== undefined && data.severityLevels !== null) {
3698
+ if (data.severityLevels != null) {
3887
3699
  contents.severityLevels = deserializeAws_restJson1SeverityLevelList(data.severityLevels, context);
3888
3700
  }
3889
- if (data.tags !== undefined && data.tags !== null) {
3701
+ if (data.tags != null) {
3890
3702
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
3891
3703
  }
3892
- return [2, Promise.resolve(contents)];
3704
+ return [2, contents];
3893
3705
  }
3894
3706
  });
3895
3707
  }); };
3896
3708
  var deserializeAws_restJson1GetCustomDataIdentifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3897
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3709
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3898
3710
  var _c;
3899
3711
  return __generator(this, function (_d) {
3900
3712
  switch (_d.label) {
@@ -3939,14 +3751,14 @@ var deserializeAws_restJson1GetCustomDataIdentifierCommandError = function (outp
3939
3751
  case 15: throw _d.sent();
3940
3752
  case 16:
3941
3753
  parsedBody = parsedOutput.body;
3942
- $metadata = deserializeMetadata(output);
3943
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3944
- response = new __BaseException({
3945
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3946
- $fault: "client",
3947
- $metadata: $metadata,
3754
+ throwDefaultError({
3755
+ output: output,
3756
+ parsedBody: parsedBody,
3757
+ exceptionCtor: __BaseException,
3758
+ errorCode: errorCode,
3948
3759
  });
3949
- throw __decorateServiceException(response, parsedBody);
3760
+ _d.label = 17;
3761
+ case 17: return [2];
3950
3762
  }
3951
3763
  });
3952
3764
  }); };
@@ -3958,24 +3770,23 @@ export var deserializeAws_restJson1GetFindingsCommand = function (output, contex
3958
3770
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3959
3771
  return [2, deserializeAws_restJson1GetFindingsCommandError(output, context)];
3960
3772
  }
3961
- contents = {
3773
+ contents = map({
3962
3774
  $metadata: deserializeMetadata(output),
3963
- findings: undefined,
3964
- };
3775
+ });
3965
3776
  _a = __expectNonNull;
3966
3777
  _b = __expectObject;
3967
3778
  return [4, parseBody(output.body, context)];
3968
3779
  case 1:
3969
3780
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3970
- if (data.findings !== undefined && data.findings !== null) {
3781
+ if (data.findings != null) {
3971
3782
  contents.findings = deserializeAws_restJson1__listOfFinding(data.findings, context);
3972
3783
  }
3973
- return [2, Promise.resolve(contents)];
3784
+ return [2, contents];
3974
3785
  }
3975
3786
  });
3976
3787
  }); };
3977
3788
  var deserializeAws_restJson1GetFindingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3978
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3789
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3979
3790
  var _c;
3980
3791
  return __generator(this, function (_d) {
3981
3792
  switch (_d.label) {
@@ -4020,14 +3831,14 @@ var deserializeAws_restJson1GetFindingsCommandError = function (output, context)
4020
3831
  case 15: throw _d.sent();
4021
3832
  case 16:
4022
3833
  parsedBody = parsedOutput.body;
4023
- $metadata = deserializeMetadata(output);
4024
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4025
- response = new __BaseException({
4026
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4027
- $fault: "client",
4028
- $metadata: $metadata,
3834
+ throwDefaultError({
3835
+ output: output,
3836
+ parsedBody: parsedBody,
3837
+ exceptionCtor: __BaseException,
3838
+ errorCode: errorCode,
4029
3839
  });
4030
- throw __decorateServiceException(response, parsedBody);
3840
+ _d.label = 17;
3841
+ case 17: return [2];
4031
3842
  }
4032
3843
  });
4033
3844
  }); };
@@ -4039,52 +3850,44 @@ export var deserializeAws_restJson1GetFindingsFilterCommand = function (output,
4039
3850
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4040
3851
  return [2, deserializeAws_restJson1GetFindingsFilterCommandError(output, context)];
4041
3852
  }
4042
- contents = {
3853
+ contents = map({
4043
3854
  $metadata: deserializeMetadata(output),
4044
- action: undefined,
4045
- arn: undefined,
4046
- description: undefined,
4047
- findingCriteria: undefined,
4048
- id: undefined,
4049
- name: undefined,
4050
- position: undefined,
4051
- tags: undefined,
4052
- };
3855
+ });
4053
3856
  _a = __expectNonNull;
4054
3857
  _b = __expectObject;
4055
3858
  return [4, parseBody(output.body, context)];
4056
3859
  case 1:
4057
3860
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4058
- if (data.action !== undefined && data.action !== null) {
3861
+ if (data.action != null) {
4059
3862
  contents.action = __expectString(data.action);
4060
3863
  }
4061
- if (data.arn !== undefined && data.arn !== null) {
3864
+ if (data.arn != null) {
4062
3865
  contents.arn = __expectString(data.arn);
4063
3866
  }
4064
- if (data.description !== undefined && data.description !== null) {
3867
+ if (data.description != null) {
4065
3868
  contents.description = __expectString(data.description);
4066
3869
  }
4067
- if (data.findingCriteria !== undefined && data.findingCriteria !== null) {
3870
+ if (data.findingCriteria != null) {
4068
3871
  contents.findingCriteria = deserializeAws_restJson1FindingCriteria(data.findingCriteria, context);
4069
3872
  }
4070
- if (data.id !== undefined && data.id !== null) {
3873
+ if (data.id != null) {
4071
3874
  contents.id = __expectString(data.id);
4072
3875
  }
4073
- if (data.name !== undefined && data.name !== null) {
3876
+ if (data.name != null) {
4074
3877
  contents.name = __expectString(data.name);
4075
3878
  }
4076
- if (data.position !== undefined && data.position !== null) {
3879
+ if (data.position != null) {
4077
3880
  contents.position = __expectInt32(data.position);
4078
3881
  }
4079
- if (data.tags !== undefined && data.tags !== null) {
3882
+ if (data.tags != null) {
4080
3883
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
4081
3884
  }
4082
- return [2, Promise.resolve(contents)];
3885
+ return [2, contents];
4083
3886
  }
4084
3887
  });
4085
3888
  }); };
4086
3889
  var deserializeAws_restJson1GetFindingsFilterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4087
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3890
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4088
3891
  var _c;
4089
3892
  return __generator(this, function (_d) {
4090
3893
  switch (_d.label) {
@@ -4129,14 +3932,14 @@ var deserializeAws_restJson1GetFindingsFilterCommandError = function (output, co
4129
3932
  case 15: throw _d.sent();
4130
3933
  case 16:
4131
3934
  parsedBody = parsedOutput.body;
4132
- $metadata = deserializeMetadata(output);
4133
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4134
- response = new __BaseException({
4135
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4136
- $fault: "client",
4137
- $metadata: $metadata,
3935
+ throwDefaultError({
3936
+ output: output,
3937
+ parsedBody: parsedBody,
3938
+ exceptionCtor: __BaseException,
3939
+ errorCode: errorCode,
4138
3940
  });
4139
- throw __decorateServiceException(response, parsedBody);
3941
+ _d.label = 17;
3942
+ case 17: return [2];
4140
3943
  }
4141
3944
  });
4142
3945
  }); };
@@ -4148,24 +3951,23 @@ export var deserializeAws_restJson1GetFindingsPublicationConfigurationCommand =
4148
3951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4149
3952
  return [2, deserializeAws_restJson1GetFindingsPublicationConfigurationCommandError(output, context)];
4150
3953
  }
4151
- contents = {
3954
+ contents = map({
4152
3955
  $metadata: deserializeMetadata(output),
4153
- securityHubConfiguration: undefined,
4154
- };
3956
+ });
4155
3957
  _a = __expectNonNull;
4156
3958
  _b = __expectObject;
4157
3959
  return [4, parseBody(output.body, context)];
4158
3960
  case 1:
4159
3961
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4160
- if (data.securityHubConfiguration !== undefined && data.securityHubConfiguration !== null) {
3962
+ if (data.securityHubConfiguration != null) {
4161
3963
  contents.securityHubConfiguration = deserializeAws_restJson1SecurityHubConfiguration(data.securityHubConfiguration, context);
4162
3964
  }
4163
- return [2, Promise.resolve(contents)];
3965
+ return [2, contents];
4164
3966
  }
4165
3967
  });
4166
3968
  }); };
4167
3969
  var deserializeAws_restJson1GetFindingsPublicationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4168
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3970
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4169
3971
  var _c;
4170
3972
  return __generator(this, function (_d) {
4171
3973
  switch (_d.label) {
@@ -4210,14 +4012,14 @@ var deserializeAws_restJson1GetFindingsPublicationConfigurationCommandError = fu
4210
4012
  case 15: throw _d.sent();
4211
4013
  case 16:
4212
4014
  parsedBody = parsedOutput.body;
4213
- $metadata = deserializeMetadata(output);
4214
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4215
- response = new __BaseException({
4216
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4217
- $fault: "client",
4218
- $metadata: $metadata,
4015
+ throwDefaultError({
4016
+ output: output,
4017
+ parsedBody: parsedBody,
4018
+ exceptionCtor: __BaseException,
4019
+ errorCode: errorCode,
4219
4020
  });
4220
- throw __decorateServiceException(response, parsedBody);
4021
+ _d.label = 17;
4022
+ case 17: return [2];
4221
4023
  }
4222
4024
  });
4223
4025
  }); };
@@ -4229,24 +4031,23 @@ export var deserializeAws_restJson1GetFindingStatisticsCommand = function (outpu
4229
4031
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4230
4032
  return [2, deserializeAws_restJson1GetFindingStatisticsCommandError(output, context)];
4231
4033
  }
4232
- contents = {
4034
+ contents = map({
4233
4035
  $metadata: deserializeMetadata(output),
4234
- countsByGroup: undefined,
4235
- };
4036
+ });
4236
4037
  _a = __expectNonNull;
4237
4038
  _b = __expectObject;
4238
4039
  return [4, parseBody(output.body, context)];
4239
4040
  case 1:
4240
4041
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4241
- if (data.countsByGroup !== undefined && data.countsByGroup !== null) {
4042
+ if (data.countsByGroup != null) {
4242
4043
  contents.countsByGroup = deserializeAws_restJson1__listOfGroupCount(data.countsByGroup, context);
4243
4044
  }
4244
- return [2, Promise.resolve(contents)];
4045
+ return [2, contents];
4245
4046
  }
4246
4047
  });
4247
4048
  }); };
4248
4049
  var deserializeAws_restJson1GetFindingStatisticsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4249
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4050
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4250
4051
  var _c;
4251
4052
  return __generator(this, function (_d) {
4252
4053
  switch (_d.label) {
@@ -4291,14 +4092,14 @@ var deserializeAws_restJson1GetFindingStatisticsCommandError = function (output,
4291
4092
  case 15: throw _d.sent();
4292
4093
  case 16:
4293
4094
  parsedBody = parsedOutput.body;
4294
- $metadata = deserializeMetadata(output);
4295
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4296
- response = new __BaseException({
4297
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4298
- $fault: "client",
4299
- $metadata: $metadata,
4095
+ throwDefaultError({
4096
+ output: output,
4097
+ parsedBody: parsedBody,
4098
+ exceptionCtor: __BaseException,
4099
+ errorCode: errorCode,
4300
4100
  });
4301
- throw __decorateServiceException(response, parsedBody);
4101
+ _d.label = 17;
4102
+ case 17: return [2];
4302
4103
  }
4303
4104
  });
4304
4105
  }); };
@@ -4310,24 +4111,23 @@ export var deserializeAws_restJson1GetInvitationsCountCommand = function (output
4310
4111
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4311
4112
  return [2, deserializeAws_restJson1GetInvitationsCountCommandError(output, context)];
4312
4113
  }
4313
- contents = {
4114
+ contents = map({
4314
4115
  $metadata: deserializeMetadata(output),
4315
- invitationsCount: undefined,
4316
- };
4116
+ });
4317
4117
  _a = __expectNonNull;
4318
4118
  _b = __expectObject;
4319
4119
  return [4, parseBody(output.body, context)];
4320
4120
  case 1:
4321
4121
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4322
- if (data.invitationsCount !== undefined && data.invitationsCount !== null) {
4122
+ if (data.invitationsCount != null) {
4323
4123
  contents.invitationsCount = __expectLong(data.invitationsCount);
4324
4124
  }
4325
- return [2, Promise.resolve(contents)];
4125
+ return [2, contents];
4326
4126
  }
4327
4127
  });
4328
4128
  }); };
4329
4129
  var deserializeAws_restJson1GetInvitationsCountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4330
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4130
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4331
4131
  var _c;
4332
4132
  return __generator(this, function (_d) {
4333
4133
  switch (_d.label) {
@@ -4372,14 +4172,14 @@ var deserializeAws_restJson1GetInvitationsCountCommandError = function (output,
4372
4172
  case 15: throw _d.sent();
4373
4173
  case 16:
4374
4174
  parsedBody = parsedOutput.body;
4375
- $metadata = deserializeMetadata(output);
4376
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4377
- response = new __BaseException({
4378
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4379
- $fault: "client",
4380
- $metadata: $metadata,
4175
+ throwDefaultError({
4176
+ output: output,
4177
+ parsedBody: parsedBody,
4178
+ exceptionCtor: __BaseException,
4179
+ errorCode: errorCode,
4381
4180
  });
4382
- throw __decorateServiceException(response, parsedBody);
4181
+ _d.label = 17;
4182
+ case 17: return [2];
4383
4183
  }
4384
4184
  });
4385
4185
  }); };
@@ -4391,40 +4191,35 @@ export var deserializeAws_restJson1GetMacieSessionCommand = function (output, co
4391
4191
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4392
4192
  return [2, deserializeAws_restJson1GetMacieSessionCommandError(output, context)];
4393
4193
  }
4394
- contents = {
4194
+ contents = map({
4395
4195
  $metadata: deserializeMetadata(output),
4396
- createdAt: undefined,
4397
- findingPublishingFrequency: undefined,
4398
- serviceRole: undefined,
4399
- status: undefined,
4400
- updatedAt: undefined,
4401
- };
4196
+ });
4402
4197
  _a = __expectNonNull;
4403
4198
  _b = __expectObject;
4404
4199
  return [4, parseBody(output.body, context)];
4405
4200
  case 1:
4406
4201
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4407
- if (data.createdAt !== undefined && data.createdAt !== null) {
4202
+ if (data.createdAt != null) {
4408
4203
  contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
4409
4204
  }
4410
- if (data.findingPublishingFrequency !== undefined && data.findingPublishingFrequency !== null) {
4205
+ if (data.findingPublishingFrequency != null) {
4411
4206
  contents.findingPublishingFrequency = __expectString(data.findingPublishingFrequency);
4412
4207
  }
4413
- if (data.serviceRole !== undefined && data.serviceRole !== null) {
4208
+ if (data.serviceRole != null) {
4414
4209
  contents.serviceRole = __expectString(data.serviceRole);
4415
4210
  }
4416
- if (data.status !== undefined && data.status !== null) {
4211
+ if (data.status != null) {
4417
4212
  contents.status = __expectString(data.status);
4418
4213
  }
4419
- if (data.updatedAt !== undefined && data.updatedAt !== null) {
4214
+ if (data.updatedAt != null) {
4420
4215
  contents.updatedAt = __expectNonNull(__parseRfc3339DateTime(data.updatedAt));
4421
4216
  }
4422
- return [2, Promise.resolve(contents)];
4217
+ return [2, contents];
4423
4218
  }
4424
4219
  });
4425
4220
  }); };
4426
4221
  var deserializeAws_restJson1GetMacieSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4427
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4222
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4428
4223
  var _c;
4429
4224
  return __generator(this, function (_d) {
4430
4225
  switch (_d.label) {
@@ -4469,14 +4264,14 @@ var deserializeAws_restJson1GetMacieSessionCommandError = function (output, cont
4469
4264
  case 15: throw _d.sent();
4470
4265
  case 16:
4471
4266
  parsedBody = parsedOutput.body;
4472
- $metadata = deserializeMetadata(output);
4473
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4474
- response = new __BaseException({
4475
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4476
- $fault: "client",
4477
- $metadata: $metadata,
4267
+ throwDefaultError({
4268
+ output: output,
4269
+ parsedBody: parsedBody,
4270
+ exceptionCtor: __BaseException,
4271
+ errorCode: errorCode,
4478
4272
  });
4479
- throw __decorateServiceException(response, parsedBody);
4273
+ _d.label = 17;
4274
+ case 17: return [2];
4480
4275
  }
4481
4276
  });
4482
4277
  }); };
@@ -4488,24 +4283,23 @@ export var deserializeAws_restJson1GetMasterAccountCommand = function (output, c
4488
4283
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4489
4284
  return [2, deserializeAws_restJson1GetMasterAccountCommandError(output, context)];
4490
4285
  }
4491
- contents = {
4286
+ contents = map({
4492
4287
  $metadata: deserializeMetadata(output),
4493
- master: undefined,
4494
- };
4288
+ });
4495
4289
  _a = __expectNonNull;
4496
4290
  _b = __expectObject;
4497
4291
  return [4, parseBody(output.body, context)];
4498
4292
  case 1:
4499
4293
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4500
- if (data.master !== undefined && data.master !== null) {
4294
+ if (data.master != null) {
4501
4295
  contents.master = deserializeAws_restJson1Invitation(data.master, context);
4502
4296
  }
4503
- return [2, Promise.resolve(contents)];
4297
+ return [2, contents];
4504
4298
  }
4505
4299
  });
4506
4300
  }); };
4507
4301
  var deserializeAws_restJson1GetMasterAccountCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4508
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4302
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4509
4303
  var _c;
4510
4304
  return __generator(this, function (_d) {
4511
4305
  switch (_d.label) {
@@ -4550,14 +4344,14 @@ var deserializeAws_restJson1GetMasterAccountCommandError = function (output, con
4550
4344
  case 15: throw _d.sent();
4551
4345
  case 16:
4552
4346
  parsedBody = parsedOutput.body;
4553
- $metadata = deserializeMetadata(output);
4554
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4555
- response = new __BaseException({
4556
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4557
- $fault: "client",
4558
- $metadata: $metadata,
4347
+ throwDefaultError({
4348
+ output: output,
4349
+ parsedBody: parsedBody,
4350
+ exceptionCtor: __BaseException,
4351
+ errorCode: errorCode,
4559
4352
  });
4560
- throw __decorateServiceException(response, parsedBody);
4353
+ _d.label = 17;
4354
+ case 17: return [2];
4561
4355
  }
4562
4356
  });
4563
4357
  }); };
@@ -4569,56 +4363,47 @@ export var deserializeAws_restJson1GetMemberCommand = function (output, context)
4569
4363
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4570
4364
  return [2, deserializeAws_restJson1GetMemberCommandError(output, context)];
4571
4365
  }
4572
- contents = {
4366
+ contents = map({
4573
4367
  $metadata: deserializeMetadata(output),
4574
- accountId: undefined,
4575
- administratorAccountId: undefined,
4576
- arn: undefined,
4577
- email: undefined,
4578
- invitedAt: undefined,
4579
- masterAccountId: undefined,
4580
- relationshipStatus: undefined,
4581
- tags: undefined,
4582
- updatedAt: undefined,
4583
- };
4368
+ });
4584
4369
  _a = __expectNonNull;
4585
4370
  _b = __expectObject;
4586
4371
  return [4, parseBody(output.body, context)];
4587
4372
  case 1:
4588
4373
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4589
- if (data.accountId !== undefined && data.accountId !== null) {
4374
+ if (data.accountId != null) {
4590
4375
  contents.accountId = __expectString(data.accountId);
4591
4376
  }
4592
- if (data.administratorAccountId !== undefined && data.administratorAccountId !== null) {
4377
+ if (data.administratorAccountId != null) {
4593
4378
  contents.administratorAccountId = __expectString(data.administratorAccountId);
4594
4379
  }
4595
- if (data.arn !== undefined && data.arn !== null) {
4380
+ if (data.arn != null) {
4596
4381
  contents.arn = __expectString(data.arn);
4597
4382
  }
4598
- if (data.email !== undefined && data.email !== null) {
4383
+ if (data.email != null) {
4599
4384
  contents.email = __expectString(data.email);
4600
4385
  }
4601
- if (data.invitedAt !== undefined && data.invitedAt !== null) {
4386
+ if (data.invitedAt != null) {
4602
4387
  contents.invitedAt = __expectNonNull(__parseRfc3339DateTime(data.invitedAt));
4603
4388
  }
4604
- if (data.masterAccountId !== undefined && data.masterAccountId !== null) {
4389
+ if (data.masterAccountId != null) {
4605
4390
  contents.masterAccountId = __expectString(data.masterAccountId);
4606
4391
  }
4607
- if (data.relationshipStatus !== undefined && data.relationshipStatus !== null) {
4392
+ if (data.relationshipStatus != null) {
4608
4393
  contents.relationshipStatus = __expectString(data.relationshipStatus);
4609
4394
  }
4610
- if (data.tags !== undefined && data.tags !== null) {
4395
+ if (data.tags != null) {
4611
4396
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
4612
4397
  }
4613
- if (data.updatedAt !== undefined && data.updatedAt !== null) {
4398
+ if (data.updatedAt != null) {
4614
4399
  contents.updatedAt = __expectNonNull(__parseRfc3339DateTime(data.updatedAt));
4615
4400
  }
4616
- return [2, Promise.resolve(contents)];
4401
+ return [2, contents];
4617
4402
  }
4618
4403
  });
4619
4404
  }); };
4620
4405
  var deserializeAws_restJson1GetMemberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4621
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4406
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4622
4407
  var _c;
4623
4408
  return __generator(this, function (_d) {
4624
4409
  switch (_d.label) {
@@ -4663,14 +4448,14 @@ var deserializeAws_restJson1GetMemberCommandError = function (output, context) {
4663
4448
  case 15: throw _d.sent();
4664
4449
  case 16:
4665
4450
  parsedBody = parsedOutput.body;
4666
- $metadata = deserializeMetadata(output);
4667
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4668
- response = new __BaseException({
4669
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4670
- $fault: "client",
4671
- $metadata: $metadata,
4451
+ throwDefaultError({
4452
+ output: output,
4453
+ parsedBody: parsedBody,
4454
+ exceptionCtor: __BaseException,
4455
+ errorCode: errorCode,
4672
4456
  });
4673
- throw __decorateServiceException(response, parsedBody);
4457
+ _d.label = 17;
4458
+ case 17: return [2];
4674
4459
  }
4675
4460
  });
4676
4461
  }); };
@@ -4682,24 +4467,23 @@ export var deserializeAws_restJson1GetRevealConfigurationCommand = function (out
4682
4467
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4683
4468
  return [2, deserializeAws_restJson1GetRevealConfigurationCommandError(output, context)];
4684
4469
  }
4685
- contents = {
4470
+ contents = map({
4686
4471
  $metadata: deserializeMetadata(output),
4687
- configuration: undefined,
4688
- };
4472
+ });
4689
4473
  _a = __expectNonNull;
4690
4474
  _b = __expectObject;
4691
4475
  return [4, parseBody(output.body, context)];
4692
4476
  case 1:
4693
4477
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4694
- if (data.configuration !== undefined && data.configuration !== null) {
4478
+ if (data.configuration != null) {
4695
4479
  contents.configuration = deserializeAws_restJson1RevealConfiguration(data.configuration, context);
4696
4480
  }
4697
- return [2, Promise.resolve(contents)];
4481
+ return [2, contents];
4698
4482
  }
4699
4483
  });
4700
4484
  }); };
4701
4485
  var deserializeAws_restJson1GetRevealConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4702
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4486
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4703
4487
  var _c;
4704
4488
  return __generator(this, function (_d) {
4705
4489
  switch (_d.label) {
@@ -4732,14 +4516,14 @@ var deserializeAws_restJson1GetRevealConfigurationCommandError = function (outpu
4732
4516
  case 9: throw _d.sent();
4733
4517
  case 10:
4734
4518
  parsedBody = parsedOutput.body;
4735
- $metadata = deserializeMetadata(output);
4736
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4737
- response = new __BaseException({
4738
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4739
- $fault: "client",
4740
- $metadata: $metadata,
4519
+ throwDefaultError({
4520
+ output: output,
4521
+ parsedBody: parsedBody,
4522
+ exceptionCtor: __BaseException,
4523
+ errorCode: errorCode,
4741
4524
  });
4742
- throw __decorateServiceException(response, parsedBody);
4525
+ _d.label = 11;
4526
+ case 11: return [2];
4743
4527
  }
4744
4528
  });
4745
4529
  }); };
@@ -4751,32 +4535,29 @@ export var deserializeAws_restJson1GetSensitiveDataOccurrencesCommand = function
4751
4535
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4752
4536
  return [2, deserializeAws_restJson1GetSensitiveDataOccurrencesCommandError(output, context)];
4753
4537
  }
4754
- contents = {
4538
+ contents = map({
4755
4539
  $metadata: deserializeMetadata(output),
4756
- error: undefined,
4757
- sensitiveDataOccurrences: undefined,
4758
- status: undefined,
4759
- };
4540
+ });
4760
4541
  _a = __expectNonNull;
4761
4542
  _b = __expectObject;
4762
4543
  return [4, parseBody(output.body, context)];
4763
4544
  case 1:
4764
4545
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4765
- if (data.error !== undefined && data.error !== null) {
4546
+ if (data.error != null) {
4766
4547
  contents.error = __expectString(data.error);
4767
4548
  }
4768
- if (data.sensitiveDataOccurrences !== undefined && data.sensitiveDataOccurrences !== null) {
4549
+ if (data.sensitiveDataOccurrences != null) {
4769
4550
  contents.sensitiveDataOccurrences = deserializeAws_restJson1SensitiveDataOccurrences(data.sensitiveDataOccurrences, context);
4770
4551
  }
4771
- if (data.status !== undefined && data.status !== null) {
4552
+ if (data.status != null) {
4772
4553
  contents.status = __expectString(data.status);
4773
4554
  }
4774
- return [2, Promise.resolve(contents)];
4555
+ return [2, contents];
4775
4556
  }
4776
4557
  });
4777
4558
  }); };
4778
4559
  var deserializeAws_restJson1GetSensitiveDataOccurrencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4779
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4560
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4780
4561
  var _c;
4781
4562
  return __generator(this, function (_d) {
4782
4563
  switch (_d.label) {
@@ -4817,14 +4598,14 @@ var deserializeAws_restJson1GetSensitiveDataOccurrencesCommandError = function (
4817
4598
  case 13: throw _d.sent();
4818
4599
  case 14:
4819
4600
  parsedBody = parsedOutput.body;
4820
- $metadata = deserializeMetadata(output);
4821
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4822
- response = new __BaseException({
4823
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4824
- $fault: "client",
4825
- $metadata: $metadata,
4601
+ throwDefaultError({
4602
+ output: output,
4603
+ parsedBody: parsedBody,
4604
+ exceptionCtor: __BaseException,
4605
+ errorCode: errorCode,
4826
4606
  });
4827
- throw __decorateServiceException(response, parsedBody);
4607
+ _d.label = 15;
4608
+ case 15: return [2];
4828
4609
  }
4829
4610
  });
4830
4611
  }); };
@@ -4836,28 +4617,26 @@ export var deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityComman
4836
4617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4837
4618
  return [2, deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommandError(output, context)];
4838
4619
  }
4839
- contents = {
4620
+ contents = map({
4840
4621
  $metadata: deserializeMetadata(output),
4841
- code: undefined,
4842
- reasons: undefined,
4843
- };
4622
+ });
4844
4623
  _a = __expectNonNull;
4845
4624
  _b = __expectObject;
4846
4625
  return [4, parseBody(output.body, context)];
4847
4626
  case 1:
4848
4627
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4849
- if (data.code !== undefined && data.code !== null) {
4628
+ if (data.code != null) {
4850
4629
  contents.code = __expectString(data.code);
4851
4630
  }
4852
- if (data.reasons !== undefined && data.reasons !== null) {
4631
+ if (data.reasons != null) {
4853
4632
  contents.reasons = deserializeAws_restJson1__listOfUnavailabilityReasonCode(data.reasons, context);
4854
4633
  }
4855
- return [2, Promise.resolve(contents)];
4634
+ return [2, contents];
4856
4635
  }
4857
4636
  });
4858
4637
  }); };
4859
4638
  var deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4860
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4639
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4861
4640
  var _c;
4862
4641
  return __generator(this, function (_d) {
4863
4642
  switch (_d.label) {
@@ -4890,14 +4669,14 @@ var deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommandError
4890
4669
  case 9: throw _d.sent();
4891
4670
  case 10:
4892
4671
  parsedBody = parsedOutput.body;
4893
- $metadata = deserializeMetadata(output);
4894
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4895
- response = new __BaseException({
4896
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4897
- $fault: "client",
4898
- $metadata: $metadata,
4672
+ throwDefaultError({
4673
+ output: output,
4674
+ parsedBody: parsedBody,
4675
+ exceptionCtor: __BaseException,
4676
+ errorCode: errorCode,
4899
4677
  });
4900
- throw __decorateServiceException(response, parsedBody);
4678
+ _d.label = 11;
4679
+ case 11: return [2];
4901
4680
  }
4902
4681
  });
4903
4682
  }); };
@@ -4909,32 +4688,29 @@ export var deserializeAws_restJson1GetUsageStatisticsCommand = function (output,
4909
4688
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4910
4689
  return [2, deserializeAws_restJson1GetUsageStatisticsCommandError(output, context)];
4911
4690
  }
4912
- contents = {
4691
+ contents = map({
4913
4692
  $metadata: deserializeMetadata(output),
4914
- nextToken: undefined,
4915
- records: undefined,
4916
- timeRange: undefined,
4917
- };
4693
+ });
4918
4694
  _a = __expectNonNull;
4919
4695
  _b = __expectObject;
4920
4696
  return [4, parseBody(output.body, context)];
4921
4697
  case 1:
4922
4698
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4923
- if (data.nextToken !== undefined && data.nextToken !== null) {
4699
+ if (data.nextToken != null) {
4924
4700
  contents.nextToken = __expectString(data.nextToken);
4925
4701
  }
4926
- if (data.records !== undefined && data.records !== null) {
4702
+ if (data.records != null) {
4927
4703
  contents.records = deserializeAws_restJson1__listOfUsageRecord(data.records, context);
4928
4704
  }
4929
- if (data.timeRange !== undefined && data.timeRange !== null) {
4705
+ if (data.timeRange != null) {
4930
4706
  contents.timeRange = __expectString(data.timeRange);
4931
4707
  }
4932
- return [2, Promise.resolve(contents)];
4708
+ return [2, contents];
4933
4709
  }
4934
4710
  });
4935
4711
  }); };
4936
4712
  var deserializeAws_restJson1GetUsageStatisticsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4937
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4713
+ var parsedOutput, _a, errorCode, _b, parsedBody;
4938
4714
  var _c;
4939
4715
  return __generator(this, function (_d) {
4940
4716
  switch (_d.label) {
@@ -4979,14 +4755,14 @@ var deserializeAws_restJson1GetUsageStatisticsCommandError = function (output, c
4979
4755
  case 15: throw _d.sent();
4980
4756
  case 16:
4981
4757
  parsedBody = parsedOutput.body;
4982
- $metadata = deserializeMetadata(output);
4983
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4984
- response = new __BaseException({
4985
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4986
- $fault: "client",
4987
- $metadata: $metadata,
4758
+ throwDefaultError({
4759
+ output: output,
4760
+ parsedBody: parsedBody,
4761
+ exceptionCtor: __BaseException,
4762
+ errorCode: errorCode,
4988
4763
  });
4989
- throw __decorateServiceException(response, parsedBody);
4764
+ _d.label = 17;
4765
+ case 17: return [2];
4990
4766
  }
4991
4767
  });
4992
4768
  }); };
@@ -4998,28 +4774,26 @@ export var deserializeAws_restJson1GetUsageTotalsCommand = function (output, con
4998
4774
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4999
4775
  return [2, deserializeAws_restJson1GetUsageTotalsCommandError(output, context)];
5000
4776
  }
5001
- contents = {
4777
+ contents = map({
5002
4778
  $metadata: deserializeMetadata(output),
5003
- timeRange: undefined,
5004
- usageTotals: undefined,
5005
- };
4779
+ });
5006
4780
  _a = __expectNonNull;
5007
4781
  _b = __expectObject;
5008
4782
  return [4, parseBody(output.body, context)];
5009
4783
  case 1:
5010
4784
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5011
- if (data.timeRange !== undefined && data.timeRange !== null) {
4785
+ if (data.timeRange != null) {
5012
4786
  contents.timeRange = __expectString(data.timeRange);
5013
4787
  }
5014
- if (data.usageTotals !== undefined && data.usageTotals !== null) {
4788
+ if (data.usageTotals != null) {
5015
4789
  contents.usageTotals = deserializeAws_restJson1__listOfUsageTotal(data.usageTotals, context);
5016
4790
  }
5017
- return [2, Promise.resolve(contents)];
4791
+ return [2, contents];
5018
4792
  }
5019
4793
  });
5020
4794
  }); };
5021
4795
  var deserializeAws_restJson1GetUsageTotalsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5022
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4796
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5023
4797
  var _c;
5024
4798
  return __generator(this, function (_d) {
5025
4799
  switch (_d.label) {
@@ -5064,14 +4838,14 @@ var deserializeAws_restJson1GetUsageTotalsCommandError = function (output, conte
5064
4838
  case 15: throw _d.sent();
5065
4839
  case 16:
5066
4840
  parsedBody = parsedOutput.body;
5067
- $metadata = deserializeMetadata(output);
5068
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5069
- response = new __BaseException({
5070
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5071
- $fault: "client",
5072
- $metadata: $metadata,
4841
+ throwDefaultError({
4842
+ output: output,
4843
+ parsedBody: parsedBody,
4844
+ exceptionCtor: __BaseException,
4845
+ errorCode: errorCode,
5073
4846
  });
5074
- throw __decorateServiceException(response, parsedBody);
4847
+ _d.label = 17;
4848
+ case 17: return [2];
5075
4849
  }
5076
4850
  });
5077
4851
  }); };
@@ -5083,28 +4857,26 @@ export var deserializeAws_restJson1ListClassificationJobsCommand = function (out
5083
4857
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5084
4858
  return [2, deserializeAws_restJson1ListClassificationJobsCommandError(output, context)];
5085
4859
  }
5086
- contents = {
4860
+ contents = map({
5087
4861
  $metadata: deserializeMetadata(output),
5088
- items: undefined,
5089
- nextToken: undefined,
5090
- };
4862
+ });
5091
4863
  _a = __expectNonNull;
5092
4864
  _b = __expectObject;
5093
4865
  return [4, parseBody(output.body, context)];
5094
4866
  case 1:
5095
4867
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5096
- if (data.items !== undefined && data.items !== null) {
4868
+ if (data.items != null) {
5097
4869
  contents.items = deserializeAws_restJson1__listOfJobSummary(data.items, context);
5098
4870
  }
5099
- if (data.nextToken !== undefined && data.nextToken !== null) {
4871
+ if (data.nextToken != null) {
5100
4872
  contents.nextToken = __expectString(data.nextToken);
5101
4873
  }
5102
- return [2, Promise.resolve(contents)];
4874
+ return [2, contents];
5103
4875
  }
5104
4876
  });
5105
4877
  }); };
5106
4878
  var deserializeAws_restJson1ListClassificationJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5107
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4879
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5108
4880
  var _c;
5109
4881
  return __generator(this, function (_d) {
5110
4882
  switch (_d.label) {
@@ -5149,14 +4921,14 @@ var deserializeAws_restJson1ListClassificationJobsCommandError = function (outpu
5149
4921
  case 15: throw _d.sent();
5150
4922
  case 16:
5151
4923
  parsedBody = parsedOutput.body;
5152
- $metadata = deserializeMetadata(output);
5153
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5154
- response = new __BaseException({
5155
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5156
- $fault: "client",
5157
- $metadata: $metadata,
4924
+ throwDefaultError({
4925
+ output: output,
4926
+ parsedBody: parsedBody,
4927
+ exceptionCtor: __BaseException,
4928
+ errorCode: errorCode,
5158
4929
  });
5159
- throw __decorateServiceException(response, parsedBody);
4930
+ _d.label = 17;
4931
+ case 17: return [2];
5160
4932
  }
5161
4933
  });
5162
4934
  }); };
@@ -5168,28 +4940,26 @@ export var deserializeAws_restJson1ListCustomDataIdentifiersCommand = function (
5168
4940
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5169
4941
  return [2, deserializeAws_restJson1ListCustomDataIdentifiersCommandError(output, context)];
5170
4942
  }
5171
- contents = {
4943
+ contents = map({
5172
4944
  $metadata: deserializeMetadata(output),
5173
- items: undefined,
5174
- nextToken: undefined,
5175
- };
4945
+ });
5176
4946
  _a = __expectNonNull;
5177
4947
  _b = __expectObject;
5178
4948
  return [4, parseBody(output.body, context)];
5179
4949
  case 1:
5180
4950
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5181
- if (data.items !== undefined && data.items !== null) {
4951
+ if (data.items != null) {
5182
4952
  contents.items = deserializeAws_restJson1__listOfCustomDataIdentifierSummary(data.items, context);
5183
4953
  }
5184
- if (data.nextToken !== undefined && data.nextToken !== null) {
4954
+ if (data.nextToken != null) {
5185
4955
  contents.nextToken = __expectString(data.nextToken);
5186
4956
  }
5187
- return [2, Promise.resolve(contents)];
4957
+ return [2, contents];
5188
4958
  }
5189
4959
  });
5190
4960
  }); };
5191
4961
  var deserializeAws_restJson1ListCustomDataIdentifiersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5192
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4962
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5193
4963
  var _c;
5194
4964
  return __generator(this, function (_d) {
5195
4965
  switch (_d.label) {
@@ -5234,14 +5004,14 @@ var deserializeAws_restJson1ListCustomDataIdentifiersCommandError = function (ou
5234
5004
  case 15: throw _d.sent();
5235
5005
  case 16:
5236
5006
  parsedBody = parsedOutput.body;
5237
- $metadata = deserializeMetadata(output);
5238
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5239
- response = new __BaseException({
5240
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5241
- $fault: "client",
5242
- $metadata: $metadata,
5007
+ throwDefaultError({
5008
+ output: output,
5009
+ parsedBody: parsedBody,
5010
+ exceptionCtor: __BaseException,
5011
+ errorCode: errorCode,
5243
5012
  });
5244
- throw __decorateServiceException(response, parsedBody);
5013
+ _d.label = 17;
5014
+ case 17: return [2];
5245
5015
  }
5246
5016
  });
5247
5017
  }); };
@@ -5253,28 +5023,26 @@ export var deserializeAws_restJson1ListFindingsCommand = function (output, conte
5253
5023
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5254
5024
  return [2, deserializeAws_restJson1ListFindingsCommandError(output, context)];
5255
5025
  }
5256
- contents = {
5026
+ contents = map({
5257
5027
  $metadata: deserializeMetadata(output),
5258
- findingIds: undefined,
5259
- nextToken: undefined,
5260
- };
5028
+ });
5261
5029
  _a = __expectNonNull;
5262
5030
  _b = __expectObject;
5263
5031
  return [4, parseBody(output.body, context)];
5264
5032
  case 1:
5265
5033
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5266
- if (data.findingIds !== undefined && data.findingIds !== null) {
5034
+ if (data.findingIds != null) {
5267
5035
  contents.findingIds = deserializeAws_restJson1__listOf__string(data.findingIds, context);
5268
5036
  }
5269
- if (data.nextToken !== undefined && data.nextToken !== null) {
5037
+ if (data.nextToken != null) {
5270
5038
  contents.nextToken = __expectString(data.nextToken);
5271
5039
  }
5272
- return [2, Promise.resolve(contents)];
5040
+ return [2, contents];
5273
5041
  }
5274
5042
  });
5275
5043
  }); };
5276
5044
  var deserializeAws_restJson1ListFindingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5277
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5045
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5278
5046
  var _c;
5279
5047
  return __generator(this, function (_d) {
5280
5048
  switch (_d.label) {
@@ -5319,14 +5087,14 @@ var deserializeAws_restJson1ListFindingsCommandError = function (output, context
5319
5087
  case 15: throw _d.sent();
5320
5088
  case 16:
5321
5089
  parsedBody = parsedOutput.body;
5322
- $metadata = deserializeMetadata(output);
5323
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5324
- response = new __BaseException({
5325
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5326
- $fault: "client",
5327
- $metadata: $metadata,
5090
+ throwDefaultError({
5091
+ output: output,
5092
+ parsedBody: parsedBody,
5093
+ exceptionCtor: __BaseException,
5094
+ errorCode: errorCode,
5328
5095
  });
5329
- throw __decorateServiceException(response, parsedBody);
5096
+ _d.label = 17;
5097
+ case 17: return [2];
5330
5098
  }
5331
5099
  });
5332
5100
  }); };
@@ -5338,28 +5106,26 @@ export var deserializeAws_restJson1ListFindingsFiltersCommand = function (output
5338
5106
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5339
5107
  return [2, deserializeAws_restJson1ListFindingsFiltersCommandError(output, context)];
5340
5108
  }
5341
- contents = {
5109
+ contents = map({
5342
5110
  $metadata: deserializeMetadata(output),
5343
- findingsFilterListItems: undefined,
5344
- nextToken: undefined,
5345
- };
5111
+ });
5346
5112
  _a = __expectNonNull;
5347
5113
  _b = __expectObject;
5348
5114
  return [4, parseBody(output.body, context)];
5349
5115
  case 1:
5350
5116
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5351
- if (data.findingsFilterListItems !== undefined && data.findingsFilterListItems !== null) {
5117
+ if (data.findingsFilterListItems != null) {
5352
5118
  contents.findingsFilterListItems = deserializeAws_restJson1__listOfFindingsFilterListItem(data.findingsFilterListItems, context);
5353
5119
  }
5354
- if (data.nextToken !== undefined && data.nextToken !== null) {
5120
+ if (data.nextToken != null) {
5355
5121
  contents.nextToken = __expectString(data.nextToken);
5356
5122
  }
5357
- return [2, Promise.resolve(contents)];
5123
+ return [2, contents];
5358
5124
  }
5359
5125
  });
5360
5126
  }); };
5361
5127
  var deserializeAws_restJson1ListFindingsFiltersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5362
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5128
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5363
5129
  var _c;
5364
5130
  return __generator(this, function (_d) {
5365
5131
  switch (_d.label) {
@@ -5404,14 +5170,14 @@ var deserializeAws_restJson1ListFindingsFiltersCommandError = function (output,
5404
5170
  case 15: throw _d.sent();
5405
5171
  case 16:
5406
5172
  parsedBody = parsedOutput.body;
5407
- $metadata = deserializeMetadata(output);
5408
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5409
- response = new __BaseException({
5410
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5411
- $fault: "client",
5412
- $metadata: $metadata,
5173
+ throwDefaultError({
5174
+ output: output,
5175
+ parsedBody: parsedBody,
5176
+ exceptionCtor: __BaseException,
5177
+ errorCode: errorCode,
5413
5178
  });
5414
- throw __decorateServiceException(response, parsedBody);
5179
+ _d.label = 17;
5180
+ case 17: return [2];
5415
5181
  }
5416
5182
  });
5417
5183
  }); };
@@ -5423,28 +5189,26 @@ export var deserializeAws_restJson1ListInvitationsCommand = function (output, co
5423
5189
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5424
5190
  return [2, deserializeAws_restJson1ListInvitationsCommandError(output, context)];
5425
5191
  }
5426
- contents = {
5192
+ contents = map({
5427
5193
  $metadata: deserializeMetadata(output),
5428
- invitations: undefined,
5429
- nextToken: undefined,
5430
- };
5194
+ });
5431
5195
  _a = __expectNonNull;
5432
5196
  _b = __expectObject;
5433
5197
  return [4, parseBody(output.body, context)];
5434
5198
  case 1:
5435
5199
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5436
- if (data.invitations !== undefined && data.invitations !== null) {
5200
+ if (data.invitations != null) {
5437
5201
  contents.invitations = deserializeAws_restJson1__listOfInvitation(data.invitations, context);
5438
5202
  }
5439
- if (data.nextToken !== undefined && data.nextToken !== null) {
5203
+ if (data.nextToken != null) {
5440
5204
  contents.nextToken = __expectString(data.nextToken);
5441
5205
  }
5442
- return [2, Promise.resolve(contents)];
5206
+ return [2, contents];
5443
5207
  }
5444
5208
  });
5445
5209
  }); };
5446
5210
  var deserializeAws_restJson1ListInvitationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5447
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5211
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5448
5212
  var _c;
5449
5213
  return __generator(this, function (_d) {
5450
5214
  switch (_d.label) {
@@ -5489,14 +5253,14 @@ var deserializeAws_restJson1ListInvitationsCommandError = function (output, cont
5489
5253
  case 15: throw _d.sent();
5490
5254
  case 16:
5491
5255
  parsedBody = parsedOutput.body;
5492
- $metadata = deserializeMetadata(output);
5493
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5494
- response = new __BaseException({
5495
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5496
- $fault: "client",
5497
- $metadata: $metadata,
5256
+ throwDefaultError({
5257
+ output: output,
5258
+ parsedBody: parsedBody,
5259
+ exceptionCtor: __BaseException,
5260
+ errorCode: errorCode,
5498
5261
  });
5499
- throw __decorateServiceException(response, parsedBody);
5262
+ _d.label = 17;
5263
+ case 17: return [2];
5500
5264
  }
5501
5265
  });
5502
5266
  }); };
@@ -5508,28 +5272,26 @@ export var deserializeAws_restJson1ListManagedDataIdentifiersCommand = function
5508
5272
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5509
5273
  return [2, deserializeAws_restJson1ListManagedDataIdentifiersCommandError(output, context)];
5510
5274
  }
5511
- contents = {
5275
+ contents = map({
5512
5276
  $metadata: deserializeMetadata(output),
5513
- items: undefined,
5514
- nextToken: undefined,
5515
- };
5277
+ });
5516
5278
  _a = __expectNonNull;
5517
5279
  _b = __expectObject;
5518
5280
  return [4, parseBody(output.body, context)];
5519
5281
  case 1:
5520
5282
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5521
- if (data.items !== undefined && data.items !== null) {
5283
+ if (data.items != null) {
5522
5284
  contents.items = deserializeAws_restJson1__listOfManagedDataIdentifierSummary(data.items, context);
5523
5285
  }
5524
- if (data.nextToken !== undefined && data.nextToken !== null) {
5286
+ if (data.nextToken != null) {
5525
5287
  contents.nextToken = __expectString(data.nextToken);
5526
5288
  }
5527
- return [2, Promise.resolve(contents)];
5289
+ return [2, contents];
5528
5290
  }
5529
5291
  });
5530
5292
  }); };
5531
5293
  var deserializeAws_restJson1ListManagedDataIdentifiersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5532
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
5294
+ var parsedOutput, _a, errorCode, parsedBody;
5533
5295
  var _b;
5534
5296
  return __generator(this, function (_c) {
5535
5297
  switch (_c.label) {
@@ -5540,18 +5302,13 @@ var deserializeAws_restJson1ListManagedDataIdentifiersCommandError = function (o
5540
5302
  case 1:
5541
5303
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
5542
5304
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5543
- switch (errorCode) {
5544
- default:
5545
- parsedBody = parsedOutput.body;
5546
- $metadata = deserializeMetadata(output);
5547
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5548
- response = new __BaseException({
5549
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5550
- $fault: "client",
5551
- $metadata: $metadata,
5552
- });
5553
- throw __decorateServiceException(response, parsedBody);
5554
- }
5305
+ parsedBody = parsedOutput.body;
5306
+ throwDefaultError({
5307
+ output: output,
5308
+ parsedBody: parsedBody,
5309
+ exceptionCtor: __BaseException,
5310
+ errorCode: errorCode,
5311
+ });
5555
5312
  return [2];
5556
5313
  }
5557
5314
  });
@@ -5564,28 +5321,26 @@ export var deserializeAws_restJson1ListMembersCommand = function (output, contex
5564
5321
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5565
5322
  return [2, deserializeAws_restJson1ListMembersCommandError(output, context)];
5566
5323
  }
5567
- contents = {
5324
+ contents = map({
5568
5325
  $metadata: deserializeMetadata(output),
5569
- members: undefined,
5570
- nextToken: undefined,
5571
- };
5326
+ });
5572
5327
  _a = __expectNonNull;
5573
5328
  _b = __expectObject;
5574
5329
  return [4, parseBody(output.body, context)];
5575
5330
  case 1:
5576
5331
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5577
- if (data.members !== undefined && data.members !== null) {
5332
+ if (data.members != null) {
5578
5333
  contents.members = deserializeAws_restJson1__listOfMember(data.members, context);
5579
5334
  }
5580
- if (data.nextToken !== undefined && data.nextToken !== null) {
5335
+ if (data.nextToken != null) {
5581
5336
  contents.nextToken = __expectString(data.nextToken);
5582
5337
  }
5583
- return [2, Promise.resolve(contents)];
5338
+ return [2, contents];
5584
5339
  }
5585
5340
  });
5586
5341
  }); };
5587
5342
  var deserializeAws_restJson1ListMembersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5588
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5343
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5589
5344
  var _c;
5590
5345
  return __generator(this, function (_d) {
5591
5346
  switch (_d.label) {
@@ -5630,14 +5385,14 @@ var deserializeAws_restJson1ListMembersCommandError = function (output, context)
5630
5385
  case 15: throw _d.sent();
5631
5386
  case 16:
5632
5387
  parsedBody = parsedOutput.body;
5633
- $metadata = deserializeMetadata(output);
5634
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5635
- response = new __BaseException({
5636
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5637
- $fault: "client",
5638
- $metadata: $metadata,
5388
+ throwDefaultError({
5389
+ output: output,
5390
+ parsedBody: parsedBody,
5391
+ exceptionCtor: __BaseException,
5392
+ errorCode: errorCode,
5639
5393
  });
5640
- throw __decorateServiceException(response, parsedBody);
5394
+ _d.label = 17;
5395
+ case 17: return [2];
5641
5396
  }
5642
5397
  });
5643
5398
  }); };
@@ -5649,28 +5404,26 @@ export var deserializeAws_restJson1ListOrganizationAdminAccountsCommand = functi
5649
5404
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5650
5405
  return [2, deserializeAws_restJson1ListOrganizationAdminAccountsCommandError(output, context)];
5651
5406
  }
5652
- contents = {
5407
+ contents = map({
5653
5408
  $metadata: deserializeMetadata(output),
5654
- adminAccounts: undefined,
5655
- nextToken: undefined,
5656
- };
5409
+ });
5657
5410
  _a = __expectNonNull;
5658
5411
  _b = __expectObject;
5659
5412
  return [4, parseBody(output.body, context)];
5660
5413
  case 1:
5661
5414
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5662
- if (data.adminAccounts !== undefined && data.adminAccounts !== null) {
5415
+ if (data.adminAccounts != null) {
5663
5416
  contents.adminAccounts = deserializeAws_restJson1__listOfAdminAccount(data.adminAccounts, context);
5664
5417
  }
5665
- if (data.nextToken !== undefined && data.nextToken !== null) {
5418
+ if (data.nextToken != null) {
5666
5419
  contents.nextToken = __expectString(data.nextToken);
5667
5420
  }
5668
- return [2, Promise.resolve(contents)];
5421
+ return [2, contents];
5669
5422
  }
5670
5423
  });
5671
5424
  }); };
5672
5425
  var deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5673
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5426
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5674
5427
  var _c;
5675
5428
  return __generator(this, function (_d) {
5676
5429
  switch (_d.label) {
@@ -5715,14 +5468,14 @@ var deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = function
5715
5468
  case 15: throw _d.sent();
5716
5469
  case 16:
5717
5470
  parsedBody = parsedOutput.body;
5718
- $metadata = deserializeMetadata(output);
5719
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5720
- response = new __BaseException({
5721
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5722
- $fault: "client",
5723
- $metadata: $metadata,
5471
+ throwDefaultError({
5472
+ output: output,
5473
+ parsedBody: parsedBody,
5474
+ exceptionCtor: __BaseException,
5475
+ errorCode: errorCode,
5724
5476
  });
5725
- throw __decorateServiceException(response, parsedBody);
5477
+ _d.label = 17;
5478
+ case 17: return [2];
5726
5479
  }
5727
5480
  });
5728
5481
  }); };
@@ -5734,24 +5487,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
5734
5487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5735
5488
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
5736
5489
  }
5737
- contents = {
5490
+ contents = map({
5738
5491
  $metadata: deserializeMetadata(output),
5739
- tags: undefined,
5740
- };
5492
+ });
5741
5493
  _a = __expectNonNull;
5742
5494
  _b = __expectObject;
5743
5495
  return [4, parseBody(output.body, context)];
5744
5496
  case 1:
5745
5497
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5746
- if (data.tags !== undefined && data.tags !== null) {
5498
+ if (data.tags != null) {
5747
5499
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
5748
5500
  }
5749
- return [2, Promise.resolve(contents)];
5501
+ return [2, contents];
5750
5502
  }
5751
5503
  });
5752
5504
  }); };
5753
5505
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5754
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
5506
+ var parsedOutput, _a, errorCode, parsedBody;
5755
5507
  var _b;
5756
5508
  return __generator(this, function (_c) {
5757
5509
  switch (_c.label) {
@@ -5762,18 +5514,13 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
5762
5514
  case 1:
5763
5515
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
5764
5516
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5765
- switch (errorCode) {
5766
- default:
5767
- parsedBody = parsedOutput.body;
5768
- $metadata = deserializeMetadata(output);
5769
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5770
- response = new __BaseException({
5771
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5772
- $fault: "client",
5773
- $metadata: $metadata,
5774
- });
5775
- throw __decorateServiceException(response, parsedBody);
5776
- }
5517
+ parsedBody = parsedOutput.body;
5518
+ throwDefaultError({
5519
+ output: output,
5520
+ parsedBody: parsedBody,
5521
+ exceptionCtor: __BaseException,
5522
+ errorCode: errorCode,
5523
+ });
5777
5524
  return [2];
5778
5525
  }
5779
5526
  });
@@ -5786,24 +5533,23 @@ export var deserializeAws_restJson1PutClassificationExportConfigurationCommand =
5786
5533
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5787
5534
  return [2, deserializeAws_restJson1PutClassificationExportConfigurationCommandError(output, context)];
5788
5535
  }
5789
- contents = {
5536
+ contents = map({
5790
5537
  $metadata: deserializeMetadata(output),
5791
- configuration: undefined,
5792
- };
5538
+ });
5793
5539
  _a = __expectNonNull;
5794
5540
  _b = __expectObject;
5795
5541
  return [4, parseBody(output.body, context)];
5796
5542
  case 1:
5797
5543
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5798
- if (data.configuration !== undefined && data.configuration !== null) {
5544
+ if (data.configuration != null) {
5799
5545
  contents.configuration = deserializeAws_restJson1ClassificationExportConfiguration(data.configuration, context);
5800
5546
  }
5801
- return [2, Promise.resolve(contents)];
5547
+ return [2, contents];
5802
5548
  }
5803
5549
  });
5804
5550
  }); };
5805
5551
  var deserializeAws_restJson1PutClassificationExportConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5806
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5552
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5807
5553
  var _c;
5808
5554
  return __generator(this, function (_d) {
5809
5555
  switch (_d.label) {
@@ -5848,14 +5594,14 @@ var deserializeAws_restJson1PutClassificationExportConfigurationCommandError = f
5848
5594
  case 15: throw _d.sent();
5849
5595
  case 16:
5850
5596
  parsedBody = parsedOutput.body;
5851
- $metadata = deserializeMetadata(output);
5852
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5853
- response = new __BaseException({
5854
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5855
- $fault: "client",
5856
- $metadata: $metadata,
5597
+ throwDefaultError({
5598
+ output: output,
5599
+ parsedBody: parsedBody,
5600
+ exceptionCtor: __BaseException,
5601
+ errorCode: errorCode,
5857
5602
  });
5858
- throw __decorateServiceException(response, parsedBody);
5603
+ _d.label = 17;
5604
+ case 17: return [2];
5859
5605
  }
5860
5606
  });
5861
5607
  }); };
@@ -5867,18 +5613,18 @@ export var deserializeAws_restJson1PutFindingsPublicationConfigurationCommand =
5867
5613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5868
5614
  return [2, deserializeAws_restJson1PutFindingsPublicationConfigurationCommandError(output, context)];
5869
5615
  }
5870
- contents = {
5616
+ contents = map({
5871
5617
  $metadata: deserializeMetadata(output),
5872
- };
5618
+ });
5873
5619
  return [4, collectBody(output.body, context)];
5874
5620
  case 1:
5875
5621
  _a.sent();
5876
- return [2, Promise.resolve(contents)];
5622
+ return [2, contents];
5877
5623
  }
5878
5624
  });
5879
5625
  }); };
5880
5626
  var deserializeAws_restJson1PutFindingsPublicationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5881
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5627
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5882
5628
  var _c;
5883
5629
  return __generator(this, function (_d) {
5884
5630
  switch (_d.label) {
@@ -5923,14 +5669,14 @@ var deserializeAws_restJson1PutFindingsPublicationConfigurationCommandError = fu
5923
5669
  case 15: throw _d.sent();
5924
5670
  case 16:
5925
5671
  parsedBody = parsedOutput.body;
5926
- $metadata = deserializeMetadata(output);
5927
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5928
- response = new __BaseException({
5929
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5930
- $fault: "client",
5931
- $metadata: $metadata,
5672
+ throwDefaultError({
5673
+ output: output,
5674
+ parsedBody: parsedBody,
5675
+ exceptionCtor: __BaseException,
5676
+ errorCode: errorCode,
5932
5677
  });
5933
- throw __decorateServiceException(response, parsedBody);
5678
+ _d.label = 17;
5679
+ case 17: return [2];
5934
5680
  }
5935
5681
  });
5936
5682
  }); };
@@ -5942,28 +5688,26 @@ export var deserializeAws_restJson1SearchResourcesCommand = function (output, co
5942
5688
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5943
5689
  return [2, deserializeAws_restJson1SearchResourcesCommandError(output, context)];
5944
5690
  }
5945
- contents = {
5691
+ contents = map({
5946
5692
  $metadata: deserializeMetadata(output),
5947
- matchingResources: undefined,
5948
- nextToken: undefined,
5949
- };
5693
+ });
5950
5694
  _a = __expectNonNull;
5951
5695
  _b = __expectObject;
5952
5696
  return [4, parseBody(output.body, context)];
5953
5697
  case 1:
5954
5698
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5955
- if (data.matchingResources !== undefined && data.matchingResources !== null) {
5699
+ if (data.matchingResources != null) {
5956
5700
  contents.matchingResources = deserializeAws_restJson1__listOfMatchingResource(data.matchingResources, context);
5957
5701
  }
5958
- if (data.nextToken !== undefined && data.nextToken !== null) {
5702
+ if (data.nextToken != null) {
5959
5703
  contents.nextToken = __expectString(data.nextToken);
5960
5704
  }
5961
- return [2, Promise.resolve(contents)];
5705
+ return [2, contents];
5962
5706
  }
5963
5707
  });
5964
5708
  }); };
5965
5709
  var deserializeAws_restJson1SearchResourcesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5966
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5710
+ var parsedOutput, _a, errorCode, _b, parsedBody;
5967
5711
  var _c;
5968
5712
  return __generator(this, function (_d) {
5969
5713
  switch (_d.label) {
@@ -6008,14 +5752,14 @@ var deserializeAws_restJson1SearchResourcesCommandError = function (output, cont
6008
5752
  case 15: throw _d.sent();
6009
5753
  case 16:
6010
5754
  parsedBody = parsedOutput.body;
6011
- $metadata = deserializeMetadata(output);
6012
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6013
- response = new __BaseException({
6014
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6015
- $fault: "client",
6016
- $metadata: $metadata,
5755
+ throwDefaultError({
5756
+ output: output,
5757
+ parsedBody: parsedBody,
5758
+ exceptionCtor: __BaseException,
5759
+ errorCode: errorCode,
6017
5760
  });
6018
- throw __decorateServiceException(response, parsedBody);
5761
+ _d.label = 17;
5762
+ case 17: return [2];
6019
5763
  }
6020
5764
  });
6021
5765
  }); };
@@ -6027,18 +5771,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
6027
5771
  if (output.statusCode !== 204 && output.statusCode >= 300) {
6028
5772
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
6029
5773
  }
6030
- contents = {
5774
+ contents = map({
6031
5775
  $metadata: deserializeMetadata(output),
6032
- };
5776
+ });
6033
5777
  return [4, collectBody(output.body, context)];
6034
5778
  case 1:
6035
5779
  _a.sent();
6036
- return [2, Promise.resolve(contents)];
5780
+ return [2, contents];
6037
5781
  }
6038
5782
  });
6039
5783
  }); };
6040
5784
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6041
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
5785
+ var parsedOutput, _a, errorCode, parsedBody;
6042
5786
  var _b;
6043
5787
  return __generator(this, function (_c) {
6044
5788
  switch (_c.label) {
@@ -6049,18 +5793,13 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
6049
5793
  case 1:
6050
5794
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
6051
5795
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6052
- switch (errorCode) {
6053
- default:
6054
- parsedBody = parsedOutput.body;
6055
- $metadata = deserializeMetadata(output);
6056
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6057
- response = new __BaseException({
6058
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6059
- $fault: "client",
6060
- $metadata: $metadata,
6061
- });
6062
- throw __decorateServiceException(response, parsedBody);
6063
- }
5796
+ parsedBody = parsedOutput.body;
5797
+ throwDefaultError({
5798
+ output: output,
5799
+ parsedBody: parsedBody,
5800
+ exceptionCtor: __BaseException,
5801
+ errorCode: errorCode,
5802
+ });
6064
5803
  return [2];
6065
5804
  }
6066
5805
  });
@@ -6073,24 +5812,23 @@ export var deserializeAws_restJson1TestCustomDataIdentifierCommand = function (o
6073
5812
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6074
5813
  return [2, deserializeAws_restJson1TestCustomDataIdentifierCommandError(output, context)];
6075
5814
  }
6076
- contents = {
5815
+ contents = map({
6077
5816
  $metadata: deserializeMetadata(output),
6078
- matchCount: undefined,
6079
- };
5817
+ });
6080
5818
  _a = __expectNonNull;
6081
5819
  _b = __expectObject;
6082
5820
  return [4, parseBody(output.body, context)];
6083
5821
  case 1:
6084
5822
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6085
- if (data.matchCount !== undefined && data.matchCount !== null) {
5823
+ if (data.matchCount != null) {
6086
5824
  contents.matchCount = __expectInt32(data.matchCount);
6087
5825
  }
6088
- return [2, Promise.resolve(contents)];
5826
+ return [2, contents];
6089
5827
  }
6090
5828
  });
6091
5829
  }); };
6092
5830
  var deserializeAws_restJson1TestCustomDataIdentifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6093
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5831
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6094
5832
  var _c;
6095
5833
  return __generator(this, function (_d) {
6096
5834
  switch (_d.label) {
@@ -6135,14 +5873,14 @@ var deserializeAws_restJson1TestCustomDataIdentifierCommandError = function (out
6135
5873
  case 15: throw _d.sent();
6136
5874
  case 16:
6137
5875
  parsedBody = parsedOutput.body;
6138
- $metadata = deserializeMetadata(output);
6139
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6140
- response = new __BaseException({
6141
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6142
- $fault: "client",
6143
- $metadata: $metadata,
5876
+ throwDefaultError({
5877
+ output: output,
5878
+ parsedBody: parsedBody,
5879
+ exceptionCtor: __BaseException,
5880
+ errorCode: errorCode,
6144
5881
  });
6145
- throw __decorateServiceException(response, parsedBody);
5882
+ _d.label = 17;
5883
+ case 17: return [2];
6146
5884
  }
6147
5885
  });
6148
5886
  }); };
@@ -6154,18 +5892,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
6154
5892
  if (output.statusCode !== 204 && output.statusCode >= 300) {
6155
5893
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
6156
5894
  }
6157
- contents = {
5895
+ contents = map({
6158
5896
  $metadata: deserializeMetadata(output),
6159
- };
5897
+ });
6160
5898
  return [4, collectBody(output.body, context)];
6161
5899
  case 1:
6162
5900
  _a.sent();
6163
- return [2, Promise.resolve(contents)];
5901
+ return [2, contents];
6164
5902
  }
6165
5903
  });
6166
5904
  }); };
6167
5905
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6168
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
5906
+ var parsedOutput, _a, errorCode, parsedBody;
6169
5907
  var _b;
6170
5908
  return __generator(this, function (_c) {
6171
5909
  switch (_c.label) {
@@ -6176,18 +5914,13 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
6176
5914
  case 1:
6177
5915
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
6178
5916
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6179
- switch (errorCode) {
6180
- default:
6181
- parsedBody = parsedOutput.body;
6182
- $metadata = deserializeMetadata(output);
6183
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6184
- response = new __BaseException({
6185
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6186
- $fault: "client",
6187
- $metadata: $metadata,
6188
- });
6189
- throw __decorateServiceException(response, parsedBody);
6190
- }
5917
+ parsedBody = parsedOutput.body;
5918
+ throwDefaultError({
5919
+ output: output,
5920
+ parsedBody: parsedBody,
5921
+ exceptionCtor: __BaseException,
5922
+ errorCode: errorCode,
5923
+ });
6191
5924
  return [2];
6192
5925
  }
6193
5926
  });
@@ -6200,18 +5933,18 @@ export var deserializeAws_restJson1UpdateClassificationJobCommand = function (ou
6200
5933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6201
5934
  return [2, deserializeAws_restJson1UpdateClassificationJobCommandError(output, context)];
6202
5935
  }
6203
- contents = {
5936
+ contents = map({
6204
5937
  $metadata: deserializeMetadata(output),
6205
- };
5938
+ });
6206
5939
  return [4, collectBody(output.body, context)];
6207
5940
  case 1:
6208
5941
  _a.sent();
6209
- return [2, Promise.resolve(contents)];
5942
+ return [2, contents];
6210
5943
  }
6211
5944
  });
6212
5945
  }); };
6213
5946
  var deserializeAws_restJson1UpdateClassificationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6214
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5947
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6215
5948
  var _c;
6216
5949
  return __generator(this, function (_d) {
6217
5950
  switch (_d.label) {
@@ -6256,14 +5989,14 @@ var deserializeAws_restJson1UpdateClassificationJobCommandError = function (outp
6256
5989
  case 15: throw _d.sent();
6257
5990
  case 16:
6258
5991
  parsedBody = parsedOutput.body;
6259
- $metadata = deserializeMetadata(output);
6260
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6261
- response = new __BaseException({
6262
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6263
- $fault: "client",
6264
- $metadata: $metadata,
5992
+ throwDefaultError({
5993
+ output: output,
5994
+ parsedBody: parsedBody,
5995
+ exceptionCtor: __BaseException,
5996
+ errorCode: errorCode,
6265
5997
  });
6266
- throw __decorateServiceException(response, parsedBody);
5998
+ _d.label = 17;
5999
+ case 17: return [2];
6267
6000
  }
6268
6001
  });
6269
6002
  }); };
@@ -6275,28 +6008,26 @@ export var deserializeAws_restJson1UpdateFindingsFilterCommand = function (outpu
6275
6008
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6276
6009
  return [2, deserializeAws_restJson1UpdateFindingsFilterCommandError(output, context)];
6277
6010
  }
6278
- contents = {
6011
+ contents = map({
6279
6012
  $metadata: deserializeMetadata(output),
6280
- arn: undefined,
6281
- id: undefined,
6282
- };
6013
+ });
6283
6014
  _a = __expectNonNull;
6284
6015
  _b = __expectObject;
6285
6016
  return [4, parseBody(output.body, context)];
6286
6017
  case 1:
6287
6018
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6288
- if (data.arn !== undefined && data.arn !== null) {
6019
+ if (data.arn != null) {
6289
6020
  contents.arn = __expectString(data.arn);
6290
6021
  }
6291
- if (data.id !== undefined && data.id !== null) {
6022
+ if (data.id != null) {
6292
6023
  contents.id = __expectString(data.id);
6293
6024
  }
6294
- return [2, Promise.resolve(contents)];
6025
+ return [2, contents];
6295
6026
  }
6296
6027
  });
6297
6028
  }); };
6298
6029
  var deserializeAws_restJson1UpdateFindingsFilterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6299
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6030
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6300
6031
  var _c;
6301
6032
  return __generator(this, function (_d) {
6302
6033
  switch (_d.label) {
@@ -6341,14 +6072,14 @@ var deserializeAws_restJson1UpdateFindingsFilterCommandError = function (output,
6341
6072
  case 15: throw _d.sent();
6342
6073
  case 16:
6343
6074
  parsedBody = parsedOutput.body;
6344
- $metadata = deserializeMetadata(output);
6345
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6346
- response = new __BaseException({
6347
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6348
- $fault: "client",
6349
- $metadata: $metadata,
6075
+ throwDefaultError({
6076
+ output: output,
6077
+ parsedBody: parsedBody,
6078
+ exceptionCtor: __BaseException,
6079
+ errorCode: errorCode,
6350
6080
  });
6351
- throw __decorateServiceException(response, parsedBody);
6081
+ _d.label = 17;
6082
+ case 17: return [2];
6352
6083
  }
6353
6084
  });
6354
6085
  }); };
@@ -6360,18 +6091,18 @@ export var deserializeAws_restJson1UpdateMacieSessionCommand = function (output,
6360
6091
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6361
6092
  return [2, deserializeAws_restJson1UpdateMacieSessionCommandError(output, context)];
6362
6093
  }
6363
- contents = {
6094
+ contents = map({
6364
6095
  $metadata: deserializeMetadata(output),
6365
- };
6096
+ });
6366
6097
  return [4, collectBody(output.body, context)];
6367
6098
  case 1:
6368
6099
  _a.sent();
6369
- return [2, Promise.resolve(contents)];
6100
+ return [2, contents];
6370
6101
  }
6371
6102
  });
6372
6103
  }); };
6373
6104
  var deserializeAws_restJson1UpdateMacieSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6374
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6105
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6375
6106
  var _c;
6376
6107
  return __generator(this, function (_d) {
6377
6108
  switch (_d.label) {
@@ -6416,14 +6147,14 @@ var deserializeAws_restJson1UpdateMacieSessionCommandError = function (output, c
6416
6147
  case 15: throw _d.sent();
6417
6148
  case 16:
6418
6149
  parsedBody = parsedOutput.body;
6419
- $metadata = deserializeMetadata(output);
6420
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6421
- response = new __BaseException({
6422
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6423
- $fault: "client",
6424
- $metadata: $metadata,
6150
+ throwDefaultError({
6151
+ output: output,
6152
+ parsedBody: parsedBody,
6153
+ exceptionCtor: __BaseException,
6154
+ errorCode: errorCode,
6425
6155
  });
6426
- throw __decorateServiceException(response, parsedBody);
6156
+ _d.label = 17;
6157
+ case 17: return [2];
6427
6158
  }
6428
6159
  });
6429
6160
  }); };
@@ -6435,18 +6166,18 @@ export var deserializeAws_restJson1UpdateMemberSessionCommand = function (output
6435
6166
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6436
6167
  return [2, deserializeAws_restJson1UpdateMemberSessionCommandError(output, context)];
6437
6168
  }
6438
- contents = {
6169
+ contents = map({
6439
6170
  $metadata: deserializeMetadata(output),
6440
- };
6171
+ });
6441
6172
  return [4, collectBody(output.body, context)];
6442
6173
  case 1:
6443
6174
  _a.sent();
6444
- return [2, Promise.resolve(contents)];
6175
+ return [2, contents];
6445
6176
  }
6446
6177
  });
6447
6178
  }); };
6448
6179
  var deserializeAws_restJson1UpdateMemberSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6449
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6180
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6450
6181
  var _c;
6451
6182
  return __generator(this, function (_d) {
6452
6183
  switch (_d.label) {
@@ -6491,14 +6222,14 @@ var deserializeAws_restJson1UpdateMemberSessionCommandError = function (output,
6491
6222
  case 15: throw _d.sent();
6492
6223
  case 16:
6493
6224
  parsedBody = parsedOutput.body;
6494
- $metadata = deserializeMetadata(output);
6495
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6496
- response = new __BaseException({
6497
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6498
- $fault: "client",
6499
- $metadata: $metadata,
6225
+ throwDefaultError({
6226
+ output: output,
6227
+ parsedBody: parsedBody,
6228
+ exceptionCtor: __BaseException,
6229
+ errorCode: errorCode,
6500
6230
  });
6501
- throw __decorateServiceException(response, parsedBody);
6231
+ _d.label = 17;
6232
+ case 17: return [2];
6502
6233
  }
6503
6234
  });
6504
6235
  }); };
@@ -6510,18 +6241,18 @@ export var deserializeAws_restJson1UpdateOrganizationConfigurationCommand = func
6510
6241
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6511
6242
  return [2, deserializeAws_restJson1UpdateOrganizationConfigurationCommandError(output, context)];
6512
6243
  }
6513
- contents = {
6244
+ contents = map({
6514
6245
  $metadata: deserializeMetadata(output),
6515
- };
6246
+ });
6516
6247
  return [4, collectBody(output.body, context)];
6517
6248
  case 1:
6518
6249
  _a.sent();
6519
- return [2, Promise.resolve(contents)];
6250
+ return [2, contents];
6520
6251
  }
6521
6252
  });
6522
6253
  }); };
6523
6254
  var deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6524
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6255
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6525
6256
  var _c;
6526
6257
  return __generator(this, function (_d) {
6527
6258
  switch (_d.label) {
@@ -6566,14 +6297,14 @@ var deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = functi
6566
6297
  case 15: throw _d.sent();
6567
6298
  case 16:
6568
6299
  parsedBody = parsedOutput.body;
6569
- $metadata = deserializeMetadata(output);
6570
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6571
- response = new __BaseException({
6572
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6573
- $fault: "client",
6574
- $metadata: $metadata,
6300
+ throwDefaultError({
6301
+ output: output,
6302
+ parsedBody: parsedBody,
6303
+ exceptionCtor: __BaseException,
6304
+ errorCode: errorCode,
6575
6305
  });
6576
- throw __decorateServiceException(response, parsedBody);
6306
+ _d.label = 17;
6307
+ case 17: return [2];
6577
6308
  }
6578
6309
  });
6579
6310
  }); };
@@ -6585,24 +6316,23 @@ export var deserializeAws_restJson1UpdateRevealConfigurationCommand = function (
6585
6316
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6586
6317
  return [2, deserializeAws_restJson1UpdateRevealConfigurationCommandError(output, context)];
6587
6318
  }
6588
- contents = {
6319
+ contents = map({
6589
6320
  $metadata: deserializeMetadata(output),
6590
- configuration: undefined,
6591
- };
6321
+ });
6592
6322
  _a = __expectNonNull;
6593
6323
  _b = __expectObject;
6594
6324
  return [4, parseBody(output.body, context)];
6595
6325
  case 1:
6596
6326
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6597
- if (data.configuration !== undefined && data.configuration !== null) {
6327
+ if (data.configuration != null) {
6598
6328
  contents.configuration = deserializeAws_restJson1RevealConfiguration(data.configuration, context);
6599
6329
  }
6600
- return [2, Promise.resolve(contents)];
6330
+ return [2, contents];
6601
6331
  }
6602
6332
  });
6603
6333
  }); };
6604
6334
  var deserializeAws_restJson1UpdateRevealConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6605
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6335
+ var parsedOutput, _a, errorCode, _b, parsedBody;
6606
6336
  var _c;
6607
6337
  return __generator(this, function (_d) {
6608
6338
  switch (_d.label) {
@@ -6635,23 +6365,24 @@ var deserializeAws_restJson1UpdateRevealConfigurationCommandError = function (ou
6635
6365
  case 9: throw _d.sent();
6636
6366
  case 10:
6637
6367
  parsedBody = parsedOutput.body;
6638
- $metadata = deserializeMetadata(output);
6639
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6640
- response = new __BaseException({
6641
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6642
- $fault: "client",
6643
- $metadata: $metadata,
6368
+ throwDefaultError({
6369
+ output: output,
6370
+ parsedBody: parsedBody,
6371
+ exceptionCtor: __BaseException,
6372
+ errorCode: errorCode,
6644
6373
  });
6645
- throw __decorateServiceException(response, parsedBody);
6374
+ _d.label = 11;
6375
+ case 11: return [2];
6646
6376
  }
6647
6377
  });
6648
6378
  }); };
6379
+ var map = __map;
6649
6380
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6650
6381
  var contents, data, exception;
6651
6382
  return __generator(this, function (_a) {
6652
- contents = {};
6383
+ contents = map({});
6653
6384
  data = parsedOutput.body;
6654
- if (data.message !== undefined && data.message !== null) {
6385
+ if (data.message != null) {
6655
6386
  contents.message = __expectString(data.message);
6656
6387
  }
6657
6388
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6661,9 +6392,9 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
6661
6392
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6662
6393
  var contents, data, exception;
6663
6394
  return __generator(this, function (_a) {
6664
- contents = {};
6395
+ contents = map({});
6665
6396
  data = parsedOutput.body;
6666
- if (data.message !== undefined && data.message !== null) {
6397
+ if (data.message != null) {
6667
6398
  contents.message = __expectString(data.message);
6668
6399
  }
6669
6400
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6673,9 +6404,9 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
6673
6404
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6674
6405
  var contents, data, exception;
6675
6406
  return __generator(this, function (_a) {
6676
- contents = {};
6407
+ contents = map({});
6677
6408
  data = parsedOutput.body;
6678
- if (data.message !== undefined && data.message !== null) {
6409
+ if (data.message != null) {
6679
6410
  contents.message = __expectString(data.message);
6680
6411
  }
6681
6412
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6685,9 +6416,9 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
6685
6416
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6686
6417
  var contents, data, exception;
6687
6418
  return __generator(this, function (_a) {
6688
- contents = {};
6419
+ contents = map({});
6689
6420
  data = parsedOutput.body;
6690
- if (data.message !== undefined && data.message !== null) {
6421
+ if (data.message != null) {
6691
6422
  contents.message = __expectString(data.message);
6692
6423
  }
6693
6424
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6697,9 +6428,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
6697
6428
  var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6698
6429
  var contents, data, exception;
6699
6430
  return __generator(this, function (_a) {
6700
- contents = {};
6431
+ contents = map({});
6701
6432
  data = parsedOutput.body;
6702
- if (data.message !== undefined && data.message !== null) {
6433
+ if (data.message != null) {
6703
6434
  contents.message = __expectString(data.message);
6704
6435
  }
6705
6436
  exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6709,9 +6440,9 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
6709
6440
  var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6710
6441
  var contents, data, exception;
6711
6442
  return __generator(this, function (_a) {
6712
- contents = {};
6443
+ contents = map({});
6713
6444
  data = parsedOutput.body;
6714
- if (data.message !== undefined && data.message !== null) {
6445
+ if (data.message != null) {
6715
6446
  contents.message = __expectString(data.message);
6716
6447
  }
6717
6448
  exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6721,9 +6452,9 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
6721
6452
  var deserializeAws_restJson1UnprocessableEntityExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6722
6453
  var contents, data, exception;
6723
6454
  return __generator(this, function (_a) {
6724
- contents = {};
6455
+ contents = map({});
6725
6456
  data = parsedOutput.body;
6726
- if (data.message !== undefined && data.message !== null) {
6457
+ if (data.message != null) {
6727
6458
  contents.message = __expectString(data.message);
6728
6459
  }
6729
6460
  exception = new UnprocessableEntityException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6733,9 +6464,9 @@ var deserializeAws_restJson1UnprocessableEntityExceptionResponse = function (par
6733
6464
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
6734
6465
  var contents, data, exception;
6735
6466
  return __generator(this, function (_a) {
6736
- contents = {};
6467
+ contents = map({});
6737
6468
  data = parsedOutput.body;
6738
- if (data.message !== undefined && data.message !== null) {
6469
+ if (data.message != null) {
6739
6470
  contents.message = __expectString(data.message);
6740
6471
  }
6741
6472
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -6746,9 +6477,6 @@ var serializeAws_restJson1__listOf__string = function (input, context) {
6746
6477
  return input
6747
6478
  .filter(function (e) { return e != null; })
6748
6479
  .map(function (entry) {
6749
- if (entry === null) {
6750
- return null;
6751
- }
6752
6480
  return entry;
6753
6481
  });
6754
6482
  };
@@ -6756,9 +6484,6 @@ var serializeAws_restJson1__listOfCriteriaForJob = function (input, context) {
6756
6484
  return input
6757
6485
  .filter(function (e) { return e != null; })
6758
6486
  .map(function (entry) {
6759
- if (entry === null) {
6760
- return null;
6761
- }
6762
6487
  return serializeAws_restJson1CriteriaForJob(entry, context);
6763
6488
  });
6764
6489
  };
@@ -6766,9 +6491,6 @@ var serializeAws_restJson1__listOfFindingType = function (input, context) {
6766
6491
  return input
6767
6492
  .filter(function (e) { return e != null; })
6768
6493
  .map(function (entry) {
6769
- if (entry === null) {
6770
- return null;
6771
- }
6772
6494
  return entry;
6773
6495
  });
6774
6496
  };
@@ -6776,9 +6498,6 @@ var serializeAws_restJson1__listOfJobScopeTerm = function (input, context) {
6776
6498
  return input
6777
6499
  .filter(function (e) { return e != null; })
6778
6500
  .map(function (entry) {
6779
- if (entry === null) {
6780
- return null;
6781
- }
6782
6501
  return serializeAws_restJson1JobScopeTerm(entry, context);
6783
6502
  });
6784
6503
  };
@@ -6786,9 +6505,6 @@ var serializeAws_restJson1__listOfListJobsFilterTerm = function (input, context)
6786
6505
  return input
6787
6506
  .filter(function (e) { return e != null; })
6788
6507
  .map(function (entry) {
6789
- if (entry === null) {
6790
- return null;
6791
- }
6792
6508
  return serializeAws_restJson1ListJobsFilterTerm(entry, context);
6793
6509
  });
6794
6510
  };
@@ -6796,9 +6512,6 @@ var serializeAws_restJson1__listOfS3BucketDefinitionForJob = function (input, co
6796
6512
  return input
6797
6513
  .filter(function (e) { return e != null; })
6798
6514
  .map(function (entry) {
6799
- if (entry === null) {
6800
- return null;
6801
- }
6802
6515
  return serializeAws_restJson1S3BucketDefinitionForJob(entry, context);
6803
6516
  });
6804
6517
  };
@@ -6806,9 +6519,6 @@ var serializeAws_restJson1__listOfSearchResourcesCriteria = function (input, con
6806
6519
  return input
6807
6520
  .filter(function (e) { return e != null; })
6808
6521
  .map(function (entry) {
6809
- if (entry === null) {
6810
- return null;
6811
- }
6812
6522
  return serializeAws_restJson1SearchResourcesCriteria(entry, context);
6813
6523
  });
6814
6524
  };
@@ -6816,9 +6526,6 @@ var serializeAws_restJson1__listOfSearchResourcesTagCriterionPair = function (in
6816
6526
  return input
6817
6527
  .filter(function (e) { return e != null; })
6818
6528
  .map(function (entry) {
6819
- if (entry === null) {
6820
- return null;
6821
- }
6822
6529
  return serializeAws_restJson1SearchResourcesTagCriterionPair(entry, context);
6823
6530
  });
6824
6531
  };
@@ -6826,9 +6533,6 @@ var serializeAws_restJson1__listOfTagCriterionPairForJob = function (input, cont
6826
6533
  return input
6827
6534
  .filter(function (e) { return e != null; })
6828
6535
  .map(function (entry) {
6829
- if (entry === null) {
6830
- return null;
6831
- }
6832
6536
  return serializeAws_restJson1TagCriterionPairForJob(entry, context);
6833
6537
  });
6834
6538
  };
@@ -6836,9 +6540,6 @@ var serializeAws_restJson1__listOfTagValuePair = function (input, context) {
6836
6540
  return input
6837
6541
  .filter(function (e) { return e != null; })
6838
6542
  .map(function (entry) {
6839
- if (entry === null) {
6840
- return null;
6841
- }
6842
6543
  return serializeAws_restJson1TagValuePair(entry, context);
6843
6544
  });
6844
6545
  };
@@ -6846,9 +6547,6 @@ var serializeAws_restJson1__listOfUsageStatisticsFilter = function (input, conte
6846
6547
  return input
6847
6548
  .filter(function (e) { return e != null; })
6848
6549
  .map(function (entry) {
6849
- if (entry === null) {
6850
- return null;
6851
- }
6852
6550
  return serializeAws_restJson1UsageStatisticsFilter(entry, context);
6853
6551
  });
6854
6552
  };
@@ -7010,9 +6708,6 @@ var serializeAws_restJson1SeverityLevelList = function (input, context) {
7010
6708
  return input
7011
6709
  .filter(function (e) { return e != null; })
7012
6710
  .map(function (entry) {
7013
- if (entry === null) {
7014
- return null;
7015
- }
7016
6711
  return serializeAws_restJson1SeverityLevel(entry, context);
7017
6712
  });
7018
6713
  };