@aws-sdk/client-efs 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.
@@ -17,14 +17,12 @@ const serializeAws_restJson1CreateAccessPointCommand = async (input, context) =>
17
17
  let body;
18
18
  body = JSON.stringify({
19
19
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
20
- ...(input.FileSystemId !== undefined && input.FileSystemId !== null && { FileSystemId: input.FileSystemId }),
21
- ...(input.PosixUser !== undefined &&
22
- input.PosixUser !== null && { PosixUser: serializeAws_restJson1PosixUser(input.PosixUser, context) }),
23
- ...(input.RootDirectory !== undefined &&
24
- input.RootDirectory !== null && {
20
+ ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }),
21
+ ...(input.PosixUser != null && { PosixUser: serializeAws_restJson1PosixUser(input.PosixUser, context) }),
22
+ ...(input.RootDirectory != null && {
25
23
  RootDirectory: serializeAws_restJson1RootDirectory(input.RootDirectory, context),
26
24
  }),
27
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
25
+ ...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
28
26
  });
29
27
  return new protocol_http_1.HttpRequest({
30
28
  protocol,
@@ -46,21 +44,17 @@ const serializeAws_restJson1CreateFileSystemCommand = async (input, context) =>
46
44
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems";
47
45
  let body;
48
46
  body = JSON.stringify({
49
- ...(input.AvailabilityZoneName !== undefined &&
50
- input.AvailabilityZoneName !== null && { AvailabilityZoneName: input.AvailabilityZoneName }),
51
- ...(input.Backup !== undefined && input.Backup !== null && { Backup: input.Backup }),
47
+ ...(input.AvailabilityZoneName != null && { AvailabilityZoneName: input.AvailabilityZoneName }),
48
+ ...(input.Backup != null && { Backup: input.Backup }),
52
49
  CreationToken: (_a = input.CreationToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
53
- ...(input.Encrypted !== undefined && input.Encrypted !== null && { Encrypted: input.Encrypted }),
54
- ...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
55
- ...(input.PerformanceMode !== undefined &&
56
- input.PerformanceMode !== null && { PerformanceMode: input.PerformanceMode }),
57
- ...(input.ProvisionedThroughputInMibps !== undefined &&
58
- input.ProvisionedThroughputInMibps !== null && {
50
+ ...(input.Encrypted != null && { Encrypted: input.Encrypted }),
51
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
52
+ ...(input.PerformanceMode != null && { PerformanceMode: input.PerformanceMode }),
53
+ ...(input.ProvisionedThroughputInMibps != null && {
59
54
  ProvisionedThroughputInMibps: (0, smithy_client_1.serializeFloat)(input.ProvisionedThroughputInMibps),
60
55
  }),
61
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
62
- ...(input.ThroughputMode !== undefined &&
63
- input.ThroughputMode !== null && { ThroughputMode: input.ThroughputMode }),
56
+ ...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
57
+ ...(input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode }),
64
58
  });
65
59
  return new protocol_http_1.HttpRequest({
66
60
  protocol,
@@ -81,13 +75,12 @@ const serializeAws_restJson1CreateMountTargetCommand = async (input, context) =>
81
75
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets";
82
76
  let body;
83
77
  body = JSON.stringify({
84
- ...(input.FileSystemId !== undefined && input.FileSystemId !== null && { FileSystemId: input.FileSystemId }),
85
- ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }),
86
- ...(input.SecurityGroups !== undefined &&
87
- input.SecurityGroups !== null && {
78
+ ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }),
79
+ ...(input.IpAddress != null && { IpAddress: input.IpAddress }),
80
+ ...(input.SecurityGroups != null && {
88
81
  SecurityGroups: serializeAws_restJson1SecurityGroups(input.SecurityGroups, context),
89
82
  }),
90
- ...(input.SubnetId !== undefined && input.SubnetId !== null && { SubnetId: input.SubnetId }),
83
+ ...(input.SubnetId != null && { SubnetId: input.SubnetId }),
91
84
  });
92
85
  return new protocol_http_1.HttpRequest({
93
86
  protocol,
@@ -119,8 +112,7 @@ const serializeAws_restJson1CreateReplicationConfigurationCommand = async (input
119
112
  }
120
113
  let body;
121
114
  body = JSON.stringify({
122
- ...(input.Destinations !== undefined &&
123
- input.Destinations !== null && {
115
+ ...(input.Destinations != null && {
124
116
  Destinations: serializeAws_restJson1DestinationsToCreate(input.Destinations, context),
125
117
  }),
126
118
  });
@@ -153,7 +145,7 @@ const serializeAws_restJson1CreateTagsCommand = async (input, context) => {
153
145
  }
154
146
  let body;
155
147
  body = JSON.stringify({
156
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
148
+ ...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
157
149
  });
158
150
  return new protocol_http_1.HttpRequest({
159
151
  protocol,
@@ -316,8 +308,7 @@ const serializeAws_restJson1DeleteTagsCommand = async (input, context) => {
316
308
  }
317
309
  let body;
318
310
  body = JSON.stringify({
319
- ...(input.TagKeys !== undefined &&
320
- input.TagKeys !== null && { TagKeys: serializeAws_restJson1TagKeys(input.TagKeys, context) }),
311
+ ...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeys(input.TagKeys, context) }),
321
312
  });
322
313
  return new protocol_http_1.HttpRequest({
323
314
  protocol,
@@ -361,8 +352,8 @@ const serializeAws_restJson1DescribeAccountPreferencesCommand = async (input, co
361
352
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences";
362
353
  let body;
363
354
  body = JSON.stringify({
364
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
365
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
355
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
356
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
366
357
  });
367
358
  return new protocol_http_1.HttpRequest({
368
359
  protocol,
@@ -634,8 +625,7 @@ const serializeAws_restJson1ModifyMountTargetSecurityGroupsCommand = async (inpu
634
625
  }
635
626
  let body;
636
627
  body = JSON.stringify({
637
- ...(input.SecurityGroups !== undefined &&
638
- input.SecurityGroups !== null && {
628
+ ...(input.SecurityGroups != null && {
639
629
  SecurityGroups: serializeAws_restJson1SecurityGroups(input.SecurityGroups, context),
640
630
  }),
641
631
  });
@@ -658,8 +648,7 @@ const serializeAws_restJson1PutAccountPreferencesCommand = async (input, context
658
648
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences";
659
649
  let body;
660
650
  body = JSON.stringify({
661
- ...(input.ResourceIdType !== undefined &&
662
- input.ResourceIdType !== null && { ResourceIdType: input.ResourceIdType }),
651
+ ...(input.ResourceIdType != null && { ResourceIdType: input.ResourceIdType }),
663
652
  });
664
653
  return new protocol_http_1.HttpRequest({
665
654
  protocol,
@@ -691,8 +680,9 @@ const serializeAws_restJson1PutBackupPolicyCommand = async (input, context) => {
691
680
  }
692
681
  let body;
693
682
  body = JSON.stringify({
694
- ...(input.BackupPolicy !== undefined &&
695
- input.BackupPolicy !== null && { BackupPolicy: serializeAws_restJson1BackupPolicy(input.BackupPolicy, context) }),
683
+ ...(input.BackupPolicy != null && {
684
+ BackupPolicy: serializeAws_restJson1BackupPolicy(input.BackupPolicy, context),
685
+ }),
696
686
  });
697
687
  return new protocol_http_1.HttpRequest({
698
688
  protocol,
@@ -724,11 +714,10 @@ const serializeAws_restJson1PutFileSystemPolicyCommand = async (input, context)
724
714
  }
725
715
  let body;
726
716
  body = JSON.stringify({
727
- ...(input.BypassPolicyLockoutSafetyCheck !== undefined &&
728
- input.BypassPolicyLockoutSafetyCheck !== null && {
717
+ ...(input.BypassPolicyLockoutSafetyCheck != null && {
729
718
  BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck,
730
719
  }),
731
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
720
+ ...(input.Policy != null && { Policy: input.Policy }),
732
721
  });
733
722
  return new protocol_http_1.HttpRequest({
734
723
  protocol,
@@ -760,8 +749,7 @@ const serializeAws_restJson1PutLifecycleConfigurationCommand = async (input, con
760
749
  }
761
750
  let body;
762
751
  body = JSON.stringify({
763
- ...(input.LifecyclePolicies !== undefined &&
764
- input.LifecyclePolicies !== null && {
752
+ ...(input.LifecyclePolicies != null && {
765
753
  LifecyclePolicies: serializeAws_restJson1LifecyclePolicies(input.LifecyclePolicies, context),
766
754
  }),
767
755
  });
@@ -794,7 +782,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
794
782
  }
795
783
  let body;
796
784
  body = JSON.stringify({
797
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
785
+ ...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
798
786
  });
799
787
  return new protocol_http_1.HttpRequest({
800
788
  protocol,
@@ -855,12 +843,10 @@ const serializeAws_restJson1UpdateFileSystemCommand = async (input, context) =>
855
843
  }
856
844
  let body;
857
845
  body = JSON.stringify({
858
- ...(input.ProvisionedThroughputInMibps !== undefined &&
859
- input.ProvisionedThroughputInMibps !== null && {
846
+ ...(input.ProvisionedThroughputInMibps != null && {
860
847
  ProvisionedThroughputInMibps: (0, smithy_client_1.serializeFloat)(input.ProvisionedThroughputInMibps),
861
848
  }),
862
- ...(input.ThroughputMode !== undefined &&
863
- input.ThroughputMode !== null && { ThroughputMode: input.ThroughputMode }),
849
+ ...(input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode }),
864
850
  });
865
851
  return new protocol_http_1.HttpRequest({
866
852
  protocol,
@@ -930,8 +916,7 @@ const deserializeAws_restJson1CreateAccessPointCommandError = async (output, con
930
916
  body: await parseBody(output.body, context),
931
917
  };
932
918
  let response;
933
- let errorCode = "UnknownError";
934
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
919
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
935
920
  switch (errorCode) {
936
921
  case "AccessPointAlreadyExists":
937
922
  case "com.amazonaws.efs#AccessPointAlreadyExists":
@@ -956,10 +941,12 @@ const deserializeAws_restJson1CreateAccessPointCommandError = async (output, con
956
941
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
957
942
  default:
958
943
  const parsedBody = parsedOutput.body;
944
+ const $metadata = deserializeMetadata(output);
945
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
959
946
  response = new EFSServiceException_1.EFSServiceException({
960
- name: parsedBody.code || parsedBody.Code || errorCode,
947
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
961
948
  $fault: "client",
962
- $metadata: deserializeMetadata(output),
949
+ $metadata,
963
950
  });
964
951
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
965
952
  }
@@ -1049,8 +1036,7 @@ const deserializeAws_restJson1CreateFileSystemCommandError = async (output, cont
1049
1036
  body: await parseBody(output.body, context),
1050
1037
  };
1051
1038
  let response;
1052
- let errorCode = "UnknownError";
1053
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1039
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1054
1040
  switch (errorCode) {
1055
1041
  case "BadRequest":
1056
1042
  case "com.amazonaws.efs#BadRequest":
@@ -1075,10 +1061,12 @@ const deserializeAws_restJson1CreateFileSystemCommandError = async (output, cont
1075
1061
  throw await deserializeAws_restJson1UnsupportedAvailabilityZoneResponse(parsedOutput, context);
1076
1062
  default:
1077
1063
  const parsedBody = parsedOutput.body;
1064
+ const $metadata = deserializeMetadata(output);
1065
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1078
1066
  response = new EFSServiceException_1.EFSServiceException({
1079
- name: parsedBody.code || parsedBody.Code || errorCode,
1067
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1080
1068
  $fault: "client",
1081
- $metadata: deserializeMetadata(output),
1069
+ $metadata,
1082
1070
  });
1083
1071
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1084
1072
  }
@@ -1140,8 +1128,7 @@ const deserializeAws_restJson1CreateMountTargetCommandError = async (output, con
1140
1128
  body: await parseBody(output.body, context),
1141
1129
  };
1142
1130
  let response;
1143
- let errorCode = "UnknownError";
1144
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1131
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1145
1132
  switch (errorCode) {
1146
1133
  case "AvailabilityZonesMismatch":
1147
1134
  case "com.amazonaws.efs#AvailabilityZonesMismatch":
@@ -1184,10 +1171,12 @@ const deserializeAws_restJson1CreateMountTargetCommandError = async (output, con
1184
1171
  throw await deserializeAws_restJson1UnsupportedAvailabilityZoneResponse(parsedOutput, context);
1185
1172
  default:
1186
1173
  const parsedBody = parsedOutput.body;
1174
+ const $metadata = deserializeMetadata(output);
1175
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1187
1176
  response = new EFSServiceException_1.EFSServiceException({
1188
- name: parsedBody.code || parsedBody.Code || errorCode,
1177
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1189
1178
  $fault: "client",
1190
- $metadata: deserializeMetadata(output),
1179
+ $metadata,
1191
1180
  });
1192
1181
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1193
1182
  }
@@ -1233,8 +1222,7 @@ const deserializeAws_restJson1CreateReplicationConfigurationCommandError = async
1233
1222
  body: await parseBody(output.body, context),
1234
1223
  };
1235
1224
  let response;
1236
- let errorCode = "UnknownError";
1237
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1225
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1238
1226
  switch (errorCode) {
1239
1227
  case "BadRequest":
1240
1228
  case "com.amazonaws.efs#BadRequest":
@@ -1268,10 +1256,12 @@ const deserializeAws_restJson1CreateReplicationConfigurationCommandError = async
1268
1256
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1269
1257
  default:
1270
1258
  const parsedBody = parsedOutput.body;
1259
+ const $metadata = deserializeMetadata(output);
1260
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1271
1261
  response = new EFSServiceException_1.EFSServiceException({
1272
- name: parsedBody.code || parsedBody.Code || errorCode,
1262
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1273
1263
  $fault: "client",
1274
- $metadata: deserializeMetadata(output),
1264
+ $metadata,
1275
1265
  });
1276
1266
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1277
1267
  }
@@ -1293,8 +1283,7 @@ const deserializeAws_restJson1CreateTagsCommandError = async (output, context) =
1293
1283
  body: await parseBody(output.body, context),
1294
1284
  };
1295
1285
  let response;
1296
- let errorCode = "UnknownError";
1297
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1286
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1298
1287
  switch (errorCode) {
1299
1288
  case "BadRequest":
1300
1289
  case "com.amazonaws.efs#BadRequest":
@@ -1307,10 +1296,12 @@ const deserializeAws_restJson1CreateTagsCommandError = async (output, context) =
1307
1296
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1308
1297
  default:
1309
1298
  const parsedBody = parsedOutput.body;
1299
+ const $metadata = deserializeMetadata(output);
1300
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1310
1301
  response = new EFSServiceException_1.EFSServiceException({
1311
- name: parsedBody.code || parsedBody.Code || errorCode,
1302
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1312
1303
  $fault: "client",
1313
- $metadata: deserializeMetadata(output),
1304
+ $metadata,
1314
1305
  });
1315
1306
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1316
1307
  }
@@ -1332,8 +1323,7 @@ const deserializeAws_restJson1DeleteAccessPointCommandError = async (output, con
1332
1323
  body: await parseBody(output.body, context),
1333
1324
  };
1334
1325
  let response;
1335
- let errorCode = "UnknownError";
1336
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1326
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1337
1327
  switch (errorCode) {
1338
1328
  case "AccessPointNotFound":
1339
1329
  case "com.amazonaws.efs#AccessPointNotFound":
@@ -1346,10 +1336,12 @@ const deserializeAws_restJson1DeleteAccessPointCommandError = async (output, con
1346
1336
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1347
1337
  default:
1348
1338
  const parsedBody = parsedOutput.body;
1339
+ const $metadata = deserializeMetadata(output);
1340
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1349
1341
  response = new EFSServiceException_1.EFSServiceException({
1350
- name: parsedBody.code || parsedBody.Code || errorCode,
1342
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1351
1343
  $fault: "client",
1352
- $metadata: deserializeMetadata(output),
1344
+ $metadata,
1353
1345
  });
1354
1346
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1355
1347
  }
@@ -1371,8 +1363,7 @@ const deserializeAws_restJson1DeleteFileSystemCommandError = async (output, cont
1371
1363
  body: await parseBody(output.body, context),
1372
1364
  };
1373
1365
  let response;
1374
- let errorCode = "UnknownError";
1375
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1366
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1376
1367
  switch (errorCode) {
1377
1368
  case "BadRequest":
1378
1369
  case "com.amazonaws.efs#BadRequest":
@@ -1388,10 +1379,12 @@ const deserializeAws_restJson1DeleteFileSystemCommandError = async (output, cont
1388
1379
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1389
1380
  default:
1390
1381
  const parsedBody = parsedOutput.body;
1382
+ const $metadata = deserializeMetadata(output);
1383
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1391
1384
  response = new EFSServiceException_1.EFSServiceException({
1392
- name: parsedBody.code || parsedBody.Code || errorCode,
1385
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1393
1386
  $fault: "client",
1394
- $metadata: deserializeMetadata(output),
1387
+ $metadata,
1395
1388
  });
1396
1389
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1397
1390
  }
@@ -1413,8 +1406,7 @@ const deserializeAws_restJson1DeleteFileSystemPolicyCommandError = async (output
1413
1406
  body: await parseBody(output.body, context),
1414
1407
  };
1415
1408
  let response;
1416
- let errorCode = "UnknownError";
1417
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1409
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
1410
  switch (errorCode) {
1419
1411
  case "BadRequest":
1420
1412
  case "com.amazonaws.efs#BadRequest":
@@ -1430,10 +1422,12 @@ const deserializeAws_restJson1DeleteFileSystemPolicyCommandError = async (output
1430
1422
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1431
1423
  default:
1432
1424
  const parsedBody = parsedOutput.body;
1425
+ const $metadata = deserializeMetadata(output);
1426
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1433
1427
  response = new EFSServiceException_1.EFSServiceException({
1434
- name: parsedBody.code || parsedBody.Code || errorCode,
1428
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1435
1429
  $fault: "client",
1436
- $metadata: deserializeMetadata(output),
1430
+ $metadata,
1437
1431
  });
1438
1432
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1439
1433
  }
@@ -1455,8 +1449,7 @@ const deserializeAws_restJson1DeleteMountTargetCommandError = async (output, con
1455
1449
  body: await parseBody(output.body, context),
1456
1450
  };
1457
1451
  let response;
1458
- let errorCode = "UnknownError";
1459
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1452
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1460
1453
  switch (errorCode) {
1461
1454
  case "BadRequest":
1462
1455
  case "com.amazonaws.efs#BadRequest":
@@ -1472,10 +1465,12 @@ const deserializeAws_restJson1DeleteMountTargetCommandError = async (output, con
1472
1465
  throw await deserializeAws_restJson1MountTargetNotFoundResponse(parsedOutput, context);
1473
1466
  default:
1474
1467
  const parsedBody = parsedOutput.body;
1468
+ const $metadata = deserializeMetadata(output);
1469
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1475
1470
  response = new EFSServiceException_1.EFSServiceException({
1476
- name: parsedBody.code || parsedBody.Code || errorCode,
1471
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1477
1472
  $fault: "client",
1478
- $metadata: deserializeMetadata(output),
1473
+ $metadata,
1479
1474
  });
1480
1475
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1481
1476
  }
@@ -1497,8 +1492,7 @@ const deserializeAws_restJson1DeleteReplicationConfigurationCommandError = async
1497
1492
  body: await parseBody(output.body, context),
1498
1493
  };
1499
1494
  let response;
1500
- let errorCode = "UnknownError";
1501
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1495
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1502
1496
  switch (errorCode) {
1503
1497
  case "BadRequest":
1504
1498
  case "com.amazonaws.efs#BadRequest":
@@ -1514,10 +1508,12 @@ const deserializeAws_restJson1DeleteReplicationConfigurationCommandError = async
1514
1508
  throw await deserializeAws_restJson1ReplicationNotFoundResponse(parsedOutput, context);
1515
1509
  default:
1516
1510
  const parsedBody = parsedOutput.body;
1511
+ const $metadata = deserializeMetadata(output);
1512
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1517
1513
  response = new EFSServiceException_1.EFSServiceException({
1518
- name: parsedBody.code || parsedBody.Code || errorCode,
1514
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1519
1515
  $fault: "client",
1520
- $metadata: deserializeMetadata(output),
1516
+ $metadata,
1521
1517
  });
1522
1518
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1523
1519
  }
@@ -1539,8 +1535,7 @@ const deserializeAws_restJson1DeleteTagsCommandError = async (output, context) =
1539
1535
  body: await parseBody(output.body, context),
1540
1536
  };
1541
1537
  let response;
1542
- let errorCode = "UnknownError";
1543
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1538
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1544
1539
  switch (errorCode) {
1545
1540
  case "BadRequest":
1546
1541
  case "com.amazonaws.efs#BadRequest":
@@ -1553,10 +1548,12 @@ const deserializeAws_restJson1DeleteTagsCommandError = async (output, context) =
1553
1548
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1554
1549
  default:
1555
1550
  const parsedBody = parsedOutput.body;
1551
+ const $metadata = deserializeMetadata(output);
1552
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1556
1553
  response = new EFSServiceException_1.EFSServiceException({
1557
- name: parsedBody.code || parsedBody.Code || errorCode,
1554
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1558
1555
  $fault: "client",
1559
- $metadata: deserializeMetadata(output),
1556
+ $metadata,
1560
1557
  });
1561
1558
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1562
1559
  }
@@ -1586,8 +1583,7 @@ const deserializeAws_restJson1DescribeAccessPointsCommandError = async (output,
1586
1583
  body: await parseBody(output.body, context),
1587
1584
  };
1588
1585
  let response;
1589
- let errorCode = "UnknownError";
1590
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1586
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1591
1587
  switch (errorCode) {
1592
1588
  case "AccessPointNotFound":
1593
1589
  case "com.amazonaws.efs#AccessPointNotFound":
@@ -1603,10 +1599,12 @@ const deserializeAws_restJson1DescribeAccessPointsCommandError = async (output,
1603
1599
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1604
1600
  default:
1605
1601
  const parsedBody = parsedOutput.body;
1602
+ const $metadata = deserializeMetadata(output);
1603
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1606
1604
  response = new EFSServiceException_1.EFSServiceException({
1607
- name: parsedBody.code || parsedBody.Code || errorCode,
1605
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1608
1606
  $fault: "client",
1609
- $metadata: deserializeMetadata(output),
1607
+ $metadata,
1610
1608
  });
1611
1609
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1612
1610
  }
@@ -1636,18 +1634,19 @@ const deserializeAws_restJson1DescribeAccountPreferencesCommandError = async (ou
1636
1634
  body: await parseBody(output.body, context),
1637
1635
  };
1638
1636
  let response;
1639
- let errorCode = "UnknownError";
1640
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1637
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1641
1638
  switch (errorCode) {
1642
1639
  case "InternalServerError":
1643
1640
  case "com.amazonaws.efs#InternalServerError":
1644
1641
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1645
1642
  default:
1646
1643
  const parsedBody = parsedOutput.body;
1644
+ const $metadata = deserializeMetadata(output);
1645
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1647
1646
  response = new EFSServiceException_1.EFSServiceException({
1648
- name: parsedBody.code || parsedBody.Code || errorCode,
1647
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1649
1648
  $fault: "client",
1650
- $metadata: deserializeMetadata(output),
1649
+ $metadata,
1651
1650
  });
1652
1651
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1653
1652
  }
@@ -1673,8 +1672,7 @@ const deserializeAws_restJson1DescribeBackupPolicyCommandError = async (output,
1673
1672
  body: await parseBody(output.body, context),
1674
1673
  };
1675
1674
  let response;
1676
- let errorCode = "UnknownError";
1677
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1675
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1678
1676
  switch (errorCode) {
1679
1677
  case "BadRequest":
1680
1678
  case "com.amazonaws.efs#BadRequest":
@@ -1693,10 +1691,12 @@ const deserializeAws_restJson1DescribeBackupPolicyCommandError = async (output,
1693
1691
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1694
1692
  default:
1695
1693
  const parsedBody = parsedOutput.body;
1694
+ const $metadata = deserializeMetadata(output);
1695
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1696
1696
  response = new EFSServiceException_1.EFSServiceException({
1697
- name: parsedBody.code || parsedBody.Code || errorCode,
1697
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1698
1698
  $fault: "client",
1699
- $metadata: deserializeMetadata(output),
1699
+ $metadata,
1700
1700
  });
1701
1701
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1702
1702
  }
@@ -1726,8 +1726,7 @@ const deserializeAws_restJson1DescribeFileSystemPolicyCommandError = async (outp
1726
1726
  body: await parseBody(output.body, context),
1727
1727
  };
1728
1728
  let response;
1729
- let errorCode = "UnknownError";
1730
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1729
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1731
1730
  switch (errorCode) {
1732
1731
  case "BadRequest":
1733
1732
  case "com.amazonaws.efs#BadRequest":
@@ -1743,10 +1742,12 @@ const deserializeAws_restJson1DescribeFileSystemPolicyCommandError = async (outp
1743
1742
  throw await deserializeAws_restJson1PolicyNotFoundResponse(parsedOutput, context);
1744
1743
  default:
1745
1744
  const parsedBody = parsedOutput.body;
1745
+ const $metadata = deserializeMetadata(output);
1746
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1746
1747
  response = new EFSServiceException_1.EFSServiceException({
1747
- name: parsedBody.code || parsedBody.Code || errorCode,
1748
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1748
1749
  $fault: "client",
1749
- $metadata: deserializeMetadata(output),
1750
+ $metadata,
1750
1751
  });
1751
1752
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1752
1753
  }
@@ -1780,8 +1781,7 @@ const deserializeAws_restJson1DescribeFileSystemsCommandError = async (output, c
1780
1781
  body: await parseBody(output.body, context),
1781
1782
  };
1782
1783
  let response;
1783
- let errorCode = "UnknownError";
1784
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1784
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1785
1785
  switch (errorCode) {
1786
1786
  case "BadRequest":
1787
1787
  case "com.amazonaws.efs#BadRequest":
@@ -1794,10 +1794,12 @@ const deserializeAws_restJson1DescribeFileSystemsCommandError = async (output, c
1794
1794
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1795
1795
  default:
1796
1796
  const parsedBody = parsedOutput.body;
1797
+ const $metadata = deserializeMetadata(output);
1798
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1797
1799
  response = new EFSServiceException_1.EFSServiceException({
1798
- name: parsedBody.code || parsedBody.Code || errorCode,
1800
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1799
1801
  $fault: "client",
1800
- $metadata: deserializeMetadata(output),
1802
+ $metadata,
1801
1803
  });
1802
1804
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1803
1805
  }
@@ -1823,8 +1825,7 @@ const deserializeAws_restJson1DescribeLifecycleConfigurationCommandError = async
1823
1825
  body: await parseBody(output.body, context),
1824
1826
  };
1825
1827
  let response;
1826
- let errorCode = "UnknownError";
1827
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1828
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1828
1829
  switch (errorCode) {
1829
1830
  case "BadRequest":
1830
1831
  case "com.amazonaws.efs#BadRequest":
@@ -1837,10 +1838,12 @@ const deserializeAws_restJson1DescribeLifecycleConfigurationCommandError = async
1837
1838
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
1838
1839
  default:
1839
1840
  const parsedBody = parsedOutput.body;
1841
+ const $metadata = deserializeMetadata(output);
1842
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1840
1843
  response = new EFSServiceException_1.EFSServiceException({
1841
- name: parsedBody.code || parsedBody.Code || errorCode,
1844
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1842
1845
  $fault: "client",
1843
- $metadata: deserializeMetadata(output),
1846
+ $metadata,
1844
1847
  });
1845
1848
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1846
1849
  }
@@ -1874,8 +1877,7 @@ const deserializeAws_restJson1DescribeMountTargetsCommandError = async (output,
1874
1877
  body: await parseBody(output.body, context),
1875
1878
  };
1876
1879
  let response;
1877
- let errorCode = "UnknownError";
1878
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1880
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1879
1881
  switch (errorCode) {
1880
1882
  case "AccessPointNotFound":
1881
1883
  case "com.amazonaws.efs#AccessPointNotFound":
@@ -1894,10 +1896,12 @@ const deserializeAws_restJson1DescribeMountTargetsCommandError = async (output,
1894
1896
  throw await deserializeAws_restJson1MountTargetNotFoundResponse(parsedOutput, context);
1895
1897
  default:
1896
1898
  const parsedBody = parsedOutput.body;
1899
+ const $metadata = deserializeMetadata(output);
1900
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1897
1901
  response = new EFSServiceException_1.EFSServiceException({
1898
- name: parsedBody.code || parsedBody.Code || errorCode,
1902
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1899
1903
  $fault: "client",
1900
- $metadata: deserializeMetadata(output),
1904
+ $metadata,
1901
1905
  });
1902
1906
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1903
1907
  }
@@ -1923,8 +1927,7 @@ const deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommandError = as
1923
1927
  body: await parseBody(output.body, context),
1924
1928
  };
1925
1929
  let response;
1926
- let errorCode = "UnknownError";
1927
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1930
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1928
1931
  switch (errorCode) {
1929
1932
  case "BadRequest":
1930
1933
  case "com.amazonaws.efs#BadRequest":
@@ -1940,10 +1943,12 @@ const deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommandError = as
1940
1943
  throw await deserializeAws_restJson1MountTargetNotFoundResponse(parsedOutput, context);
1941
1944
  default:
1942
1945
  const parsedBody = parsedOutput.body;
1946
+ const $metadata = deserializeMetadata(output);
1947
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1943
1948
  response = new EFSServiceException_1.EFSServiceException({
1944
- name: parsedBody.code || parsedBody.Code || errorCode,
1949
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1945
1950
  $fault: "client",
1946
- $metadata: deserializeMetadata(output),
1951
+ $metadata,
1947
1952
  });
1948
1953
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1949
1954
  }
@@ -1973,8 +1978,7 @@ const deserializeAws_restJson1DescribeReplicationConfigurationsCommandError = as
1973
1978
  body: await parseBody(output.body, context),
1974
1979
  };
1975
1980
  let response;
1976
- let errorCode = "UnknownError";
1977
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1981
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1978
1982
  switch (errorCode) {
1979
1983
  case "BadRequest":
1980
1984
  case "com.amazonaws.efs#BadRequest":
@@ -1993,10 +1997,12 @@ const deserializeAws_restJson1DescribeReplicationConfigurationsCommandError = as
1993
1997
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1994
1998
  default:
1995
1999
  const parsedBody = parsedOutput.body;
2000
+ const $metadata = deserializeMetadata(output);
2001
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1996
2002
  response = new EFSServiceException_1.EFSServiceException({
1997
- name: parsedBody.code || parsedBody.Code || errorCode,
2003
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1998
2004
  $fault: "client",
1999
- $metadata: deserializeMetadata(output),
2005
+ $metadata,
2000
2006
  });
2001
2007
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2002
2008
  }
@@ -2030,8 +2036,7 @@ const deserializeAws_restJson1DescribeTagsCommandError = async (output, context)
2030
2036
  body: await parseBody(output.body, context),
2031
2037
  };
2032
2038
  let response;
2033
- let errorCode = "UnknownError";
2034
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2039
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2035
2040
  switch (errorCode) {
2036
2041
  case "BadRequest":
2037
2042
  case "com.amazonaws.efs#BadRequest":
@@ -2044,10 +2049,12 @@ const deserializeAws_restJson1DescribeTagsCommandError = async (output, context)
2044
2049
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
2045
2050
  default:
2046
2051
  const parsedBody = parsedOutput.body;
2052
+ const $metadata = deserializeMetadata(output);
2053
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2047
2054
  response = new EFSServiceException_1.EFSServiceException({
2048
- name: parsedBody.code || parsedBody.Code || errorCode,
2055
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2049
2056
  $fault: "client",
2050
- $metadata: deserializeMetadata(output),
2057
+ $metadata,
2051
2058
  });
2052
2059
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2053
2060
  }
@@ -2077,8 +2084,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2077
2084
  body: await parseBody(output.body, context),
2078
2085
  };
2079
2086
  let response;
2080
- let errorCode = "UnknownError";
2081
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2087
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2082
2088
  switch (errorCode) {
2083
2089
  case "AccessPointNotFound":
2084
2090
  case "com.amazonaws.efs#AccessPointNotFound":
@@ -2094,10 +2100,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2094
2100
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
2095
2101
  default:
2096
2102
  const parsedBody = parsedOutput.body;
2103
+ const $metadata = deserializeMetadata(output);
2104
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2097
2105
  response = new EFSServiceException_1.EFSServiceException({
2098
- name: parsedBody.code || parsedBody.Code || errorCode,
2106
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2099
2107
  $fault: "client",
2100
- $metadata: deserializeMetadata(output),
2108
+ $metadata,
2101
2109
  });
2102
2110
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2103
2111
  }
@@ -2119,8 +2127,7 @@ const deserializeAws_restJson1ModifyMountTargetSecurityGroupsCommandError = asyn
2119
2127
  body: await parseBody(output.body, context),
2120
2128
  };
2121
2129
  let response;
2122
- let errorCode = "UnknownError";
2123
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2130
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2124
2131
  switch (errorCode) {
2125
2132
  case "BadRequest":
2126
2133
  case "com.amazonaws.efs#BadRequest":
@@ -2142,10 +2149,12 @@ const deserializeAws_restJson1ModifyMountTargetSecurityGroupsCommandError = asyn
2142
2149
  throw await deserializeAws_restJson1SecurityGroupNotFoundResponse(parsedOutput, context);
2143
2150
  default:
2144
2151
  const parsedBody = parsedOutput.body;
2152
+ const $metadata = deserializeMetadata(output);
2153
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2145
2154
  response = new EFSServiceException_1.EFSServiceException({
2146
- name: parsedBody.code || parsedBody.Code || errorCode,
2155
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2147
2156
  $fault: "client",
2148
- $metadata: deserializeMetadata(output),
2157
+ $metadata,
2149
2158
  });
2150
2159
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2151
2160
  }
@@ -2171,8 +2180,7 @@ const deserializeAws_restJson1PutAccountPreferencesCommandError = async (output,
2171
2180
  body: await parseBody(output.body, context),
2172
2181
  };
2173
2182
  let response;
2174
- let errorCode = "UnknownError";
2175
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2183
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2176
2184
  switch (errorCode) {
2177
2185
  case "BadRequest":
2178
2186
  case "com.amazonaws.efs#BadRequest":
@@ -2182,10 +2190,12 @@ const deserializeAws_restJson1PutAccountPreferencesCommandError = async (output,
2182
2190
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
2183
2191
  default:
2184
2192
  const parsedBody = parsedOutput.body;
2193
+ const $metadata = deserializeMetadata(output);
2194
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2185
2195
  response = new EFSServiceException_1.EFSServiceException({
2186
- name: parsedBody.code || parsedBody.Code || errorCode,
2196
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2187
2197
  $fault: "client",
2188
- $metadata: deserializeMetadata(output),
2198
+ $metadata,
2189
2199
  });
2190
2200
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2191
2201
  }
@@ -2211,8 +2221,7 @@ const deserializeAws_restJson1PutBackupPolicyCommandError = async (output, conte
2211
2221
  body: await parseBody(output.body, context),
2212
2222
  };
2213
2223
  let response;
2214
- let errorCode = "UnknownError";
2215
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2224
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2216
2225
  switch (errorCode) {
2217
2226
  case "BadRequest":
2218
2227
  case "com.amazonaws.efs#BadRequest":
@@ -2231,10 +2240,12 @@ const deserializeAws_restJson1PutBackupPolicyCommandError = async (output, conte
2231
2240
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2232
2241
  default:
2233
2242
  const parsedBody = parsedOutput.body;
2243
+ const $metadata = deserializeMetadata(output);
2244
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2234
2245
  response = new EFSServiceException_1.EFSServiceException({
2235
- name: parsedBody.code || parsedBody.Code || errorCode,
2246
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2236
2247
  $fault: "client",
2237
- $metadata: deserializeMetadata(output),
2248
+ $metadata,
2238
2249
  });
2239
2250
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2240
2251
  }
@@ -2264,8 +2275,7 @@ const deserializeAws_restJson1PutFileSystemPolicyCommandError = async (output, c
2264
2275
  body: await parseBody(output.body, context),
2265
2276
  };
2266
2277
  let response;
2267
- let errorCode = "UnknownError";
2268
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2278
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2269
2279
  switch (errorCode) {
2270
2280
  case "BadRequest":
2271
2281
  case "com.amazonaws.efs#BadRequest":
@@ -2284,10 +2294,12 @@ const deserializeAws_restJson1PutFileSystemPolicyCommandError = async (output, c
2284
2294
  throw await deserializeAws_restJson1InvalidPolicyExceptionResponse(parsedOutput, context);
2285
2295
  default:
2286
2296
  const parsedBody = parsedOutput.body;
2297
+ const $metadata = deserializeMetadata(output);
2298
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2287
2299
  response = new EFSServiceException_1.EFSServiceException({
2288
- name: parsedBody.code || parsedBody.Code || errorCode,
2300
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2289
2301
  $fault: "client",
2290
- $metadata: deserializeMetadata(output),
2302
+ $metadata,
2291
2303
  });
2292
2304
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2293
2305
  }
@@ -2313,8 +2325,7 @@ const deserializeAws_restJson1PutLifecycleConfigurationCommandError = async (out
2313
2325
  body: await parseBody(output.body, context),
2314
2326
  };
2315
2327
  let response;
2316
- let errorCode = "UnknownError";
2317
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2328
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2318
2329
  switch (errorCode) {
2319
2330
  case "BadRequest":
2320
2331
  case "com.amazonaws.efs#BadRequest":
@@ -2330,10 +2341,12 @@ const deserializeAws_restJson1PutLifecycleConfigurationCommandError = async (out
2330
2341
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
2331
2342
  default:
2332
2343
  const parsedBody = parsedOutput.body;
2344
+ const $metadata = deserializeMetadata(output);
2345
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2333
2346
  response = new EFSServiceException_1.EFSServiceException({
2334
- name: parsedBody.code || parsedBody.Code || errorCode,
2347
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2335
2348
  $fault: "client",
2336
- $metadata: deserializeMetadata(output),
2349
+ $metadata,
2337
2350
  });
2338
2351
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2339
2352
  }
@@ -2355,8 +2368,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2355
2368
  body: await parseBody(output.body, context),
2356
2369
  };
2357
2370
  let response;
2358
- let errorCode = "UnknownError";
2359
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2371
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2360
2372
  switch (errorCode) {
2361
2373
  case "AccessPointNotFound":
2362
2374
  case "com.amazonaws.efs#AccessPointNotFound":
@@ -2372,10 +2384,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2372
2384
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
2373
2385
  default:
2374
2386
  const parsedBody = parsedOutput.body;
2387
+ const $metadata = deserializeMetadata(output);
2388
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2375
2389
  response = new EFSServiceException_1.EFSServiceException({
2376
- name: parsedBody.code || parsedBody.Code || errorCode,
2390
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2377
2391
  $fault: "client",
2378
- $metadata: deserializeMetadata(output),
2392
+ $metadata,
2379
2393
  });
2380
2394
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2381
2395
  }
@@ -2397,8 +2411,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2397
2411
  body: await parseBody(output.body, context),
2398
2412
  };
2399
2413
  let response;
2400
- let errorCode = "UnknownError";
2401
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2414
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2402
2415
  switch (errorCode) {
2403
2416
  case "AccessPointNotFound":
2404
2417
  case "com.amazonaws.efs#AccessPointNotFound":
@@ -2414,10 +2427,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2414
2427
  throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
2415
2428
  default:
2416
2429
  const parsedBody = parsedOutput.body;
2430
+ const $metadata = deserializeMetadata(output);
2431
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2417
2432
  response = new EFSServiceException_1.EFSServiceException({
2418
- name: parsedBody.code || parsedBody.Code || errorCode,
2433
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2419
2434
  $fault: "client",
2420
- $metadata: deserializeMetadata(output),
2435
+ $metadata,
2421
2436
  });
2422
2437
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2423
2438
  }
@@ -2507,8 +2522,7 @@ const deserializeAws_restJson1UpdateFileSystemCommandError = async (output, cont
2507
2522
  body: await parseBody(output.body, context),
2508
2523
  };
2509
2524
  let response;
2510
- let errorCode = "UnknownError";
2511
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2525
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2512
2526
  switch (errorCode) {
2513
2527
  case "BadRequest":
2514
2528
  case "com.amazonaws.efs#BadRequest":
@@ -2533,10 +2547,12 @@ const deserializeAws_restJson1UpdateFileSystemCommandError = async (output, cont
2533
2547
  throw await deserializeAws_restJson1TooManyRequestsResponse(parsedOutput, context);
2534
2548
  default:
2535
2549
  const parsedBody = parsedOutput.body;
2550
+ const $metadata = deserializeMetadata(output);
2551
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2536
2552
  response = new EFSServiceException_1.EFSServiceException({
2537
- name: parsedBody.code || parsedBody.Code || errorCode,
2553
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2538
2554
  $fault: "client",
2539
- $metadata: deserializeMetadata(output),
2555
+ $metadata,
2540
2556
  });
2541
2557
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2542
2558
  }
@@ -2999,14 +3015,14 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
2999
3015
  };
3000
3016
  const serializeAws_restJson1BackupPolicy = (input, context) => {
3001
3017
  return {
3002
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
3018
+ ...(input.Status != null && { Status: input.Status }),
3003
3019
  };
3004
3020
  };
3005
3021
  const serializeAws_restJson1CreationInfo = (input, context) => {
3006
3022
  return {
3007
- ...(input.OwnerGid !== undefined && input.OwnerGid !== null && { OwnerGid: input.OwnerGid }),
3008
- ...(input.OwnerUid !== undefined && input.OwnerUid !== null && { OwnerUid: input.OwnerUid }),
3009
- ...(input.Permissions !== undefined && input.Permissions !== null && { Permissions: input.Permissions }),
3023
+ ...(input.OwnerGid != null && { OwnerGid: input.OwnerGid }),
3024
+ ...(input.OwnerUid != null && { OwnerUid: input.OwnerUid }),
3025
+ ...(input.Permissions != null && { Permissions: input.Permissions }),
3010
3026
  };
3011
3027
  };
3012
3028
  const serializeAws_restJson1DestinationsToCreate = (input, context) => {
@@ -3021,10 +3037,9 @@ const serializeAws_restJson1DestinationsToCreate = (input, context) => {
3021
3037
  };
3022
3038
  const serializeAws_restJson1DestinationToCreate = (input, context) => {
3023
3039
  return {
3024
- ...(input.AvailabilityZoneName !== undefined &&
3025
- input.AvailabilityZoneName !== null && { AvailabilityZoneName: input.AvailabilityZoneName }),
3026
- ...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
3027
- ...(input.Region !== undefined && input.Region !== null && { Region: input.Region }),
3040
+ ...(input.AvailabilityZoneName != null && { AvailabilityZoneName: input.AvailabilityZoneName }),
3041
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
3042
+ ...(input.Region != null && { Region: input.Region }),
3028
3043
  };
3029
3044
  };
3030
3045
  const serializeAws_restJson1LifecyclePolicies = (input, context) => {
@@ -3039,29 +3054,27 @@ const serializeAws_restJson1LifecyclePolicies = (input, context) => {
3039
3054
  };
3040
3055
  const serializeAws_restJson1LifecyclePolicy = (input, context) => {
3041
3056
  return {
3042
- ...(input.TransitionToIA !== undefined &&
3043
- input.TransitionToIA !== null && { TransitionToIA: input.TransitionToIA }),
3044
- ...(input.TransitionToPrimaryStorageClass !== undefined &&
3045
- input.TransitionToPrimaryStorageClass !== null && {
3057
+ ...(input.TransitionToIA != null && { TransitionToIA: input.TransitionToIA }),
3058
+ ...(input.TransitionToPrimaryStorageClass != null && {
3046
3059
  TransitionToPrimaryStorageClass: input.TransitionToPrimaryStorageClass,
3047
3060
  }),
3048
3061
  };
3049
3062
  };
3050
3063
  const serializeAws_restJson1PosixUser = (input, context) => {
3051
3064
  return {
3052
- ...(input.Gid !== undefined && input.Gid !== null && { Gid: input.Gid }),
3053
- ...(input.SecondaryGids !== undefined &&
3054
- input.SecondaryGids !== null && {
3065
+ ...(input.Gid != null && { Gid: input.Gid }),
3066
+ ...(input.SecondaryGids != null && {
3055
3067
  SecondaryGids: serializeAws_restJson1SecondaryGids(input.SecondaryGids, context),
3056
3068
  }),
3057
- ...(input.Uid !== undefined && input.Uid !== null && { Uid: input.Uid }),
3069
+ ...(input.Uid != null && { Uid: input.Uid }),
3058
3070
  };
3059
3071
  };
3060
3072
  const serializeAws_restJson1RootDirectory = (input, context) => {
3061
3073
  return {
3062
- ...(input.CreationInfo !== undefined &&
3063
- input.CreationInfo !== null && { CreationInfo: serializeAws_restJson1CreationInfo(input.CreationInfo, context) }),
3064
- ...(input.Path !== undefined && input.Path !== null && { Path: input.Path }),
3074
+ ...(input.CreationInfo != null && {
3075
+ CreationInfo: serializeAws_restJson1CreationInfo(input.CreationInfo, context),
3076
+ }),
3077
+ ...(input.Path != null && { Path: input.Path }),
3065
3078
  };
3066
3079
  };
3067
3080
  const serializeAws_restJson1SecondaryGids = (input, context) => {
@@ -3086,8 +3099,8 @@ const serializeAws_restJson1SecurityGroups = (input, context) => {
3086
3099
  };
3087
3100
  const serializeAws_restJson1Tag = (input, context) => {
3088
3101
  return {
3089
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
3090
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3102
+ ...(input.Key != null && { Key: input.Key }),
3103
+ ...(input.Value != null && { Value: input.Value }),
3091
3104
  };
3092
3105
  };
3093
3106
  const serializeAws_restJson1TagKeys = (input, context) => {
@@ -3119,15 +3132,9 @@ const deserializeAws_restJson1AccessPointDescription = (output, context) => {
3119
3132
  LifeCycleState: (0, smithy_client_1.expectString)(output.LifeCycleState),
3120
3133
  Name: (0, smithy_client_1.expectString)(output.Name),
3121
3134
  OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
3122
- PosixUser: output.PosixUser !== undefined && output.PosixUser !== null
3123
- ? deserializeAws_restJson1PosixUser(output.PosixUser, context)
3124
- : undefined,
3125
- RootDirectory: output.RootDirectory !== undefined && output.RootDirectory !== null
3126
- ? deserializeAws_restJson1RootDirectory(output.RootDirectory, context)
3127
- : undefined,
3128
- Tags: output.Tags !== undefined && output.Tags !== null
3129
- ? deserializeAws_restJson1Tags(output.Tags, context)
3130
- : undefined,
3135
+ PosixUser: output.PosixUser != null ? deserializeAws_restJson1PosixUser(output.PosixUser, context) : undefined,
3136
+ RootDirectory: output.RootDirectory != null ? deserializeAws_restJson1RootDirectory(output.RootDirectory, context) : undefined,
3137
+ Tags: output.Tags != null ? deserializeAws_restJson1Tags(output.Tags, context) : undefined,
3131
3138
  };
3132
3139
  };
3133
3140
  const deserializeAws_restJson1AccessPointDescriptions = (output, context) => {
@@ -3156,7 +3163,7 @@ const deserializeAws_restJson1CreationInfo = (output, context) => {
3156
3163
  const deserializeAws_restJson1Destination = (output, context) => {
3157
3164
  return {
3158
3165
  FileSystemId: (0, smithy_client_1.expectString)(output.FileSystemId),
3159
- LastReplicatedTimestamp: output.LastReplicatedTimestamp !== undefined && output.LastReplicatedTimestamp !== null
3166
+ LastReplicatedTimestamp: output.LastReplicatedTimestamp != null
3160
3167
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastReplicatedTimestamp)))
3161
3168
  : undefined,
3162
3169
  Region: (0, smithy_client_1.expectString)(output.Region),
@@ -3178,7 +3185,7 @@ const deserializeAws_restJson1FileSystemDescription = (output, context) => {
3178
3185
  return {
3179
3186
  AvailabilityZoneId: (0, smithy_client_1.expectString)(output.AvailabilityZoneId),
3180
3187
  AvailabilityZoneName: (0, smithy_client_1.expectString)(output.AvailabilityZoneName),
3181
- CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
3188
+ CreationTime: output.CreationTime != null
3182
3189
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
3183
3190
  : undefined,
3184
3191
  CreationToken: (0, smithy_client_1.expectString)(output.CreationToken),
@@ -3192,12 +3199,8 @@ const deserializeAws_restJson1FileSystemDescription = (output, context) => {
3192
3199
  OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
3193
3200
  PerformanceMode: (0, smithy_client_1.expectString)(output.PerformanceMode),
3194
3201
  ProvisionedThroughputInMibps: (0, smithy_client_1.limitedParseDouble)(output.ProvisionedThroughputInMibps),
3195
- SizeInBytes: output.SizeInBytes !== undefined && output.SizeInBytes !== null
3196
- ? deserializeAws_restJson1FileSystemSize(output.SizeInBytes, context)
3197
- : undefined,
3198
- Tags: output.Tags !== undefined && output.Tags !== null
3199
- ? deserializeAws_restJson1Tags(output.Tags, context)
3200
- : undefined,
3202
+ SizeInBytes: output.SizeInBytes != null ? deserializeAws_restJson1FileSystemSize(output.SizeInBytes, context) : undefined,
3203
+ Tags: output.Tags != null ? deserializeAws_restJson1Tags(output.Tags, context) : undefined,
3201
3204
  ThroughputMode: (0, smithy_client_1.expectString)(output.ThroughputMode),
3202
3205
  };
3203
3206
  };
@@ -3214,9 +3217,7 @@ const deserializeAws_restJson1FileSystemDescriptions = (output, context) => {
3214
3217
  };
3215
3218
  const deserializeAws_restJson1FileSystemSize = (output, context) => {
3216
3219
  return {
3217
- Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
3218
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp)))
3219
- : undefined,
3220
+ Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
3220
3221
  Value: (0, smithy_client_1.expectLong)(output.Value),
3221
3222
  ValueInIA: (0, smithy_client_1.expectLong)(output.ValueInIA),
3222
3223
  ValueInStandard: (0, smithy_client_1.expectLong)(output.ValueInStandard),
@@ -3267,20 +3268,16 @@ const deserializeAws_restJson1MountTargetDescriptions = (output, context) => {
3267
3268
  const deserializeAws_restJson1PosixUser = (output, context) => {
3268
3269
  return {
3269
3270
  Gid: (0, smithy_client_1.expectLong)(output.Gid),
3270
- SecondaryGids: output.SecondaryGids !== undefined && output.SecondaryGids !== null
3271
- ? deserializeAws_restJson1SecondaryGids(output.SecondaryGids, context)
3272
- : undefined,
3271
+ SecondaryGids: output.SecondaryGids != null ? deserializeAws_restJson1SecondaryGids(output.SecondaryGids, context) : undefined,
3273
3272
  Uid: (0, smithy_client_1.expectLong)(output.Uid),
3274
3273
  };
3275
3274
  };
3276
3275
  const deserializeAws_restJson1ReplicationConfigurationDescription = (output, context) => {
3277
3276
  return {
3278
- CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
3277
+ CreationTime: output.CreationTime != null
3279
3278
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
3280
3279
  : undefined,
3281
- Destinations: output.Destinations !== undefined && output.Destinations !== null
3282
- ? deserializeAws_restJson1Destinations(output.Destinations, context)
3283
- : undefined,
3280
+ Destinations: output.Destinations != null ? deserializeAws_restJson1Destinations(output.Destinations, context) : undefined,
3284
3281
  OriginalSourceFileSystemArn: (0, smithy_client_1.expectString)(output.OriginalSourceFileSystemArn),
3285
3282
  SourceFileSystemArn: (0, smithy_client_1.expectString)(output.SourceFileSystemArn),
3286
3283
  SourceFileSystemId: (0, smithy_client_1.expectString)(output.SourceFileSystemId),
@@ -3301,9 +3298,7 @@ const deserializeAws_restJson1ReplicationConfigurationDescriptions = (output, co
3301
3298
  const deserializeAws_restJson1ResourceIdPreference = (output, context) => {
3302
3299
  return {
3303
3300
  ResourceIdType: (0, smithy_client_1.expectString)(output.ResourceIdType),
3304
- Resources: output.Resources !== undefined && output.Resources !== null
3305
- ? deserializeAws_restJson1Resources(output.Resources, context)
3306
- : undefined,
3301
+ Resources: output.Resources != null ? deserializeAws_restJson1Resources(output.Resources, context) : undefined,
3307
3302
  };
3308
3303
  };
3309
3304
  const deserializeAws_restJson1Resources = (output, context) => {
@@ -3319,9 +3314,7 @@ const deserializeAws_restJson1Resources = (output, context) => {
3319
3314
  };
3320
3315
  const deserializeAws_restJson1RootDirectory = (output, context) => {
3321
3316
  return {
3322
- CreationInfo: output.CreationInfo !== undefined && output.CreationInfo !== null
3323
- ? deserializeAws_restJson1CreationInfo(output.CreationInfo, context)
3324
- : undefined,
3317
+ CreationInfo: output.CreationInfo != null ? deserializeAws_restJson1CreationInfo(output.CreationInfo, context) : undefined,
3325
3318
  Path: (0, smithy_client_1.expectString)(output.Path),
3326
3319
  };
3327
3320
  };
@@ -3413,5 +3406,4 @@ const loadRestJsonErrorCode = (output, data) => {
3413
3406
  if (data["__type"] !== undefined) {
3414
3407
  return sanitizeErrorCode(data["__type"]);
3415
3408
  }
3416
- return "";
3417
3409
  };