@aws-sdk/client-accessanalyzer 3.118.0 → 3.127.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,9 +16,9 @@ const serializeAws_restJson1ApplyArchiveRuleCommand = async (input, context) =>
16
16
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/archive-rule";
17
17
  let body;
18
18
  body = JSON.stringify({
19
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
19
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
20
20
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
21
- ...(input.ruleName !== undefined && input.ruleName !== null && { ruleName: input.ruleName }),
21
+ ...(input.ruleName != null && { ruleName: input.ruleName }),
22
22
  });
23
23
  return new protocol_http_1.HttpRequest({
24
24
  protocol,
@@ -66,10 +66,9 @@ const serializeAws_restJson1CreateAccessPreviewCommand = async (input, context)
66
66
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/access-preview";
67
67
  let body;
68
68
  body = JSON.stringify({
69
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
69
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
70
70
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
71
- ...(input.configurations !== undefined &&
72
- input.configurations !== null && {
71
+ ...(input.configurations != null && {
73
72
  configurations: serializeAws_restJson1ConfigurationsMap(input.configurations, context),
74
73
  }),
75
74
  });
@@ -93,15 +92,13 @@ const serializeAws_restJson1CreateAnalyzerCommand = async (input, context) => {
93
92
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer";
94
93
  let body;
95
94
  body = JSON.stringify({
96
- ...(input.analyzerName !== undefined && input.analyzerName !== null && { analyzerName: input.analyzerName }),
97
- ...(input.archiveRules !== undefined &&
98
- input.archiveRules !== null && {
95
+ ...(input.analyzerName != null && { analyzerName: input.analyzerName }),
96
+ ...(input.archiveRules != null && {
99
97
  archiveRules: serializeAws_restJson1InlineArchiveRulesList(input.archiveRules, context),
100
98
  }),
101
99
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
102
- ...(input.tags !== undefined &&
103
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
104
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
100
+ ...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
101
+ ...(input.type != null && { type: input.type }),
105
102
  });
106
103
  return new protocol_http_1.HttpRequest({
107
104
  protocol,
@@ -134,9 +131,8 @@ const serializeAws_restJson1CreateArchiveRuleCommand = async (input, context) =>
134
131
  let body;
135
132
  body = JSON.stringify({
136
133
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
137
- ...(input.filter !== undefined &&
138
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
139
- ...(input.ruleName !== undefined && input.ruleName !== null && { ruleName: input.ruleName }),
134
+ ...(input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
135
+ ...(input.ruleName != null && { ruleName: input.ruleName }),
140
136
  });
141
137
  return new protocol_http_1.HttpRequest({
142
138
  protocol,
@@ -417,11 +413,10 @@ const serializeAws_restJson1ListAccessPreviewFindingsCommand = async (input, con
417
413
  }
418
414
  let body;
419
415
  body = JSON.stringify({
420
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
421
- ...(input.filter !== undefined &&
422
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
423
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
424
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
416
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
417
+ ...(input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
418
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
419
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
425
420
  });
426
421
  return new protocol_http_1.HttpRequest({
427
422
  protocol,
@@ -464,10 +459,10 @@ const serializeAws_restJson1ListAnalyzedResourcesCommand = async (input, context
464
459
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/analyzed-resource";
465
460
  let body;
466
461
  body = JSON.stringify({
467
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
468
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
469
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
470
- ...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
462
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
463
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
464
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
465
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
471
466
  });
472
467
  return new protocol_http_1.HttpRequest({
473
468
  protocol,
@@ -541,13 +536,11 @@ const serializeAws_restJson1ListFindingsCommand = async (input, context) => {
541
536
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/finding";
542
537
  let body;
543
538
  body = JSON.stringify({
544
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
545
- ...(input.filter !== undefined &&
546
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
547
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
548
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
549
- ...(input.sort !== undefined &&
550
- input.sort !== null && { sort: serializeAws_restJson1SortCriteria(input.sort, context) }),
539
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
540
+ ...(input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
541
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
542
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
543
+ ...(input.sort != null && { sort: serializeAws_restJson1SortCriteria(input.sort, context) }),
551
544
  });
552
545
  return new protocol_http_1.HttpRequest({
553
546
  protocol,
@@ -618,12 +611,10 @@ const serializeAws_restJson1StartPolicyGenerationCommand = async (input, context
618
611
  let body;
619
612
  body = JSON.stringify({
620
613
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
621
- ...(input.cloudTrailDetails !== undefined &&
622
- input.cloudTrailDetails !== null && {
614
+ ...(input.cloudTrailDetails != null && {
623
615
  cloudTrailDetails: serializeAws_restJson1CloudTrailDetails(input.cloudTrailDetails, context),
624
616
  }),
625
- ...(input.policyGenerationDetails !== undefined &&
626
- input.policyGenerationDetails !== null && {
617
+ ...(input.policyGenerationDetails != null && {
627
618
  policyGenerationDetails: serializeAws_restJson1PolicyGenerationDetails(input.policyGenerationDetails, context),
628
619
  }),
629
620
  });
@@ -646,8 +637,8 @@ const serializeAws_restJson1StartResourceScanCommand = async (input, context) =>
646
637
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/resource/scan";
647
638
  let body;
648
639
  body = JSON.stringify({
649
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
650
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
640
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
641
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
651
642
  });
652
643
  return new protocol_http_1.HttpRequest({
653
644
  protocol,
@@ -678,8 +669,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
678
669
  }
679
670
  let body;
680
671
  body = JSON.stringify({
681
- ...(input.tags !== undefined &&
682
- input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
672
+ ...(input.tags != null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
683
673
  });
684
674
  return new protocol_http_1.HttpRequest({
685
675
  protocol,
@@ -753,8 +743,7 @@ const serializeAws_restJson1UpdateArchiveRuleCommand = async (input, context) =>
753
743
  let body;
754
744
  body = JSON.stringify({
755
745
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
756
- ...(input.filter !== undefined &&
757
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
746
+ ...(input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
758
747
  });
759
748
  return new protocol_http_1.HttpRequest({
760
749
  protocol,
@@ -776,12 +765,11 @@ const serializeAws_restJson1UpdateFindingsCommand = async (input, context) => {
776
765
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/finding";
777
766
  let body;
778
767
  body = JSON.stringify({
779
- ...(input.analyzerArn !== undefined && input.analyzerArn !== null && { analyzerArn: input.analyzerArn }),
768
+ ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }),
780
769
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
781
- ...(input.ids !== undefined &&
782
- input.ids !== null && { ids: serializeAws_restJson1FindingIdList(input.ids, context) }),
783
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
784
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
770
+ ...(input.ids != null && { ids: serializeAws_restJson1FindingIdList(input.ids, context) }),
771
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
772
+ ...(input.status != null && { status: input.status }),
785
773
  });
786
774
  return new protocol_http_1.HttpRequest({
787
775
  protocol,
@@ -806,12 +794,10 @@ const serializeAws_restJson1ValidatePolicyCommand = async (input, context) => {
806
794
  };
807
795
  let body;
808
796
  body = JSON.stringify({
809
- ...(input.locale !== undefined && input.locale !== null && { locale: input.locale }),
810
- ...(input.policyDocument !== undefined &&
811
- input.policyDocument !== null && { policyDocument: input.policyDocument }),
812
- ...(input.policyType !== undefined && input.policyType !== null && { policyType: input.policyType }),
813
- ...(input.validatePolicyResourceType !== undefined &&
814
- input.validatePolicyResourceType !== null && { validatePolicyResourceType: input.validatePolicyResourceType }),
797
+ ...(input.locale != null && { locale: input.locale }),
798
+ ...(input.policyDocument != null && { policyDocument: input.policyDocument }),
799
+ ...(input.policyType != null && { policyType: input.policyType }),
800
+ ...(input.validatePolicyResourceType != null && { validatePolicyResourceType: input.validatePolicyResourceType }),
815
801
  });
816
802
  return new protocol_http_1.HttpRequest({
817
803
  protocol,
@@ -842,8 +828,7 @@ const deserializeAws_restJson1ApplyArchiveRuleCommandError = async (output, cont
842
828
  body: await parseBody(output.body, context),
843
829
  };
844
830
  let response;
845
- let errorCode = "UnknownError";
846
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
831
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
847
832
  switch (errorCode) {
848
833
  case "AccessDeniedException":
849
834
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -862,10 +847,12 @@ const deserializeAws_restJson1ApplyArchiveRuleCommandError = async (output, cont
862
847
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
863
848
  default:
864
849
  const parsedBody = parsedOutput.body;
850
+ const $metadata = deserializeMetadata(output);
851
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
865
852
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
866
- name: parsedBody.code || parsedBody.Code || errorCode,
853
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
867
854
  $fault: "client",
868
- $metadata: deserializeMetadata(output),
855
+ $metadata,
869
856
  });
870
857
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
871
858
  }
@@ -887,8 +874,7 @@ const deserializeAws_restJson1CancelPolicyGenerationCommandError = async (output
887
874
  body: await parseBody(output.body, context),
888
875
  };
889
876
  let response;
890
- let errorCode = "UnknownError";
891
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
877
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
892
878
  switch (errorCode) {
893
879
  case "AccessDeniedException":
894
880
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -904,10 +890,12 @@ const deserializeAws_restJson1CancelPolicyGenerationCommandError = async (output
904
890
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
905
891
  default:
906
892
  const parsedBody = parsedOutput.body;
893
+ const $metadata = deserializeMetadata(output);
894
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
907
895
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
908
- name: parsedBody.code || parsedBody.Code || errorCode,
896
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
909
897
  $fault: "client",
910
- $metadata: deserializeMetadata(output),
898
+ $metadata,
911
899
  });
912
900
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
913
901
  }
@@ -933,8 +921,7 @@ const deserializeAws_restJson1CreateAccessPreviewCommandError = async (output, c
933
921
  body: await parseBody(output.body, context),
934
922
  };
935
923
  let response;
936
- let errorCode = "UnknownError";
937
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
925
  switch (errorCode) {
939
926
  case "AccessDeniedException":
940
927
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -959,10 +946,12 @@ const deserializeAws_restJson1CreateAccessPreviewCommandError = async (output, c
959
946
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
960
947
  default:
961
948
  const parsedBody = parsedOutput.body;
949
+ const $metadata = deserializeMetadata(output);
950
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
962
951
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
963
- name: parsedBody.code || parsedBody.Code || errorCode,
952
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
964
953
  $fault: "client",
965
- $metadata: deserializeMetadata(output),
954
+ $metadata,
966
955
  });
967
956
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
968
957
  }
@@ -988,8 +977,7 @@ const deserializeAws_restJson1CreateAnalyzerCommandError = async (output, contex
988
977
  body: await parseBody(output.body, context),
989
978
  };
990
979
  let response;
991
- let errorCode = "UnknownError";
992
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
980
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
993
981
  switch (errorCode) {
994
982
  case "AccessDeniedException":
995
983
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1011,10 +999,12 @@ const deserializeAws_restJson1CreateAnalyzerCommandError = async (output, contex
1011
999
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1012
1000
  default:
1013
1001
  const parsedBody = parsedOutput.body;
1002
+ const $metadata = deserializeMetadata(output);
1003
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1014
1004
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1015
- name: parsedBody.code || parsedBody.Code || errorCode,
1005
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1016
1006
  $fault: "client",
1017
- $metadata: deserializeMetadata(output),
1007
+ $metadata,
1018
1008
  });
1019
1009
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1020
1010
  }
@@ -1036,8 +1026,7 @@ const deserializeAws_restJson1CreateArchiveRuleCommandError = async (output, con
1036
1026
  body: await parseBody(output.body, context),
1037
1027
  };
1038
1028
  let response;
1039
- let errorCode = "UnknownError";
1040
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1029
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1041
1030
  switch (errorCode) {
1042
1031
  case "AccessDeniedException":
1043
1032
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1062,10 +1051,12 @@ const deserializeAws_restJson1CreateArchiveRuleCommandError = async (output, con
1062
1051
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1063
1052
  default:
1064
1053
  const parsedBody = parsedOutput.body;
1054
+ const $metadata = deserializeMetadata(output);
1055
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1065
1056
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1066
- name: parsedBody.code || parsedBody.Code || errorCode,
1057
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1067
1058
  $fault: "client",
1068
- $metadata: deserializeMetadata(output),
1059
+ $metadata,
1069
1060
  });
1070
1061
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1071
1062
  }
@@ -1087,8 +1078,7 @@ const deserializeAws_restJson1DeleteAnalyzerCommandError = async (output, contex
1087
1078
  body: await parseBody(output.body, context),
1088
1079
  };
1089
1080
  let response;
1090
- let errorCode = "UnknownError";
1091
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1081
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1092
1082
  switch (errorCode) {
1093
1083
  case "AccessDeniedException":
1094
1084
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1107,10 +1097,12 @@ const deserializeAws_restJson1DeleteAnalyzerCommandError = async (output, contex
1107
1097
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1108
1098
  default:
1109
1099
  const parsedBody = parsedOutput.body;
1100
+ const $metadata = deserializeMetadata(output);
1101
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1110
1102
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1111
- name: parsedBody.code || parsedBody.Code || errorCode,
1103
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1112
1104
  $fault: "client",
1113
- $metadata: deserializeMetadata(output),
1105
+ $metadata,
1114
1106
  });
1115
1107
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1116
1108
  }
@@ -1132,8 +1124,7 @@ const deserializeAws_restJson1DeleteArchiveRuleCommandError = async (output, con
1132
1124
  body: await parseBody(output.body, context),
1133
1125
  };
1134
1126
  let response;
1135
- let errorCode = "UnknownError";
1136
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1127
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1137
1128
  switch (errorCode) {
1138
1129
  case "AccessDeniedException":
1139
1130
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1152,10 +1143,12 @@ const deserializeAws_restJson1DeleteArchiveRuleCommandError = async (output, con
1152
1143
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1153
1144
  default:
1154
1145
  const parsedBody = parsedOutput.body;
1146
+ const $metadata = deserializeMetadata(output);
1147
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1155
1148
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1156
- name: parsedBody.code || parsedBody.Code || errorCode,
1149
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1157
1150
  $fault: "client",
1158
- $metadata: deserializeMetadata(output),
1151
+ $metadata,
1159
1152
  });
1160
1153
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1161
1154
  }
@@ -1181,8 +1174,7 @@ const deserializeAws_restJson1GetAccessPreviewCommandError = async (output, cont
1181
1174
  body: await parseBody(output.body, context),
1182
1175
  };
1183
1176
  let response;
1184
- let errorCode = "UnknownError";
1185
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1177
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1186
1178
  switch (errorCode) {
1187
1179
  case "AccessDeniedException":
1188
1180
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1201,10 +1193,12 @@ const deserializeAws_restJson1GetAccessPreviewCommandError = async (output, cont
1201
1193
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1202
1194
  default:
1203
1195
  const parsedBody = parsedOutput.body;
1196
+ const $metadata = deserializeMetadata(output);
1197
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1204
1198
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1205
- name: parsedBody.code || parsedBody.Code || errorCode,
1199
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1206
1200
  $fault: "client",
1207
- $metadata: deserializeMetadata(output),
1201
+ $metadata,
1208
1202
  });
1209
1203
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1210
1204
  }
@@ -1230,8 +1224,7 @@ const deserializeAws_restJson1GetAnalyzedResourceCommandError = async (output, c
1230
1224
  body: await parseBody(output.body, context),
1231
1225
  };
1232
1226
  let response;
1233
- let errorCode = "UnknownError";
1234
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1227
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
1228
  switch (errorCode) {
1236
1229
  case "AccessDeniedException":
1237
1230
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1250,10 +1243,12 @@ const deserializeAws_restJson1GetAnalyzedResourceCommandError = async (output, c
1250
1243
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1251
1244
  default:
1252
1245
  const parsedBody = parsedOutput.body;
1246
+ const $metadata = deserializeMetadata(output);
1247
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1253
1248
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1254
- name: parsedBody.code || parsedBody.Code || errorCode,
1249
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1255
1250
  $fault: "client",
1256
- $metadata: deserializeMetadata(output),
1251
+ $metadata,
1257
1252
  });
1258
1253
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1259
1254
  }
@@ -1279,8 +1274,7 @@ const deserializeAws_restJson1GetAnalyzerCommandError = async (output, context)
1279
1274
  body: await parseBody(output.body, context),
1280
1275
  };
1281
1276
  let response;
1282
- let errorCode = "UnknownError";
1283
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1277
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1284
1278
  switch (errorCode) {
1285
1279
  case "AccessDeniedException":
1286
1280
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1299,10 +1293,12 @@ const deserializeAws_restJson1GetAnalyzerCommandError = async (output, context)
1299
1293
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1300
1294
  default:
1301
1295
  const parsedBody = parsedOutput.body;
1296
+ const $metadata = deserializeMetadata(output);
1297
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1302
1298
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1303
- name: parsedBody.code || parsedBody.Code || errorCode,
1299
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1304
1300
  $fault: "client",
1305
- $metadata: deserializeMetadata(output),
1301
+ $metadata,
1306
1302
  });
1307
1303
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1308
1304
  }
@@ -1328,8 +1324,7 @@ const deserializeAws_restJson1GetArchiveRuleCommandError = async (output, contex
1328
1324
  body: await parseBody(output.body, context),
1329
1325
  };
1330
1326
  let response;
1331
- let errorCode = "UnknownError";
1332
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1327
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1333
1328
  switch (errorCode) {
1334
1329
  case "AccessDeniedException":
1335
1330
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1348,10 +1343,12 @@ const deserializeAws_restJson1GetArchiveRuleCommandError = async (output, contex
1348
1343
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1349
1344
  default:
1350
1345
  const parsedBody = parsedOutput.body;
1346
+ const $metadata = deserializeMetadata(output);
1347
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1351
1348
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1352
- name: parsedBody.code || parsedBody.Code || errorCode,
1349
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1353
1350
  $fault: "client",
1354
- $metadata: deserializeMetadata(output),
1351
+ $metadata,
1355
1352
  });
1356
1353
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1357
1354
  }
@@ -1377,8 +1374,7 @@ const deserializeAws_restJson1GetFindingCommandError = async (output, context) =
1377
1374
  body: await parseBody(output.body, context),
1378
1375
  };
1379
1376
  let response;
1380
- let errorCode = "UnknownError";
1381
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1377
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1382
1378
  switch (errorCode) {
1383
1379
  case "AccessDeniedException":
1384
1380
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1397,10 +1393,12 @@ const deserializeAws_restJson1GetFindingCommandError = async (output, context) =
1397
1393
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1398
1394
  default:
1399
1395
  const parsedBody = parsedOutput.body;
1396
+ const $metadata = deserializeMetadata(output);
1397
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1400
1398
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1401
- name: parsedBody.code || parsedBody.Code || errorCode,
1399
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1402
1400
  $fault: "client",
1403
- $metadata: deserializeMetadata(output),
1401
+ $metadata,
1404
1402
  });
1405
1403
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1406
1404
  }
@@ -1430,8 +1428,7 @@ const deserializeAws_restJson1GetGeneratedPolicyCommandError = async (output, co
1430
1428
  body: await parseBody(output.body, context),
1431
1429
  };
1432
1430
  let response;
1433
- let errorCode = "UnknownError";
1434
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1431
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1435
1432
  switch (errorCode) {
1436
1433
  case "AccessDeniedException":
1437
1434
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1447,10 +1444,12 @@ const deserializeAws_restJson1GetGeneratedPolicyCommandError = async (output, co
1447
1444
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1448
1445
  default:
1449
1446
  const parsedBody = parsedOutput.body;
1447
+ const $metadata = deserializeMetadata(output);
1448
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1450
1449
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1451
- name: parsedBody.code || parsedBody.Code || errorCode,
1450
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1452
1451
  $fault: "client",
1453
- $metadata: deserializeMetadata(output),
1452
+ $metadata,
1454
1453
  });
1455
1454
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1456
1455
  }
@@ -1480,8 +1479,7 @@ const deserializeAws_restJson1ListAccessPreviewFindingsCommandError = async (out
1480
1479
  body: await parseBody(output.body, context),
1481
1480
  };
1482
1481
  let response;
1483
- let errorCode = "UnknownError";
1484
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1482
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1485
1483
  switch (errorCode) {
1486
1484
  case "AccessDeniedException":
1487
1485
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1503,10 +1501,12 @@ const deserializeAws_restJson1ListAccessPreviewFindingsCommandError = async (out
1503
1501
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1504
1502
  default:
1505
1503
  const parsedBody = parsedOutput.body;
1504
+ const $metadata = deserializeMetadata(output);
1505
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1506
1506
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1507
- name: parsedBody.code || parsedBody.Code || errorCode,
1507
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1508
1508
  $fault: "client",
1509
- $metadata: deserializeMetadata(output),
1509
+ $metadata,
1510
1510
  });
1511
1511
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1512
1512
  }
@@ -1536,8 +1536,7 @@ const deserializeAws_restJson1ListAccessPreviewsCommandError = async (output, co
1536
1536
  body: await parseBody(output.body, context),
1537
1537
  };
1538
1538
  let response;
1539
- let errorCode = "UnknownError";
1540
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1539
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1541
1540
  switch (errorCode) {
1542
1541
  case "AccessDeniedException":
1543
1542
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1556,10 +1555,12 @@ const deserializeAws_restJson1ListAccessPreviewsCommandError = async (output, co
1556
1555
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1557
1556
  default:
1558
1557
  const parsedBody = parsedOutput.body;
1558
+ const $metadata = deserializeMetadata(output);
1559
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1559
1560
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1560
- name: parsedBody.code || parsedBody.Code || errorCode,
1561
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1561
1562
  $fault: "client",
1562
- $metadata: deserializeMetadata(output),
1563
+ $metadata,
1563
1564
  });
1564
1565
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1565
1566
  }
@@ -1589,8 +1590,7 @@ const deserializeAws_restJson1ListAnalyzedResourcesCommandError = async (output,
1589
1590
  body: await parseBody(output.body, context),
1590
1591
  };
1591
1592
  let response;
1592
- let errorCode = "UnknownError";
1593
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1593
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1594
1594
  switch (errorCode) {
1595
1595
  case "AccessDeniedException":
1596
1596
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1609,10 +1609,12 @@ const deserializeAws_restJson1ListAnalyzedResourcesCommandError = async (output,
1609
1609
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1610
1610
  default:
1611
1611
  const parsedBody = parsedOutput.body;
1612
+ const $metadata = deserializeMetadata(output);
1613
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1612
1614
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1613
- name: parsedBody.code || parsedBody.Code || errorCode,
1615
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1614
1616
  $fault: "client",
1615
- $metadata: deserializeMetadata(output),
1617
+ $metadata,
1616
1618
  });
1617
1619
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1618
1620
  }
@@ -1642,8 +1644,7 @@ const deserializeAws_restJson1ListAnalyzersCommandError = async (output, context
1642
1644
  body: await parseBody(output.body, context),
1643
1645
  };
1644
1646
  let response;
1645
- let errorCode = "UnknownError";
1646
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1647
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1647
1648
  switch (errorCode) {
1648
1649
  case "AccessDeniedException":
1649
1650
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1659,10 +1660,12 @@ const deserializeAws_restJson1ListAnalyzersCommandError = async (output, context
1659
1660
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1660
1661
  default:
1661
1662
  const parsedBody = parsedOutput.body;
1663
+ const $metadata = deserializeMetadata(output);
1664
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1662
1665
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1663
- name: parsedBody.code || parsedBody.Code || errorCode,
1666
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1664
1667
  $fault: "client",
1665
- $metadata: deserializeMetadata(output),
1668
+ $metadata,
1666
1669
  });
1667
1670
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1668
1671
  }
@@ -1692,8 +1695,7 @@ const deserializeAws_restJson1ListArchiveRulesCommandError = async (output, cont
1692
1695
  body: await parseBody(output.body, context),
1693
1696
  };
1694
1697
  let response;
1695
- let errorCode = "UnknownError";
1696
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1698
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1697
1699
  switch (errorCode) {
1698
1700
  case "AccessDeniedException":
1699
1701
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1709,10 +1711,12 @@ const deserializeAws_restJson1ListArchiveRulesCommandError = async (output, cont
1709
1711
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1710
1712
  default:
1711
1713
  const parsedBody = parsedOutput.body;
1714
+ const $metadata = deserializeMetadata(output);
1715
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1712
1716
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1713
- name: parsedBody.code || parsedBody.Code || errorCode,
1717
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1714
1718
  $fault: "client",
1715
- $metadata: deserializeMetadata(output),
1719
+ $metadata,
1716
1720
  });
1717
1721
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1718
1722
  }
@@ -1742,8 +1746,7 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
1742
1746
  body: await parseBody(output.body, context),
1743
1747
  };
1744
1748
  let response;
1745
- let errorCode = "UnknownError";
1746
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1749
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
1750
  switch (errorCode) {
1748
1751
  case "AccessDeniedException":
1749
1752
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1762,10 +1765,12 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
1762
1765
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1763
1766
  default:
1764
1767
  const parsedBody = parsedOutput.body;
1768
+ const $metadata = deserializeMetadata(output);
1769
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1765
1770
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1766
- name: parsedBody.code || parsedBody.Code || errorCode,
1771
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1767
1772
  $fault: "client",
1768
- $metadata: deserializeMetadata(output),
1773
+ $metadata,
1769
1774
  });
1770
1775
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1771
1776
  }
@@ -1795,8 +1800,7 @@ const deserializeAws_restJson1ListPolicyGenerationsCommandError = async (output,
1795
1800
  body: await parseBody(output.body, context),
1796
1801
  };
1797
1802
  let response;
1798
- let errorCode = "UnknownError";
1799
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1803
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1800
1804
  switch (errorCode) {
1801
1805
  case "AccessDeniedException":
1802
1806
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1812,10 +1816,12 @@ const deserializeAws_restJson1ListPolicyGenerationsCommandError = async (output,
1812
1816
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1813
1817
  default:
1814
1818
  const parsedBody = parsedOutput.body;
1819
+ const $metadata = deserializeMetadata(output);
1820
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1815
1821
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1816
- name: parsedBody.code || parsedBody.Code || errorCode,
1822
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1817
1823
  $fault: "client",
1818
- $metadata: deserializeMetadata(output),
1824
+ $metadata,
1819
1825
  });
1820
1826
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1821
1827
  }
@@ -1841,8 +1847,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1841
1847
  body: await parseBody(output.body, context),
1842
1848
  };
1843
1849
  let response;
1844
- let errorCode = "UnknownError";
1845
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1850
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1846
1851
  switch (errorCode) {
1847
1852
  case "AccessDeniedException":
1848
1853
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1861,10 +1866,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1861
1866
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1862
1867
  default:
1863
1868
  const parsedBody = parsedOutput.body;
1869
+ const $metadata = deserializeMetadata(output);
1870
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1864
1871
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1865
- name: parsedBody.code || parsedBody.Code || errorCode,
1872
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1866
1873
  $fault: "client",
1867
- $metadata: deserializeMetadata(output),
1874
+ $metadata,
1868
1875
  });
1869
1876
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1870
1877
  }
@@ -1890,8 +1897,7 @@ const deserializeAws_restJson1StartPolicyGenerationCommandError = async (output,
1890
1897
  body: await parseBody(output.body, context),
1891
1898
  };
1892
1899
  let response;
1893
- let errorCode = "UnknownError";
1894
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1900
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1895
1901
  switch (errorCode) {
1896
1902
  case "AccessDeniedException":
1897
1903
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1913,10 +1919,12 @@ const deserializeAws_restJson1StartPolicyGenerationCommandError = async (output,
1913
1919
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1914
1920
  default:
1915
1921
  const parsedBody = parsedOutput.body;
1922
+ const $metadata = deserializeMetadata(output);
1923
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1916
1924
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1917
- name: parsedBody.code || parsedBody.Code || errorCode,
1925
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1918
1926
  $fault: "client",
1919
- $metadata: deserializeMetadata(output),
1927
+ $metadata,
1920
1928
  });
1921
1929
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1922
1930
  }
@@ -1938,8 +1946,7 @@ const deserializeAws_restJson1StartResourceScanCommandError = async (output, con
1938
1946
  body: await parseBody(output.body, context),
1939
1947
  };
1940
1948
  let response;
1941
- let errorCode = "UnknownError";
1942
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1949
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1943
1950
  switch (errorCode) {
1944
1951
  case "AccessDeniedException":
1945
1952
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -1958,10 +1965,12 @@ const deserializeAws_restJson1StartResourceScanCommandError = async (output, con
1958
1965
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1959
1966
  default:
1960
1967
  const parsedBody = parsedOutput.body;
1968
+ const $metadata = deserializeMetadata(output);
1969
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1961
1970
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
1962
- name: parsedBody.code || parsedBody.Code || errorCode,
1971
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1963
1972
  $fault: "client",
1964
- $metadata: deserializeMetadata(output),
1973
+ $metadata,
1965
1974
  });
1966
1975
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1967
1976
  }
@@ -1983,8 +1992,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1983
1992
  body: await parseBody(output.body, context),
1984
1993
  };
1985
1994
  let response;
1986
- let errorCode = "UnknownError";
1987
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1995
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1988
1996
  switch (errorCode) {
1989
1997
  case "AccessDeniedException":
1990
1998
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -2003,10 +2011,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2003
2011
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2004
2012
  default:
2005
2013
  const parsedBody = parsedOutput.body;
2014
+ const $metadata = deserializeMetadata(output);
2015
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2006
2016
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
2007
- name: parsedBody.code || parsedBody.Code || errorCode,
2017
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2008
2018
  $fault: "client",
2009
- $metadata: deserializeMetadata(output),
2019
+ $metadata,
2010
2020
  });
2011
2021
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2012
2022
  }
@@ -2028,8 +2038,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2028
2038
  body: await parseBody(output.body, context),
2029
2039
  };
2030
2040
  let response;
2031
- let errorCode = "UnknownError";
2032
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2041
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2033
2042
  switch (errorCode) {
2034
2043
  case "AccessDeniedException":
2035
2044
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -2048,10 +2057,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2048
2057
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2049
2058
  default:
2050
2059
  const parsedBody = parsedOutput.body;
2060
+ const $metadata = deserializeMetadata(output);
2061
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2051
2062
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
2052
- name: parsedBody.code || parsedBody.Code || errorCode,
2063
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2053
2064
  $fault: "client",
2054
- $metadata: deserializeMetadata(output),
2065
+ $metadata,
2055
2066
  });
2056
2067
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2057
2068
  }
@@ -2073,8 +2084,7 @@ const deserializeAws_restJson1UpdateArchiveRuleCommandError = async (output, con
2073
2084
  body: await parseBody(output.body, context),
2074
2085
  };
2075
2086
  let response;
2076
- let errorCode = "UnknownError";
2077
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2087
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2078
2088
  switch (errorCode) {
2079
2089
  case "AccessDeniedException":
2080
2090
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -2093,10 +2103,12 @@ const deserializeAws_restJson1UpdateArchiveRuleCommandError = async (output, con
2093
2103
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2094
2104
  default:
2095
2105
  const parsedBody = parsedOutput.body;
2106
+ const $metadata = deserializeMetadata(output);
2107
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2096
2108
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
2097
- name: parsedBody.code || parsedBody.Code || errorCode,
2109
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2098
2110
  $fault: "client",
2099
- $metadata: deserializeMetadata(output),
2111
+ $metadata,
2100
2112
  });
2101
2113
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2102
2114
  }
@@ -2118,8 +2130,7 @@ const deserializeAws_restJson1UpdateFindingsCommandError = async (output, contex
2118
2130
  body: await parseBody(output.body, context),
2119
2131
  };
2120
2132
  let response;
2121
- let errorCode = "UnknownError";
2122
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2133
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2123
2134
  switch (errorCode) {
2124
2135
  case "AccessDeniedException":
2125
2136
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -2138,10 +2149,12 @@ const deserializeAws_restJson1UpdateFindingsCommandError = async (output, contex
2138
2149
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2139
2150
  default:
2140
2151
  const parsedBody = parsedOutput.body;
2152
+ const $metadata = deserializeMetadata(output);
2153
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2141
2154
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
2142
- name: parsedBody.code || parsedBody.Code || errorCode,
2155
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2143
2156
  $fault: "client",
2144
- $metadata: deserializeMetadata(output),
2157
+ $metadata,
2145
2158
  });
2146
2159
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2147
2160
  }
@@ -2171,8 +2184,7 @@ const deserializeAws_restJson1ValidatePolicyCommandError = async (output, contex
2171
2184
  body: await parseBody(output.body, context),
2172
2185
  };
2173
2186
  let response;
2174
- let errorCode = "UnknownError";
2175
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2187
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2176
2188
  switch (errorCode) {
2177
2189
  case "AccessDeniedException":
2178
2190
  case "com.amazonaws.accessanalyzer#AccessDeniedException":
@@ -2188,10 +2200,12 @@ const deserializeAws_restJson1ValidatePolicyCommandError = async (output, contex
2188
2200
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2189
2201
  default:
2190
2202
  const parsedBody = parsedOutput.body;
2203
+ const $metadata = deserializeMetadata(output);
2204
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2191
2205
  response = new AccessAnalyzerServiceException_1.AccessAnalyzerServiceException({
2192
- name: parsedBody.code || parsedBody.Code || errorCode,
2206
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2193
2207
  $fault: "client",
2194
- $metadata: deserializeMetadata(output),
2208
+ $metadata,
2195
2209
  });
2196
2210
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2197
2211
  }
@@ -2319,13 +2333,10 @@ const serializeAws_restJson1AclGrantee = (input, context) => {
2319
2333
  };
2320
2334
  const serializeAws_restJson1CloudTrailDetails = (input, context) => {
2321
2335
  return {
2322
- ...(input.accessRole !== undefined && input.accessRole !== null && { accessRole: input.accessRole }),
2323
- ...(input.endTime !== undefined &&
2324
- input.endTime !== null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }),
2325
- ...(input.startTime !== undefined &&
2326
- input.startTime !== null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }),
2327
- ...(input.trails !== undefined &&
2328
- input.trails !== null && { trails: serializeAws_restJson1TrailList(input.trails, context) }),
2336
+ ...(input.accessRole != null && { accessRole: input.accessRole }),
2337
+ ...(input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }),
2338
+ ...(input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }),
2339
+ ...(input.trails != null && { trails: serializeAws_restJson1TrailList(input.trails, context) }),
2329
2340
  };
2330
2341
  };
2331
2342
  const serializeAws_restJson1Configuration = (input, context) => {
@@ -2353,11 +2364,10 @@ const serializeAws_restJson1ConfigurationsMap = (input, context) => {
2353
2364
  };
2354
2365
  const serializeAws_restJson1Criterion = (input, context) => {
2355
2366
  return {
2356
- ...(input.contains !== undefined &&
2357
- input.contains !== null && { contains: serializeAws_restJson1ValueList(input.contains, context) }),
2358
- ...(input.eq !== undefined && input.eq !== null && { eq: serializeAws_restJson1ValueList(input.eq, context) }),
2359
- ...(input.exists !== undefined && input.exists !== null && { exists: input.exists }),
2360
- ...(input.neq !== undefined && input.neq !== null && { neq: serializeAws_restJson1ValueList(input.neq, context) }),
2367
+ ...(input.contains != null && { contains: serializeAws_restJson1ValueList(input.contains, context) }),
2368
+ ...(input.eq != null && { eq: serializeAws_restJson1ValueList(input.eq, context) }),
2369
+ ...(input.exists != null && { exists: input.exists }),
2370
+ ...(input.neq != null && { neq: serializeAws_restJson1ValueList(input.neq, context) }),
2361
2371
  };
2362
2372
  };
2363
2373
  const serializeAws_restJson1FilterCriteriaMap = (input, context) => {
@@ -2383,14 +2393,13 @@ const serializeAws_restJson1FindingIdList = (input, context) => {
2383
2393
  };
2384
2394
  const serializeAws_restJson1IamRoleConfiguration = (input, context) => {
2385
2395
  return {
2386
- ...(input.trustPolicy !== undefined && input.trustPolicy !== null && { trustPolicy: input.trustPolicy }),
2396
+ ...(input.trustPolicy != null && { trustPolicy: input.trustPolicy }),
2387
2397
  };
2388
2398
  };
2389
2399
  const serializeAws_restJson1InlineArchiveRule = (input, context) => {
2390
2400
  return {
2391
- ...(input.filter !== undefined &&
2392
- input.filter !== null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
2393
- ...(input.ruleName !== undefined && input.ruleName !== null && { ruleName: input.ruleName }),
2401
+ ...(input.filter != null && { filter: serializeAws_restJson1FilterCriteriaMap(input.filter, context) }),
2402
+ ...(input.ruleName != null && { ruleName: input.ruleName }),
2394
2403
  };
2395
2404
  };
2396
2405
  const serializeAws_restJson1InlineArchiveRulesList = (input, context) => {
@@ -2419,20 +2428,15 @@ const serializeAws_restJson1KmsConstraintsMap = (input, context) => {
2419
2428
  };
2420
2429
  const serializeAws_restJson1KmsGrantConfiguration = (input, context) => {
2421
2430
  return {
2422
- ...(input.constraints !== undefined &&
2423
- input.constraints !== null && {
2431
+ ...(input.constraints != null && {
2424
2432
  constraints: serializeAws_restJson1KmsGrantConstraints(input.constraints, context),
2425
2433
  }),
2426
- ...(input.granteePrincipal !== undefined &&
2427
- input.granteePrincipal !== null && { granteePrincipal: input.granteePrincipal }),
2428
- ...(input.issuingAccount !== undefined &&
2429
- input.issuingAccount !== null && { issuingAccount: input.issuingAccount }),
2430
- ...(input.operations !== undefined &&
2431
- input.operations !== null && {
2434
+ ...(input.granteePrincipal != null && { granteePrincipal: input.granteePrincipal }),
2435
+ ...(input.issuingAccount != null && { issuingAccount: input.issuingAccount }),
2436
+ ...(input.operations != null && {
2432
2437
  operations: serializeAws_restJson1KmsGrantOperationsList(input.operations, context),
2433
2438
  }),
2434
- ...(input.retiringPrincipal !== undefined &&
2435
- input.retiringPrincipal !== null && { retiringPrincipal: input.retiringPrincipal }),
2439
+ ...(input.retiringPrincipal != null && { retiringPrincipal: input.retiringPrincipal }),
2436
2440
  };
2437
2441
  };
2438
2442
  const serializeAws_restJson1KmsGrantConfigurationsList = (input, context) => {
@@ -2447,12 +2451,10 @@ const serializeAws_restJson1KmsGrantConfigurationsList = (input, context) => {
2447
2451
  };
2448
2452
  const serializeAws_restJson1KmsGrantConstraints = (input, context) => {
2449
2453
  return {
2450
- ...(input.encryptionContextEquals !== undefined &&
2451
- input.encryptionContextEquals !== null && {
2454
+ ...(input.encryptionContextEquals != null && {
2452
2455
  encryptionContextEquals: serializeAws_restJson1KmsConstraintsMap(input.encryptionContextEquals, context),
2453
2456
  }),
2454
- ...(input.encryptionContextSubset !== undefined &&
2455
- input.encryptionContextSubset !== null && {
2457
+ ...(input.encryptionContextSubset != null && {
2456
2458
  encryptionContextSubset: serializeAws_restJson1KmsConstraintsMap(input.encryptionContextSubset, context),
2457
2459
  }),
2458
2460
  };
@@ -2469,10 +2471,8 @@ const serializeAws_restJson1KmsGrantOperationsList = (input, context) => {
2469
2471
  };
2470
2472
  const serializeAws_restJson1KmsKeyConfiguration = (input, context) => {
2471
2473
  return {
2472
- ...(input.grants !== undefined &&
2473
- input.grants !== null && { grants: serializeAws_restJson1KmsGrantConfigurationsList(input.grants, context) }),
2474
- ...(input.keyPolicies !== undefined &&
2475
- input.keyPolicies !== null && {
2474
+ ...(input.grants != null && { grants: serializeAws_restJson1KmsGrantConfigurationsList(input.grants, context) }),
2475
+ ...(input.keyPolicies != null && {
2476
2476
  keyPolicies: serializeAws_restJson1KmsKeyPoliciesMap(input.keyPolicies, context),
2477
2477
  }),
2478
2478
  };
@@ -2499,7 +2499,7 @@ const serializeAws_restJson1NetworkOriginConfiguration = (input, context) => {
2499
2499
  };
2500
2500
  const serializeAws_restJson1PolicyGenerationDetails = (input, context) => {
2501
2501
  return {
2502
- ...(input.principalArn !== undefined && input.principalArn !== null && { principalArn: input.principalArn }),
2502
+ ...(input.principalArn != null && { principalArn: input.principalArn }),
2503
2503
  };
2504
2504
  };
2505
2505
  const serializeAws_restJson1RegionList = (input, context) => {
@@ -2514,14 +2514,11 @@ const serializeAws_restJson1RegionList = (input, context) => {
2514
2514
  };
2515
2515
  const serializeAws_restJson1S3AccessPointConfiguration = (input, context) => {
2516
2516
  return {
2517
- ...(input.accessPointPolicy !== undefined &&
2518
- input.accessPointPolicy !== null && { accessPointPolicy: input.accessPointPolicy }),
2519
- ...(input.networkOrigin !== undefined &&
2520
- input.networkOrigin !== null && {
2517
+ ...(input.accessPointPolicy != null && { accessPointPolicy: input.accessPointPolicy }),
2518
+ ...(input.networkOrigin != null && {
2521
2519
  networkOrigin: serializeAws_restJson1NetworkOriginConfiguration(input.networkOrigin, context),
2522
2520
  }),
2523
- ...(input.publicAccessBlock !== undefined &&
2524
- input.publicAccessBlock !== null && {
2521
+ ...(input.publicAccessBlock != null && {
2525
2522
  publicAccessBlock: serializeAws_restJson1S3PublicAccessBlockConfiguration(input.publicAccessBlock, context),
2526
2523
  }),
2527
2524
  };
@@ -2539,9 +2536,8 @@ const serializeAws_restJson1S3AccessPointConfigurationsMap = (input, context) =>
2539
2536
  };
2540
2537
  const serializeAws_restJson1S3BucketAclGrantConfiguration = (input, context) => {
2541
2538
  return {
2542
- ...(input.grantee !== undefined &&
2543
- input.grantee !== null && { grantee: serializeAws_restJson1AclGrantee(input.grantee, context) }),
2544
- ...(input.permission !== undefined && input.permission !== null && { permission: input.permission }),
2539
+ ...(input.grantee != null && { grantee: serializeAws_restJson1AclGrantee(input.grantee, context) }),
2540
+ ...(input.permission != null && { permission: input.permission }),
2545
2541
  };
2546
2542
  };
2547
2543
  const serializeAws_restJson1S3BucketAclGrantConfigurationsList = (input, context) => {
@@ -2556,44 +2552,39 @@ const serializeAws_restJson1S3BucketAclGrantConfigurationsList = (input, context
2556
2552
  };
2557
2553
  const serializeAws_restJson1S3BucketConfiguration = (input, context) => {
2558
2554
  return {
2559
- ...(input.accessPoints !== undefined &&
2560
- input.accessPoints !== null && {
2555
+ ...(input.accessPoints != null && {
2561
2556
  accessPoints: serializeAws_restJson1S3AccessPointConfigurationsMap(input.accessPoints, context),
2562
2557
  }),
2563
- ...(input.bucketAclGrants !== undefined &&
2564
- input.bucketAclGrants !== null && {
2558
+ ...(input.bucketAclGrants != null && {
2565
2559
  bucketAclGrants: serializeAws_restJson1S3BucketAclGrantConfigurationsList(input.bucketAclGrants, context),
2566
2560
  }),
2567
- ...(input.bucketPolicy !== undefined && input.bucketPolicy !== null && { bucketPolicy: input.bucketPolicy }),
2568
- ...(input.bucketPublicAccessBlock !== undefined &&
2569
- input.bucketPublicAccessBlock !== null && {
2561
+ ...(input.bucketPolicy != null && { bucketPolicy: input.bucketPolicy }),
2562
+ ...(input.bucketPublicAccessBlock != null && {
2570
2563
  bucketPublicAccessBlock: serializeAws_restJson1S3PublicAccessBlockConfiguration(input.bucketPublicAccessBlock, context),
2571
2564
  }),
2572
2565
  };
2573
2566
  };
2574
2567
  const serializeAws_restJson1S3PublicAccessBlockConfiguration = (input, context) => {
2575
2568
  return {
2576
- ...(input.ignorePublicAcls !== undefined &&
2577
- input.ignorePublicAcls !== null && { ignorePublicAcls: input.ignorePublicAcls }),
2578
- ...(input.restrictPublicBuckets !== undefined &&
2579
- input.restrictPublicBuckets !== null && { restrictPublicBuckets: input.restrictPublicBuckets }),
2569
+ ...(input.ignorePublicAcls != null && { ignorePublicAcls: input.ignorePublicAcls }),
2570
+ ...(input.restrictPublicBuckets != null && { restrictPublicBuckets: input.restrictPublicBuckets }),
2580
2571
  };
2581
2572
  };
2582
2573
  const serializeAws_restJson1SecretsManagerSecretConfiguration = (input, context) => {
2583
2574
  return {
2584
- ...(input.kmsKeyId !== undefined && input.kmsKeyId !== null && { kmsKeyId: input.kmsKeyId }),
2585
- ...(input.secretPolicy !== undefined && input.secretPolicy !== null && { secretPolicy: input.secretPolicy }),
2575
+ ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2576
+ ...(input.secretPolicy != null && { secretPolicy: input.secretPolicy }),
2586
2577
  };
2587
2578
  };
2588
2579
  const serializeAws_restJson1SortCriteria = (input, context) => {
2589
2580
  return {
2590
- ...(input.attributeName !== undefined && input.attributeName !== null && { attributeName: input.attributeName }),
2591
- ...(input.orderBy !== undefined && input.orderBy !== null && { orderBy: input.orderBy }),
2581
+ ...(input.attributeName != null && { attributeName: input.attributeName }),
2582
+ ...(input.orderBy != null && { orderBy: input.orderBy }),
2592
2583
  };
2593
2584
  };
2594
2585
  const serializeAws_restJson1SqsQueueConfiguration = (input, context) => {
2595
2586
  return {
2596
- ...(input.queuePolicy !== undefined && input.queuePolicy !== null && { queuePolicy: input.queuePolicy }),
2587
+ ...(input.queuePolicy != null && { queuePolicy: input.queuePolicy }),
2597
2588
  };
2598
2589
  };
2599
2590
  const serializeAws_restJson1TagsMap = (input, context) => {
@@ -2609,10 +2600,9 @@ const serializeAws_restJson1TagsMap = (input, context) => {
2609
2600
  };
2610
2601
  const serializeAws_restJson1Trail = (input, context) => {
2611
2602
  return {
2612
- ...(input.allRegions !== undefined && input.allRegions !== null && { allRegions: input.allRegions }),
2613
- ...(input.cloudTrailArn !== undefined && input.cloudTrailArn !== null && { cloudTrailArn: input.cloudTrailArn }),
2614
- ...(input.regions !== undefined &&
2615
- input.regions !== null && { regions: serializeAws_restJson1RegionList(input.regions, context) }),
2603
+ ...(input.allRegions != null && { allRegions: input.allRegions }),
2604
+ ...(input.cloudTrailArn != null && { cloudTrailArn: input.cloudTrailArn }),
2605
+ ...(input.regions != null && { regions: serializeAws_restJson1RegionList(input.regions, context) }),
2616
2606
  };
2617
2607
  };
2618
2608
  const serializeAws_restJson1TrailList = (input, context) => {
@@ -2637,51 +2627,39 @@ const serializeAws_restJson1ValueList = (input, context) => {
2637
2627
  };
2638
2628
  const serializeAws_restJson1VpcConfiguration = (input, context) => {
2639
2629
  return {
2640
- ...(input.vpcId !== undefined && input.vpcId !== null && { vpcId: input.vpcId }),
2630
+ ...(input.vpcId != null && { vpcId: input.vpcId }),
2641
2631
  };
2642
2632
  };
2643
2633
  const deserializeAws_restJson1AccessPreview = (output, context) => {
2644
2634
  return {
2645
2635
  analyzerArn: (0, smithy_client_1.expectString)(output.analyzerArn),
2646
- configurations: output.configurations !== undefined && output.configurations !== null
2636
+ configurations: output.configurations != null
2647
2637
  ? deserializeAws_restJson1ConfigurationsMap(output.configurations, context)
2648
2638
  : undefined,
2649
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2650
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2651
- : undefined,
2639
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2652
2640
  id: (0, smithy_client_1.expectString)(output.id),
2653
2641
  status: (0, smithy_client_1.expectString)(output.status),
2654
- statusReason: output.statusReason !== undefined && output.statusReason !== null
2642
+ statusReason: output.statusReason != null
2655
2643
  ? deserializeAws_restJson1AccessPreviewStatusReason(output.statusReason, context)
2656
2644
  : undefined,
2657
2645
  };
2658
2646
  };
2659
2647
  const deserializeAws_restJson1AccessPreviewFinding = (output, context) => {
2660
2648
  return {
2661
- action: output.action !== undefined && output.action !== null
2662
- ? deserializeAws_restJson1ActionList(output.action, context)
2663
- : undefined,
2649
+ action: output.action != null ? deserializeAws_restJson1ActionList(output.action, context) : undefined,
2664
2650
  changeType: (0, smithy_client_1.expectString)(output.changeType),
2665
- condition: output.condition !== undefined && output.condition !== null
2666
- ? deserializeAws_restJson1ConditionKeyMap(output.condition, context)
2667
- : undefined,
2668
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2669
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2670
- : undefined,
2651
+ condition: output.condition != null ? deserializeAws_restJson1ConditionKeyMap(output.condition, context) : undefined,
2652
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2671
2653
  error: (0, smithy_client_1.expectString)(output.error),
2672
2654
  existingFindingId: (0, smithy_client_1.expectString)(output.existingFindingId),
2673
2655
  existingFindingStatus: (0, smithy_client_1.expectString)(output.existingFindingStatus),
2674
2656
  id: (0, smithy_client_1.expectString)(output.id),
2675
2657
  isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2676
- principal: output.principal !== undefined && output.principal !== null
2677
- ? deserializeAws_restJson1PrincipalMap(output.principal, context)
2678
- : undefined,
2658
+ principal: output.principal != null ? deserializeAws_restJson1PrincipalMap(output.principal, context) : undefined,
2679
2659
  resource: (0, smithy_client_1.expectString)(output.resource),
2680
2660
  resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2681
2661
  resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2682
- sources: output.sources !== undefined && output.sources !== null
2683
- ? deserializeAws_restJson1FindingSourceList(output.sources, context)
2684
- : undefined,
2662
+ sources: output.sources != null ? deserializeAws_restJson1FindingSourceList(output.sources, context) : undefined,
2685
2663
  status: (0, smithy_client_1.expectString)(output.status),
2686
2664
  };
2687
2665
  };
@@ -2715,12 +2693,10 @@ const deserializeAws_restJson1AccessPreviewStatusReason = (output, context) => {
2715
2693
  const deserializeAws_restJson1AccessPreviewSummary = (output, context) => {
2716
2694
  return {
2717
2695
  analyzerArn: (0, smithy_client_1.expectString)(output.analyzerArn),
2718
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2719
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2720
- : undefined,
2696
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2721
2697
  id: (0, smithy_client_1.expectString)(output.id),
2722
2698
  status: (0, smithy_client_1.expectString)(output.status),
2723
- statusReason: output.statusReason !== undefined && output.statusReason !== null
2699
+ statusReason: output.statusReason != null
2724
2700
  ? deserializeAws_restJson1AccessPreviewStatusReason(output.statusReason, context)
2725
2701
  : undefined,
2726
2702
  };
@@ -2747,27 +2723,17 @@ const deserializeAws_restJson1ActionList = (output, context) => {
2747
2723
  };
2748
2724
  const deserializeAws_restJson1AnalyzedResource = (output, context) => {
2749
2725
  return {
2750
- actions: output.actions !== undefined && output.actions !== null
2751
- ? deserializeAws_restJson1ActionList(output.actions, context)
2752
- : undefined,
2753
- analyzedAt: output.analyzedAt !== undefined && output.analyzedAt !== null
2754
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.analyzedAt))
2755
- : undefined,
2756
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2757
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2758
- : undefined,
2726
+ actions: output.actions != null ? deserializeAws_restJson1ActionList(output.actions, context) : undefined,
2727
+ analyzedAt: output.analyzedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.analyzedAt)) : undefined,
2728
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2759
2729
  error: (0, smithy_client_1.expectString)(output.error),
2760
2730
  isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2761
2731
  resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
2762
2732
  resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2763
2733
  resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2764
- sharedVia: output.sharedVia !== undefined && output.sharedVia !== null
2765
- ? deserializeAws_restJson1SharedViaList(output.sharedVia, context)
2766
- : undefined,
2734
+ sharedVia: output.sharedVia != null ? deserializeAws_restJson1SharedViaList(output.sharedVia, context) : undefined,
2767
2735
  status: (0, smithy_client_1.expectString)(output.status),
2768
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
2769
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt))
2770
- : undefined,
2736
+ updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt)) : undefined,
2771
2737
  };
2772
2738
  };
2773
2739
  const deserializeAws_restJson1AnalyzedResourcesList = (output, context) => {
@@ -2802,21 +2768,15 @@ const deserializeAws_restJson1AnalyzersList = (output, context) => {
2802
2768
  const deserializeAws_restJson1AnalyzerSummary = (output, context) => {
2803
2769
  return {
2804
2770
  arn: (0, smithy_client_1.expectString)(output.arn),
2805
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2806
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2807
- : undefined,
2771
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2808
2772
  lastResourceAnalyzed: (0, smithy_client_1.expectString)(output.lastResourceAnalyzed),
2809
- lastResourceAnalyzedAt: output.lastResourceAnalyzedAt !== undefined && output.lastResourceAnalyzedAt !== null
2773
+ lastResourceAnalyzedAt: output.lastResourceAnalyzedAt != null
2810
2774
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.lastResourceAnalyzedAt))
2811
2775
  : undefined,
2812
2776
  name: (0, smithy_client_1.expectString)(output.name),
2813
2777
  status: (0, smithy_client_1.expectString)(output.status),
2814
- statusReason: output.statusReason !== undefined && output.statusReason !== null
2815
- ? deserializeAws_restJson1StatusReason(output.statusReason, context)
2816
- : undefined,
2817
- tags: output.tags !== undefined && output.tags !== null
2818
- ? deserializeAws_restJson1TagsMap(output.tags, context)
2819
- : undefined,
2778
+ statusReason: output.statusReason != null ? deserializeAws_restJson1StatusReason(output.statusReason, context) : undefined,
2779
+ tags: output.tags != null ? deserializeAws_restJson1TagsMap(output.tags, context) : undefined,
2820
2780
  type: (0, smithy_client_1.expectString)(output.type),
2821
2781
  };
2822
2782
  };
@@ -2833,27 +2793,17 @@ const deserializeAws_restJson1ArchiveRulesList = (output, context) => {
2833
2793
  };
2834
2794
  const deserializeAws_restJson1ArchiveRuleSummary = (output, context) => {
2835
2795
  return {
2836
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2837
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2838
- : undefined,
2839
- filter: output.filter !== undefined && output.filter !== null
2840
- ? deserializeAws_restJson1FilterCriteriaMap(output.filter, context)
2841
- : undefined,
2796
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2797
+ filter: output.filter != null ? deserializeAws_restJson1FilterCriteriaMap(output.filter, context) : undefined,
2842
2798
  ruleName: (0, smithy_client_1.expectString)(output.ruleName),
2843
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
2844
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt))
2845
- : undefined,
2799
+ updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt)) : undefined,
2846
2800
  };
2847
2801
  };
2848
2802
  const deserializeAws_restJson1CloudTrailProperties = (output, context) => {
2849
2803
  return {
2850
- endTime: output.endTime !== undefined && output.endTime !== null
2851
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.endTime))
2852
- : undefined,
2853
- startTime: output.startTime !== undefined && output.startTime !== null
2854
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.startTime))
2855
- : undefined,
2856
- trailProperties: output.trailProperties !== undefined && output.trailProperties !== null
2804
+ endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.endTime)) : undefined,
2805
+ startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.startTime)) : undefined,
2806
+ trailProperties: output.trailProperties != null
2857
2807
  ? deserializeAws_restJson1TrailPropertiesList(output.trailProperties, context)
2858
2808
  : undefined,
2859
2809
  };
@@ -2910,14 +2860,10 @@ const deserializeAws_restJson1ConfigurationsMap = (output, context) => {
2910
2860
  };
2911
2861
  const deserializeAws_restJson1Criterion = (output, context) => {
2912
2862
  return {
2913
- contains: output.contains !== undefined && output.contains !== null
2914
- ? deserializeAws_restJson1ValueList(output.contains, context)
2915
- : undefined,
2916
- eq: output.eq !== undefined && output.eq !== null ? deserializeAws_restJson1ValueList(output.eq, context) : undefined,
2863
+ contains: output.contains != null ? deserializeAws_restJson1ValueList(output.contains, context) : undefined,
2864
+ eq: output.eq != null ? deserializeAws_restJson1ValueList(output.eq, context) : undefined,
2917
2865
  exists: (0, smithy_client_1.expectBoolean)(output.exists),
2918
- neq: output.neq !== undefined && output.neq !== null
2919
- ? deserializeAws_restJson1ValueList(output.neq, context)
2920
- : undefined,
2866
+ neq: output.neq != null ? deserializeAws_restJson1ValueList(output.neq, context) : undefined,
2921
2867
  };
2922
2868
  };
2923
2869
  const deserializeAws_restJson1FilterCriteriaMap = (output, context) => {
@@ -2933,34 +2879,20 @@ const deserializeAws_restJson1FilterCriteriaMap = (output, context) => {
2933
2879
  };
2934
2880
  const deserializeAws_restJson1Finding = (output, context) => {
2935
2881
  return {
2936
- action: output.action !== undefined && output.action !== null
2937
- ? deserializeAws_restJson1ActionList(output.action, context)
2938
- : undefined,
2939
- analyzedAt: output.analyzedAt !== undefined && output.analyzedAt !== null
2940
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.analyzedAt))
2941
- : undefined,
2942
- condition: output.condition !== undefined && output.condition !== null
2943
- ? deserializeAws_restJson1ConditionKeyMap(output.condition, context)
2944
- : undefined,
2945
- createdAt: output.createdAt !== undefined && output.createdAt !== null
2946
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
2947
- : undefined,
2882
+ action: output.action != null ? deserializeAws_restJson1ActionList(output.action, context) : undefined,
2883
+ analyzedAt: output.analyzedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.analyzedAt)) : undefined,
2884
+ condition: output.condition != null ? deserializeAws_restJson1ConditionKeyMap(output.condition, context) : undefined,
2885
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
2948
2886
  error: (0, smithy_client_1.expectString)(output.error),
2949
2887
  id: (0, smithy_client_1.expectString)(output.id),
2950
2888
  isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
2951
- principal: output.principal !== undefined && output.principal !== null
2952
- ? deserializeAws_restJson1PrincipalMap(output.principal, context)
2953
- : undefined,
2889
+ principal: output.principal != null ? deserializeAws_restJson1PrincipalMap(output.principal, context) : undefined,
2954
2890
  resource: (0, smithy_client_1.expectString)(output.resource),
2955
2891
  resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
2956
2892
  resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2957
- sources: output.sources !== undefined && output.sources !== null
2958
- ? deserializeAws_restJson1FindingSourceList(output.sources, context)
2959
- : undefined,
2893
+ sources: output.sources != null ? deserializeAws_restJson1FindingSourceList(output.sources, context) : undefined,
2960
2894
  status: (0, smithy_client_1.expectString)(output.status),
2961
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
2962
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt))
2963
- : undefined,
2895
+ updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt)) : undefined,
2964
2896
  };
2965
2897
  };
2966
2898
  const deserializeAws_restJson1FindingsList = (output, context) => {
@@ -2976,9 +2908,7 @@ const deserializeAws_restJson1FindingsList = (output, context) => {
2976
2908
  };
2977
2909
  const deserializeAws_restJson1FindingSource = (output, context) => {
2978
2910
  return {
2979
- detail: output.detail !== undefined && output.detail !== null
2980
- ? deserializeAws_restJson1FindingSourceDetail(output.detail, context)
2981
- : undefined,
2911
+ detail: output.detail != null ? deserializeAws_restJson1FindingSourceDetail(output.detail, context) : undefined,
2982
2912
  type: (0, smithy_client_1.expectString)(output.type),
2983
2913
  };
2984
2914
  };
@@ -3000,34 +2930,20 @@ const deserializeAws_restJson1FindingSourceList = (output, context) => {
3000
2930
  };
3001
2931
  const deserializeAws_restJson1FindingSummary = (output, context) => {
3002
2932
  return {
3003
- action: output.action !== undefined && output.action !== null
3004
- ? deserializeAws_restJson1ActionList(output.action, context)
3005
- : undefined,
3006
- analyzedAt: output.analyzedAt !== undefined && output.analyzedAt !== null
3007
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.analyzedAt))
3008
- : undefined,
3009
- condition: output.condition !== undefined && output.condition !== null
3010
- ? deserializeAws_restJson1ConditionKeyMap(output.condition, context)
3011
- : undefined,
3012
- createdAt: output.createdAt !== undefined && output.createdAt !== null
3013
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt))
3014
- : undefined,
2933
+ action: output.action != null ? deserializeAws_restJson1ActionList(output.action, context) : undefined,
2934
+ analyzedAt: output.analyzedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.analyzedAt)) : undefined,
2935
+ condition: output.condition != null ? deserializeAws_restJson1ConditionKeyMap(output.condition, context) : undefined,
2936
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdAt)) : undefined,
3015
2937
  error: (0, smithy_client_1.expectString)(output.error),
3016
2938
  id: (0, smithy_client_1.expectString)(output.id),
3017
2939
  isPublic: (0, smithy_client_1.expectBoolean)(output.isPublic),
3018
- principal: output.principal !== undefined && output.principal !== null
3019
- ? deserializeAws_restJson1PrincipalMap(output.principal, context)
3020
- : undefined,
2940
+ principal: output.principal != null ? deserializeAws_restJson1PrincipalMap(output.principal, context) : undefined,
3021
2941
  resource: (0, smithy_client_1.expectString)(output.resource),
3022
2942
  resourceOwnerAccount: (0, smithy_client_1.expectString)(output.resourceOwnerAccount),
3023
2943
  resourceType: (0, smithy_client_1.expectString)(output.resourceType),
3024
- sources: output.sources !== undefined && output.sources !== null
3025
- ? deserializeAws_restJson1FindingSourceList(output.sources, context)
3026
- : undefined,
2944
+ sources: output.sources != null ? deserializeAws_restJson1FindingSourceList(output.sources, context) : undefined,
3027
2945
  status: (0, smithy_client_1.expectString)(output.status),
3028
- updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
3029
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt))
3030
- : undefined,
2946
+ updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.updatedAt)) : undefined,
3031
2947
  };
