@aws-sdk/client-accessanalyzer 3.118.1 → 3.128.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.
@@ -16,7 +16,7 @@ export var serializeAws_restJson1ApplyArchiveRuleCommand = function (input, cont
16
16
  "content-type": "application/json",
17
17
  };
18
18
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/archive-rule";
19
- body = JSON.stringify(__assign(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ruleName !== undefined && input.ruleName !== null && { ruleName: input.ruleName })));
19
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ruleName != null && { ruleName: input.ruleName })));
20
20
  return [2, new __HttpRequest({
21
21
  protocol: protocol,
22
22
  hostname: hostname,
@@ -72,8 +72,7 @@ export var serializeAws_restJson1CreateAccessPreviewCommand = function (input, c
72
72
  "content-type": "application/json",
73
73
  };
74
74
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/access-preview";
75
- body = JSON.stringify(__assign(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.configurations !== undefined &&
76
- input.configurations !== null && {
75
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.configurations != null && {
77
76
  configurations: serializeAws_restJson1ConfigurationsMap(input.configurations, context),
78
77
  })));
79
78
  return [2, new __HttpRequest({
@@ -100,11 +99,9 @@ export var serializeAws_restJson1CreateAnalyzerCommand = function (input, contex
100
99
  "content-type": "application/json",
101
100
  };
102
101
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/analyzer";
103
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.analyzerName !== undefined && input.analyzerName !== null && { analyzerName: input.analyzerName })), (input.archiveRules !== undefined &&
104
- input.archiveRules !== null && {
102
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.analyzerName != null && { analyzerName: input.analyzerName })), (input.archiveRules != null && {
105
103
  archiveRules: serializeAws_restJson1InlineArchiveRulesList(input.archiveRules, context),
106
- })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.tags !== undefined &&
107
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })), (input.type !== undefined && input.type !== null && { type: input.type })));
104
+ })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })), (input.type != null && { type: input.type })));
108
105
  return [2, new __HttpRequest({
109
106
  protocol: protocol,
110
107
  hostname: hostname,
@@ -139,8 +136,7 @@ export var serializeAws_restJson1CreateArchiveRuleCommand = function (input, con
139
136
  else {
140
137
  throw new Error("No value provided for input HTTP label: analyzerName.");
141
138
  }
142
- body = JSON.stringify(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.filter !== undefined &&
143
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.ruleName !== undefined && input.ruleName !== null && { ruleName: input.ruleName })));
139
+ body = JSON.stringify(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.ruleName != null && { ruleName: input.ruleName })));
144
140
  return [2, new __HttpRequest({
145
141
  protocol: protocol,
146
142
  hostname: hostname,
@@ -450,8 +446,7 @@ export var serializeAws_restJson1ListAccessPreviewFindingsCommand = function (in
450
446
  else {
451
447
  throw new Error("No value provided for input HTTP label: accessPreviewId.");
452
448
  }
453
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), (input.filter !== undefined &&
454
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
449
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), (input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })));
455
450
  return [2, new __HttpRequest({
456
451
  protocol: protocol,
457
452
  hostname: hostname,
@@ -498,7 +493,7 @@ export var serializeAws_restJson1ListAnalyzedResourcesCommand = function (input,
498
493
  "content-type": "application/json",
499
494
  };
500
495
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/analyzed-resource";
501
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType })));
496
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.resourceType != null && { resourceType: input.resourceType })));
502
497
  return [2, new __HttpRequest({
503
498
  protocol: protocol,
504
499
  hostname: hostname,
@@ -578,9 +573,7 @@ export var serializeAws_restJson1ListFindingsCommand = function (input, context)
578
573
  "content-type": "application/json",
579
574
  };
580
575
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/finding";
581
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), (input.filter !== undefined &&
582
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.sort !== undefined &&
583
- input.sort !== null && { sort: serializeAws_restJson1SortCriteria(input.sort, context) })));
576
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), (input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.sort != null && { sort: serializeAws_restJson1SortCriteria(input.sort, context) })));
584
577
  return [2, new __HttpRequest({
585
578
  protocol: protocol,
586
579
  hostname: hostname,
@@ -659,11 +652,9 @@ export var serializeAws_restJson1StartPolicyGenerationCommand = function (input,
659
652
  "content-type": "application/json",
660
653
  };
661
654
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policy/generation";
662
- body = JSON.stringify(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.cloudTrailDetails !== undefined &&
663
- input.cloudTrailDetails !== null && {
655
+ body = JSON.stringify(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.cloudTrailDetails != null && {
664
656
  cloudTrailDetails: serializeAws_restJson1CloudTrailDetails(input.cloudTrailDetails, context),
665
- })), (input.policyGenerationDetails !== undefined &&
666
- input.policyGenerationDetails !== null && {
657
+ })), (input.policyGenerationDetails != null && {
667
658
  policyGenerationDetails: serializeAws_restJson1PolicyGenerationDetails(input.policyGenerationDetails, context),
668
659
  })));
669
660
  return [2, new __HttpRequest({
@@ -689,7 +680,7 @@ export var serializeAws_restJson1StartResourceScanCommand = function (input, con
689
680
  "content-type": "application/json",
690
681
  };
691
682
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/resource/scan";
692
- body = JSON.stringify(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn })));
683
+ body = JSON.stringify(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), (input.resourceArn != null && { resourceArn: input.resourceArn })));
693
684
  return [2, new __HttpRequest({
694
685
  protocol: protocol,
695
686
  hostname: hostname,
@@ -723,8 +714,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
723
714
  else {
724
715
  throw new Error("No value provided for input HTTP label: resourceArn.");
725
716
  }
726
- body = JSON.stringify(__assign({}, (input.tags !== undefined &&
727
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })));
717
+ body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })));
728
718
  return [2, new __HttpRequest({
729
719
  protocol: protocol,
730
720
  hostname: hostname,
@@ -803,8 +793,7 @@ export var serializeAws_restJson1UpdateArchiveRuleCommand = function (input, con
803
793
  else {
804
794
  throw new Error("No value provided for input HTTP label: ruleName.");
805
795
  }
806
- body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.filter !== undefined &&
807
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })));
796
+ body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })));
808
797
  return [2, new __HttpRequest({
809
798
  protocol: protocol,
810
799
  hostname: hostname,
@@ -829,8 +818,7 @@ export var serializeAws_restJson1UpdateFindingsCommand = function (input, contex
829
818
  "content-type": "application/json",
830
819
  };
831
820
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/finding";
832
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ids !== undefined &&
833
- input.ids !== null && { ids: serializeAws_restJson1FindingIdList(input.ids, context) })), (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn })), (input.status !== undefined && input.status !== null && { status: input.status })));
821
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.analyzerArn != null && { analyzerArn: input.analyzerArn })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ids != null && { ids: serializeAws_restJson1FindingIdList(input.ids, context) })), (input.resourceArn != null && { resourceArn: input.resourceArn })), (input.status != null && { status: input.status })));
834
822
  return [2, new __HttpRequest({
835
823
  protocol: protocol,
836
824
  hostname: hostname,
@@ -855,9 +843,7 @@ export var serializeAws_restJson1ValidatePolicyCommand = function (input, contex
855
843
  };
856
844
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policy/validation";
857
845
  query = __assign(__assign({}, (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
858
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.locale !== undefined && input.locale !== null && { locale: input.locale })), (input.policyDocument !== undefined &&
859
- input.policyDocument !== null && { policyDocument: input.policyDocument })), (input.policyType !== undefined && input.policyType !== null && { policyType: input.policyType })), (input.validatePolicyResourceType !== undefined &&
860
- input.validatePolicyResourceType !== null && { validatePolicyResourceType: input.validatePolicyResourceType })));
846
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.locale != null && { locale: input.locale })), (input.policyDocument != null && { policyDocument: input.policyDocument })), (input.policyType != null && { policyType: input.policyType })), (input.validatePolicyResourceType != null && { validatePolicyResourceType: input.validatePolicyResourceType })));
861
847
  return [2, new __HttpRequest({
862
848
  protocol: protocol,
863
849
  hostname: hostname,
@@ -890,7 +876,7 @@ export var deserializeAws_restJson1ApplyArchiveRuleCommand = function (output, c
890
876
  });
891
877
  }); };
892
878
  var deserializeAws_restJson1ApplyArchiveRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
893
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
879
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
894
880
  var _c;