3032
2948
  };
3033
2949
  const deserializeAws_restJson1GeneratedPolicy = (output, context) => {
@@ -3048,7 +2964,7 @@ const deserializeAws_restJson1GeneratedPolicyList = (output, context) => {
3048
2964
  };
3049
2965
  const deserializeAws_restJson1GeneratedPolicyProperties = (output, context) => {
3050
2966
  return {
3051
- cloudTrailProperties: output.cloudTrailProperties !== undefined && output.cloudTrailProperties !== null
2967
+ cloudTrailProperties: output.cloudTrailProperties != null
3052
2968
  ? deserializeAws_restJson1CloudTrailProperties(output.cloudTrailProperties, context)
3053
2969
  : undefined,
3054
2970
  isComplete: (0, smithy_client_1.expectBoolean)(output.isComplete),
@@ -3057,10 +2973,10 @@ const deserializeAws_restJson1GeneratedPolicyProperties = (output, context) => {
3057
2973
  };
3058
2974
  const deserializeAws_restJson1GeneratedPolicyResult = (output, context) => {
3059
2975
  return {
3060
- generatedPolicies: output.generatedPolicies !== undefined && output.generatedPolicies !== null
2976
+ generatedPolicies: output.generatedPolicies != null
3061
2977
  ? deserializeAws_restJson1GeneratedPolicyList(output.generatedPolicies, context)
3062
2978
  : undefined,
3063
- properties: output.properties !== undefined && output.properties !== null
2979
+ properties: output.properties != null
3064
2980
  ? deserializeAws_restJson1GeneratedPolicyProperties(output.properties, context)
3065
2981
  : undefined,
3066
2982
  };
@@ -3075,16 +2991,10 @@ const deserializeAws_restJson1InternetConfiguration = (output, context) => {
3075
2991
  };
3076
2992
  const deserializeAws_restJson1JobDetails = (output, context) => {
3077
2993
  return {
3078
- completedOn: output.completedOn !== undefined && output.completedOn !== null
3079
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.completedOn))
3080
- : undefined,
3081
- jobError: output.jobError !== undefined && output.jobError !== null
3082
- ? deserializeAws_restJson1JobError(output.jobError, context)
3083
- : undefined,
2994
+ completedOn: output.completedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.completedOn)) : undefined,
2995
+ jobError: output.jobError != null ? deserializeAws_restJson1JobError(output.jobError, context) : undefined,
3084
2996
  jobId: (0, smithy_client_1.expectString)(output.jobId),
3085
- startedOn: output.startedOn !== undefined && output.startedOn !== null
3086
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.startedOn))
3087
- : undefined,
2997
+ startedOn: output.startedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.startedOn)) : undefined,
3088
2998
  status: (0, smithy_client_1.expectString)(output.status),