895
881
  return __generator(this, function (_d) {
896
882
  switch (_d.label) {
@@ -900,7 +886,6 @@ var deserializeAws_restJson1ApplyArchiveRuleCommandError = function (output, con
900
886
  return [4, parseBody(output.body, context)];
901
887
  case 1:
902
888
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
903
- errorCode = "UnknownError";
904
889
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
905
890
  _b = errorCode;
906
891
  switch (_b) {
@@ -928,10 +913,12 @@ var deserializeAws_restJson1ApplyArchiveRuleCommandError = function (output, con
928
913
  case 11: throw _d.sent();
929
914
  case 12:
930
915
  parsedBody = parsedOutput.body;
916
+ $metadata = deserializeMetadata(output);
917
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
931
918
  response = new __BaseException({
932
- name: parsedBody.code || parsedBody.Code || errorCode,
919
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
933
920
  $fault: "client",
934
- $metadata: deserializeMetadata(output),
921
+ $metadata: $metadata,
935
922
  });
936
923
  throw __decorateServiceException(response, parsedBody);
937
924
  }
@@ -956,7 +943,7 @@ export var deserializeAws_restJson1CancelPolicyGenerationCommand = function (out
956
943
  });
957
944
  }); };
958
945
  var deserializeAws_restJson1CancelPolicyGenerationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
959
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
946
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
960
947
  var _c;
961
948
  return __generator(this, function (_d) {
962
949
  switch (_d.label) {
@@ -966,7 +953,6 @@ var deserializeAws_restJson1CancelPolicyGenerationCommandError = function (outpu
966
953
  return [4, parseBody(output.body, context)];
967
954
  case 1:
968
955
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
969
- errorCode = "UnknownError";
970
956
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
971
957
  _b = errorCode;
972
958
  switch (_b) {
@@ -990,10 +976,12 @@ var deserializeAws_restJson1CancelPolicyGenerationCommandError = function (outpu
990
976
  case 9: throw _d.sent();
991
977
  case 10:
992
978
  parsedBody = parsedOutput.body;
979
+ $metadata = deserializeMetadata(output);
980
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
993
981
  response = new __BaseException({
994
- name: parsedBody.code || parsedBody.Code || errorCode,
982
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
995
983
  $fault: "client",
996
- $metadata: deserializeMetadata(output),
984
+ $metadata: $metadata,
997
985
  });
998
986
  throw __decorateServiceException(response, parsedBody);
999
987
  }
@@ -1024,7 +1012,7 @@ export var deserializeAws_restJson1CreateAccessPreviewCommand = function (output
1024
1012
  });
1025
1013
  }); };
1026
1014
  var deserializeAws_restJson1CreateAccessPreviewCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1027
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1015
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1028
1016
  var _c;
1029
1017
  return __generator(this, function (_d) {
1030
1018
  switch (_d.label) {
@@ -1034,7 +1022,6 @@ var deserializeAws_restJson1CreateAccessPreviewCommandError = function (output,
1034
1022
  return [4, parseBody(output.body, context)];
1035
1023
  case 1:
1036
1024
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1037
- errorCode = "UnknownError";
1038
1025
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1039
1026
  _b = errorCode;
1040
1027
  switch (_b) {
@@ -1070,10 +1057,12 @@ var deserializeAws_restJson1CreateAccessPreviewCommandError = function (output,
1070
1057
  case 15: throw _d.sent();
1071
1058
  case 16:
1072
1059
  parsedBody = parsedOutput.body;
1060
+ $metadata = deserializeMetadata(output);
1061
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1073
1062
  response = new __BaseException({
1074
- name: parsedBody.code || parsedBody.Code || errorCode,
1063
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1075
1064
  $fault: "client",
1076
- $metadata: deserializeMetadata(output),
1065
+ $metadata: $metadata,
1077
1066
  });
1078
1067
  throw __decorateServiceException(response, parsedBody);
1079
1068
  }
@@ -1104,7 +1093,7 @@ export var deserializeAws_restJson1CreateAnalyzerCommand = function (output, con
1104
1093
  });
1105
1094
  }); };
1106
1095
  var deserializeAws_restJson1CreateAnalyzerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1107
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1096
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1108
1097
  var _c;
1109
1098
  return __generator(this, function (_d) {
1110
1099
  switch (_d.label) {
@@ -1114,7 +1103,6 @@ var deserializeAws_restJson1CreateAnalyzerCommandError = function (output, conte
1114
1103
  return [4, parseBody(output.body, context)];
1115
1104
  case 1:
1116
1105
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1117
- errorCode = "UnknownError";
1118
1106
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1119
1107
  _b = errorCode;
1120
1108
  switch (_b) {
@@ -1146,10 +1134,12 @@ var deserializeAws_restJson1CreateAnalyzerCommandError = function (output, conte
1146
1134
  case 13: throw _d.sent();
1147
1135
  case 14:
1148
1136
  parsedBody = parsedOutput.body;
1137
+ $metadata = deserializeMetadata(output);
1138
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1149
1139
  response = new __BaseException({
1150
- name: parsedBody.code || parsedBody.Code || errorCode,
1140
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1151
1141
  $fault: "client",
1152
- $metadata: deserializeMetadata(output),
1142
+ $metadata: $metadata,
1153
1143
  });
1154
1144
  throw __decorateServiceException(response, parsedBody);
1155
1145
  }
@@ -1174,7 +1164,7 @@ export var deserializeAws_restJson1CreateArchiveRuleCommand = function (output,
1174
1164
  });
1175
1165
  }); };
1176
1166
  var deserializeAws_restJson1CreateArchiveRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1177
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1167
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1178
1168
  var _c;
1179
1169
  return __generator(this, function (_d) {
1180
1170
  switch (_d.label) {
@@ -1184,7 +1174,6 @@ var deserializeAws_restJson1CreateArchiveRuleCommandError = function (output, co
1184
1174
  return [4, parseBody(output.body, context)];
1185
1175
  case 1:
1186
1176
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1187
- errorCode = "UnknownError";
1188
1177
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
1178
  _b = errorCode;
1190
1179
  switch (_b) {
@@ -1220,10 +1209,12 @@ var deserializeAws_restJson1CreateArchiveRuleCommandError = function (output, co
1220
1209
  case 15: throw _d.sent();
1221
1210
  case 16:
1222
1211
  parsedBody = parsedOutput.body;
1212
+ $metadata = deserializeMetadata(output);
1213
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1223
1214
  response = new __BaseException({
1224
- name: parsedBody.code || parsedBody.Code || errorCode,
1215
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1225
1216
  $fault: "client",
1226
- $metadata: deserializeMetadata(output),
1217
+ $metadata: $metadata,
1227
1218
  });
1228
1219
  throw __decorateServiceException(response, parsedBody);
1229
1220
  }
@@ -1248,7 +1239,7 @@ export var deserializeAws_restJson1DeleteAnalyzerCommand = function (output, con
1248
1239
  });
1249
1240
  }); };
1250
1241
  var deserializeAws_restJson1DeleteAnalyzerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1251
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1242
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1252
1243
  var _c;
1253
1244
  return __generator(this, function (_d) {
1254
1245
  switch (_d.label) {
@@ -1258,7 +1249,6 @@ var deserializeAws_restJson1DeleteAnalyzerCommandError = function (output, conte
1258
1249
  return [4, parseBody(output.body, context)];
1259
1250
  case 1:
1260
1251
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1261
- errorCode = "UnknownError";
1262
1252
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1263
1253
  _b = errorCode;
1264
1254
  switch (_b) {
@@ -1286,10 +1276,12 @@ var deserializeAws_restJson1DeleteAnalyzerCommandError = function (output, conte
1286
1276
  case 11: throw _d.sent();
1287
1277
  case 12:
1288
1278
  parsedBody = parsedOutput.body;
1279
+ $metadata = deserializeMetadata(output);
1280
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1289
1281
  response = new __BaseException({
1290
- name: parsedBody.code || parsedBody.Code || errorCode,
1282
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1291
1283
  $fault: "client",
1292
- $metadata: deserializeMetadata(output),
1284
+ $metadata: $metadata,
1293
1285
  });
1294
1286
  throw __decorateServiceException(response, parsedBody);
1295
1287
  }
@@ -1314,7 +1306,7 @@ export var deserializeAws_restJson1DeleteArchiveRuleCommand = function (output,
1314
1306
  });
1315
1307
  }); };
1316
1308
  var deserializeAws_restJson1DeleteArchiveRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1317
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1309
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1318
1310
  var _c;
1319
1311
  return __generator(this, function (_d) {
1320
1312
  switch (_d.label) {
@@ -1324,7 +1316,6 @@ var deserializeAws_restJson1DeleteArchiveRuleCommandError = function (output, co
1324
1316
  return [4, parseBody(output.body, context)];
1325
1317
  case 1:
1326
1318
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1327
- errorCode = "UnknownError";
1328
1319
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1329
1320
  _b = errorCode;
1330
1321
  switch (_b) {
@@ -1352,10 +1343,12 @@ var deserializeAws_restJson1DeleteArchiveRuleCommandError = function (output, co
1352
1343
  case 11: throw _d.sent();
1353
1344
  case 12:
1354
1345
  parsedBody = parsedOutput.body;
1346
+ $metadata = deserializeMetadata(output);
1347
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1355
1348
  response = new __BaseException({
1356
- name: parsedBody.code || parsedBody.Code || errorCode,
1349
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1357
1350
  $fault: "client",
1358
- $metadata: deserializeMetadata(output),
1351
+ $metadata: $metadata,
1359
1352
  });
1360
1353
  throw __decorateServiceException(response, parsedBody);
1361
1354
  }
@@ -1386,7 +1379,7 @@ export var deserializeAws_restJson1GetAccessPreviewCommand = function (output, c
1386
1379
  });
1387
1380
  }); };
1388
1381
  var deserializeAws_restJson1GetAccessPreviewCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1389
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1382
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1390
1383
  var _c;
1391
1384
  return __generator(this, function (_d) {
1392
1385
  switch (_d.label) {
@@ -1396,7 +1389,6 @@ var deserializeAws_restJson1GetAccessPreviewCommandError = function (output, con
1396
1389
  return [4, parseBody(output.body, context)];
1397
1390
  case 1:
1398
1391
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1399
- errorCode = "UnknownError";
1400
1392
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1401
1393
  _b = errorCode;
1402
1394
  switch (_b) {
@@ -1424,10 +1416,12 @@ var deserializeAws_restJson1GetAccessPreviewCommandError = function (output, con
1424
1416
  case 11: throw _d.sent();
1425
1417
  case 12:
1426
1418
  parsedBody = parsedOutput.body;
1419
+ $metadata = deserializeMetadata(output);
1420
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1427
1421
  response = new __BaseException({
1428
- name: parsedBody.code || parsedBody.Code || errorCode,
1422
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1429
1423
  $fault: "client",
1430
- $metadata: deserializeMetadata(output),
1424
+ $metadata: $metadata,
1431
1425
  });
1432
1426
  throw __decorateServiceException(response, parsedBody);
1433
1427
  }
@@ -1458,7 +1452,7 @@ export var deserializeAws_restJson1GetAnalyzedResourceCommand = function (output
1458
1452
  });
1459
1453
  }); };
1460
1454
  var deserializeAws_restJson1GetAnalyzedResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1461
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1455
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1462
1456
  var _c;
1463
1457
  return __generator(this, function (_d) {
1464
1458
  switch (_d.label) {
@@ -1468,7 +1462,6 @@ var deserializeAws_restJson1GetAnalyzedResourceCommandError = function (output,
1468
1462
  return [4, parseBody(output.body, context)];
1469
1463
  case 1:
1470
1464
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1471
- errorCode = "UnknownError";
1472
1465
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1473
1466
  _b = errorCode;
1474
1467
  switch (_b) {
@@ -1496,10 +1489,12 @@ var deserializeAws_restJson1GetAnalyzedResourceCommandError = function (output,
1496
1489
  case 11: throw _d.sent();
1497
1490
  case 12:
1498
1491
  parsedBody = parsedOutput.body;
1492
+ $metadata = deserializeMetadata(output);
1493
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1499
1494
  response = new __BaseException({
1500
- name: parsedBody.code || parsedBody.Code || errorCode,
1495
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1501
1496
  $fault: "client",
1502
- $metadata: deserializeMetadata(output),
1497
+ $metadata: $metadata,
1503
1498
  });
1504
1499
  throw __decorateServiceException(response, parsedBody);
1505
1500
  }
@@ -1530,7 +1525,7 @@ export var deserializeAws_restJson1GetAnalyzerCommand = function (output, contex
1530
1525
  });
1531
1526
  }); };
1532
1527
  var deserializeAws_restJson1GetAnalyzerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1533
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1528
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1534
1529
  var _c;
1535
1530
  return __generator(this, function (_d) {
1536
1531
  switch (_d.label) {
@@ -1540,7 +1535,6 @@ var deserializeAws_restJson1GetAnalyzerCommandError = function (output, context)
1540
1535
  return [4, parseBody(output.body, context)];
1541
1536
  case 1:
1542
1537
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1543
- errorCode = "UnknownError";
1544
1538
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1545
1539
  _b = errorCode;
1546
1540
  switch (_b) {
@@ -1568,10 +1562,12 @@ var deserializeAws_restJson1GetAnalyzerCommandError = function (output, context)
1568
1562
  case 11: throw _d.sent();
1569
1563
  case 12:
1570
1564
  parsedBody = parsedOutput.body;
1565
+ $metadata = deserializeMetadata(output);
1566
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1571
1567
  response = new __BaseException({
1572
- name: parsedBody.code || parsedBody.Code || errorCode,
1568
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1573
1569
  $fault: "client",
1574
- $metadata: deserializeMetadata(output),
1570
+ $metadata: $metadata,
1575
1571
  });
1576
1572
  throw __decorateServiceException(response, parsedBody);
1577
1573
  }
@@ -1602,7 +1598,7 @@ export var deserializeAws_restJson1GetArchiveRuleCommand = function (output, con
1602
1598
  });
1603
1599
  }); };
1604
1600
  var deserializeAws_restJson1GetArchiveRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1605
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1601
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1606
1602
  var _c;
1607
1603
  return __generator(this, function (_d) {
1608
1604
  switch (_d.label) {
@@ -1612,7 +1608,6 @@ var deserializeAws_restJson1GetArchiveRuleCommandError = function (output, conte
1612
1608
  return [4, parseBody(output.body, context)];
1613
1609
  case 1:
1614
1610
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1615
- errorCode = "UnknownError";
1616
1611
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1617
1612
  _b = errorCode;
1618
1613
  switch (_b) {
@@ -1640,10 +1635,12 @@ var deserializeAws_restJson1GetArchiveRuleCommandError = function (output, conte
1640
1635
  case 11: throw _d.sent();
1641
1636
  case 12:
1642
1637
  parsedBody = parsedOutput.body;
1638
+ $metadata = deserializeMetadata(output);
1639
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1643
1640
  response = new __BaseException({
1644
- name: parsedBody.code || parsedBody.Code || errorCode,
1641
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1645
1642
  $fault: "client",
1646
- $metadata: deserializeMetadata(output),
1643
+ $metadata: $metadata,
1647
1644
  });
1648
1645
  throw __decorateServiceException(response, parsedBody);
1649
1646
  }
@@ -1674,7 +1671,7 @@ export var deserializeAws_restJson1GetFindingCommand = function (output, context
1674
1671
  });
1675
1672
  }); };
1676
1673
  var deserializeAws_restJson1GetFindingCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1677
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1674
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1678
1675
  var _c;
1679
1676
  return __generator(this, function (_d) {
1680
1677
  switch (_d.label) {
@@ -1684,7 +1681,6 @@ var deserializeAws_restJson1GetFindingCommandError = function (output, context)
1684
1681
  return [4, parseBody(output.body, context)];
1685
1682
  case 1:
1686
1683
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1687
- errorCode = "UnknownError";
1688
1684
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1689
1685
  _b = errorCode;
1690
1686
  switch (_b) {
@@ -1712,10 +1708,12 @@ var deserializeAws_restJson1GetFindingCommandError = function (output, context)
1712
1708
  case 11: throw _d.sent();
1713
1709
  case 12:
1714
1710
  parsedBody = parsedOutput.body;
1711
+ $metadata = deserializeMetadata(output);
1712
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1715
1713
  response = new __BaseException({
1716
- name: parsedBody.code || parsedBody.Code || errorCode,
1714
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1717
1715
  $fault: "client",
1718
- $metadata: deserializeMetadata(output),
1716
+ $metadata: $metadata,
1719
1717
  });
1720
1718
  throw __decorateServiceException(response, parsedBody);
1721
1719
  }
@@ -1750,7 +1748,7 @@ export var deserializeAws_restJson1GetGeneratedPolicyCommand = function (output,
1750
1748
  });
1751
1749
  }); };
1752
1750
  var deserializeAws_restJson1GetGeneratedPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1753
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1751
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1754
1752
  var _c;
1755
1753
  return __generator(this, function (_d) {
1756
1754
  switch (_d.label) {
@@ -1760,7 +1758,6 @@ var deserializeAws_restJson1GetGeneratedPolicyCommandError = function (output, c
1760
1758
  return [4, parseBody(output.body, context)];
1761
1759
  case 1:
1762
1760
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1763
- errorCode = "UnknownError";
1764
1761
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1765
1762
  _b = errorCode;
1766
1763
  switch (_b) {
@@ -1784,10 +1781,12 @@ var deserializeAws_restJson1GetGeneratedPolicyCommandError = function (output, c
1784
1781
  case 9: throw _d.sent();
1785
1782
  case 10:
1786
1783
  parsedBody = parsedOutput.body;
1784
+ $metadata = deserializeMetadata(output);
1785
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1787
1786
  response = new __BaseException({
1788
- name: parsedBody.code || parsedBody.Code || errorCode,
1787
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1789
1788
  $fault: "client",
1790
- $metadata: deserializeMetadata(output),
1789
+ $metadata: $metadata,
1791
1790
  });
1792
1791
  throw __decorateServiceException(response, parsedBody);
1793
1792
  }
@@ -1822,7 +1821,7 @@ export var deserializeAws_restJson1ListAccessPreviewFindingsCommand = function (
1822
1821
  });
1823
1822
  }); };
1824
1823
  var deserializeAws_restJson1ListAccessPreviewFindingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1825
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1824
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1826
1825
  var _c;
1827
1826
  return __generator(this, function (_d) {
1828
1827
  switch (_d.label) {
@@ -1832,7 +1831,6 @@ var deserializeAws_restJson1ListAccessPreviewFindingsCommandError = function (ou
1832
1831
  return [4, parseBody(output.body, context)];
1833
1832
  case 1:
1834
1833
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1835
- errorCode = "UnknownError";
1836
1834
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1837
1835
  _b = errorCode;
1838
1836
  switch (_b) {
@@ -1864,10 +1862,12 @@ var deserializeAws_restJson1ListAccessPreviewFindingsCommandError = function (ou
1864
1862
  case 13: throw _d.sent();
1865
1863
  case 14:
1866
1864
  parsedBody = parsedOutput.body;
1865
+ $metadata = deserializeMetadata(output);
1866
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1867
1867
  response = new __BaseException({
1868
- name: parsedBody.code || parsedBody.Code || errorCode,
1868
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1869
1869
  $fault: "client",
1870
- $metadata: deserializeMetadata(output),
1870
+ $metadata: $metadata,
1871
1871
  });
1872
1872
  throw __decorateServiceException(response, parsedBody);
1873
1873
  }
@@ -1902,7 +1902,7 @@ export var deserializeAws_restJson1ListAccessPreviewsCommand = function (output,
1902
1902
  });
1903
1903
  }); };
1904
1904
  var deserializeAws_restJson1ListAccessPreviewsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1905
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1905
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1906
1906
  var _c;
1907
1907
  return __generator(this, function (_d) {
1908
1908
  switch (_d.label) {
@@ -1912,7 +1912,6 @@ var deserializeAws_restJson1ListAccessPreviewsCommandError = function (output, c
1912
1912
  return [4, parseBody(output.body, context)];
1913
1913
  case 1:
1914
1914
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1915
- errorCode = "UnknownError";
1916
1915
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1917
1916
  _b = errorCode;
1918
1917
  switch (_b) {
@@ -1940,10 +1939,12 @@ var deserializeAws_restJson1ListAccessPreviewsCommandError = function (output, c
1940
1939
  case 11: throw _d.sent();
1941
1940
  case 12:
1942
1941
  parsedBody = parsedOutput.body;
1942
+ $metadata = deserializeMetadata(output);
1943
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1943
1944
  response = new __BaseException({
1944
- name: parsedBody.code || parsedBody.Code || errorCode,
1945
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1945
1946
  $fault: "client",
1946
- $metadata: deserializeMetadata(output),
1947
+ $metadata: $metadata,
1947
1948
  });
1948
1949
  throw __decorateServiceException(response, parsedBody);
1949
1950
  }
@@ -1978,7 +1979,7 @@ export var deserializeAws_restJson1ListAnalyzedResourcesCommand = function (outp
1978
1979
  });
1979
1980
  }); };
1980
1981
  var deserializeAws_restJson1ListAnalyzedResourcesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1981
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1982
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1982
1983
  var _c;
1983
1984
  return __generator(this, function (_d) {
1984
1985
  switch (_d.label) {
@@ -1988,7 +1989,6 @@ var deserializeAws_restJson1ListAnalyzedResourcesCommandError = function (output
1988
1989
  return [4, parseBody(output.body, context)];
1989
1990
  case 1:
1990
1991
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1991
- errorCode = "UnknownError";
1992
1992
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1993
1993
  _b = errorCode;
1994
1994
  switch (_b) {
@@ -2016,10 +2016,12 @@ var deserializeAws_restJson1ListAnalyzedResourcesCommandError = function (output
2016
2016
  case 11: throw _d.sent();
2017
2017
  case 12:
2018
2018
  parsedBody = parsedOutput.body;
2019
+ $metadata = deserializeMetadata(output);
2020
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2019
2021
  response = new __BaseException({
2020
- name: parsedBody.code || parsedBody.Code || errorCode,
2022
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2021
2023
  $fault: "client",
2022
- $metadata: deserializeMetadata(output),
2024
+ $metadata: $metadata,
2023
2025
  });
2024
2026
  throw __decorateServiceException(response, parsedBody);
2025
2027
  }
@@ -2054,7 +2056,7 @@ export var deserializeAws_restJson1ListAnalyzersCommand = function (output, cont
2054
2056
  });
2055
2057
  }); };
2056
2058
  var deserializeAws_restJson1ListAnalyzersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2057
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2059
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2058
2060
  var _c;
2059
2061
  return __generator(this, function (_d) {
2060
2062
  switch (_d.label) {
@@ -2064,7 +2066,6 @@ var deserializeAws_restJson1ListAnalyzersCommandError = function (output, contex
2064
2066
  return [4, parseBody(output.body, context)];
2065
2067
  case 1:
2066
2068
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2067
- errorCode = "UnknownError";
2068
2069
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2069
2070
  _b = errorCode;
2070
2071
  switch (_b) {
@@ -2088,10 +2089,12 @@ var deserializeAws_restJson1ListAnalyzersCommandError = function (output, contex
2088
2089
  case 9: throw _d.sent();
2089
2090
  case 10:
2090
2091
  parsedBody = parsedOutput.body;
2092
+ $metadata = deserializeMetadata(output);
2093
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2091
2094
  response = new __BaseException({
2092
- name: parsedBody.code || parsedBody.Code || errorCode,
2095
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2093
2096
  $fault: "client",
2094
- $metadata: deserializeMetadata(output),
2097
+ $metadata: $metadata,
2095
2098
  });
2096
2099
  throw __decorateServiceException(response, parsedBody);
2097
2100
  }
@@ -2126,7 +2129,7 @@ export var deserializeAws_restJson1ListArchiveRulesCommand = function (output, c
2126
2129
  });
2127
2130
  }); };
2128
2131
  var deserializeAws_restJson1ListArchiveRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2129
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2132
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2130
2133
  var _c;
2131
2134
  return __generator(this, function (_d) {
2132
2135
  switch (_d.label) {
@@ -2136,7 +2139,6 @@ var deserializeAws_restJson1ListArchiveRulesCommandError = function (output, con
2136
2139
  return [4, parseBody(output.body, context)];
2137
2140
  case 1:
2138
2141
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2139
- errorCode = "UnknownError";
2140
2142
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2141
2143
  _b = errorCode;
2142
2144
  switch (_b) {
@@ -2160,10 +2162,12 @@ var deserializeAws_restJson1ListArchiveRulesCommandError = function (output, con
2160
2162
  case 9: throw _d.sent();
2161
2163
  case 10:
2162
2164
  parsedBody = parsedOutput.body;
2165
+ $metadata = deserializeMetadata(output);
2166
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2163
2167
  response = new __BaseException({
2164
- name: parsedBody.code || parsedBody.Code || errorCode,
2168
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2165
2169
  $fault: "client",
2166
- $metadata: deserializeMetadata(output),
2170
+ $metadata: $metadata,
2167
2171
  });
2168
2172
  throw __decorateServiceException(response, parsedBody);
2169
2173
  }
@@ -2198,7 +2202,7 @@ export var deserializeAws_restJson1ListFindingsCommand = function (output, conte
2198
2202
  });
2199
2203
  }); };
2200
2204
  var deserializeAws_restJson1ListFindingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2201
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2205
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2202
2206
  var _c;
2203
2207
  return __generator(this, function (_d) {
2204
2208
  switch (_d.label) {
@@ -2208,7 +2212,6 @@ var deserializeAws_restJson1ListFindingsCommandError = function (output, context
2208
2212
  return [4, parseBody(output.body, context)];
2209
2213
  case 1:
2210
2214
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2211
- errorCode = "UnknownError";
2212
2215
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2213
2216
  _b = errorCode;
2214
2217
  switch (_b) {
@@ -2236,10 +2239,12 @@ var deserializeAws_restJson1ListFindingsCommandError = function (output, context
2236
2239
  case 11: throw _d.sent();
2237
2240
  case 12:
2238
2241
  parsedBody = parsedOutput.body;
2242
+ $metadata = deserializeMetadata(output);
2243
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2239
2244
  response = new __BaseException({
2240
- name: parsedBody.code || parsedBody.Code || errorCode,
2245
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2241
2246
  $fault: "client",
2242
- $metadata: deserializeMetadata(output),
2247
+ $metadata: $metadata,
2243
2248
  });
2244
2249
  throw __decorateServiceException(response, parsedBody);
2245
2250
  }
@@ -2274,7 +2279,7 @@ export var deserializeAws_restJson1ListPolicyGenerationsCommand = function (outp
2274
2279
  });
2275
2280
  }); };
2276
2281
  var deserializeAws_restJson1ListPolicyGenerationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2277
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2282
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2278
2283
  var _c;
2279
2284
  return __generator(this, function (_d) {
2280
2285
  switch (_d.label) {
@@ -2284,7 +2289,6 @@ var deserializeAws_restJson1ListPolicyGenerationsCommandError = function (output
2284
2289
  return [4, parseBody(output.body, context)];
2285
2290
  case 1:
2286
2291
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2287
- errorCode = "UnknownError";
2288
2292
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2289
2293
  _b = errorCode;
2290
2294
  switch (_b) {
@@ -2308,10 +2312,12 @@ var deserializeAws_restJson1ListPolicyGenerationsCommandError = function (output
2308
2312
  case 9: throw _d.sent();
2309
2313
  case 10:
2310
2314
  parsedBody = parsedOutput.body;
2315
+ $metadata = deserializeMetadata(output);
2316
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2311
2317
  response = new __BaseException({
2312
- name: parsedBody.code || parsedBody.Code || errorCode,
2318
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2313
2319
  $fault: "client",
2314
- $metadata: deserializeMetadata(output),
2320
+ $metadata: $metadata,
2315
2321
  });
2316
2322
  throw __decorateServiceException(response, parsedBody);
2317
2323
  }
@@ -2342,7 +2348,7 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
2342
2348
  });
2343
2349
  }); };
2344
2350
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2345
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2351
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2346
2352
  var _c;
2347
2353
  return __generator(this, function (_d) {
2348
2354
  switch (_d.label) {
@@ -2352,7 +2358,6 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2352
2358
  return [4, parseBody(output.body, context)];
2353
2359
  case 1:
2354
2360
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2355
- errorCode = "UnknownError";
2356
2361
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2357
2362
  _b = errorCode;
2358
2363
  switch (_b) {
@@ -2380,10 +2385,12 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2380
2385
  case 11: throw _d.sent();
2381
2386
  case 12:
2382
2387
  parsedBody = parsedOutput.body;
2388
+ $metadata = deserializeMetadata(output);
2389
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2383
2390
  response = new __BaseException({
2384
- name: parsedBody.code || parsedBody.Code || errorCode,
2391
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2385
2392
  $fault: "client",
2386
- $metadata: deserializeMetadata(output),
2393
+ $metadata: $metadata,
2387
2394
  });
2388
2395
  throw __decorateServiceException(response, parsedBody);
2389
2396
  }
@@ -2414,7 +2421,7 @@ export var deserializeAws_restJson1StartPolicyGenerationCommand = function (outp
2414
2421
  });
2415
2422
  }); };
2416
2423
  var deserializeAws_restJson1StartPolicyGenerationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2417
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2424
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2418
2425
  var _c;
2419
2426
  return __generator(this, function (_d) {
2420
2427
  switch (_d.label) {
@@ -2424,7 +2431,6 @@ var deserializeAws_restJson1StartPolicyGenerationCommandError = function (output
2424
2431
  return [4, parseBody(output.body, context)];
2425
2432
  case 1:
2426
2433
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2427
- errorCode = "UnknownError";
2428
2434
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2429
2435
  _b = errorCode;
2430
2436
  switch (_b) {
@@ -2456,10 +2462,12 @@ var deserializeAws_restJson1StartPolicyGenerationCommandError = function (output
2456
2462
  case 13: throw _d.sent();
2457
2463
  case 14:
2458
2464
  parsedBody = parsedOutput.body;
2465
+ $metadata = deserializeMetadata(output);
2466
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2459
2467
  response = new __BaseException({
2460
- name: parsedBody.code || parsedBody.Code || errorCode,
2468
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2461
2469
  $fault: "client",
2462
- $metadata: deserializeMetadata(output),
2470
+ $metadata: $metadata,
2463
2471
  });
2464
2472
  throw __decorateServiceException(response, parsedBody);
2465
2473
  }
@@ -2484,7 +2492,7 @@ export var deserializeAws_restJson1StartResourceScanCommand = function (output,
2484
2492
  });
2485
2493
  }); };
2486
2494
  var deserializeAws_restJson1StartResourceScanCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2487
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2495
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2488
2496
  var _c;
2489
2497
  return __generator(this, function (_d) {
2490
2498
  switch (_d.label) {
@@ -2494,7 +2502,6 @@ var deserializeAws_restJson1StartResourceScanCommandError = function (output, co
2494
2502
  return [4, parseBody(output.body, context)];
2495
2503
  case 1:
2496
2504
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2497
- errorCode = "UnknownError";
2498
2505
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2499
2506
  _b = errorCode;
2500
2507
  switch (_b) {
@@ -2522,10 +2529,12 @@ var deserializeAws_restJson1StartResourceScanCommandError = function (output, co
2522
2529
  case 11: throw _d.sent();
2523
2530
  case 12:
2524
2531
  parsedBody = parsedOutput.body;
2532
+ $metadata = deserializeMetadata(output);
2533
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2525
2534
  response = new __BaseException({
2526
- name: parsedBody.code || parsedBody.Code || errorCode,
2535
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2527
2536
  $fault: "client",
2528
- $metadata: deserializeMetadata(output),
2537
+ $metadata: $metadata,
2529
2538
  });
2530
2539
  throw __decorateServiceException(response, parsedBody);
2531
2540
  }
@@ -2550,7 +2559,7 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
2550
2559
  });
2551
2560
  }); };
2552
2561
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2553
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2562
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2554
2563
  var _c;
2555
2564
  return __generator(this, function (_d) {
2556
2565
  switch (_d.label) {
@@ -2560,7 +2569,6 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2560
2569
  return [4, parseBody(output.body, context)];
2561
2570
  case 1:
2562
2571
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2563
- errorCode = "UnknownError";
2564
2572
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2565
2573
  _b = errorCode;
2566
2574
  switch (_b) {
@@ -2588,10 +2596,12 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2588
2596
  case 11: throw _d.sent();
2589
2597
  case 12:
2590
2598
  parsedBody = parsedOutput.body;
2599
+ $metadata = deserializeMetadata(output);
2600
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2591
2601
  response = new __BaseException({
2592
- name: parsedBody.code || parsedBody.Code || errorCode,
2602
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2593
2603
  $fault: "client",
2594
- $metadata: deserializeMetadata(output),
2604
+ $metadata: $metadata,
2595
2605
  });
2596
2606
  throw __decorateServiceException(response, parsedBody);
2597
2607
  }
@@ -2616,7 +2626,7 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
2616
2626
  });
2617
2627
  }); };
2618
2628
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2619
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2629
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2620
2630
  var _c;
2621
2631
  return __generator(this, function (_d) {
2622
2632
  switch (_d.label) {
@@ -2626,7 +2636,6 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2626
2636
  return [4, parseBody(output.body, context)];
2627
2637
  case 1:
2628
2638
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2629
- errorCode = "UnknownError";
2630
2639
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2631
2640
  _b = errorCode;
2632
2641
  switch (_b) {
@@ -2654,10 +2663,12 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2654
2663
  case 11: throw _d.sent();
2655
2664
  case 12:
2656
2665
  parsedBody = parsedOutput.body;
2666
+ $metadata = deserializeMetadata(output);
2667
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2657
2668
  response = new __BaseException({
2658
- name: parsedBody.code || parsedBody.Code || errorCode,
2669
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2659
2670
  $fault: "client",
2660
- $metadata: deserializeMetadata(output),
2671
+ $metadata: $metadata,
2661
2672
  });
2662
2673
  throw __decorateServiceException(response, parsedBody);
2663
2674
  }
@@ -2682,7 +2693,7 @@ export var deserializeAws_restJson1UpdateArchiveRuleCommand = function (output,
2682
2693
  });
2683
2694
  }); };
2684
2695
  var deserializeAws_restJson1UpdateArchiveRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2685
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2696
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2686
2697
  var _c;
2687
2698
  return __generator(this, function (_d) {
2688
2699
  switch (_d.label) {
@@ -2692,7 +2703,6 @@ var deserializeAws_restJson1UpdateArchiveRuleCommandError = function (output, co
2692
2703
  return [4, parseBody(output.body, context)];
2693
2704
  case 1:
2694
2705
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2695
- errorCode = "UnknownError";
2696
2706
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2697
2707
  _b = errorCode;
2698
2708
  switch (_b) {
@@ -2720,10 +2730,12 @@ var deserializeAws_restJson1UpdateArchiveRuleCommandError = function (output, co
2720
2730
  case 11: throw _d.sent();
2721
2731
  case 12:
2722
2732
  parsedBody = parsedOutput.body;
2733
+ $metadata = deserializeMetadata(output);
2734
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2723
2735
  response = new __BaseException({
2724
- name: parsedBody.code || parsedBody.Code || errorCode,
2736
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2725
2737
  $fault: "client",
2726
- $metadata: deserializeMetadata(output),
2738
+ $metadata: $metadata,
2727
2739
  });
2728
2740
  throw __decorateServiceException(response, parsedBody);
2729
2741
  }
@@ -2748,7 +2760,7 @@ export var deserializeAws_restJson1UpdateFindingsCommand = function (output, con
2748
2760
  });
2749
2761
  }); };
2750
2762
  var deserializeAws_restJson1UpdateFindingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2751
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2763
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2752
2764
  var _c;
2753
2765
  return __generator(this, function (_d) {
2754
2766
  switch (_d.label) {
@@ -2758,7 +2770,6 @@ var deserializeAws_restJson1UpdateFindingsCommandError = function (output, conte
2758
2770
  return [4, parseBody(output.body, context)];
2759
2771
  case 1:
2760
2772
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2761
- errorCode = "UnknownError";
2762
2773
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2763
2774
  _b = errorCode;
2764
2775
  switch (_b) {
@@ -2786,10 +2797,12 @@ var deserializeAws_restJson1UpdateFindingsCommandError = function (output, conte
2786
2797
  case 11: throw _d.sent();
2787
2798
  case 12:
2788
2799
  parsedBody = parsedOutput.body;
2800
+ $metadata = deserializeMetadata(output);
2801
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2789
2802
  response = new __BaseException({
2790
- name: parsedBody.code || parsedBody.Code || errorCode,
2803
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2791
2804
  $fault: "client",
2792
- $metadata: deserializeMetadata(output),
2805
+ $metadata: $metadata,
2793
2806
  });
2794
2807
  throw __decorateServiceException(response, parsedBody);
2795
2808
  }
@@ -2824,7 +2837,7 @@ export var deserializeAws_restJson1ValidatePolicyCommand = function (output, con
2824
2837
  });
2825
2838
  }); };
2826
2839
  var deserializeAws_restJson1ValidatePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2827
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2840
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2828
2841
  var _c;
2829
2842
  return __generator(this, function (_d) {
2830
2843
  switch (_d.label) {
@@ -2834,7 +2847,6 @@ var deserializeAws_restJson1ValidatePolicyCommandError = function (output, conte
2834
2847
  return [4, parseBody(output.body, context)];
2835
2848
  case 1:
2836
2849
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2837
- errorCode = "UnknownError";
2838
2850
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2839
2851
  _b = errorCode;
2840
2852
  switch (_b) {
@@ -2858,10 +2870,12 @@ var deserializeAws_restJson1ValidatePolicyCommandError = function (output, conte
2858
2870
  case 9: throw _d.sent();
2859
2871
  case 10:
2860
2872
  parsedBody = parsedOutput.body;
2873
+ $metadata = deserializeMetadata(output);
2874
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2861
2875
  response = new __BaseException({
2862
- name: parsedBody.code || parsedBody.Code || errorCode,
2876
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2863
2877
  $fault: "client",
2864
- $metadata: deserializeMetadata(output),
2878
+ $metadata: $metadata,
2865
2879
  });
2866
2880
  throw __decorateServiceException(response, parsedBody);
2867
2881
  }
@@ -2989,10 +3003,7 @@ var serializeAws_restJson1AclGrantee = function (input, context) {
2989
3003
  });
2990
3004
  };
2991
3005
  var serializeAws_restJson1CloudTrailDetails = function (input, context) {
2992
- return __assign(__assign(__assign(__assign({}, (input.accessRole !== undefined && input.accessRole !== null && { accessRole: input.accessRole })), (input.endTime !== undefined &&
2993
- input.endTime !== null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" })), (input.startTime !== undefined &&
2994
- input.startTime !== null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" })), (input.trails !== undefined &&
2995
- input.trails !== null && { trails: serializeAws_restJson1TrailList(input.trails, context) }));
3006
+ return __assign(__assign(__assign(__assign({}, (input.accessRole != null && { accessRole: input.accessRole })), (input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" })), (input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" })), (input.trails != null && { trails: serializeAws_restJson1TrailList(input.trails, context) }));
2996
3007
  };
2997
3008
  var serializeAws_restJson1Configuration = function (input, context) {
2998
3009
  return Configuration.visit(input, {
@@ -3017,8 +3028,7 @@ var serializeAws_restJson1ConfigurationsMap = function (input, context) {
3017
3028
  }, {});
3018
3029
  };
3019
3030
  var serializeAws_restJson1Criterion = function (input, context) {
3020
- return __assign(__assign(__assign(__assign({}, (input.contains !== undefined &&
3021
- input.contains !== null && { contains: serializeAws_restJson1ValueList(input.contains, context) })), (input.eq !== undefined && input.eq !== null && { eq: serializeAws_restJson1ValueList(input.eq, context) })), (input.exists !== undefined && input.exists !== null && { exists: input.exists })), (input.neq !== undefined && input.neq !== null && { neq: serializeAws_restJson1ValueList(input.neq, context) }));
3031
+ return __assign(__assign(__assign(__assign({}, (input.contains != null && { contains: serializeAws_restJson1ValueList(input.contains, context) })), (input.eq != null && { eq: serializeAws_restJson1ValueList(input.eq, context) })), (input.exists != null && { exists: input.exists })), (input.neq != null && { neq: serializeAws_restJson1ValueList(input.neq, context) }));
3022
3032
  };
3023
3033
  var serializeAws_restJson1FilterCriteriaMap = function (input, context) {
3024
3034
  return Object.entries(input).reduce(function (acc, _a) {
@@ -3041,11 +3051,10 @@ var serializeAws_restJson1FindingIdList = function (input, context) {
3041
3051
  });
3042
3052
  };
3043
3053
  var serializeAws_restJson1IamRoleConfiguration = function (input, context) {
3044
- return __assign({}, (input.trustPolicy !== undefined && input.trustPolicy !== null && { trustPolicy: input.trustPolicy }));
3054
+ return __assign({}, (input.trustPolicy != null && { trustPolicy: input.trustPolicy }));
3045
3055
  };
3046
3056
  var serializeAws_restJson1InlineArchiveRule = function (input, context) {
3047
- return __assign(__assign({}, (input.filter !== undefined &&
3048
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.ruleName !== undefined && input.ruleName !== null && { ruleName: input.ruleName }));
3057
+ return __assign(__assign({}, (input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) })), (input.ruleName != null && { ruleName: input.ruleName }));
3049
3058
  };
3050
3059
  var serializeAws_restJson1InlineArchiveRulesList = function (input, context) {
3051
3060
  return input
@@ -3071,16 +3080,11 @@ var serializeAws_restJson1KmsConstraintsMap = function (input, context) {
3071
3080
  }, {});
3072
3081
  };
3073
3082
  var serializeAws_restJson1KmsGrantConfiguration = function (input, context) {
3074
- return __assign(__assign(__assign(__assign(__assign({}, (input.constraints !== undefined &&
3075
- input.constraints !== null && {
3083
+ return __assign(__assign(__assign(__assign(__assign({}, (input.constraints != null && {
3076
3084
  constraints: serializeAws_restJson1KmsGrantConstraints(input.constraints, context),
3077
- })), (input.granteePrincipal !== undefined &&
3078
- input.granteePrincipal !== null && { granteePrincipal: input.granteePrincipal })), (input.issuingAccount !== undefined &&
3079
- input.issuingAccount !== null && { issuingAccount: input.issuingAccount })), (input.operations !== undefined &&
3080
- input.operations !== null && {
3085
+ })), (input.granteePrincipal != null && { granteePrincipal: input.granteePrincipal })), (input.issuingAccount != null && { issuingAccount: input.issuingAccount })), (input.operations != null && {
3081
3086
  operations: serializeAws_restJson1KmsGrantOperationsList(input.operations, context),
3082
- })), (input.retiringPrincipal !== undefined &&
3083
- input.retiringPrincipal !== null && { retiringPrincipal: input.retiringPrincipal }));
3087
+ })), (input.retiringPrincipal != null && { retiringPrincipal: input.retiringPrincipal }));
3084
3088
  };
3085
3089
  var serializeAws_restJson1KmsGrantConfigurationsList = function (input, context) {
3086
3090
  return input
@@ -3093,11 +3097,9 @@ var serializeAws_restJson1KmsGrantConfigurationsList = function (input, context)
3093
3097
  });
3094
3098
  };
3095
3099
  var serializeAws_restJson1KmsGrantConstraints = function (input, context) {
3096
- return __assign(__assign({}, (input.encryptionContextEquals !== undefined &&
3097
- input.encryptionContextEquals !== null && {
3100
+ return __assign(__assign({}, (input.encryptionContextEquals != null && {
3098
3101
  encryptionContextEquals: serializeAws_restJson1KmsConstraintsMap(input.encryptionContextEquals, context),
3099
- })), (input.encryptionContextSubset !== undefined &&
3100
- input.encryptionContextSubset !== null && {
3102
+ })), (input.encryptionContextSubset != null && {
3101
3103
  encryptionContextSubset: serializeAws_restJson1KmsConstraintsMap(input.encryptionContextSubset, context),
3102
3104
  }));
3103
3105
  };
@@ -3112,9 +3114,7 @@ var serializeAws_restJson1KmsGrantOperationsList = function (input, context) {
3112
3114
  });
3113
3115
  };
3114
3116
  var serializeAws_restJson1KmsKeyConfiguration = function (input, context) {
3115
- return __assign(__assign({}, (input.grants !== undefined &&
3116
- input.grants !== null && { grants: serializeAws_restJson1KmsGrantConfigurationsList(input.grants, context) })), (input.keyPolicies !== undefined &&
3117
- input.keyPolicies !== null && {
3117
+ return __assign(__assign({}, (input.grants != null && { grants: serializeAws_restJson1KmsGrantConfigurationsList(input.grants, context) })), (input.keyPolicies != null && {
3118
3118
  keyPolicies: serializeAws_restJson1KmsKeyPoliciesMap(input.keyPolicies, context),
3119
3119
  }));
3120
3120
  };
@@ -3138,7 +3138,7 @@ var serializeAws_restJson1NetworkOriginConfiguration = function (input, context)
3138
3138
  });
3139
3139
  };
3140
3140
  var serializeAws_restJson1PolicyGenerationDetails = function (input, context) {
3141
- return __assign({}, (input.principalArn !== undefined && input.principalArn !== null && { principalArn: input.principalArn }));
3141
+ return __assign({}, (input.principalArn != null && { principalArn: input.principalArn }));
3142
3142
  };
3143
3143
  var serializeAws_restJson1RegionList = function (input, context) {
3144
3144
  return input
@@ -3151,12 +3151,9 @@ var serializeAws_restJson1RegionList = function (input, context) {
3151
3151
  });
3152
3152
  };
3153
3153
  var serializeAws_restJson1S3AccessPointConfiguration = function (input, context) {
3154
- return __assign(__assign(__assign({}, (input.accessPointPolicy !== undefined &&
3155
- input.accessPointPolicy !== null && { accessPointPolicy: input.accessPointPolicy })), (input.networkOrigin !== undefined &&
3156
- input.networkOrigin !== null && {
3154
+ return __assign(__assign(__assign({}, (input.accessPointPolicy != null && { accessPointPolicy: input.accessPointPolicy })), (input.networkOrigin != null && {
3157
3155
  networkOrigin: serializeAws_restJson1NetworkOriginConfiguration(input.networkOrigin, context),
3158
- })), (input.publicAccessBlock !== undefined &&
3159
- input.publicAccessBlock !== null && {
3156
+ })), (input.publicAccessBlock != null && {
3160
3157
  publicAccessBlock: serializeAws_restJson1S3PublicAccessBlockConfiguration(input.publicAccessBlock, context),
3161
3158
  }));
3162
3159
  };
@@ -3171,8 +3168,7 @@ var serializeAws_restJson1S3AccessPointConfigurationsMap = function (input, cont
3171
3168
  }, {});
3172
3169
  };
3173
3170
  var serializeAws_restJson1S3BucketAclGrantConfiguration = function (input, context) {
3174
- return __assign(__assign({}, (input.grantee !== undefined &&
3175
- input.grantee !== null && { grantee: serializeAws_restJson1AclGrantee(input.grantee, context) })), (input.permission !== undefined && input.permission !== null && { permission: input.permission }));
3171
+ return __assign(__assign({}, (input.grantee != null && { grantee: serializeAws_restJson1AclGrantee(input.grantee, context) })), (input.permission != null && { permission: input.permission }));
3176
3172
  };
3177
3173
  var serializeAws_restJson1S3BucketAclGrantConfigurationsList = function (input, context) {
3178
3174
  return input
@@ -3185,30 +3181,25 @@ var serializeAws_restJson1S3BucketAclGrantConfigurationsList = function (input,
3185
3181
  });
3186
3182
  };
3187
3183
  var serializeAws_restJson1S3BucketConfiguration = function (input, context) {
3188
- return __assign(__assign(__assign(__assign({}, (input.accessPoints !== undefined &&
3189
- input.accessPoints !== null && {
3184
+ return __assign(__assign(__assign(__assign({}, (input.accessPoints != null && {
3190
3185
  accessPoints: serializeAws_restJson1S3AccessPointConfigurationsMap(input.accessPoints, context),
3191
- })), (input.bucketAclGrants !== undefined &&
3192
- input.bucketAclGrants !== null && {
3186
+ })), (input.bucketAclGrants != null && {
3193
3187
  bucketAclGrants: serializeAws_restJson1S3BucketAclGrantConfigurationsList(input.bucketAclGrants, context),
3194
- })), (input.bucketPolicy !== undefined && input.bucketPolicy !== null && { bucketPolicy: input.bucketPolicy })), (input.bucketPublicAccessBlock !== undefined &&
3195
- input.bucketPublicAccessBlock !== null && {
3188
+ })), (input.bucketPolicy != null && { bucketPolicy: input.bucketPolicy })), (input.bucketPublicAccessBlock != null && {
3196
3189
  bucketPublicAccessBlock: serializeAws_restJson1S3PublicAccessBlockConfiguration(input.bucketPublicAccessBlock, context),
3197
3190
  }));
3198
3191
  };
3199
3192
  var serializeAws_restJson1S3PublicAccessBlockConfiguration = function (input, context) {
3200
- return __assign(__assign({}, (input.ignorePublicAcls !== undefined &&
3201
- input.ignorePublicAcls !== null && { ignorePublicAcls: input.ignorePublicAcls })), (input.restrictPublicBuckets !== undefined &&
3202
- input.restrictPublicBuckets !== null && { restrictPublicBuckets: input.restrictPublicBuckets }));
3193
+ return __assign(__assign({}, (input.ignorePublicAcls != null && { ignorePublicAcls: input.ignorePublicAcls })), (input.restrictPublicBuckets != null && { restrictPublicBuckets: input.restrictPublicBuckets }));
3203
3194
  };
3204
3195
  var serializeAws_restJson1SecretsManagerSecretConfiguration = function (input, context) {
3205
- return __assign(__assign({}, (input.kmsKeyId !== undefined && input.kmsKeyId !== null && { kmsKeyId: input.kmsKeyId })), (input.secretPolicy !== undefined && input.secretPolicy !== null && { secretPolicy: input.secretPolicy }));
3196
+ return __assign(__assign({}, (input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId })), (input.secretPolicy != null && { secretPolicy: input.secretPolicy }));
3206
3197
  };
3207
3198
  var serializeAws_restJson1SortCriteria = function (input, context) {
3208
- return __assign(__assign({}, (input.attributeName !== undefined && input.attributeName !== null && { attributeName: input.attributeName })), (input.orderBy !== undefined && input.orderBy !== null && { orderBy: input.orderBy }));
3199
+ return __assign(__assign({}, (input.attributeName != null && { attributeName: input.attributeName })), (input.orderBy != null && { orderBy: input.orderBy }));
3209
3200
  };
3210
3201
  var serializeAws_restJson1SqsQueueConfiguration = function (input, context) {
3211
- return __assign({}, (input.queuePolicy !== undefined && input.queuePolicy !== null && { queuePolicy: input.queuePolicy }));
3202
+ return __assign({}, (input.queuePolicy != null && { queuePolicy: input.queuePolicy }));
3212
3203
  };
3213
3204
  var serializeAws_restJson1TagsMap = function (input, context) {
3214
3205
  return Object.entries(input).reduce(function (acc, _a) {
@@ -3221,8 +3212,7 @@ var serializeAws_restJson1TagsMap = function (input, context) {
3221
3212
  }, {});
3222
3213
  };
3223
3214
  var serializeAws_restJson1Trail = function (input, context) {
3224
- return __assign(__assign(__assign({}, (input.allRegions !== undefined && input.allRegions !== null && { allRegions: input.allRegions })), (input.cloudTrailArn !== undefined && input.cloudTrailArn !== null && { cloudTrailArn: input.cloudTrailArn })), (input.regions !== undefined &&
3225
- input.regions !== null && { regions: serializeAws_restJson1RegionList(input.regions, context) }));
3215
+ return __assign(__assign(__assign({}, (input.allRegions != null && { allRegions: input.allRegions })), (input.cloudTrailArn != null && { cloudTrailArn: input.cloudTrailArn })), (input.regions != null && { regions: serializeAws_restJson1RegionList(input.regions, context) }));
3226
3216
  };
3227
3217
  var serializeAws_restJson1TrailList = function (input, context) {
3228
3218
  return input
@@ -3245,50 +3235,38 @@ var serializeAws_restJson1ValueList = function (input, context) {
3245
3235
  });
3246
3236
  };
3247
3237
  var serializeAws_restJson1VpcConfiguration = function (input, context) {
3248
- return __assign({}, (input.vpcId !== undefined && input.vpcId !== null && { vpcId: input.vpcId }));
3238
+ return __assign({}, (input.vpcId != null && { vpcId: input.vpcId }));
3249
3239
  };
3250
3240
  var deserializeAws_restJson1AccessPreview = function (output, context) {
3251
3241
  return {
3252
3242
  analyzerArn: __expectString(output.analyzerArn),
3253
- configurations: output.configurations !== undefined && output.configurations !== null
3243
+ configurations: output.configurations != null
3254
3244
  ? deserializeAws_restJson1ConfigurationsMap(output.configurations, context)
3255
3245
  : undefined,
3256
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3257
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3258
- : undefined,
3246
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3259
3247
  id: __expectString(output.id),
3260
3248
  status: __expectString(output.status),
3261
- statusReason: output.statusReason !== undefined && output.statusReason !== null
3249
+ statusReason: output.statusReason != null
3262
3250
  ? deserializeAws_restJson1AccessPreviewStatusReason(output.statusReason, context)
3263
3251
  : undefined,
3264
3252
  };
3265
3253
  };
3266
3254
  var deserializeAws_restJson1AccessPreviewFinding = function (output, context) {
3267
3255
  return {
3268
- action: output.action !== undefined && output.action !== null
3269
- ? deserializeAws_restJson1ActionList(output.action, context)
3270
- : undefined,
3256
+ action: output.action != null ? deserializeAws_restJson1ActionList(output.action, context) : undefined,
3271
3257
  changeType: __expectString(output.changeType),
3272
- condition: output.condition !== undefined && output.condition !== null
3273
- ? deserializeAws_restJson1ConditionKeyMap(output.condition, context)
3274
- : undefined,
3275
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3276
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3277
- : undefined,
3258
+ condition: output.condition != null ? deserializeAws_restJson1ConditionKeyMap(output.condition, context) : undefined,
3259
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3278
3260
  error: __expectString(output.error),
3279
3261
  existingFindingId: __expectString(output.existingFindingId),
3280
3262
  existingFindingStatus: __expectString(output.existingFindingStatus),
3281
3263
  id: __expectString(output.id),
3282
3264
  isPublic: __expectBoolean(output.isPublic),
3283
- principal: output.principal !== undefined && output.principal !== null
3284
- ? deserializeAws_restJson1PrincipalMap(output.principal, context)
3285
- : undefined,
3265
+ principal: output.principal != null ? deserializeAws_restJson1PrincipalMap(output.principal, context) : undefined,
3286
3266
  resource: __expectString(output.resource),
3287
3267
  resourceOwnerAccount: __expectString(output.resourceOwnerAccount),
3288
3268
  resourceType: __expectString(output.resourceType),
3289
- sources: output.sources !== undefined && output.sources !== null
3290
- ? deserializeAws_restJson1FindingSourceList(output.sources, context)
3291
- : undefined,
3269
+ sources: output.sources != null ? deserializeAws_restJson1FindingSourceList(output.sources, context) : undefined,
3292
3270
  status: __expectString(output.status),
3293
3271
  };
3294
3272
  };
@@ -3322,12 +3300,10 @@ var deserializeAws_restJson1AccessPreviewStatusReason = function (output, contex
3322
3300
  var deserializeAws_restJson1AccessPreviewSummary = function (output, context) {
3323
3301
  return {
3324
3302
  analyzerArn: __expectString(output.analyzerArn),
3325
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3326
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3327
- : undefined,
3303
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3328
3304
  id: __expectString(output.id),
3329
3305
  status: __expectString(output.status),
3330
- statusReason: output.statusReason !== undefined && output.statusReason !== null
3306
+ statusReason: output.statusReason != null
3331
3307
  ? deserializeAws_restJson1AccessPreviewStatusReason(output.statusReason, context)
3332
3308
  : undefined,
3333
3309
  };
@@ -3354,27 +3330,17 @@ var deserializeAws_restJson1ActionList = function (output, context) {
3354
3330
  };
3355
3331
  var deserializeAws_restJson1AnalyzedResource = function (output, context) {
3356
3332
  return {
3357
- actions: output.actions !== undefined && output.actions !== null
3358
- ? deserializeAws_restJson1ActionList(output.actions, context)
3359
- : undefined,
3360
- analyzedAt: output.analyzedAt !== undefined && output.analyzedAt !== null
3361
- ? __expectNonNull(__parseRfc3339DateTime(output.analyzedAt))
3362
- : undefined,
3363
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3364
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3365
- : undefined,
3333
+ actions: output.actions != null ? deserializeAws_restJson1ActionList(output.actions, context) : undefined,
3334
+ analyzedAt: output.analyzedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.analyzedAt)) : undefined,
3335
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3366
3336
  error: __expectString(output.error),
3367
3337
  isPublic: __expectBoolean(output.isPublic),
3368
3338
  resourceArn: __expectString(output.resourceArn),
3369
3339
  resourceOwnerAccount: __expectString(output.resourceOwnerAccount),
3370
3340
  resourceType: __expectString(output.resourceType),
3371
- sharedVia: output.sharedVia !== undefined && output.sharedVia !== null
3372
- ? deserializeAws_restJson1SharedViaList(output.sharedVia, context)
3373
- : undefined,
3341
+ sharedVia: output.sharedVia != null ? deserializeAws_restJson1SharedViaList(output.sharedVia, context) : undefined,
3374
3342
  status: __expectString(output.status),
3375
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
3376
- ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt))
3377
- : undefined,
3343
+ updatedAt: output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt)) : undefined,
3378
3344
  };
3379
3345
  };
3380
3346
  var deserializeAws_restJson1AnalyzedResourcesList = function (output, context) {
@@ -3409,21 +3375,15 @@ var deserializeAws_restJson1AnalyzersList = function (output, context) {
3409
3375
  var deserializeAws_restJson1AnalyzerSummary = function (output, context) {
3410
3376
  return {
3411
3377
  arn: __expectString(output.arn),
3412
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3413
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3414
- : undefined,
3378
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3415
3379
  lastResourceAnalyzed: __expectString(output.lastResourceAnalyzed),
3416
- lastResourceAnalyzedAt: output.lastResourceAnalyzedAt !== undefined && output.lastResourceAnalyzedAt !== null
3380
+ lastResourceAnalyzedAt: output.lastResourceAnalyzedAt != null
3417
3381
  ? __expectNonNull(__parseRfc3339DateTime(output.lastResourceAnalyzedAt))
3418
3382
  : undefined,
3419
3383
  name: __expectString(output.name),
3420
3384
  status: __expectString(output.status),
3421
- statusReason: output.statusReason !== undefined && output.statusReason !== null
3422
- ? deserializeAws_restJson1StatusReason(output.statusReason, context)
3423
- : undefined,
3424
- tags: output.tags !== undefined && output.tags !== null
3425
- ? deserializeAws_restJson1TagsMap(output.tags, context)
3426
- : undefined,
3385
+ statusReason: output.statusReason != null ? deserializeAws_restJson1StatusReason(output.statusReason, context) : undefined,
3386
+ tags: output.tags != null ? deserializeAws_restJson1TagsMap(output.tags, context) : undefined,
3427
3387
  type: __expectString(output.type),
3428
3388
  };
3429
3389
  };
@@ -3440,27 +3400,17 @@ var deserializeAws_restJson1ArchiveRulesList = function (output, context) {
3440
3400
  };
3441
3401
  var deserializeAws_restJson1ArchiveRuleSummary = function (output, context) {
3442
3402
  return {
3443
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3444
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3445
- : undefined,
3446
- filter: output.filter !== undefined && output.filter !== null
3447
- ? deserializeAws_restJson1FilterCriteriaMap(output.filter, context)
3448
- : undefined,
3403
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3404
+ filter: output.filter != null ? deserializeAws_restJson1FilterCriteriaMap(output.filter, context) : undefined,
3449
3405
  ruleName: __expectString(output.ruleName),
3450
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
3451
- ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt))
3452
- : undefined,
3406
+ updatedAt: output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt)) : undefined,
3453
3407
  };
3454
3408
  };
3455
3409
  var deserializeAws_restJson1CloudTrailProperties = function (output, context) {
3456
3410
  return {
3457
- endTime: output.endTime !== undefined && output.endTime !== null
3458
- ? __expectNonNull(__parseRfc3339DateTime(output.endTime))
3459
- : undefined,
3460
- startTime: output.startTime !== undefined && output.startTime !== null
3461
- ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3462
- : undefined,
3463
- trailProperties: output.trailProperties !== undefined && output.trailProperties !== null
3411
+ endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTime(output.endTime)) : undefined,
3412
+ startTime: output.startTime != null ? __expectNonNull(__parseRfc3339DateTime(output.startTime)) : undefined,
3413
+ trailProperties: output.trailProperties != null
3464
3414
  ? deserializeAws_restJson1TrailPropertiesList(output.trailProperties, context)
3465
3415
  : undefined,
3466
3416
  };
@@ -3515,14 +3465,10 @@ var deserializeAws_restJson1ConfigurationsMap = function (output, context) {
3515
3465
  };
3516
3466
  var deserializeAws_restJson1Criterion = function (output, context) {
3517
3467
  return {
3518
- contains: output.contains !== undefined && output.contains !== null
3519
- ? deserializeAws_restJson1ValueList(output.contains, context)
3520
- : undefined,
3521
- eq: output.eq !== undefined && output.eq !== null ? deserializeAws_restJson1ValueList(output.eq, context) : undefined,
3468
+ contains: output.contains != null ? deserializeAws_restJson1ValueList(output.contains, context) : undefined,
3469
+ eq: output.eq != null ? deserializeAws_restJson1ValueList(output.eq, context) : undefined,
3522
3470
  exists: __expectBoolean(output.exists),
3523
- neq: output.neq !== undefined && output.neq !== null
3524
- ? deserializeAws_restJson1ValueList(output.neq, context)
3525
- : undefined,
3471
+ neq: output.neq != null ? deserializeAws_restJson1ValueList(output.neq, context) : undefined,
3526
3472
  };
3527
3473
  };
3528
3474
  var deserializeAws_restJson1FilterCriteriaMap = function (output, context) {
@@ -3537,34 +3483,20 @@ var deserializeAws_restJson1FilterCriteriaMap = function (output, context) {
3537
3483
  };
3538
3484
  var deserializeAws_restJson1Finding = function (output, context) {
3539
3485
  return {
3540
- action: output.action !== undefined && output.action !== null
3541
- ? deserializeAws_restJson1ActionList(output.action, context)
3542
- : undefined,
3543
- analyzedAt: output.analyzedAt !== undefined && output.analyzedAt !== null
3544
- ? __expectNonNull(__parseRfc3339DateTime(output.analyzedAt))
3545
- : undefined,
3546
- condition: output.condition !== undefined && output.condition !== null
3547
- ? deserializeAws_restJson1ConditionKeyMap(output.condition, context)
3548
- : undefined,
3549
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3550
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3551
- : undefined,
3486
+ action: output.action != null ? deserializeAws_restJson1ActionList(output.action, context) : undefined,
3487
+ analyzedAt: output.analyzedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.analyzedAt)) : undefined,
3488
+ condition: output.condition != null ? deserializeAws_restJson1ConditionKeyMap(output.condition, context) : undefined,
3489
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3552
3490
  error: __expectString(output.error),
3553
3491
  id: __expectString(output.id),
3554
3492
  isPublic: __expectBoolean(output.isPublic),
3555
- principal: output.principal !== undefined && output.principal !== null
3556
- ? deserializeAws_restJson1PrincipalMap(output.principal, context)
3557
- : undefined,
3493
+ principal: output.principal != null ? deserializeAws_restJson1PrincipalMap(output.principal, context) : undefined,
3558
3494
  resource: __expectString(output.resource),
3559
3495
  resourceOwnerAccount: __expectString(output.resourceOwnerAccount),
3560
3496
  resourceType: __expectString(output.resourceType),
3561
- sources: output.sources !== undefined && output.sources !== null
3562
- ? deserializeAws_restJson1FindingSourceList(output.sources, context)
3563
- : undefined,
3497
+ sources: output.sources != null ? deserializeAws_restJson1FindingSourceList(output.sources, context) : undefined,
3564
3498
  status: __expectString(output.status),
3565
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
3566
- ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt))
3567
- : undefined,
3499
+ updatedAt: output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt)) : undefined,
3568
3500
  };
3569
3501
  };
3570
3502
  var deserializeAws_restJson1FindingsList = function (output, context) {
@@ -3580,9 +3512,7 @@ var deserializeAws_restJson1FindingsList = function (output, context) {
3580
3512
  };
3581
3513
  var deserializeAws_restJson1FindingSource = function (output, context) {
3582
3514
  return {
3583
- detail: output.detail !== undefined && output.detail !== null
3584
- ? deserializeAws_restJson1FindingSourceDetail(output.detail, context)
3585
- : undefined,
3515
+ detail: output.detail != null ? deserializeAws_restJson1FindingSourceDetail(output.detail, context) : undefined,
3586
3516
  type: __expectString(output.type),
3587
3517
  };
3588
3518
  };
@@ -3604,34 +3534,20 @@ var deserializeAws_restJson1FindingSourceList = function (output, context) {
3604
3534
  };
3605
3535
  var deserializeAws_restJson1FindingSummary = function (output, context) {
3606
3536
  return {
3607
- action: output.action !== undefined && output.action !== null
3608
- ? deserializeAws_restJson1ActionList(output.action, context)
3609
- : undefined,
3610
- analyzedAt: output.analyzedAt !== undefined && output.analyzedAt !== null
3611
- ? __expectNonNull(__parseRfc3339DateTime(output.analyzedAt))
3612
- : undefined,
3613
- condition: output.condition !== undefined && output.condition !== null
3614
- ? deserializeAws_restJson1ConditionKeyMap(output.condition, context)
3615
- : undefined,
3616
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3617
- ? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
3618
- : undefined,
3537
+ action: output.action != null ? deserializeAws_restJson1ActionList(output.action, context) : undefined,
3538
+ analyzedAt: output.analyzedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.analyzedAt)) : undefined,
3539
+ condition: output.condition != null ? deserializeAws_restJson1ConditionKeyMap(output.condition, context) : undefined,
3540
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
3619
3541
  error: __expectString(output.error),
3620
3542
  id: __expectString(output.id),
3621
3543
  isPublic: __expectBoolean(output.isPublic),
3622
- principal: output.principal !== undefined && output.principal !== null
3623
- ? deserializeAws_restJson1PrincipalMap(output.principal, context)
3624
- : undefined,
3544
+ principal: output.principal != null ? deserializeAws_restJson1PrincipalMap(output.principal, context) : undefined,
3625
3545
  resource: __expectString(output.resource),
3626
3546
  resourceOwnerAccount: __expectString(output.resourceOwnerAccount),
3627
3547
  resourceType: __expectString(output.resourceType),
3628
- sources: output.sources !== undefined && output.sources !== null
3629
- ? deserializeAws_restJson1FindingSourceList(output.sources, context)
3630
- : undefined,
3548
+ sources: output.sources != null ? deserializeAws_restJson1FindingSourceList(output.sources, context) : undefined,
3631
3549
  status: __expectString(output.status),
3632
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
3633
- ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt))
3634
- : undefined,
3550
+ updatedAt: output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTime(output.updatedAt)) : undefined,
3635
3551
  };
3636
3552
  };
3637
3553
  var deserializeAws_restJson1GeneratedPolicy = function (output, context) {
@@ -3652,7 +3568,7 @@ var deserializeAws_restJson1GeneratedPolicyList = function (output, context) {
3652
3568
  };
3653
3569
  var deserializeAws_restJson1GeneratedPolicyProperties = function (output, context) {
3654
3570
  return {
3655
- cloudTrailProperties: output.cloudTrailProperties !== undefined && output.cloudTrailProperties !== null
3571
+ cloudTrailProperties: output.cloudTrailProperties != null
3656
3572
  ? deserializeAws_restJson1CloudTrailProperties(output.cloudTrailProperties, context)
3657
3573
  : undefined,
3658
3574
  isComplete: __expectBoolean(output.isComplete),
@@ -3661,10 +3577,10 @@ var deserializeAws_restJson1GeneratedPolicyProperties = function (output, contex
3661
3577
  };
3662
3578
  var deserializeAws_restJson1GeneratedPolicyResult = function (output, context) {
3663
3579
  return {
3664
- generatedPolicies: output.generatedPolicies !== undefined && output.generatedPolicies !== null
3580
+ generatedPolicies: output.generatedPolicies != null
3665
3581
  ? deserializeAws_restJson1GeneratedPolicyList(output.generatedPolicies, context)
3666
3582
  : undefined,
3667
- properties: output.properties !== undefined && output.properties !== null
3583
+ properties: output.properties != null
3668
3584
  ? deserializeAws_restJson1GeneratedPolicyProperties(output.properties, context)
3669
3585
  : undefined,
3670
3586
  };
@@ -3679,16 +3595,10 @@ var deserializeAws_restJson1InternetConfiguration = function (output, context) {
3679
3595
  };
3680
3596
  var deserializeAws_restJson1JobDetails = function (output, context) {
3681
3597
  return {
3682
- completedOn: output.completedOn !== undefined && output.completedOn !== null
3683
- ? __expectNonNull(__parseRfc3339DateTime(output.completedOn))
3684
- : undefined,
3685
- jobError: output.jobError !== undefined && output.jobError !== null
3686
- ? deserializeAws_restJson1JobError(output.jobError, context)
3687
- : undefined,
3598
+ completedOn: output.completedOn != null ? __expectNonNull(__parseRfc3339DateTime(output.completedOn)) : undefined,
3599
+ jobError: output.jobError != null ? deserializeAws_restJson1JobError(output.jobError, context) : undefined,
3688
3600
  jobId: __expectString(output.jobId),
3689
- startedOn: output.startedOn !== undefined && output.startedOn !== null
3690
- ? __expectNonNull(__parseRfc3339DateTime(output.startedOn))
3691
- : undefined,
3601
+ startedOn: output.startedOn != null ? __expectNonNull(__parseRfc3339DateTime(output.startedOn)) : undefined,
3692
3602
  status: __expectString(output.status),
3693
3603
  };
3694
3604
  };
@@ -3710,12 +3620,10 @@ var deserializeAws_restJson1KmsConstraintsMap = function (output, context) {
3710
3620
  };
3711
3621
  var deserializeAws_restJson1KmsGrantConfiguration = function (output, context) {
3712
3622
  return {
3713
- constraints: output.constraints !== undefined && output.constraints !== null
3714
- ? deserializeAws_restJson1KmsGrantConstraints(output.constraints, context)
3715
- : undefined,
3623
+ constraints: output.constraints != null ? deserializeAws_restJson1KmsGrantConstraints(output.constraints, context) : undefined,
3716
3624
  granteePrincipal: __expectString(output.granteePrincipal),
3717
3625
  issuingAccount: __expectString(output.issuingAccount),
3718
- operations: output.operations !== undefined && output.operations !== null
3626
+ operations: output.operations != null
3719
3627
  ? deserializeAws_restJson1KmsGrantOperationsList(output.operations, context)
3720
3628
  : undefined,
3721
3629
  retiringPrincipal: __expectString(output.retiringPrincipal),
@@ -3734,10 +3642,10 @@ var deserializeAws_restJson1KmsGrantConfigurationsList = function (output, conte
3734
3642
  };
3735
3643
  var deserializeAws_restJson1KmsGrantConstraints = function (output, context) {
3736
3644
  return {
3737
- encryptionContextEquals: output.encryptionContextEquals !== undefined && output.encryptionContextEquals !== null
3645
+ encryptionContextEquals: output.encryptionContextEquals != null
3738
3646
  ? deserializeAws_restJson1KmsConstraintsMap(output.encryptionContextEquals, context)
3739
3647
  : undefined,
3740
- encryptionContextSubset: output.encryptionContextSubset !== undefined && output.encryptionContextSubset !== null
3648
+ encryptionContextSubset: output.encryptionContextSubset != null
3741
3649
  ? deserializeAws_restJson1KmsConstraintsMap(output.encryptionContextSubset, context)
3742
3650
  : undefined,
3743
3651
  };
@@ -3755,12 +3663,8 @@ var deserializeAws_restJson1KmsGrantOperationsList = function (output, context)
3755
3663
  };
3756
3664
  var deserializeAws_restJson1KmsKeyConfiguration = function (output, context) {
3757
3665
  return {
3758
- grants: output.grants !== undefined && output.grants !== null
3759
- ? deserializeAws_restJson1KmsGrantConfigurationsList(output.grants, context)
3760
- : undefined,
3761
- keyPolicies: output.keyPolicies !== undefined && output.keyPolicies !== null
3762
- ? deserializeAws_restJson1KmsKeyPoliciesMap(output.keyPolicies, context)
3763
- : undefined,
3666
+ grants: output.grants != null ? deserializeAws_restJson1KmsGrantConfigurationsList(output.grants, context) : undefined,
3667
+ keyPolicies: output.keyPolicies != null ? deserializeAws_restJson1KmsKeyPoliciesMap(output.keyPolicies, context) : undefined,
3764
3668
  };
3765
3669
  };
3766
3670
  var deserializeAws_restJson1KmsKeyPoliciesMap = function (output, context) {
@@ -3775,12 +3679,8 @@ var deserializeAws_restJson1KmsKeyPoliciesMap = function (output, context) {
3775
3679
  };
3776
3680
  var deserializeAws_restJson1Location = function (output, context) {
3777
3681
  return {
3778
- path: output.path !== undefined && output.path !== null
3779
- ? deserializeAws_restJson1PathElementList(output.path, context)
3780
- : undefined,
3781
- span: output.span !== undefined && output.span !== null
3782
- ? deserializeAws_restJson1Span(output.span, context)
3783
- : undefined,
3682
+ path: output.path != null ? deserializeAws_restJson1PathElementList(output.path, context) : undefined,
3683
+ span: output.span != null ? deserializeAws_restJson1Span(output.span, context) : undefined,
3784
3684
  };
3785
3685
  };
3786
3686
  var deserializeAws_restJson1LocationList = function (output, context) {
@@ -3837,14 +3737,10 @@ var deserializeAws_restJson1PathElementList = function (output, context) {
3837
3737
  };
3838
3738
  var deserializeAws_restJson1PolicyGeneration = function (output, context) {
3839
3739
  return {
3840
- completedOn: output.completedOn !== undefined && output.completedOn !== null
3841
- ? __expectNonNull(__parseRfc3339DateTime(output.completedOn))
3842
- : undefined,
3740
+ completedOn: output.completedOn != null ? __expectNonNull(__parseRfc3339DateTime(output.completedOn)) : undefined,
3843
3741
  jobId: __expectString(output.jobId),
3844
3742
  principalArn: __expectString(output.principalArn),
3845
- startedOn: output.startedOn !== undefined && output.startedOn !== null
3846
- ? __expectNonNull(__parseRfc3339DateTime(output.startedOn))
3847
- : undefined,
3743
+ startedOn: output.startedOn != null ? __expectNonNull(__parseRfc3339DateTime(output.startedOn)) : undefined,
3848
3744
  status: __expectString(output.status),
3849
3745
  };
3850
3746
  };
@@ -3890,10 +3786,10 @@ var deserializeAws_restJson1RegionList = function (output, context) {
3890
3786
  var deserializeAws_restJson1S3AccessPointConfiguration = function (output, context) {
3891
3787
  return {
3892
3788
  accessPointPolicy: __expectString(output.accessPointPolicy),
3893
- networkOrigin: output.networkOrigin !== undefined && output.networkOrigin !== null
3789
+ networkOrigin: output.networkOrigin != null
3894
3790
  ? deserializeAws_restJson1NetworkOriginConfiguration(__expectUnion(output.networkOrigin), context)
3895
3791
  : undefined,
3896
- publicAccessBlock: output.publicAccessBlock !== undefined && output.publicAccessBlock !== null
3792
+ publicAccessBlock: output.publicAccessBlock != null
3897
3793
  ? deserializeAws_restJson1S3PublicAccessBlockConfiguration(output.publicAccessBlock, context)
3898
3794
  : undefined,
3899
3795
  };
@@ -3910,9 +3806,7 @@ var deserializeAws_restJson1S3AccessPointConfigurationsMap = function (output, c
3910
3806
  };
3911
3807
  var deserializeAws_restJson1S3BucketAclGrantConfiguration = function (output, context) {
3912
3808
  return {
3913
- grantee: output.grantee !== undefined && output.grantee !== null
3914
- ? deserializeAws_restJson1AclGrantee(__expectUnion(output.grantee), context)
3915
- : undefined,
3809
+ grantee: output.grantee != null ? deserializeAws_restJson1AclGrantee(__expectUnion(output.grantee), context) : undefined,
3916
3810
  permission: __expectString(output.permission),
3917
3811
  };
3918
3812
  };
@@ -3929,14 +3823,14 @@ var deserializeAws_restJson1S3BucketAclGrantConfigurationsList = function (outpu
3929
3823
  };
3930
3824
  var deserializeAws_restJson1S3BucketConfiguration = function (output, context) {
3931
3825
  return {
3932
- accessPoints: output.accessPoints !== undefined && output.accessPoints !== null
3826
+ accessPoints: output.accessPoints != null
3933
3827
  ? deserializeAws_restJson1S3AccessPointConfigurationsMap(output.accessPoints, context)
3934
3828
  : undefined,
3935
- bucketAclGrants: output.bucketAclGrants !== undefined && output.bucketAclGrants !== null
3829
+ bucketAclGrants: output.bucketAclGrants != null
3936
3830
  ? deserializeAws_restJson1S3BucketAclGrantConfigurationsList(output.bucketAclGrants, context)
3937
3831
  : undefined,
3938
3832
  bucketPolicy: __expectString(output.bucketPolicy),
3939
- bucketPublicAccessBlock: output.bucketPublicAccessBlock !== undefined && output.bucketPublicAccessBlock !== null
3833
+ bucketPublicAccessBlock: output.bucketPublicAccessBlock != null
3940
3834
  ? deserializeAws_restJson1S3PublicAccessBlockConfiguration(output.bucketPublicAccessBlock, context)
3941
3835
  : undefined,
3942
3836
  };
@@ -3966,12 +3860,8 @@ var deserializeAws_restJson1SharedViaList = function (output, context) {
3966
3860
  };
3967
3861
  var deserializeAws_restJson1Span = function (output, context) {
3968
3862
  return {
3969
- end: output.end !== undefined && output.end !== null
3970
- ? deserializeAws_restJson1Position(output.end, context)
3971
- : undefined,
3972
- start: output.start !== undefined && output.start !== null
3973
- ? deserializeAws_restJson1Position(output.start, context)
3974
- : undefined,
3863
+ end: output.end != null ? deserializeAws_restJson1Position(output.end, context) : undefined,
3864
+ start: output.start != null ? deserializeAws_restJson1Position(output.start, context) : undefined,
3975
3865
  };
3976
3866
  };
3977
3867
  var deserializeAws_restJson1SqsQueueConfiguration = function (output, context) {
@@ -4004,9 +3894,7 @@ var deserializeAws_restJson1TrailProperties = function (output, context) {
4004
3894
  return {
4005
3895
  allRegions: __expectBoolean(output.allRegions),
4006
3896
  cloudTrailArn: __expectString(output.cloudTrailArn),
4007
- regions: output.regions !== undefined && output.regions !== null
4008
- ? deserializeAws_restJson1RegionList(output.regions, context)
4009
- : undefined,
3897
+ regions: output.regions != null ? deserializeAws_restJson1RegionList(output.regions, context) : undefined,
4010
3898
  };
4011
3899
  };
4012
3900
  var deserializeAws_restJson1TrailPropertiesList = function (output, context) {
@@ -4026,9 +3914,7 @@ var deserializeAws_restJson1ValidatePolicyFinding = function (output, context) {
4026
3914
  findingType: __expectString(output.findingType),
4027
3915
  issueCode: __expectString(output.issueCode),
4028
3916
  learnMoreLink: __expectString(output.learnMoreLink),
4029
- locations: output.locations !== undefined && output.locations !== null
4030
- ? deserializeAws_restJson1LocationList(output.locations, context)
4031
- : undefined,
3917
+ locations: output.locations != null ? deserializeAws_restJson1LocationList(output.locations, context) : undefined,
4032
3918
  };
4033
3919
  };
4034
3920
  var deserializeAws_restJson1ValidatePolicyFindingList = function (output, context) {
@@ -4131,5 +4017,4 @@ var loadRestJsonErrorCode = function (output, data) {
4131
4017
  if (data["__type"] !== undefined) {
4132
4018
  return sanitizeErrorCode(data["__type"]);
4133
4019
  }
4134
- return "";
4135
4020
  };