3089
2999
  };
3090
3000
  };
@@ -3107,12 +3017,10 @@ const deserializeAws_restJson1KmsConstraintsMap = (output, context) => {
3107
3017
  };
3108
3018
  const deserializeAws_restJson1KmsGrantConfiguration = (output, context) => {
3109
3019
  return {
3110
- constraints: output.constraints !== undefined && output.constraints !== null
3111
- ? deserializeAws_restJson1KmsGrantConstraints(output.constraints, context)
3112
- : undefined,
3020
+ constraints: output.constraints != null ? deserializeAws_restJson1KmsGrantConstraints(output.constraints, context) : undefined,
3113
3021
  granteePrincipal: (0, smithy_client_1.expectString)(output.granteePrincipal),
3114
3022
  issuingAccount: (0, smithy_client_1.expectString)(output.issuingAccount),
3115
- operations: output.operations !== undefined && output.operations !== null
3023
+ operations: output.operations != null
3116
3024
  ? deserializeAws_restJson1KmsGrantOperationsList(output.operations, context)
3117
3025
  : undefined,
3118
3026
  retiringPrincipal: (0, smithy_client_1.expectString)(output.retiringPrincipal),
@@ -3131,10 +3039,10 @@ const deserializeAws_restJson1KmsGrantConfigurationsList = (output, context) =>
3131
3039
  };
3132
3040
  const deserializeAws_restJson1KmsGrantConstraints = (output, context) => {
3133
3041
  return {
3134
- encryptionContextEquals: output.encryptionContextEquals !== undefined && output.encryptionContextEquals !== null
3042
+ encryptionContextEquals: output.encryptionContextEquals != null
3135
3043
  ? deserializeAws_restJson1KmsConstraintsMap(output.encryptionContextEquals, context)
3136
3044
  : undefined,
3137
- encryptionContextSubset: output.encryptionContextSubset !== undefined && output.encryptionContextSubset !== null
3045
+ encryptionContextSubset: output.encryptionContextSubset != null
3138
3046
  ? deserializeAws_restJson1KmsConstraintsMap(output.encryptionContextSubset, context)
3139
3047
  : undefined,
3140
3048
  };
@@ -3152,12 +3060,8 @@ const deserializeAws_restJson1KmsGrantOperationsList = (output, context) => {
3152
3060
  };
3153
3061
  const deserializeAws_restJson1KmsKeyConfiguration = (output, context) => {
3154
3062
  return {
3155
- grants: output.grants !== undefined && output.grants !== null
3156
- ? deserializeAws_restJson1KmsGrantConfigurationsList(output.grants, context)
3157
- : undefined,
3158
- keyPolicies: output.keyPolicies !== undefined && output.keyPolicies !== null
3159
- ? deserializeAws_restJson1KmsKeyPoliciesMap(output.keyPolicies, context)
3160
- : undefined,
3063
+ grants: output.grants != null ? deserializeAws_restJson1KmsGrantConfigurationsList(output.grants, context) : undefined,
3064
+ keyPolicies: output.keyPolicies != null ? deserializeAws_restJson1KmsKeyPoliciesMap(output.keyPolicies, context) : undefined,
3161
3065
  };
3162
3066
  };
3163
3067
  const deserializeAws_restJson1KmsKeyPoliciesMap = (output, context) => {
@@ -3173,12 +3077,8 @@ const deserializeAws_restJson1KmsKeyPoliciesMap = (output, context) => {
3173
3077
  };
3174
3078
  const deserializeAws_restJson1Location = (output, context) => {
3175
3079
  return {
3176
- path: output.path !== undefined && output.path !== null
3177
- ? deserializeAws_restJson1PathElementList(output.path, context)
3178
- : undefined,
3179
- span: output.span !== undefined && output.span !== null
3180
- ? deserializeAws_restJson1Span(output.span, context)
3181
- : undefined,
3080
+ path: output.path != null ? deserializeAws_restJson1PathElementList(output.path, context) : undefined,
3081
+ span: output.span != null ? deserializeAws_restJson1Span(output.span, context) : undefined,
3182
3082
  };
3183
3083
  };
3184
3084
  const deserializeAws_restJson1LocationList = (output, context) => {
@@ -3235,14 +3135,10 @@ const deserializeAws_restJson1PathElementList = (output, context) => {
3235
3135
  };
3236
3136
  const deserializeAws_restJson1PolicyGeneration = (output, context) => {
3237
3137
  return {
3238
- completedOn: output.completedOn !== undefined && output.completedOn !== null
3239
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.completedOn))
3240
- : undefined,
3138
+ completedOn: output.completedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.completedOn)) : undefined,
3241
3139
  jobId: (0, smithy_client_1.expectString)(output.jobId),
3242
3140
  principalArn: (0, smithy_client_1.expectString)(output.principalArn),
3243
- startedOn: output.startedOn !== undefined && output.startedOn !== null
3244
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.startedOn))
3245
- : undefined,
3141
+ startedOn: output.startedOn != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.startedOn)) : undefined,
3246
3142
  status: (0, smithy_client_1.expectString)(output.status),
3247
3143
  };
3248
3144
  };
@@ -3289,10 +3185,10 @@ const deserializeAws_restJson1RegionList = (output, context) => {
3289
3185
  const deserializeAws_restJson1S3AccessPointConfiguration = (output, context) => {
3290
3186
  return {
3291
3187
  accessPointPolicy: (0, smithy_client_1.expectString)(output.accessPointPolicy),
3292
- networkOrigin: output.networkOrigin !== undefined && output.networkOrigin !== null
3188
+ networkOrigin: output.networkOrigin != null
3293
3189
  ? deserializeAws_restJson1NetworkOriginConfiguration((0, smithy_client_1.expectUnion)(output.networkOrigin), context)
3294
3190
  : undefined,
3295
- publicAccessBlock: output.publicAccessBlock !== undefined && output.publicAccessBlock !== null
3191
+ publicAccessBlock: output.publicAccessBlock != null
3296
3192
  ? deserializeAws_restJson1S3PublicAccessBlockConfiguration(output.publicAccessBlock, context)
3297
3193
  : undefined,
3298
3194
  };
@@ -3310,9 +3206,7 @@ const deserializeAws_restJson1S3AccessPointConfigurationsMap = (output, context)
3310
3206
  };
3311
3207
  const deserializeAws_restJson1S3BucketAclGrantConfiguration = (output, context) => {
3312
3208
  return {
3313
- grantee: output.grantee !== undefined && output.grantee !== null
3314
- ? deserializeAws_restJson1AclGrantee((0, smithy_client_1.expectUnion)(output.grantee), context)
3315
- : undefined,
3209
+ grantee: output.grantee != null ? deserializeAws_restJson1AclGrantee((0, smithy_client_1.expectUnion)(output.grantee), context) : undefined,
3316
3210
  permission: (0, smithy_client_1.expectString)(output.permission),
3317
3211
  };
3318
3212
  };
@@ -3329,14 +3223,14 @@ const deserializeAws_restJson1S3BucketAclGrantConfigurationsList = (output, cont
3329
3223
  };
3330
3224
  const deserializeAws_restJson1S3BucketConfiguration = (output, context) => {
3331
3225
  return {
3332
- accessPoints: output.accessPoints !== undefined && output.accessPoints !== null
3226
+ accessPoints: output.accessPoints != null
3333
3227
  ? deserializeAws_restJson1S3AccessPointConfigurationsMap(output.accessPoints, context)
3334
3228
  : undefined,
3335
- bucketAclGrants: output.bucketAclGrants !== undefined && output.bucketAclGrants !== null
3229
+ bucketAclGrants: output.bucketAclGrants != null
3336
3230
  ? deserializeAws_restJson1S3BucketAclGrantConfigurationsList(output.bucketAclGrants, context)
3337
3231
  : undefined,
3338
3232
  bucketPolicy: (0, smithy_client_1.expectString)(output.bucketPolicy),
3339
- bucketPublicAccessBlock: output.bucketPublicAccessBlock !== undefined && output.bucketPublicAccessBlock !== null
3233
+ bucketPublicAccessBlock: output.bucketPublicAccessBlock != null
3340
3234
  ? deserializeAws_restJson1S3PublicAccessBlockConfiguration(output.bucketPublicAccessBlock, context)
3341
3235
  : undefined,
3342
3236
  };
@@ -3366,12 +3260,8 @@ const deserializeAws_restJson1SharedViaList = (output, context) => {
3366
3260
  };
3367
3261
  const deserializeAws_restJson1Span = (output, context) => {
3368
3262
  return {
3369
- end: output.end !== undefined && output.end !== null
3370
- ? deserializeAws_restJson1Position(output.end, context)
3371
- : undefined,
3372
- start: output.start !== undefined && output.start !== null
3373
- ? deserializeAws_restJson1Position(output.start, context)
3374
- : undefined,
3263
+ end: output.end != null ? deserializeAws_restJson1Position(output.end, context) : undefined,
3264
+ start: output.start != null ? deserializeAws_restJson1Position(output.start, context) : undefined,
3375
3265
  };
3376
3266
  };
3377
3267
  const deserializeAws_restJson1SqsQueueConfiguration = (output, context) => {
@@ -3405,9 +3295,7 @@ const deserializeAws_restJson1TrailProperties = (output, context) => {
3405
3295
  return {
3406
3296
  allRegions: (0, smithy_client_1.expectBoolean)(output.allRegions),
3407
3297
  cloudTrailArn: (0, smithy_client_1.expectString)(output.cloudTrailArn),
3408
- regions: output.regions !== undefined && output.regions !== null
3409
- ? deserializeAws_restJson1RegionList(output.regions, context)
3410
- : undefined,
3298
+ regions: output.regions != null ? deserializeAws_restJson1RegionList(output.regions, context) : undefined,
3411
3299
  };
3412
3300
  };
3413
3301
  const deserializeAws_restJson1TrailPropertiesList = (output, context) => {
@@ -3427,9 +3315,7 @@ const deserializeAws_restJson1ValidatePolicyFinding = (output, context) => {
3427
3315
  findingType: (0, smithy_client_1.expectString)(output.findingType),
3428
3316
  issueCode: (0, smithy_client_1.expectString)(output.issueCode),
3429
3317
  learnMoreLink: (0, smithy_client_1.expectString)(output.learnMoreLink),
3430
- locations: output.locations !== undefined && output.locations !== null
3431
- ? deserializeAws_restJson1LocationList(output.locations, context)
3432
- : undefined,
3318
+ locations: output.locations != null ? deserializeAws_restJson1LocationList(output.locations, context) : undefined,
3433
3319
  };
3434
3320
  };
3435
3321
  const deserializeAws_restJson1ValidatePolicyFindingList = (output, context) => {
@@ -3525,5 +3411,4 @@ const loadRestJsonErrorCode = (output, data) => {
3525
3411
  if (data["__type"] !== undefined) {
3526
3412
  return sanitizeErrorCode(data["__type"]);
3527
3413
  }
3528
- return "";
3529
3414
  };