@aws-sdk/client-efs 3.131.0 → 3.142.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/CreateAccessPointCommand.js +2 -2
  4. package/dist-cjs/commands/CreateFileSystemCommand.js +2 -2
  5. package/dist-cjs/commands/CreateMountTargetCommand.js +2 -2
  6. package/dist-cjs/commands/CreateReplicationConfigurationCommand.js +2 -2
  7. package/dist-cjs/commands/CreateTagsCommand.js +1 -1
  8. package/dist-cjs/commands/DeleteAccessPointCommand.js +1 -1
  9. package/dist-cjs/commands/DeleteFileSystemCommand.js +1 -1
  10. package/dist-cjs/commands/DeleteFileSystemPolicyCommand.js +1 -1
  11. package/dist-cjs/commands/DeleteMountTargetCommand.js +1 -1
  12. package/dist-cjs/commands/DeleteReplicationConfigurationCommand.js +1 -1
  13. package/dist-cjs/commands/DeleteTagsCommand.js +1 -1
  14. package/dist-cjs/commands/DescribeAccessPointsCommand.js +2 -2
  15. package/dist-cjs/commands/DescribeAccountPreferencesCommand.js +2 -2
  16. package/dist-cjs/commands/DescribeBackupPolicyCommand.js +2 -2
  17. package/dist-cjs/commands/DescribeFileSystemPolicyCommand.js +2 -2
  18. package/dist-cjs/commands/DescribeFileSystemsCommand.js +2 -2
  19. package/dist-cjs/commands/DescribeLifecycleConfigurationCommand.js +2 -2
  20. package/dist-cjs/commands/DescribeMountTargetSecurityGroupsCommand.js +2 -2
  21. package/dist-cjs/commands/DescribeMountTargetsCommand.js +2 -2
  22. package/dist-cjs/commands/DescribeReplicationConfigurationsCommand.js +2 -2
  23. package/dist-cjs/commands/DescribeTagsCommand.js +2 -2
  24. package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
  25. package/dist-cjs/commands/ModifyMountTargetSecurityGroupsCommand.js +1 -1
  26. package/dist-cjs/commands/PutAccountPreferencesCommand.js +2 -2
  27. package/dist-cjs/commands/PutBackupPolicyCommand.js +2 -2
  28. package/dist-cjs/commands/PutFileSystemPolicyCommand.js +2 -2
  29. package/dist-cjs/commands/PutLifecycleConfigurationCommand.js +2 -2
  30. package/dist-cjs/commands/TagResourceCommand.js +1 -1
  31. package/dist-cjs/commands/UntagResourceCommand.js +1 -1
  32. package/dist-cjs/commands/UpdateFileSystemCommand.js +2 -2
  33. package/dist-cjs/models/models_0.js +226 -338
  34. package/dist-cjs/protocols/Aws_restJson1.js +476 -859
  35. package/dist-es/commands/CreateAccessPointCommand.js +3 -3
  36. package/dist-es/commands/CreateFileSystemCommand.js +3 -3
  37. package/dist-es/commands/CreateMountTargetCommand.js +3 -3
  38. package/dist-es/commands/CreateReplicationConfigurationCommand.js +3 -3
  39. package/dist-es/commands/CreateTagsCommand.js +2 -2
  40. package/dist-es/commands/DeleteAccessPointCommand.js +2 -2
  41. package/dist-es/commands/DeleteFileSystemCommand.js +2 -2
  42. package/dist-es/commands/DeleteFileSystemPolicyCommand.js +2 -2
  43. package/dist-es/commands/DeleteMountTargetCommand.js +2 -2
  44. package/dist-es/commands/DeleteReplicationConfigurationCommand.js +2 -2
  45. package/dist-es/commands/DeleteTagsCommand.js +2 -2
  46. package/dist-es/commands/DescribeAccessPointsCommand.js +3 -3
  47. package/dist-es/commands/DescribeAccountPreferencesCommand.js +3 -3
  48. package/dist-es/commands/DescribeBackupPolicyCommand.js +3 -3
  49. package/dist-es/commands/DescribeFileSystemPolicyCommand.js +3 -3
  50. package/dist-es/commands/DescribeFileSystemsCommand.js +3 -3
  51. package/dist-es/commands/DescribeLifecycleConfigurationCommand.js +3 -3
  52. package/dist-es/commands/DescribeMountTargetSecurityGroupsCommand.js +3 -3
  53. package/dist-es/commands/DescribeMountTargetsCommand.js +3 -3
  54. package/dist-es/commands/DescribeReplicationConfigurationsCommand.js +3 -3
  55. package/dist-es/commands/DescribeTagsCommand.js +3 -3
  56. package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
  57. package/dist-es/commands/ModifyMountTargetSecurityGroupsCommand.js +2 -2
  58. package/dist-es/commands/PutAccountPreferencesCommand.js +3 -3
  59. package/dist-es/commands/PutBackupPolicyCommand.js +3 -3
  60. package/dist-es/commands/PutFileSystemPolicyCommand.js +3 -3
  61. package/dist-es/commands/PutLifecycleConfigurationCommand.js +3 -3
  62. package/dist-es/commands/TagResourceCommand.js +2 -2
  63. package/dist-es/commands/UntagResourceCommand.js +2 -2
  64. package/dist-es/commands/UpdateFileSystemCommand.js +3 -3
  65. package/dist-es/models/models_0.js +56 -224
  66. package/dist-es/protocols/Aws_restJson1.js +588 -853
  67. package/dist-types/models/models_0.d.ts +224 -336
  68. package/dist-types/ts3.4/models/models_0.d.ts +112 -224
  69. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { EFSServiceException as __BaseException } from "../models/EFSServiceException";
6
6
  import { AccessPointAlreadyExists, AccessPointLimitExceeded, AccessPointNotFound, AvailabilityZonesMismatch, BadRequest, DependencyTimeout, FileSystemAlreadyExists, FileSystemInUse, FileSystemLimitExceeded, FileSystemNotFound, IncorrectFileSystemLifeCycleState, IncorrectMountTargetState, InsufficientThroughputCapacity, InternalServerError, InvalidPolicyException, IpAddressInUse, MountTargetConflict, MountTargetNotFound, NetworkInterfaceLimitExceeded, NoFreeAddressesInSubnet, PolicyNotFound, ReplicationNotFound, SecurityGroupLimitExceeded, SecurityGroupNotFound, SubnetNotFound, ThrottlingException, ThroughputLimitExceeded, TooManyRequests, UnsupportedAvailabilityZone, ValidationException, } from "../models/models_0";
@@ -85,7 +85,7 @@ export var serializeAws_restJson1CreateMountTargetCommand = function (input, con
85
85
  });
86
86
  }); };
87
87
  export var serializeAws_restJson1CreateReplicationConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
88
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
88
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
89
89
  return __generator(this, function (_c) {
90
90
  switch (_c.label) {
91
91
  case 0: return [4, context.endpoint()];
@@ -96,16 +96,7 @@ export var serializeAws_restJson1CreateReplicationConfigurationCommand = functio
96
96
  };
97
97
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
98
98
  "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
99
- if (input.SourceFileSystemId !== undefined) {
100
- labelValue = input.SourceFileSystemId;
101
- if (labelValue.length <= 0) {
102
- throw new Error("Empty value provided for input HTTP label: SourceFileSystemId.");
103
- }
104
- resolvedPath = resolvedPath.replace("{SourceFileSystemId}", __extendedEncodeURIComponent(labelValue));
105
- }
106
- else {
107
- throw new Error("No value provided for input HTTP label: SourceFileSystemId.");
108
- }
99
+ resolvedPath = __resolvedPath(resolvedPath, input, "SourceFileSystemId", function () { return input.SourceFileSystemId; }, "{SourceFileSystemId}", false);
109
100
  body = JSON.stringify(__assign({}, (input.Destinations != null && {
110
101
  Destinations: serializeAws_restJson1DestinationsToCreate(input.Destinations, context),
111
102
  })));
@@ -122,7 +113,7 @@ export var serializeAws_restJson1CreateReplicationConfigurationCommand = functio
122
113
  });
123
114
  }); };
124
115
  export var serializeAws_restJson1CreateTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
125
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
116
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
126
117
  return __generator(this, function (_c) {
127
118
  switch (_c.label) {
128
119
  case 0: return [4, context.endpoint()];
@@ -132,16 +123,7 @@ export var serializeAws_restJson1CreateTagsCommand = function (input, context) {
132
123
  "content-type": "application/json",
133
124
  };
134
125
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/create-tags/{FileSystemId}";
135
- if (input.FileSystemId !== undefined) {
136
- labelValue = input.FileSystemId;
137
- if (labelValue.length <= 0) {
138
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
139
- }
140
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
141
- }
142
- else {
143
- throw new Error("No value provided for input HTTP label: FileSystemId.");
144
- }
126
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
145
127
  body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) })));
146
128
  return [2, new __HttpRequest({
147
129
  protocol: protocol,
@@ -156,7 +138,7 @@ export var serializeAws_restJson1CreateTagsCommand = function (input, context) {
156
138
  });
157
139
  }); };
158
140
  export var serializeAws_restJson1DeleteAccessPointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
159
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
141
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
160
142
  return __generator(this, function (_c) {
161
143
  switch (_c.label) {
162
144
  case 0: return [4, context.endpoint()];
@@ -164,16 +146,7 @@ export var serializeAws_restJson1DeleteAccessPointCommand = function (input, con
164
146
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
165
147
  headers = {};
166
148
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/access-points/{AccessPointId}";
167
- if (input.AccessPointId !== undefined) {
168
- labelValue = input.AccessPointId;
169
- if (labelValue.length <= 0) {
170
- throw new Error("Empty value provided for input HTTP label: AccessPointId.");
171
- }
172
- resolvedPath = resolvedPath.replace("{AccessPointId}", __extendedEncodeURIComponent(labelValue));
173
- }
174
- else {
175
- throw new Error("No value provided for input HTTP label: AccessPointId.");
176
- }
149
+ resolvedPath = __resolvedPath(resolvedPath, input, "AccessPointId", function () { return input.AccessPointId; }, "{AccessPointId}", false);
177
150
  return [2, new __HttpRequest({
178
151
  protocol: protocol,
179
152
  hostname: hostname,
@@ -187,7 +160,7 @@ export var serializeAws_restJson1DeleteAccessPointCommand = function (input, con
187
160
  });
188
161
  }); };
189
162
  export var serializeAws_restJson1DeleteFileSystemCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
190
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
163
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
191
164
  return __generator(this, function (_c) {
192
165
  switch (_c.label) {
193
166
  case 0: return [4, context.endpoint()];
@@ -195,16 +168,7 @@ export var serializeAws_restJson1DeleteFileSystemCommand = function (input, cont
195
168
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
196
169
  headers = {};
197
170
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/file-systems/{FileSystemId}";
198
- if (input.FileSystemId !== undefined) {
199
- labelValue = input.FileSystemId;
200
- if (labelValue.length <= 0) {
201
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
202
- }
203
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
204
- }
205
- else {
206
- throw new Error("No value provided for input HTTP label: FileSystemId.");
207
- }
171
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
208
172
  return [2, new __HttpRequest({
209
173
  protocol: protocol,
210
174
  hostname: hostname,
@@ -218,7 +182,7 @@ export var serializeAws_restJson1DeleteFileSystemCommand = function (input, cont
218
182
  });
219
183
  }); };
220
184
  export var serializeAws_restJson1DeleteFileSystemPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
221
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
185
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
222
186
  return __generator(this, function (_c) {
223
187
  switch (_c.label) {
224
188
  case 0: return [4, context.endpoint()];
@@ -227,16 +191,7 @@ export var serializeAws_restJson1DeleteFileSystemPolicyCommand = function (input
227
191
  headers = {};
228
192
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
229
193
  "/2015-02-01/file-systems/{FileSystemId}/policy";
230
- if (input.FileSystemId !== undefined) {
231
- labelValue = input.FileSystemId;
232
- if (labelValue.length <= 0) {
233
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
234
- }
235
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
236
- }
237
- else {
238
- throw new Error("No value provided for input HTTP label: FileSystemId.");
239
- }
194
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
240
195
  return [2, new __HttpRequest({
241
196
  protocol: protocol,
242
197
  hostname: hostname,
@@ -250,7 +205,7 @@ export var serializeAws_restJson1DeleteFileSystemPolicyCommand = function (input
250
205
  });
251
206
  }); };
252
207
  export var serializeAws_restJson1DeleteMountTargetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
253
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
208
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
254
209
  return __generator(this, function (_c) {
255
210
  switch (_c.label) {
256
211
  case 0: return [4, context.endpoint()];
@@ -258,16 +213,7 @@ export var serializeAws_restJson1DeleteMountTargetCommand = function (input, con
258
213
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
259
214
  headers = {};
260
215
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/mount-targets/{MountTargetId}";
261
- if (input.MountTargetId !== undefined) {
262
- labelValue = input.MountTargetId;
263
- if (labelValue.length <= 0) {
264
- throw new Error("Empty value provided for input HTTP label: MountTargetId.");
265
- }
266
- resolvedPath = resolvedPath.replace("{MountTargetId}", __extendedEncodeURIComponent(labelValue));
267
- }
268
- else {
269
- throw new Error("No value provided for input HTTP label: MountTargetId.");
270
- }
216
+ resolvedPath = __resolvedPath(resolvedPath, input, "MountTargetId", function () { return input.MountTargetId; }, "{MountTargetId}", false);
271
217
  return [2, new __HttpRequest({
272
218
  protocol: protocol,
273
219
  hostname: hostname,
@@ -281,7 +227,7 @@ export var serializeAws_restJson1DeleteMountTargetCommand = function (input, con
281
227
  });
282
228
  }); };
283
229
  export var serializeAws_restJson1DeleteReplicationConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
284
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
230
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
285
231
  return __generator(this, function (_c) {
286
232
  switch (_c.label) {
287
233
  case 0: return [4, context.endpoint()];
@@ -290,16 +236,7 @@ export var serializeAws_restJson1DeleteReplicationConfigurationCommand = functio
290
236
  headers = {};
291
237
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
292
238
  "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
293
- if (input.SourceFileSystemId !== undefined) {
294
- labelValue = input.SourceFileSystemId;
295
- if (labelValue.length <= 0) {
296
- throw new Error("Empty value provided for input HTTP label: SourceFileSystemId.");
297
- }
298
- resolvedPath = resolvedPath.replace("{SourceFileSystemId}", __extendedEncodeURIComponent(labelValue));
299
- }
300
- else {
301
- throw new Error("No value provided for input HTTP label: SourceFileSystemId.");
302
- }
239
+ resolvedPath = __resolvedPath(resolvedPath, input, "SourceFileSystemId", function () { return input.SourceFileSystemId; }, "{SourceFileSystemId}", false);
303
240
  return [2, new __HttpRequest({
304
241
  protocol: protocol,
305
242
  hostname: hostname,
@@ -313,7 +250,7 @@ export var serializeAws_restJson1DeleteReplicationConfigurationCommand = functio
313
250
  });
314
251
  }); };
315
252
  export var serializeAws_restJson1DeleteTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
316
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
253
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
317
254
  return __generator(this, function (_c) {
318
255
  switch (_c.label) {
319
256
  case 0: return [4, context.endpoint()];
@@ -323,16 +260,7 @@ export var serializeAws_restJson1DeleteTagsCommand = function (input, context) {
323
260
  "content-type": "application/json",
324
261
  };
325
262
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/delete-tags/{FileSystemId}";
326
- if (input.FileSystemId !== undefined) {
327
- labelValue = input.FileSystemId;
328
- if (labelValue.length <= 0) {
329
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
330
- }
331
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
332
- }
333
- else {
334
- throw new Error("No value provided for input HTTP label: FileSystemId.");
335
- }
263
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
336
264
  body = JSON.stringify(__assign({}, (input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeys(input.TagKeys, context) })));
337
265
  return [2, new __HttpRequest({
338
266
  protocol: protocol,
@@ -355,7 +283,12 @@ export var serializeAws_restJson1DescribeAccessPointsCommand = function (input,
355
283
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
356
284
  headers = {};
357
285
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/access-points";
358
- query = __assign(__assign(__assign(__assign({}, (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.AccessPointId !== undefined && { AccessPointId: input.AccessPointId })), (input.FileSystemId !== undefined && { FileSystemId: input.FileSystemId }));
286
+ query = map({
287
+ MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
288
+ NextToken: [, input.NextToken],
289
+ AccessPointId: [, input.AccessPointId],
290
+ FileSystemId: [, input.FileSystemId],
291
+ });
359
292
  return [2, new __HttpRequest({
360
293
  protocol: protocol,
361
294
  hostname: hostname,
@@ -394,7 +327,7 @@ export var serializeAws_restJson1DescribeAccountPreferencesCommand = function (i
394
327
  });
395
328
  }); };
396
329
  export var serializeAws_restJson1DescribeBackupPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
397
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
330
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
398
331
  return __generator(this, function (_c) {
399
332
  switch (_c.label) {
400
333
  case 0: return [4, context.endpoint()];
@@ -403,16 +336,7 @@ export var serializeAws_restJson1DescribeBackupPolicyCommand = function (input,
403
336
  headers = {};
404
337
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
405
338
  "/2015-02-01/file-systems/{FileSystemId}/backup-policy";
406
- if (input.FileSystemId !== undefined) {
407
- labelValue = input.FileSystemId;
408
- if (labelValue.length <= 0) {
409
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
410
- }
411
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
412
- }
413
- else {
414
- throw new Error("No value provided for input HTTP label: FileSystemId.");
415
- }
339
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
416
340
  return [2, new __HttpRequest({
417
341
  protocol: protocol,
418
342
  hostname: hostname,
@@ -426,7 +350,7 @@ export var serializeAws_restJson1DescribeBackupPolicyCommand = function (input,
426
350
  });
427
351
  }); };
428
352
  export var serializeAws_restJson1DescribeFileSystemPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
429
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
353
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
430
354
  return __generator(this, function (_c) {
431
355
  switch (_c.label) {
432
356
  case 0: return [4, context.endpoint()];
@@ -435,16 +359,7 @@ export var serializeAws_restJson1DescribeFileSystemPolicyCommand = function (inp
435
359
  headers = {};
436
360
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
437
361
  "/2015-02-01/file-systems/{FileSystemId}/policy";
438
- if (input.FileSystemId !== undefined) {
439
- labelValue = input.FileSystemId;
440
- if (labelValue.length <= 0) {
441
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
442
- }
443
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
444
- }
445
- else {
446
- throw new Error("No value provided for input HTTP label: FileSystemId.");
447
- }
362
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
448
363
  return [2, new __HttpRequest({
449
364
  protocol: protocol,
450
365
  hostname: hostname,
@@ -466,7 +381,12 @@ export var serializeAws_restJson1DescribeFileSystemsCommand = function (input, c
466
381
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
467
382
  headers = {};
468
383
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/file-systems";
469
- query = __assign(__assign(__assign(__assign({}, (input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() })), (input.Marker !== undefined && { Marker: input.Marker })), (input.CreationToken !== undefined && { CreationToken: input.CreationToken })), (input.FileSystemId !== undefined && { FileSystemId: input.FileSystemId }));
384
+ query = map({
385
+ MaxItems: [function () { return input.MaxItems !== void 0; }, function () { return input.MaxItems.toString(); }],
386
+ Marker: [, input.Marker],
387
+ CreationToken: [, input.CreationToken],
388
+ FileSystemId: [, input.FileSystemId],
389
+ });
470
390
  return [2, new __HttpRequest({
471
391
  protocol: protocol,
472
392
  hostname: hostname,
@@ -481,7 +401,7 @@ export var serializeAws_restJson1DescribeFileSystemsCommand = function (input, c
481
401
  });
482
402
  }); };
483
403
  export var serializeAws_restJson1DescribeLifecycleConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
484
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
404
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
485
405
  return __generator(this, function (_c) {
486
406
  switch (_c.label) {
487
407
  case 0: return [4, context.endpoint()];
@@ -490,16 +410,7 @@ export var serializeAws_restJson1DescribeLifecycleConfigurationCommand = functio
490
410
  headers = {};
491
411
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
492
412
  "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration";
493
- if (input.FileSystemId !== undefined) {
494
- labelValue = input.FileSystemId;
495
- if (labelValue.length <= 0) {
496
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
497
- }
498
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
499
- }
500
- else {
501
- throw new Error("No value provided for input HTTP label: FileSystemId.");
502
- }
413
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
503
414
  return [2, new __HttpRequest({
504
415
  protocol: protocol,
505
416
  hostname: hostname,
@@ -521,7 +432,13 @@ export var serializeAws_restJson1DescribeMountTargetsCommand = function (input,
521
432
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
522
433
  headers = {};
523
434
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/mount-targets";
524
- query = __assign(__assign(__assign(__assign(__assign({}, (input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() })), (input.Marker !== undefined && { Marker: input.Marker })), (input.FileSystemId !== undefined && { FileSystemId: input.FileSystemId })), (input.MountTargetId !== undefined && { MountTargetId: input.MountTargetId })), (input.AccessPointId !== undefined && { AccessPointId: input.AccessPointId }));
435
+ query = map({
436
+ MaxItems: [function () { return input.MaxItems !== void 0; }, function () { return input.MaxItems.toString(); }],
437
+ Marker: [, input.Marker],
438
+ FileSystemId: [, input.FileSystemId],
439
+ MountTargetId: [, input.MountTargetId],
440
+ AccessPointId: [, input.AccessPointId],
441
+ });
525
442
  return [2, new __HttpRequest({
526
443
  protocol: protocol,
527
444
  hostname: hostname,
@@ -536,7 +453,7 @@ export var serializeAws_restJson1DescribeMountTargetsCommand = function (input,
536
453
  });
537
454
  }); };
538
455
  export var serializeAws_restJson1DescribeMountTargetSecurityGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
539
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
456
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
540
457
  return __generator(this, function (_c) {
541
458
  switch (_c.label) {
542
459
  case 0: return [4, context.endpoint()];
@@ -545,16 +462,7 @@ export var serializeAws_restJson1DescribeMountTargetSecurityGroupsCommand = func
545
462
  headers = {};
546
463
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
547
464
  "/2015-02-01/mount-targets/{MountTargetId}/security-groups";
548
- if (input.MountTargetId !== undefined) {
549
- labelValue = input.MountTargetId;
550
- if (labelValue.length <= 0) {
551
- throw new Error("Empty value provided for input HTTP label: MountTargetId.");
552
- }
553
- resolvedPath = resolvedPath.replace("{MountTargetId}", __extendedEncodeURIComponent(labelValue));
554
- }
555
- else {
556
- throw new Error("No value provided for input HTTP label: MountTargetId.");
557
- }
465
+ resolvedPath = __resolvedPath(resolvedPath, input, "MountTargetId", function () { return input.MountTargetId; }, "{MountTargetId}", false);
558
466
  return [2, new __HttpRequest({
559
467
  protocol: protocol,
560
468
  hostname: hostname,
@@ -577,7 +485,11 @@ export var serializeAws_restJson1DescribeReplicationConfigurationsCommand = func
577
485
  headers = {};
578
486
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
579
487
  "/2015-02-01/file-systems/replication-configurations";
580
- query = __assign(__assign(__assign({}, (input.FileSystemId !== undefined && { FileSystemId: input.FileSystemId })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
488
+ query = map({
489
+ FileSystemId: [, input.FileSystemId],
490
+ NextToken: [, input.NextToken],
491
+ MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
492
+ });
581
493
  return [2, new __HttpRequest({
582
494
  protocol: protocol,
583
495
  hostname: hostname,
@@ -592,7 +504,7 @@ export var serializeAws_restJson1DescribeReplicationConfigurationsCommand = func
592
504
  });
593
505
  }); };
594
506
  export var serializeAws_restJson1DescribeTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
595
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
507
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
596
508
  return __generator(this, function (_c) {
597
509
  switch (_c.label) {
598
510
  case 0: return [4, context.endpoint()];
@@ -600,17 +512,11 @@ export var serializeAws_restJson1DescribeTagsCommand = function (input, context)
600
512
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
601
513
  headers = {};
602
514
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/tags/{FileSystemId}";
603
- if (input.FileSystemId !== undefined) {
604
- labelValue = input.FileSystemId;
605
- if (labelValue.length <= 0) {
606
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
607
- }
608
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
609
- }
610
- else {
611
- throw new Error("No value provided for input HTTP label: FileSystemId.");
612
- }
613
- query = __assign(__assign({}, (input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() })), (input.Marker !== undefined && { Marker: input.Marker }));
515
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
516
+ query = map({
517
+ MaxItems: [function () { return input.MaxItems !== void 0; }, function () { return input.MaxItems.toString(); }],
518
+ Marker: [, input.Marker],
519
+ });
614
520
  return [2, new __HttpRequest({
615
521
  protocol: protocol,
616
522
  hostname: hostname,
@@ -625,7 +531,7 @@ export var serializeAws_restJson1DescribeTagsCommand = function (input, context)
625
531
  });
626
532
  }); };
627
533
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
628
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
534
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
629
535
  return __generator(this, function (_c) {
630
536
  switch (_c.label) {
631
537
  case 0: return [4, context.endpoint()];
@@ -633,17 +539,11 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
633
539
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
634
540
  headers = {};
635
541
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/resource-tags/{ResourceId}";
636
- if (input.ResourceId !== undefined) {
637
- labelValue = input.ResourceId;
638
- if (labelValue.length <= 0) {
639
- throw new Error("Empty value provided for input HTTP label: ResourceId.");
640
- }
641
- resolvedPath = resolvedPath.replace("{ResourceId}", __extendedEncodeURIComponent(labelValue));
642
- }
643
- else {
644
- throw new Error("No value provided for input HTTP label: ResourceId.");
645
- }
646
- query = __assign(__assign({}, (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { NextToken: input.NextToken }));
542
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", function () { return input.ResourceId; }, "{ResourceId}", false);
543
+ query = map({
544
+ MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
545
+ NextToken: [, input.NextToken],
546
+ });
647
547
  return [2, new __HttpRequest({
648
548
  protocol: protocol,
649
549
  hostname: hostname,
@@ -658,7 +558,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
658
558
  });
659
559
  }); };
660
560
  export var serializeAws_restJson1ModifyMountTargetSecurityGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
661
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
561
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
662
562
  return __generator(this, function (_c) {
663
563
  switch (_c.label) {
664
564
  case 0: return [4, context.endpoint()];
@@ -669,16 +569,7 @@ export var serializeAws_restJson1ModifyMountTargetSecurityGroupsCommand = functi
669
569
  };
670
570
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
671
571
  "/2015-02-01/mount-targets/{MountTargetId}/security-groups";
672
- if (input.MountTargetId !== undefined) {
673
- labelValue = input.MountTargetId;
674
- if (labelValue.length <= 0) {
675
- throw new Error("Empty value provided for input HTTP label: MountTargetId.");
676
- }
677
- resolvedPath = resolvedPath.replace("{MountTargetId}", __extendedEncodeURIComponent(labelValue));
678
- }
679
- else {
680
- throw new Error("No value provided for input HTTP label: MountTargetId.");
681
- }
572
+ resolvedPath = __resolvedPath(resolvedPath, input, "MountTargetId", function () { return input.MountTargetId; }, "{MountTargetId}", false);
682
573
  body = JSON.stringify(__assign({}, (input.SecurityGroups != null && {
683
574
  SecurityGroups: serializeAws_restJson1SecurityGroups(input.SecurityGroups, context),
684
575
  })));
@@ -719,7 +610,7 @@ export var serializeAws_restJson1PutAccountPreferencesCommand = function (input,
719
610
  });
720
611
  }); };
721
612
  export var serializeAws_restJson1PutBackupPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
722
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
613
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
723
614
  return __generator(this, function (_c) {
724
615
  switch (_c.label) {
725
616
  case 0: return [4, context.endpoint()];
@@ -730,16 +621,7 @@ export var serializeAws_restJson1PutBackupPolicyCommand = function (input, conte
730
621
  };
731
622
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
732
623
  "/2015-02-01/file-systems/{FileSystemId}/backup-policy";
733
- if (input.FileSystemId !== undefined) {
734
- labelValue = input.FileSystemId;
735
- if (labelValue.length <= 0) {
736
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
737
- }
738
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
739
- }
740
- else {
741
- throw new Error("No value provided for input HTTP label: FileSystemId.");
742
- }
624
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
743
625
  body = JSON.stringify(__assign({}, (input.BackupPolicy != null && {
744
626
  BackupPolicy: serializeAws_restJson1BackupPolicy(input.BackupPolicy, context),
745
627
  })));
@@ -756,7 +638,7 @@ export var serializeAws_restJson1PutBackupPolicyCommand = function (input, conte
756
638
  });
757
639
  }); };
758
640
  export var serializeAws_restJson1PutFileSystemPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
759
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
641
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
760
642
  return __generator(this, function (_c) {
761
643
  switch (_c.label) {
762
644
  case 0: return [4, context.endpoint()];
@@ -767,16 +649,7 @@ export var serializeAws_restJson1PutFileSystemPolicyCommand = function (input, c
767
649
  };
768
650
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
769
651
  "/2015-02-01/file-systems/{FileSystemId}/policy";
770
- if (input.FileSystemId !== undefined) {
771
- labelValue = input.FileSystemId;
772
- if (labelValue.length <= 0) {
773
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
774
- }
775
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
776
- }
777
- else {
778
- throw new Error("No value provided for input HTTP label: FileSystemId.");
779
- }
652
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
780
653
  body = JSON.stringify(__assign(__assign({}, (input.BypassPolicyLockoutSafetyCheck != null && {
781
654
  BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck,
782
655
  })), (input.Policy != null && { Policy: input.Policy })));
@@ -793,7 +666,7 @@ export var serializeAws_restJson1PutFileSystemPolicyCommand = function (input, c
793
666
  });
794
667
  }); };
795
668
  export var serializeAws_restJson1PutLifecycleConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
796
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
669
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
797
670
  return __generator(this, function (_c) {
798
671
  switch (_c.label) {
799
672
  case 0: return [4, context.endpoint()];
@@ -804,16 +677,7 @@ export var serializeAws_restJson1PutLifecycleConfigurationCommand = function (in
804
677
  };
805
678
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
806
679
  "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration";
807
- if (input.FileSystemId !== undefined) {
808
- labelValue = input.FileSystemId;
809
- if (labelValue.length <= 0) {
810
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
811
- }
812
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
813
- }
814
- else {
815
- throw new Error("No value provided for input HTTP label: FileSystemId.");
816
- }
680
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
817
681
  body = JSON.stringify(__assign({}, (input.LifecyclePolicies != null && {
818
682
  LifecyclePolicies: serializeAws_restJson1LifecyclePolicies(input.LifecyclePolicies, context),
819
683
  })));
@@ -830,7 +694,7 @@ export var serializeAws_restJson1PutLifecycleConfigurationCommand = function (in
830
694
  });
831
695
  }); };
832
696
  export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
833
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
697
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
834
698
  return __generator(this, function (_c) {
835
699
  switch (_c.label) {
836
700
  case 0: return [4, context.endpoint()];
@@ -840,16 +704,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
840
704
  "content-type": "application/json",
841
705
  };
842
706
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/resource-tags/{ResourceId}";
843
- if (input.ResourceId !== undefined) {
844
- labelValue = input.ResourceId;
845
- if (labelValue.length <= 0) {
846
- throw new Error("Empty value provided for input HTTP label: ResourceId.");
847
- }
848
- resolvedPath = resolvedPath.replace("{ResourceId}", __extendedEncodeURIComponent(labelValue));
849
- }
850
- else {
851
- throw new Error("No value provided for input HTTP label: ResourceId.");
852
- }
707
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", function () { return input.ResourceId; }, "{ResourceId}", false);
853
708
  body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) })));
854
709
  return [2, new __HttpRequest({
855
710
  protocol: protocol,
@@ -864,7 +719,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
864
719
  });
865
720
  }); };
866
721
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
867
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
722
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
868
723
  return __generator(this, function (_c) {
869
724
  switch (_c.label) {
870
725
  case 0: return [4, context.endpoint()];
@@ -872,17 +727,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
872
727
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
873
728
  headers = {};
874
729
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/resource-tags/{ResourceId}";
875
- if (input.ResourceId !== undefined) {
876
- labelValue = input.ResourceId;
877
- if (labelValue.length <= 0) {
878
- throw new Error("Empty value provided for input HTTP label: ResourceId.");
879
- }
880
- resolvedPath = resolvedPath.replace("{ResourceId}", __extendedEncodeURIComponent(labelValue));
881
- }
882
- else {
883
- throw new Error("No value provided for input HTTP label: ResourceId.");
884
- }
885
- query = __assign({}, (input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map(function (_entry) { return _entry; }) }));
730
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", function () { return input.ResourceId; }, "{ResourceId}", false);
731
+ query = map({
732
+ tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
733
+ });
886
734
  return [2, new __HttpRequest({
887
735
  protocol: protocol,
888
736
  hostname: hostname,
@@ -897,7 +745,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
897
745
  });
898
746
  }); };
899
747
  export var serializeAws_restJson1UpdateFileSystemCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
900
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
748
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
901
749
  return __generator(this, function (_c) {
902
750
  switch (_c.label) {
903
751
  case 0: return [4, context.endpoint()];
@@ -907,16 +755,7 @@ export var serializeAws_restJson1UpdateFileSystemCommand = function (input, cont
907
755
  "content-type": "application/json",
908
756
  };
909
757
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2015-02-01/file-systems/{FileSystemId}";
910
- if (input.FileSystemId !== undefined) {
911
- labelValue = input.FileSystemId;
912
- if (labelValue.length <= 0) {
913
- throw new Error("Empty value provided for input HTTP label: FileSystemId.");
914
- }
915
- resolvedPath = resolvedPath.replace("{FileSystemId}", __extendedEncodeURIComponent(labelValue));
916
- }
917
- else {
918
- throw new Error("No value provided for input HTTP label: FileSystemId.");
919
- }
758
+ resolvedPath = __resolvedPath(resolvedPath, input, "FileSystemId", function () { return input.FileSystemId; }, "{FileSystemId}", false);
920
759
  body = JSON.stringify(__assign(__assign({}, (input.ProvisionedThroughputInMibps != null && {
921
760
  ProvisionedThroughputInMibps: __serializeFloat(input.ProvisionedThroughputInMibps),
922
761
  })), (input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode })));
@@ -940,60 +779,50 @@ export var deserializeAws_restJson1CreateAccessPointCommand = function (output,
940
779
  if (output.statusCode !== 200 && output.statusCode >= 300) {
941
780
  return [2, deserializeAws_restJson1CreateAccessPointCommandError(output, context)];
942
781
  }
943
- contents = {
782
+ contents = map({
944
783
  $metadata: deserializeMetadata(output),
945
- AccessPointArn: undefined,
946
- AccessPointId: undefined,
947
- ClientToken: undefined,
948
- FileSystemId: undefined,
949
- LifeCycleState: undefined,
950
- Name: undefined,
951
- OwnerId: undefined,
952
- PosixUser: undefined,
953
- RootDirectory: undefined,
954
- Tags: undefined,
955
- };
784
+ });
956
785
  _a = __expectNonNull;
957
786
  _b = __expectObject;
958
787
  return [4, parseBody(output.body, context)];
959
788
  case 1:
960
789
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
961
- if (data.AccessPointArn !== undefined && data.AccessPointArn !== null) {
790
+ if (data.AccessPointArn != null) {
962
791
  contents.AccessPointArn = __expectString(data.AccessPointArn);
963
792
  }
964
- if (data.AccessPointId !== undefined && data.AccessPointId !== null) {
793
+ if (data.AccessPointId != null) {
965
794
  contents.AccessPointId = __expectString(data.AccessPointId);
966
795
  }
967
- if (data.ClientToken !== undefined && data.ClientToken !== null) {
796
+ if (data.ClientToken != null) {
968
797
  contents.ClientToken = __expectString(data.ClientToken);
969
798
  }
970
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
799
+ if (data.FileSystemId != null) {
971
800
  contents.FileSystemId = __expectString(data.FileSystemId);
972
801
  }
973
- if (data.LifeCycleState !== undefined && data.LifeCycleState !== null) {
802
+ if (data.LifeCycleState != null) {
974
803
  contents.LifeCycleState = __expectString(data.LifeCycleState);
975
804
  }
976
- if (data.Name !== undefined && data.Name !== null) {
805
+ if (data.Name != null) {
977
806
  contents.Name = __expectString(data.Name);
978
807
  }
979
- if (data.OwnerId !== undefined && data.OwnerId !== null) {
808
+ if (data.OwnerId != null) {
980
809
  contents.OwnerId = __expectString(data.OwnerId);
981
810
  }
982
- if (data.PosixUser !== undefined && data.PosixUser !== null) {
811
+ if (data.PosixUser != null) {
983
812
  contents.PosixUser = deserializeAws_restJson1PosixUser(data.PosixUser, context);
984
813
  }
985
- if (data.RootDirectory !== undefined && data.RootDirectory !== null) {
814
+ if (data.RootDirectory != null) {
986
815
  contents.RootDirectory = deserializeAws_restJson1RootDirectory(data.RootDirectory, context);
987
816
  }
988
- if (data.Tags !== undefined && data.Tags !== null) {
817
+ if (data.Tags != null) {
989
818
  contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
990
819
  }
991
- return [2, Promise.resolve(contents)];
820
+ return [2, contents];
992
821
  }
993
822
  });
994
823
  }); };
995
824
  var deserializeAws_restJson1CreateAccessPointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
996
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
825
+ var parsedOutput, _a, errorCode, _b, parsedBody;
997
826
  var _c;
998
827
  return __generator(this, function (_d) {
999
828
  switch (_d.label) {
@@ -1038,14 +867,14 @@ var deserializeAws_restJson1CreateAccessPointCommandError = function (output, co
1038
867
  case 15: throw _d.sent();
1039
868
  case 16:
1040
869
  parsedBody = parsedOutput.body;
1041
- $metadata = deserializeMetadata(output);
1042
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1043
- response = new __BaseException({
1044
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1045
- $fault: "client",
1046
- $metadata: $metadata,
870
+ throwDefaultError({
871
+ output: output,
872
+ parsedBody: parsedBody,
873
+ exceptionCtor: __BaseException,
874
+ errorCode: errorCode,
1047
875
  });
1048
- throw __decorateServiceException(response, parsedBody);
876
+ _d.label = 17;
877
+ case 17: return [2];
1049
878
  }
1050
879
  });
1051
880
  }); };
@@ -1057,88 +886,71 @@ export var deserializeAws_restJson1CreateFileSystemCommand = function (output, c
1057
886
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1058
887
  return [2, deserializeAws_restJson1CreateFileSystemCommandError(output, context)];
1059
888
  }
1060
- contents = {
889
+ contents = map({
1061
890
  $metadata: deserializeMetadata(output),
1062
- AvailabilityZoneId: undefined,
1063
- AvailabilityZoneName: undefined,
1064
- CreationTime: undefined,
1065
- CreationToken: undefined,
1066
- Encrypted: undefined,
1067
- FileSystemArn: undefined,
1068
- FileSystemId: undefined,
1069
- KmsKeyId: undefined,
1070
- LifeCycleState: undefined,
1071
- Name: undefined,
1072
- NumberOfMountTargets: undefined,
1073
- OwnerId: undefined,
1074
- PerformanceMode: undefined,
1075
- ProvisionedThroughputInMibps: undefined,
1076
- SizeInBytes: undefined,
1077
- Tags: undefined,
1078
- ThroughputMode: undefined,
1079
- };
891
+ });
1080
892
  _a = __expectNonNull;
1081
893
  _b = __expectObject;
1082
894
  return [4, parseBody(output.body, context)];
1083
895
  case 1:
1084
896
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1085
- if (data.AvailabilityZoneId !== undefined && data.AvailabilityZoneId !== null) {
897
+ if (data.AvailabilityZoneId != null) {
1086
898
  contents.AvailabilityZoneId = __expectString(data.AvailabilityZoneId);
1087
899
  }
1088
- if (data.AvailabilityZoneName !== undefined && data.AvailabilityZoneName !== null) {
900
+ if (data.AvailabilityZoneName != null) {
1089
901
  contents.AvailabilityZoneName = __expectString(data.AvailabilityZoneName);
1090
902
  }
1091
- if (data.CreationTime !== undefined && data.CreationTime !== null) {
903
+ if (data.CreationTime != null) {
1092
904
  contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
1093
905
  }
1094
- if (data.CreationToken !== undefined && data.CreationToken !== null) {
906
+ if (data.CreationToken != null) {
1095
907
  contents.CreationToken = __expectString(data.CreationToken);
1096
908
  }
1097
- if (data.Encrypted !== undefined && data.Encrypted !== null) {
909
+ if (data.Encrypted != null) {
1098
910
  contents.Encrypted = __expectBoolean(data.Encrypted);
1099
911
  }
1100
- if (data.FileSystemArn !== undefined && data.FileSystemArn !== null) {
912
+ if (data.FileSystemArn != null) {
1101
913
  contents.FileSystemArn = __expectString(data.FileSystemArn);
1102
914
  }
1103
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
915
+ if (data.FileSystemId != null) {
1104
916
  contents.FileSystemId = __expectString(data.FileSystemId);
1105
917
  }
1106
- if (data.KmsKeyId !== undefined && data.KmsKeyId !== null) {
918
+ if (data.KmsKeyId != null) {
1107
919
  contents.KmsKeyId = __expectString(data.KmsKeyId);
1108
920
  }
1109
- if (data.LifeCycleState !== undefined && data.LifeCycleState !== null) {
921
+ if (data.LifeCycleState != null) {
1110
922
  contents.LifeCycleState = __expectString(data.LifeCycleState);
1111
923
  }
1112
- if (data.Name !== undefined && data.Name !== null) {
924
+ if (data.Name != null) {
1113
925
  contents.Name = __expectString(data.Name);
1114
926
  }
1115
- if (data.NumberOfMountTargets !== undefined && data.NumberOfMountTargets !== null) {
927
+ if (data.NumberOfMountTargets != null) {
1116
928
  contents.NumberOfMountTargets = __expectInt32(data.NumberOfMountTargets);
1117
929
  }
1118
- if (data.OwnerId !== undefined && data.OwnerId !== null) {
930
+ if (data.OwnerId != null) {
1119
931
  contents.OwnerId = __expectString(data.OwnerId);
1120
932
  }
1121
- if (data.PerformanceMode !== undefined && data.PerformanceMode !== null) {
933
+ if (data.PerformanceMode != null) {
1122
934
  contents.PerformanceMode = __expectString(data.PerformanceMode);
1123
935
  }
1124
- if (data.ProvisionedThroughputInMibps !== undefined && data.ProvisionedThroughputInMibps !== null) {
936
+ if (data.ProvisionedThroughputInMibps != null) {
1125
937
  contents.ProvisionedThroughputInMibps = __limitedParseDouble(data.ProvisionedThroughputInMibps);
1126
938
  }
1127
- if (data.SizeInBytes !== undefined && data.SizeInBytes !== null) {
939
+ if (data.SizeInBytes != null) {
1128
940
  contents.SizeInBytes = deserializeAws_restJson1FileSystemSize(data.SizeInBytes, context);
1129
941
  }
1130
- if (data.Tags !== undefined && data.Tags !== null) {
942
+ if (data.Tags != null) {
1131
943
  contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
1132
944
  }
1133
- if (data.ThroughputMode !== undefined && data.ThroughputMode !== null) {
945
+ if (data.ThroughputMode != null) {
1134
946
  contents.ThroughputMode = __expectString(data.ThroughputMode);
1135
947
  }
1136
- return [2, Promise.resolve(contents)];
948
+ return [2, contents];
1137
949
  }
1138
950
  });
1139
951
  }); };
1140
952
  var deserializeAws_restJson1CreateFileSystemCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1141
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
953
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1142
954
  var _c;
1143
955
  return __generator(this, function (_d) {
1144
956
  switch (_d.label) {
@@ -1183,14 +995,14 @@ var deserializeAws_restJson1CreateFileSystemCommandError = function (output, con
1183
995
  case 15: throw _d.sent();
1184
996
  case 16:
1185
997
  parsedBody = parsedOutput.body;
1186
- $metadata = deserializeMetadata(output);
1187
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1188
- response = new __BaseException({
1189
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1190
- $fault: "client",
1191
- $metadata: $metadata,
998
+ throwDefaultError({
999
+ output: output,
1000
+ parsedBody: parsedBody,
1001
+ exceptionCtor: __BaseException,
1002
+ errorCode: errorCode,
1192
1003
  });
1193
- throw __decorateServiceException(response, parsedBody);
1004
+ _d.label = 17;
1005
+ case 17: return [2];
1194
1006
  }
1195
1007
  });
1196
1008
  }); };
@@ -1202,60 +1014,50 @@ export var deserializeAws_restJson1CreateMountTargetCommand = function (output,
1202
1014
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1203
1015
  return [2, deserializeAws_restJson1CreateMountTargetCommandError(output, context)];
1204
1016
  }
1205
- contents = {
1017
+ contents = map({
1206
1018
  $metadata: deserializeMetadata(output),
1207
- AvailabilityZoneId: undefined,
1208
- AvailabilityZoneName: undefined,
1209
- FileSystemId: undefined,
1210
- IpAddress: undefined,
1211
- LifeCycleState: undefined,
1212
- MountTargetId: undefined,
1213
- NetworkInterfaceId: undefined,
1214
- OwnerId: undefined,
1215
- SubnetId: undefined,
1216
- VpcId: undefined,
1217
- };
1019
+ });
1218
1020
  _a = __expectNonNull;
1219
1021
  _b = __expectObject;
1220
1022
  return [4, parseBody(output.body, context)];
1221
1023
  case 1:
1222
1024
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1223
- if (data.AvailabilityZoneId !== undefined && data.AvailabilityZoneId !== null) {
1025
+ if (data.AvailabilityZoneId != null) {
1224
1026
  contents.AvailabilityZoneId = __expectString(data.AvailabilityZoneId);
1225
1027
  }
1226
- if (data.AvailabilityZoneName !== undefined && data.AvailabilityZoneName !== null) {
1028
+ if (data.AvailabilityZoneName != null) {
1227
1029
  contents.AvailabilityZoneName = __expectString(data.AvailabilityZoneName);
1228
1030
  }
1229
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
1031
+ if (data.FileSystemId != null) {
1230
1032
  contents.FileSystemId = __expectString(data.FileSystemId);
1231
1033
  }
1232
- if (data.IpAddress !== undefined && data.IpAddress !== null) {
1034
+ if (data.IpAddress != null) {
1233
1035
  contents.IpAddress = __expectString(data.IpAddress);
1234
1036
  }
1235
- if (data.LifeCycleState !== undefined && data.LifeCycleState !== null) {
1037
+ if (data.LifeCycleState != null) {
1236
1038
  contents.LifeCycleState = __expectString(data.LifeCycleState);
1237
1039
  }
1238
- if (data.MountTargetId !== undefined && data.MountTargetId !== null) {
1040
+ if (data.MountTargetId != null) {
1239
1041
  contents.MountTargetId = __expectString(data.MountTargetId);
1240
1042
  }
1241
- if (data.NetworkInterfaceId !== undefined && data.NetworkInterfaceId !== null) {
1043
+ if (data.NetworkInterfaceId != null) {
1242
1044
  contents.NetworkInterfaceId = __expectString(data.NetworkInterfaceId);
1243
1045
  }
1244
- if (data.OwnerId !== undefined && data.OwnerId !== null) {
1046
+ if (data.OwnerId != null) {
1245
1047
  contents.OwnerId = __expectString(data.OwnerId);
1246
1048
  }
1247
- if (data.SubnetId !== undefined && data.SubnetId !== null) {
1049
+ if (data.SubnetId != null) {
1248
1050
  contents.SubnetId = __expectString(data.SubnetId);
1249
1051
  }
1250
- if (data.VpcId !== undefined && data.VpcId !== null) {
1052
+ if (data.VpcId != null) {
1251
1053
  contents.VpcId = __expectString(data.VpcId);
1252
1054
  }
1253
- return [2, Promise.resolve(contents)];
1055
+ return [2, contents];
1254
1056
  }
1255
1057
  });
1256
1058
  }); };
1257
1059
  var deserializeAws_restJson1CreateMountTargetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1258
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1060
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1259
1061
  var _c;
1260
1062
  return __generator(this, function (_d) {
1261
1063
  switch (_d.label) {
@@ -1324,14 +1126,14 @@ var deserializeAws_restJson1CreateMountTargetCommandError = function (output, co
1324
1126
  case 27: throw _d.sent();
1325
1127
  case 28:
1326
1128
  parsedBody = parsedOutput.body;
1327
- $metadata = deserializeMetadata(output);
1328
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1329
- response = new __BaseException({
1330
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1331
- $fault: "client",
1332
- $metadata: $metadata,
1129
+ throwDefaultError({
1130
+ output: output,
1131
+ parsedBody: parsedBody,
1132
+ exceptionCtor: __BaseException,
1133
+ errorCode: errorCode,
1333
1134
  });
1334
- throw __decorateServiceException(response, parsedBody);
1135
+ _d.label = 29;
1136
+ case 29: return [2];
1335
1137
  }
1336
1138
  });
1337
1139
  }); };
@@ -1343,44 +1145,38 @@ export var deserializeAws_restJson1CreateReplicationConfigurationCommand = funct
1343
1145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1344
1146
  return [2, deserializeAws_restJson1CreateReplicationConfigurationCommandError(output, context)];
1345
1147
  }
1346
- contents = {
1148
+ contents = map({
1347
1149
  $metadata: deserializeMetadata(output),
1348
- CreationTime: undefined,
1349
- Destinations: undefined,
1350
- OriginalSourceFileSystemArn: undefined,
1351
- SourceFileSystemArn: undefined,
1352
- SourceFileSystemId: undefined,
1353
- SourceFileSystemRegion: undefined,
1354
- };
1150
+ });
1355
1151
  _a = __expectNonNull;
1356
1152
  _b = __expectObject;
1357
1153
  return [4, parseBody(output.body, context)];
1358
1154
  case 1:
1359
1155
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1360
- if (data.CreationTime !== undefined && data.CreationTime !== null) {
1156
+ if (data.CreationTime != null) {
1361
1157
  contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
1362
1158
  }
1363
- if (data.Destinations !== undefined && data.Destinations !== null) {
1159
+ if (data.Destinations != null) {
1364
1160
  contents.Destinations = deserializeAws_restJson1Destinations(data.Destinations, context);
1365
1161
  }
1366
- if (data.OriginalSourceFileSystemArn !== undefined && data.OriginalSourceFileSystemArn !== null) {
1162
+ if (data.OriginalSourceFileSystemArn != null) {
1367
1163
  contents.OriginalSourceFileSystemArn = __expectString(data.OriginalSourceFileSystemArn);
1368
1164
  }
1369
- if (data.SourceFileSystemArn !== undefined && data.SourceFileSystemArn !== null) {
1165
+ if (data.SourceFileSystemArn != null) {
1370
1166
  contents.SourceFileSystemArn = __expectString(data.SourceFileSystemArn);
1371
1167
  }
1372
- if (data.SourceFileSystemId !== undefined && data.SourceFileSystemId !== null) {
1168
+ if (data.SourceFileSystemId != null) {
1373
1169
  contents.SourceFileSystemId = __expectString(data.SourceFileSystemId);
1374
1170
  }
1375
- if (data.SourceFileSystemRegion !== undefined && data.SourceFileSystemRegion !== null) {
1171
+ if (data.SourceFileSystemRegion != null) {
1376
1172
  contents.SourceFileSystemRegion = __expectString(data.SourceFileSystemRegion);
1377
1173
  }
1378
- return [2, Promise.resolve(contents)];
1174
+ return [2, contents];
1379
1175
  }
1380
1176
  });
1381
1177
  }); };
1382
1178
  var deserializeAws_restJson1CreateReplicationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1383
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1179
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1384
1180
  var _c;
1385
1181
  return __generator(this, function (_d) {
1386
1182
  switch (_d.label) {
@@ -1437,14 +1233,14 @@ var deserializeAws_restJson1CreateReplicationConfigurationCommandError = functio
1437
1233
  case 21: throw _d.sent();
1438
1234
  case 22:
1439
1235
  parsedBody = parsedOutput.body;
1440
- $metadata = deserializeMetadata(output);
1441
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1442
- response = new __BaseException({
1443
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1444
- $fault: "client",
1445
- $metadata: $metadata,
1236
+ throwDefaultError({
1237
+ output: output,
1238
+ parsedBody: parsedBody,
1239
+ exceptionCtor: __BaseException,
1240
+ errorCode: errorCode,
1446
1241
  });
1447
- throw __decorateServiceException(response, parsedBody);
1242
+ _d.label = 23;
1243
+ case 23: return [2];
1448
1244
  }
1449
1245
  });
1450
1246
  }); };
@@ -1456,18 +1252,18 @@ export var deserializeAws_restJson1CreateTagsCommand = function (output, context
1456
1252
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1457
1253
  return [2, deserializeAws_restJson1CreateTagsCommandError(output, context)];
1458
1254
  }
1459
- contents = {
1255
+ contents = map({
1460
1256
  $metadata: deserializeMetadata(output),
1461
- };
1257
+ });
1462
1258
  return [4, collectBody(output.body, context)];
1463
1259
  case 1:
1464
1260
  _a.sent();
1465
- return [2, Promise.resolve(contents)];
1261
+ return [2, contents];
1466
1262
  }
1467
1263
  });
1468
1264
  }); };
1469
1265
  var deserializeAws_restJson1CreateTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1470
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1266
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1471
1267
  var _c;
1472
1268
  return __generator(this, function (_d) {
1473
1269
  switch (_d.label) {
@@ -1496,14 +1292,14 @@ var deserializeAws_restJson1CreateTagsCommandError = function (output, context)
1496
1292
  case 7: throw _d.sent();
1497
1293
  case 8:
1498
1294
  parsedBody = parsedOutput.body;
1499
- $metadata = deserializeMetadata(output);
1500
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1501
- response = new __BaseException({
1502
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1503
- $fault: "client",
1504
- $metadata: $metadata,
1295
+ throwDefaultError({
1296
+ output: output,
1297
+ parsedBody: parsedBody,
1298
+ exceptionCtor: __BaseException,
1299
+ errorCode: errorCode,
1505
1300
  });
1506
- throw __decorateServiceException(response, parsedBody);
1301
+ _d.label = 9;
1302
+ case 9: return [2];
1507
1303
  }
1508
1304
  });
1509
1305
  }); };
@@ -1515,18 +1311,18 @@ export var deserializeAws_restJson1DeleteAccessPointCommand = function (output,
1515
1311
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1516
1312
  return [2, deserializeAws_restJson1DeleteAccessPointCommandError(output, context)];
1517
1313
  }
1518
- contents = {
1314
+ contents = map({
1519
1315
  $metadata: deserializeMetadata(output),
1520
- };
1316
+ });
1521
1317
  return [4, collectBody(output.body, context)];
1522
1318
  case 1:
1523
1319
  _a.sent();
1524
- return [2, Promise.resolve(contents)];
1320
+ return [2, contents];
1525
1321
  }
1526
1322
  });
1527
1323
  }); };
1528
1324
  var deserializeAws_restJson1DeleteAccessPointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1529
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1325
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1530
1326
  var _c;
1531
1327
  return __generator(this, function (_d) {
1532
1328
  switch (_d.label) {
@@ -1555,14 +1351,14 @@ var deserializeAws_restJson1DeleteAccessPointCommandError = function (output, co
1555
1351
  case 7: throw _d.sent();
1556
1352
  case 8:
1557
1353
  parsedBody = parsedOutput.body;
1558
- $metadata = deserializeMetadata(output);
1559
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1560
- response = new __BaseException({
1561
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1562
- $fault: "client",
1563
- $metadata: $metadata,
1354
+ throwDefaultError({
1355
+ output: output,
1356
+ parsedBody: parsedBody,
1357
+ exceptionCtor: __BaseException,
1358
+ errorCode: errorCode,
1564
1359
  });
1565
- throw __decorateServiceException(response, parsedBody);
1360
+ _d.label = 9;
1361
+ case 9: return [2];
1566
1362
  }
1567
1363
  });
1568
1364
  }); };
@@ -1574,18 +1370,18 @@ export var deserializeAws_restJson1DeleteFileSystemCommand = function (output, c
1574
1370
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1575
1371
  return [2, deserializeAws_restJson1DeleteFileSystemCommandError(output, context)];
1576
1372
  }
1577
- contents = {
1373
+ contents = map({
1578
1374
  $metadata: deserializeMetadata(output),
1579
- };
1375
+ });
1580
1376
  return [4, collectBody(output.body, context)];
1581
1377
  case 1:
1582
1378
  _a.sent();
1583
- return [2, Promise.resolve(contents)];
1379
+ return [2, contents];
1584
1380
  }
1585
1381
  });
1586
1382
  }); };
1587
1383
  var deserializeAws_restJson1DeleteFileSystemCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1588
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1384
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1589
1385
  var _c;
1590
1386
  return __generator(this, function (_d) {
1591
1387
  switch (_d.label) {
@@ -1618,14 +1414,14 @@ var deserializeAws_restJson1DeleteFileSystemCommandError = function (output, con
1618
1414
  case 9: throw _d.sent();
1619
1415
  case 10:
1620
1416
  parsedBody = parsedOutput.body;
1621
- $metadata = deserializeMetadata(output);
1622
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1623
- response = new __BaseException({
1624
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1625
- $fault: "client",
1626
- $metadata: $metadata,
1417
+ throwDefaultError({
1418
+ output: output,
1419
+ parsedBody: parsedBody,
1420
+ exceptionCtor: __BaseException,
1421
+ errorCode: errorCode,
1627
1422
  });
1628
- throw __decorateServiceException(response, parsedBody);
1423
+ _d.label = 11;
1424
+ case 11: return [2];
1629
1425
  }
1630
1426
  });
1631
1427
  }); };
@@ -1637,18 +1433,18 @@ export var deserializeAws_restJson1DeleteFileSystemPolicyCommand = function (out
1637
1433
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1638
1434
  return [2, deserializeAws_restJson1DeleteFileSystemPolicyCommandError(output, context)];
1639
1435
  }
1640
- contents = {
1436
+ contents = map({
1641
1437
  $metadata: deserializeMetadata(output),
1642
- };
1438
+ });
1643
1439
  return [4, collectBody(output.body, context)];
1644
1440
  case 1:
1645
1441
  _a.sent();
1646
- return [2, Promise.resolve(contents)];
1442
+ return [2, contents];
1647
1443
  }
1648
1444
  });
1649
1445
  }); };
1650
1446
  var deserializeAws_restJson1DeleteFileSystemPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1651
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1447
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1652
1448
  var _c;
1653
1449
  return __generator(this, function (_d) {
1654
1450
  switch (_d.label) {
@@ -1681,14 +1477,14 @@ var deserializeAws_restJson1DeleteFileSystemPolicyCommandError = function (outpu
1681
1477
  case 9: throw _d.sent();
1682
1478
  case 10:
1683
1479
  parsedBody = parsedOutput.body;
1684
- $metadata = deserializeMetadata(output);
1685
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1686
- response = new __BaseException({
1687
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1688
- $fault: "client",
1689
- $metadata: $metadata,
1480
+ throwDefaultError({
1481
+ output: output,
1482
+ parsedBody: parsedBody,
1483
+ exceptionCtor: __BaseException,
1484
+ errorCode: errorCode,
1690
1485
  });
1691
- throw __decorateServiceException(response, parsedBody);
1486
+ _d.label = 11;
1487
+ case 11: return [2];
1692
1488
  }
1693
1489
  });
1694
1490
  }); };
@@ -1700,18 +1496,18 @@ export var deserializeAws_restJson1DeleteMountTargetCommand = function (output,
1700
1496
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1701
1497
  return [2, deserializeAws_restJson1DeleteMountTargetCommandError(output, context)];
1702
1498
  }
1703
- contents = {
1499
+ contents = map({
1704
1500
  $metadata: deserializeMetadata(output),
1705
- };
1501
+ });
1706
1502
  return [4, collectBody(output.body, context)];
1707
1503
  case 1:
1708
1504
  _a.sent();
1709
- return [2, Promise.resolve(contents)];
1505
+ return [2, contents];
1710
1506
  }
1711
1507
  });
1712
1508
  }); };
1713
1509
  var deserializeAws_restJson1DeleteMountTargetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1714
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1510
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1715
1511
  var _c;
1716
1512
  return __generator(this, function (_d) {
1717
1513
  switch (_d.label) {
@@ -1744,14 +1540,14 @@ var deserializeAws_restJson1DeleteMountTargetCommandError = function (output, co
1744
1540
  case 9: throw _d.sent();
1745
1541
  case 10:
1746
1542
  parsedBody = parsedOutput.body;
1747
- $metadata = deserializeMetadata(output);
1748
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1749
- response = new __BaseException({
1750
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1751
- $fault: "client",
1752
- $metadata: $metadata,
1543
+ throwDefaultError({
1544
+ output: output,
1545
+ parsedBody: parsedBody,
1546
+ exceptionCtor: __BaseException,
1547
+ errorCode: errorCode,
1753
1548
  });
1754
- throw __decorateServiceException(response, parsedBody);
1549
+ _d.label = 11;
1550
+ case 11: return [2];
1755
1551
  }
1756
1552
  });
1757
1553
  }); };
@@ -1763,18 +1559,18 @@ export var deserializeAws_restJson1DeleteReplicationConfigurationCommand = funct
1763
1559
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1764
1560
  return [2, deserializeAws_restJson1DeleteReplicationConfigurationCommandError(output, context)];
1765
1561
  }
1766
- contents = {
1562
+ contents = map({
1767
1563
  $metadata: deserializeMetadata(output),
1768
- };
1564
+ });
1769
1565
  return [4, collectBody(output.body, context)];
1770
1566
  case 1:
1771
1567
  _a.sent();
1772
- return [2, Promise.resolve(contents)];
1568
+ return [2, contents];
1773
1569
  }
1774
1570
  });
1775
1571
  }); };
1776
1572
  var deserializeAws_restJson1DeleteReplicationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1777
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1573
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1778
1574
  var _c;
1779
1575
  return __generator(this, function (_d) {
1780
1576
  switch (_d.label) {
@@ -1807,14 +1603,14 @@ var deserializeAws_restJson1DeleteReplicationConfigurationCommandError = functio
1807
1603
  case 9: throw _d.sent();
1808
1604
  case 10:
1809
1605
  parsedBody = parsedOutput.body;
1810
- $metadata = deserializeMetadata(output);
1811
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1812
- response = new __BaseException({
1813
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1814
- $fault: "client",
1815
- $metadata: $metadata,
1606
+ throwDefaultError({
1607
+ output: output,
1608
+ parsedBody: parsedBody,
1609
+ exceptionCtor: __BaseException,
1610
+ errorCode: errorCode,
1816
1611
  });
1817
- throw __decorateServiceException(response, parsedBody);
1612
+ _d.label = 11;
1613
+ case 11: return [2];
1818
1614
  }
1819
1615
  });
1820
1616
  }); };
@@ -1826,18 +1622,18 @@ export var deserializeAws_restJson1DeleteTagsCommand = function (output, context
1826
1622
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1827
1623
  return [2, deserializeAws_restJson1DeleteTagsCommandError(output, context)];
1828
1624
  }
1829
- contents = {
1625
+ contents = map({
1830
1626
  $metadata: deserializeMetadata(output),
1831
- };
1627
+ });
1832
1628
  return [4, collectBody(output.body, context)];
1833
1629
  case 1:
1834
1630
  _a.sent();
1835
- return [2, Promise.resolve(contents)];
1631
+ return [2, contents];
1836
1632
  }
1837
1633
  });
1838
1634
  }); };
1839
1635
  var deserializeAws_restJson1DeleteTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1840
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1636
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1841
1637
  var _c;
1842
1638
  return __generator(this, function (_d) {
1843
1639
  switch (_d.label) {
@@ -1866,14 +1662,14 @@ var deserializeAws_restJson1DeleteTagsCommandError = function (output, context)
1866
1662
  case 7: throw _d.sent();
1867
1663
  case 8:
1868
1664
  parsedBody = parsedOutput.body;
1869
- $metadata = deserializeMetadata(output);
1870
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1871
- response = new __BaseException({
1872
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1873
- $fault: "client",
1874
- $metadata: $metadata,
1665
+ throwDefaultError({
1666
+ output: output,
1667
+ parsedBody: parsedBody,
1668
+ exceptionCtor: __BaseException,
1669
+ errorCode: errorCode,
1875
1670
  });
1876
- throw __decorateServiceException(response, parsedBody);
1671
+ _d.label = 9;
1672
+ case 9: return [2];
1877
1673
  }
1878
1674
  });
1879
1675
  }); };
@@ -1885,28 +1681,26 @@ export var deserializeAws_restJson1DescribeAccessPointsCommand = function (outpu
1885
1681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1886
1682
  return [2, deserializeAws_restJson1DescribeAccessPointsCommandError(output, context)];
1887
1683
  }
1888
- contents = {
1684
+ contents = map({
1889
1685
  $metadata: deserializeMetadata(output),
1890
- AccessPoints: undefined,
1891
- NextToken: undefined,
1892
- };
1686
+ });
1893
1687
  _a = __expectNonNull;
1894
1688
  _b = __expectObject;
1895
1689
  return [4, parseBody(output.body, context)];
1896
1690
  case 1:
1897
1691
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1898
- if (data.AccessPoints !== undefined && data.AccessPoints !== null) {
1692
+ if (data.AccessPoints != null) {
1899
1693
  contents.AccessPoints = deserializeAws_restJson1AccessPointDescriptions(data.AccessPoints, context);
1900
1694
  }
1901
- if (data.NextToken !== undefined && data.NextToken !== null) {
1695
+ if (data.NextToken != null) {
1902
1696
  contents.NextToken = __expectString(data.NextToken);
1903
1697
  }
1904
- return [2, Promise.resolve(contents)];
1698
+ return [2, contents];
1905
1699
  }
1906
1700
  });
1907
1701
  }); };
1908
1702
  var deserializeAws_restJson1DescribeAccessPointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1909
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1703
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1910
1704
  var _c;
1911
1705
  return __generator(this, function (_d) {
1912
1706
  switch (_d.label) {
@@ -1939,14 +1733,14 @@ var deserializeAws_restJson1DescribeAccessPointsCommandError = function (output,
1939
1733
  case 9: throw _d.sent();
1940
1734
  case 10:
1941
1735
  parsedBody = parsedOutput.body;
1942
- $metadata = deserializeMetadata(output);
1943
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1944
- response = new __BaseException({
1945
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1946
- $fault: "client",
1947
- $metadata: $metadata,
1736
+ throwDefaultError({
1737
+ output: output,
1738
+ parsedBody: parsedBody,
1739
+ exceptionCtor: __BaseException,
1740
+ errorCode: errorCode,
1948
1741
  });
1949
- throw __decorateServiceException(response, parsedBody);
1742
+ _d.label = 11;
1743
+ case 11: return [2];
1950
1744
  }
1951
1745
  });
1952
1746
  }); };
@@ -1958,28 +1752,26 @@ export var deserializeAws_restJson1DescribeAccountPreferencesCommand = function
1958
1752
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1959
1753
  return [2, deserializeAws_restJson1DescribeAccountPreferencesCommandError(output, context)];
1960
1754
  }
1961
- contents = {
1755
+ contents = map({
1962
1756
  $metadata: deserializeMetadata(output),
1963
- NextToken: undefined,
1964
- ResourceIdPreference: undefined,
1965
- };
1757
+ });
1966
1758
  _a = __expectNonNull;
1967
1759
  _b = __expectObject;
1968
1760
  return [4, parseBody(output.body, context)];
1969
1761
  case 1:
1970
1762
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1971
- if (data.NextToken !== undefined && data.NextToken !== null) {
1763
+ if (data.NextToken != null) {
1972
1764
  contents.NextToken = __expectString(data.NextToken);
1973
1765
  }
1974
- if (data.ResourceIdPreference !== undefined && data.ResourceIdPreference !== null) {
1766
+ if (data.ResourceIdPreference != null) {
1975
1767
  contents.ResourceIdPreference = deserializeAws_restJson1ResourceIdPreference(data.ResourceIdPreference, context);
1976
1768
  }
1977
- return [2, Promise.resolve(contents)];
1769
+ return [2, contents];
1978
1770
  }
1979
1771
  });
1980
1772
  }); };
1981
1773
  var deserializeAws_restJson1DescribeAccountPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1982
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1774
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1983
1775
  var _c;
1984
1776
  return __generator(this, function (_d) {
1985
1777
  switch (_d.label) {
@@ -2000,14 +1792,14 @@ var deserializeAws_restJson1DescribeAccountPreferencesCommandError = function (o
2000
1792
  case 3: throw _d.sent();
2001
1793
  case 4:
2002
1794
  parsedBody = parsedOutput.body;
2003
- $metadata = deserializeMetadata(output);
2004
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2005
- response = new __BaseException({
2006
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2007
- $fault: "client",
2008
- $metadata: $metadata,
1795
+ throwDefaultError({
1796
+ output: output,
1797
+ parsedBody: parsedBody,
1798
+ exceptionCtor: __BaseException,
1799
+ errorCode: errorCode,
2009
1800
  });
2010
- throw __decorateServiceException(response, parsedBody);
1801
+ _d.label = 5;
1802
+ case 5: return [2];
2011
1803
  }
2012
1804
  });
2013
1805
  }); };
@@ -2019,24 +1811,23 @@ export var deserializeAws_restJson1DescribeBackupPolicyCommand = function (outpu
2019
1811
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2020
1812
  return [2, deserializeAws_restJson1DescribeBackupPolicyCommandError(output, context)];
2021
1813
  }
2022
- contents = {
1814
+ contents = map({
2023
1815
  $metadata: deserializeMetadata(output),
2024
- BackupPolicy: undefined,
2025
- };
1816
+ });
2026
1817
  _a = __expectNonNull;
2027
1818
  _b = __expectObject;
2028
1819
  return [4, parseBody(output.body, context)];
2029
1820
  case 1:
2030
1821
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2031
- if (data.BackupPolicy !== undefined && data.BackupPolicy !== null) {
1822
+ if (data.BackupPolicy != null) {
2032
1823
  contents.BackupPolicy = deserializeAws_restJson1BackupPolicy(data.BackupPolicy, context);
2033
1824
  }
2034
- return [2, Promise.resolve(contents)];
1825
+ return [2, contents];
2035
1826
  }
2036
1827
  });
2037
1828
  }); };
2038
1829
  var deserializeAws_restJson1DescribeBackupPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2039
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1830
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2040
1831
  var _c;
2041
1832
  return __generator(this, function (_d) {
2042
1833
  switch (_d.label) {
@@ -2073,14 +1864,14 @@ var deserializeAws_restJson1DescribeBackupPolicyCommandError = function (output,
2073
1864
  case 11: throw _d.sent();
2074
1865
  case 12:
2075
1866
  parsedBody = parsedOutput.body;
2076
- $metadata = deserializeMetadata(output);
2077
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2078
- response = new __BaseException({
2079
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2080
- $fault: "client",
2081
- $metadata: $metadata,
1867
+ throwDefaultError({
1868
+ output: output,
1869
+ parsedBody: parsedBody,
1870
+ exceptionCtor: __BaseException,
1871
+ errorCode: errorCode,
2082
1872
  });
2083
- throw __decorateServiceException(response, parsedBody);
1873
+ _d.label = 13;
1874
+ case 13: return [2];
2084
1875
  }
2085
1876
  });
2086
1877
  }); };
@@ -2092,28 +1883,26 @@ export var deserializeAws_restJson1DescribeFileSystemPolicyCommand = function (o
2092
1883
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2093
1884
  return [2, deserializeAws_restJson1DescribeFileSystemPolicyCommandError(output, context)];
2094
1885
  }
2095
- contents = {
1886
+ contents = map({
2096
1887
  $metadata: deserializeMetadata(output),
2097
- FileSystemId: undefined,
2098
- Policy: undefined,
2099
- };
1888
+ });
2100
1889
  _a = __expectNonNull;
2101
1890
  _b = __expectObject;
2102
1891
  return [4, parseBody(output.body, context)];
2103
1892
  case 1:
2104
1893
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2105
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
1894
+ if (data.FileSystemId != null) {
2106
1895
  contents.FileSystemId = __expectString(data.FileSystemId);
2107
1896
  }
2108
- if (data.Policy !== undefined && data.Policy !== null) {
1897
+ if (data.Policy != null) {
2109
1898
  contents.Policy = __expectString(data.Policy);
2110
1899
  }
2111
- return [2, Promise.resolve(contents)];
1900
+ return [2, contents];
2112
1901
  }
2113
1902
  });
2114
1903
  }); };
2115
1904
  var deserializeAws_restJson1DescribeFileSystemPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2116
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1905
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2117
1906
  var _c;
2118
1907
  return __generator(this, function (_d) {
2119
1908
  switch (_d.label) {
@@ -2146,14 +1935,14 @@ var deserializeAws_restJson1DescribeFileSystemPolicyCommandError = function (out
2146
1935
  case 9: throw _d.sent();
2147
1936
  case 10:
2148
1937
  parsedBody = parsedOutput.body;
2149
- $metadata = deserializeMetadata(output);
2150
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2151
- response = new __BaseException({
2152
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2153
- $fault: "client",
2154
- $metadata: $metadata,
1938
+ throwDefaultError({
1939
+ output: output,
1940
+ parsedBody: parsedBody,
1941
+ exceptionCtor: __BaseException,
1942
+ errorCode: errorCode,
2155
1943
  });
2156
- throw __decorateServiceException(response, parsedBody);
1944
+ _d.label = 11;
1945
+ case 11: return [2];
2157
1946
  }
2158
1947
  });
2159
1948
  }); };
@@ -2165,32 +1954,29 @@ export var deserializeAws_restJson1DescribeFileSystemsCommand = function (output
2165
1954
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2166
1955
  return [2, deserializeAws_restJson1DescribeFileSystemsCommandError(output, context)];
2167
1956
  }
2168
- contents = {
1957
+ contents = map({
2169
1958
  $metadata: deserializeMetadata(output),
2170
- FileSystems: undefined,
2171
- Marker: undefined,
2172
- NextMarker: undefined,
2173
- };
1959
+ });
2174
1960
  _a = __expectNonNull;
2175
1961
  _b = __expectObject;
2176
1962
  return [4, parseBody(output.body, context)];
2177
1963
  case 1:
2178
1964
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2179
- if (data.FileSystems !== undefined && data.FileSystems !== null) {
1965
+ if (data.FileSystems != null) {
2180
1966
  contents.FileSystems = deserializeAws_restJson1FileSystemDescriptions(data.FileSystems, context);
2181
1967
  }
2182
- if (data.Marker !== undefined && data.Marker !== null) {
1968
+ if (data.Marker != null) {
2183
1969
  contents.Marker = __expectString(data.Marker);
2184
1970
  }
2185
- if (data.NextMarker !== undefined && data.NextMarker !== null) {
1971
+ if (data.NextMarker != null) {
2186
1972
  contents.NextMarker = __expectString(data.NextMarker);
2187
1973
  }
2188
- return [2, Promise.resolve(contents)];
1974
+ return [2, contents];
2189
1975
  }
2190
1976
  });
2191
1977
  }); };
2192
1978
  var deserializeAws_restJson1DescribeFileSystemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2193
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1979
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2194
1980
  var _c;
2195
1981
  return __generator(this, function (_d) {
2196
1982
  switch (_d.label) {
@@ -2219,14 +2005,14 @@ var deserializeAws_restJson1DescribeFileSystemsCommandError = function (output,
2219
2005
  case 7: throw _d.sent();
2220
2006
  case 8:
2221
2007
  parsedBody = parsedOutput.body;
2222
- $metadata = deserializeMetadata(output);
2223
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2224
- response = new __BaseException({
2225
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2226
- $fault: "client",
2227
- $metadata: $metadata,
2008
+ throwDefaultError({
2009
+ output: output,
2010
+ parsedBody: parsedBody,
2011
+ exceptionCtor: __BaseException,
2012
+ errorCode: errorCode,
2228
2013
  });
2229
- throw __decorateServiceException(response, parsedBody);
2014
+ _d.label = 9;
2015
+ case 9: return [2];
2230
2016
  }
2231
2017
  });
2232
2018
  }); };
@@ -2238,24 +2024,23 @@ export var deserializeAws_restJson1DescribeLifecycleConfigurationCommand = funct
2238
2024
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2239
2025
  return [2, deserializeAws_restJson1DescribeLifecycleConfigurationCommandError(output, context)];
2240
2026
  }
2241
- contents = {
2027
+ contents = map({
2242
2028
  $metadata: deserializeMetadata(output),
2243
- LifecyclePolicies: undefined,
2244
- };
2029
+ });
2245
2030
  _a = __expectNonNull;
2246
2031
  _b = __expectObject;
2247
2032
  return [4, parseBody(output.body, context)];
2248
2033
  case 1:
2249
2034
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2250
- if (data.LifecyclePolicies !== undefined && data.LifecyclePolicies !== null) {
2035
+ if (data.LifecyclePolicies != null) {
2251
2036
  contents.LifecyclePolicies = deserializeAws_restJson1LifecyclePolicies(data.LifecyclePolicies, context);
2252
2037
  }
2253
- return [2, Promise.resolve(contents)];
2038
+ return [2, contents];
2254
2039
  }
2255
2040
  });
2256
2041
  }); };
2257
2042
  var deserializeAws_restJson1DescribeLifecycleConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2258
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2043
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2259
2044
  var _c;
2260
2045
  return __generator(this, function (_d) {
2261
2046
  switch (_d.label) {
@@ -2284,14 +2069,14 @@ var deserializeAws_restJson1DescribeLifecycleConfigurationCommandError = functio
2284
2069
  case 7: throw _d.sent();
2285
2070
  case 8:
2286
2071
  parsedBody = parsedOutput.body;
2287
- $metadata = deserializeMetadata(output);
2288
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2289
- response = new __BaseException({
2290
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2291
- $fault: "client",
2292
- $metadata: $metadata,
2072
+ throwDefaultError({
2073
+ output: output,
2074
+ parsedBody: parsedBody,
2075
+ exceptionCtor: __BaseException,
2076
+ errorCode: errorCode,
2293
2077
  });
2294
- throw __decorateServiceException(response, parsedBody);
2078
+ _d.label = 9;
2079
+ case 9: return [2];
2295
2080
  }
2296
2081
  });
2297
2082
  }); };
@@ -2303,32 +2088,29 @@ export var deserializeAws_restJson1DescribeMountTargetsCommand = function (outpu
2303
2088
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2304
2089
  return [2, deserializeAws_restJson1DescribeMountTargetsCommandError(output, context)];
2305
2090
  }
2306
- contents = {
2091
+ contents = map({
2307
2092
  $metadata: deserializeMetadata(output),
2308
- Marker: undefined,
2309
- MountTargets: undefined,
2310
- NextMarker: undefined,
2311
- };
2093
+ });
2312
2094
  _a = __expectNonNull;
2313
2095
  _b = __expectObject;
2314
2096
  return [4, parseBody(output.body, context)];
2315
2097
  case 1:
2316
2098
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2317
- if (data.Marker !== undefined && data.Marker !== null) {
2099
+ if (data.Marker != null) {
2318
2100
  contents.Marker = __expectString(data.Marker);
2319
2101
  }
2320
- if (data.MountTargets !== undefined && data.MountTargets !== null) {
2102
+ if (data.MountTargets != null) {
2321
2103
  contents.MountTargets = deserializeAws_restJson1MountTargetDescriptions(data.MountTargets, context);
2322
2104
  }
2323
- if (data.NextMarker !== undefined && data.NextMarker !== null) {
2105
+ if (data.NextMarker != null) {
2324
2106
  contents.NextMarker = __expectString(data.NextMarker);
2325
2107
  }
2326
- return [2, Promise.resolve(contents)];
2108
+ return [2, contents];
2327
2109
  }
2328
2110
  });
2329
2111
  }); };
2330
2112
  var deserializeAws_restJson1DescribeMountTargetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2331
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2113
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2332
2114
  var _c;
2333
2115
  return __generator(this, function (_d) {
2334
2116
  switch (_d.label) {
@@ -2365,14 +2147,14 @@ var deserializeAws_restJson1DescribeMountTargetsCommandError = function (output,
2365
2147
  case 11: throw _d.sent();
2366
2148
  case 12:
2367
2149
  parsedBody = parsedOutput.body;
2368
- $metadata = deserializeMetadata(output);
2369
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2370
- response = new __BaseException({
2371
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2372
- $fault: "client",
2373
- $metadata: $metadata,
2150
+ throwDefaultError({
2151
+ output: output,
2152
+ parsedBody: parsedBody,
2153
+ exceptionCtor: __BaseException,
2154
+ errorCode: errorCode,
2374
2155
  });
2375
- throw __decorateServiceException(response, parsedBody);
2156
+ _d.label = 13;
2157
+ case 13: return [2];
2376
2158
  }
2377
2159
  });
2378
2160
  }); };
@@ -2384,24 +2166,23 @@ export var deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommand = fu
2384
2166
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2385
2167
  return [2, deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommandError(output, context)];
2386
2168
  }
2387
- contents = {
2169
+ contents = map({
2388
2170
  $metadata: deserializeMetadata(output),
2389
- SecurityGroups: undefined,
2390
- };
2171
+ });
2391
2172
  _a = __expectNonNull;
2392
2173
  _b = __expectObject;
2393
2174
  return [4, parseBody(output.body, context)];
2394
2175
  case 1:
2395
2176
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2396
- if (data.SecurityGroups !== undefined && data.SecurityGroups !== null) {
2177
+ if (data.SecurityGroups != null) {
2397
2178
  contents.SecurityGroups = deserializeAws_restJson1SecurityGroups(data.SecurityGroups, context);
2398
2179
  }
2399
- return [2, Promise.resolve(contents)];
2180
+ return [2, contents];
2400
2181
  }
2401
2182
  });
2402
2183
  }); };
2403
2184
  var deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2404
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2185
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2405
2186
  var _c;
2406
2187
  return __generator(this, function (_d) {
2407
2188
  switch (_d.label) {
@@ -2434,14 +2215,14 @@ var deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommandError = func
2434
2215
  case 9: throw _d.sent();
2435
2216
  case 10:
2436
2217
  parsedBody = parsedOutput.body;
2437
- $metadata = deserializeMetadata(output);
2438
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2439
- response = new __BaseException({
2440
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2441
- $fault: "client",
2442
- $metadata: $metadata,
2218
+ throwDefaultError({
2219
+ output: output,
2220
+ parsedBody: parsedBody,
2221
+ exceptionCtor: __BaseException,
2222
+ errorCode: errorCode,
2443
2223
  });
2444
- throw __decorateServiceException(response, parsedBody);
2224
+ _d.label = 11;
2225
+ case 11: return [2];
2445
2226
  }
2446
2227
  });
2447
2228
  }); };
@@ -2453,28 +2234,26 @@ export var deserializeAws_restJson1DescribeReplicationConfigurationsCommand = fu
2453
2234
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2454
2235
  return [2, deserializeAws_restJson1DescribeReplicationConfigurationsCommandError(output, context)];
2455
2236
  }
2456
- contents = {
2237
+ contents = map({
2457
2238
  $metadata: deserializeMetadata(output),
2458
- NextToken: undefined,
2459
- Replications: undefined,
2460
- };
2239
+ });
2461
2240
  _a = __expectNonNull;
2462
2241
  _b = __expectObject;
2463
2242
  return [4, parseBody(output.body, context)];
2464
2243
  case 1:
2465
2244
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2466
- if (data.NextToken !== undefined && data.NextToken !== null) {
2245
+ if (data.NextToken != null) {
2467
2246
  contents.NextToken = __expectString(data.NextToken);
2468
2247
  }
2469
- if (data.Replications !== undefined && data.Replications !== null) {
2248
+ if (data.Replications != null) {
2470
2249
  contents.Replications = deserializeAws_restJson1ReplicationConfigurationDescriptions(data.Replications, context);
2471
2250
  }
2472
- return [2, Promise.resolve(contents)];
2251
+ return [2, contents];
2473
2252
  }
2474
2253
  });
2475
2254
  }); };
2476
2255
  var deserializeAws_restJson1DescribeReplicationConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2477
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2256
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2478
2257
  var _c;
2479
2258
  return __generator(this, function (_d) {
2480
2259
  switch (_d.label) {
@@ -2511,14 +2290,14 @@ var deserializeAws_restJson1DescribeReplicationConfigurationsCommandError = func
2511
2290
  case 11: throw _d.sent();
2512
2291
  case 12:
2513
2292
  parsedBody = parsedOutput.body;
2514
- $metadata = deserializeMetadata(output);
2515
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2516
- response = new __BaseException({
2517
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2518
- $fault: "client",
2519
- $metadata: $metadata,
2293
+ throwDefaultError({
2294
+ output: output,
2295
+ parsedBody: parsedBody,
2296
+ exceptionCtor: __BaseException,
2297
+ errorCode: errorCode,
2520
2298
  });
2521
- throw __decorateServiceException(response, parsedBody);
2299
+ _d.label = 13;
2300
+ case 13: return [2];
2522
2301
  }
2523
2302
  });
2524
2303
  }); };
@@ -2530,32 +2309,29 @@ export var deserializeAws_restJson1DescribeTagsCommand = function (output, conte
2530
2309
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2531
2310
  return [2, deserializeAws_restJson1DescribeTagsCommandError(output, context)];
2532
2311
  }
2533
- contents = {
2312
+ contents = map({
2534
2313
  $metadata: deserializeMetadata(output),
2535
- Marker: undefined,
2536
- NextMarker: undefined,
2537
- Tags: undefined,
2538
- };
2314
+ });
2539
2315
  _a = __expectNonNull;
2540
2316
  _b = __expectObject;
2541
2317
  return [4, parseBody(output.body, context)];
2542
2318
  case 1:
2543
2319
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2544
- if (data.Marker !== undefined && data.Marker !== null) {
2320
+ if (data.Marker != null) {
2545
2321
  contents.Marker = __expectString(data.Marker);
2546
2322
  }
2547
- if (data.NextMarker !== undefined && data.NextMarker !== null) {
2323
+ if (data.NextMarker != null) {
2548
2324
  contents.NextMarker = __expectString(data.NextMarker);
2549
2325
  }
2550
- if (data.Tags !== undefined && data.Tags !== null) {
2326
+ if (data.Tags != null) {
2551
2327
  contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
2552
2328
  }
2553
- return [2, Promise.resolve(contents)];
2329
+ return [2, contents];
2554
2330
  }
2555
2331
  });
2556
2332
  }); };
2557
2333
  var deserializeAws_restJson1DescribeTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2558
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2334
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2559
2335
  var _c;
2560
2336
  return __generator(this, function (_d) {
2561
2337
  switch (_d.label) {
@@ -2584,14 +2360,14 @@ var deserializeAws_restJson1DescribeTagsCommandError = function (output, context
2584
2360
  case 7: throw _d.sent();
2585
2361
  case 8:
2586
2362
  parsedBody = parsedOutput.body;
2587
- $metadata = deserializeMetadata(output);
2588
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2589
- response = new __BaseException({
2590
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2591
- $fault: "client",
2592
- $metadata: $metadata,
2363
+ throwDefaultError({
2364
+ output: output,
2365
+ parsedBody: parsedBody,
2366
+ exceptionCtor: __BaseException,
2367
+ errorCode: errorCode,
2593
2368
  });
2594
- throw __decorateServiceException(response, parsedBody);
2369
+ _d.label = 9;
2370
+ case 9: return [2];
2595
2371
  }
2596
2372
  });
2597
2373
  }); };
@@ -2603,28 +2379,26 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
2603
2379
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2604
2380
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
2605
2381
  }
2606
- contents = {
2382
+ contents = map({
2607
2383
  $metadata: deserializeMetadata(output),
2608
- NextToken: undefined,
2609
- Tags: undefined,
2610
- };
2384
+ });
2611
2385
  _a = __expectNonNull;
2612
2386
  _b = __expectObject;
2613
2387
  return [4, parseBody(output.body, context)];
2614
2388
  case 1:
2615
2389
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2616
- if (data.NextToken !== undefined && data.NextToken !== null) {
2390
+ if (data.NextToken != null) {
2617
2391
  contents.NextToken = __expectString(data.NextToken);
2618
2392
  }
2619
- if (data.Tags !== undefined && data.Tags !== null) {
2393
+ if (data.Tags != null) {
2620
2394
  contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
2621
2395
  }
2622
- return [2, Promise.resolve(contents)];
2396
+ return [2, contents];
2623
2397
  }
2624
2398
  });
2625
2399
  }); };
2626
2400
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2627
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2401
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2628
2402
  var _c;
2629
2403
  return __generator(this, function (_d) {
2630
2404
  switch (_d.label) {
@@ -2657,14 +2431,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2657
2431
  case 9: throw _d.sent();
2658
2432
  case 10:
2659
2433
  parsedBody = parsedOutput.body;
2660
- $metadata = deserializeMetadata(output);
2661
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2662
- response = new __BaseException({
2663
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2664
- $fault: "client",
2665
- $metadata: $metadata,
2434
+ throwDefaultError({
2435
+ output: output,
2436
+ parsedBody: parsedBody,
2437
+ exceptionCtor: __BaseException,
2438
+ errorCode: errorCode,
2666
2439
  });
2667
- throw __decorateServiceException(response, parsedBody);
2440
+ _d.label = 11;
2441
+ case 11: return [2];
2668
2442
  }
2669
2443
  });
2670
2444
  }); };
@@ -2676,18 +2450,18 @@ export var deserializeAws_restJson1ModifyMountTargetSecurityGroupsCommand = func
2676
2450
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2677
2451
  return [2, deserializeAws_restJson1ModifyMountTargetSecurityGroupsCommandError(output, context)];
2678
2452
  }
2679
- contents = {
2453
+ contents = map({
2680
2454
  $metadata: deserializeMetadata(output),
2681
- };
2455
+ });
2682
2456
  return [4, collectBody(output.body, context)];
2683
2457
  case 1:
2684
2458
  _a.sent();
2685
- return [2, Promise.resolve(contents)];
2459
+ return [2, contents];
2686
2460
  }
2687
2461
  });
2688
2462
  }); };
2689
2463
  var deserializeAws_restJson1ModifyMountTargetSecurityGroupsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2690
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2464
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2691
2465
  var _c;
2692
2466
  return __generator(this, function (_d) {
2693
2467
  switch (_d.label) {
@@ -2728,14 +2502,14 @@ var deserializeAws_restJson1ModifyMountTargetSecurityGroupsCommandError = functi
2728
2502
  case 13: throw _d.sent();
2729
2503
  case 14:
2730
2504
  parsedBody = parsedOutput.body;
2731
- $metadata = deserializeMetadata(output);
2732
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2733
- response = new __BaseException({
2734
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2735
- $fault: "client",
2736
- $metadata: $metadata,
2505
+ throwDefaultError({
2506
+ output: output,
2507
+ parsedBody: parsedBody,
2508
+ exceptionCtor: __BaseException,
2509
+ errorCode: errorCode,
2737
2510
  });
2738
- throw __decorateServiceException(response, parsedBody);
2511
+ _d.label = 15;
2512
+ case 15: return [2];
2739
2513
  }
2740
2514
  });
2741
2515
  }); };
@@ -2747,24 +2521,23 @@ export var deserializeAws_restJson1PutAccountPreferencesCommand = function (outp
2747
2521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2748
2522
  return [2, deserializeAws_restJson1PutAccountPreferencesCommandError(output, context)];
2749
2523
  }
2750
- contents = {
2524
+ contents = map({
2751
2525
  $metadata: deserializeMetadata(output),
2752
- ResourceIdPreference: undefined,
2753
- };
2526
+ });
2754
2527
  _a = __expectNonNull;
2755
2528
  _b = __expectObject;
2756
2529
  return [4, parseBody(output.body, context)];
2757
2530
  case 1:
2758
2531
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2759
- if (data.ResourceIdPreference !== undefined && data.ResourceIdPreference !== null) {
2532
+ if (data.ResourceIdPreference != null) {
2760
2533
  contents.ResourceIdPreference = deserializeAws_restJson1ResourceIdPreference(data.ResourceIdPreference, context);
2761
2534
  }
2762
- return [2, Promise.resolve(contents)];
2535
+ return [2, contents];
2763
2536
  }
2764
2537
  });
2765
2538
  }); };
2766
2539
  var deserializeAws_restJson1PutAccountPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2767
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2540
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2768
2541
  var _c;
2769
2542
  return __generator(this, function (_d) {
2770
2543
  switch (_d.label) {
@@ -2789,14 +2562,14 @@ var deserializeAws_restJson1PutAccountPreferencesCommandError = function (output
2789
2562
  case 5: throw _d.sent();
2790
2563
  case 6:
2791
2564
  parsedBody = parsedOutput.body;
2792
- $metadata = deserializeMetadata(output);
2793
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2794
- response = new __BaseException({
2795
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2796
- $fault: "client",
2797
- $metadata: $metadata,
2565
+ throwDefaultError({
2566
+ output: output,
2567
+ parsedBody: parsedBody,
2568
+ exceptionCtor: __BaseException,
2569
+ errorCode: errorCode,
2798
2570
  });
2799
- throw __decorateServiceException(response, parsedBody);
2571
+ _d.label = 7;
2572
+ case 7: return [2];
2800
2573
  }
2801
2574
  });
2802
2575
  }); };
@@ -2808,24 +2581,23 @@ export var deserializeAws_restJson1PutBackupPolicyCommand = function (output, co
2808
2581
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2809
2582
  return [2, deserializeAws_restJson1PutBackupPolicyCommandError(output, context)];
2810
2583
  }
2811
- contents = {
2584
+ contents = map({
2812
2585
  $metadata: deserializeMetadata(output),
2813
- BackupPolicy: undefined,
2814
- };
2586
+ });
2815
2587
  _a = __expectNonNull;
2816
2588
  _b = __expectObject;
2817
2589
  return [4, parseBody(output.body, context)];
2818
2590
  case 1:
2819
2591
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2820
- if (data.BackupPolicy !== undefined && data.BackupPolicy !== null) {
2592
+ if (data.BackupPolicy != null) {
2821
2593
  contents.BackupPolicy = deserializeAws_restJson1BackupPolicy(data.BackupPolicy, context);
2822
2594
  }
2823
- return [2, Promise.resolve(contents)];
2595
+ return [2, contents];
2824
2596
  }
2825
2597
  });
2826
2598
  }); };
2827
2599
  var deserializeAws_restJson1PutBackupPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2828
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2600
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2829
2601
  var _c;
2830
2602
  return __generator(this, function (_d) {
2831
2603
  switch (_d.label) {
@@ -2862,14 +2634,14 @@ var deserializeAws_restJson1PutBackupPolicyCommandError = function (output, cont
2862
2634
  case 11: throw _d.sent();
2863
2635
  case 12:
2864
2636
  parsedBody = parsedOutput.body;
2865
- $metadata = deserializeMetadata(output);
2866
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2867
- response = new __BaseException({
2868
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2869
- $fault: "client",
2870
- $metadata: $metadata,
2637
+ throwDefaultError({
2638
+ output: output,
2639
+ parsedBody: parsedBody,
2640
+ exceptionCtor: __BaseException,
2641
+ errorCode: errorCode,
2871
2642
  });
2872
- throw __decorateServiceException(response, parsedBody);
2643
+ _d.label = 13;
2644
+ case 13: return [2];
2873
2645
  }
2874
2646
  });
2875
2647
  }); };
@@ -2881,28 +2653,26 @@ export var deserializeAws_restJson1PutFileSystemPolicyCommand = function (output
2881
2653
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2882
2654
  return [2, deserializeAws_restJson1PutFileSystemPolicyCommandError(output, context)];
2883
2655
  }
2884
- contents = {
2656
+ contents = map({
2885
2657
  $metadata: deserializeMetadata(output),
2886
- FileSystemId: undefined,
2887
- Policy: undefined,
2888
- };
2658
+ });
2889
2659
  _a = __expectNonNull;
2890
2660
  _b = __expectObject;
2891
2661
  return [4, parseBody(output.body, context)];
2892
2662
  case 1:
2893
2663
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2894
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
2664
+ if (data.FileSystemId != null) {
2895
2665
  contents.FileSystemId = __expectString(data.FileSystemId);
2896
2666
  }
2897
- if (data.Policy !== undefined && data.Policy !== null) {
2667
+ if (data.Policy != null) {
2898
2668
  contents.Policy = __expectString(data.Policy);
2899
2669
  }
2900
- return [2, Promise.resolve(contents)];
2670
+ return [2, contents];
2901
2671
  }
2902
2672
  });
2903
2673
  }); };
2904
2674
  var deserializeAws_restJson1PutFileSystemPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2905
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2675
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2906
2676
  var _c;
2907
2677
  return __generator(this, function (_d) {
2908
2678
  switch (_d.label) {
@@ -2939,14 +2709,14 @@ var deserializeAws_restJson1PutFileSystemPolicyCommandError = function (output,
2939
2709
  case 11: throw _d.sent();
2940
2710
  case 12:
2941
2711
  parsedBody = parsedOutput.body;
2942
- $metadata = deserializeMetadata(output);
2943
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2944
- response = new __BaseException({
2945
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2946
- $fault: "client",
2947
- $metadata: $metadata,
2712
+ throwDefaultError({
2713
+ output: output,
2714
+ parsedBody: parsedBody,
2715
+ exceptionCtor: __BaseException,
2716
+ errorCode: errorCode,
2948
2717
  });
2949
- throw __decorateServiceException(response, parsedBody);
2718
+ _d.label = 13;
2719
+ case 13: return [2];
2950
2720
  }
2951
2721
  });
2952
2722
  }); };
@@ -2958,24 +2728,23 @@ export var deserializeAws_restJson1PutLifecycleConfigurationCommand = function (
2958
2728
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2959
2729
  return [2, deserializeAws_restJson1PutLifecycleConfigurationCommandError(output, context)];
2960
2730
  }
2961
- contents = {
2731
+ contents = map({
2962
2732
  $metadata: deserializeMetadata(output),
2963
- LifecyclePolicies: undefined,
2964
- };
2733
+ });
2965
2734
  _a = __expectNonNull;
2966
2735
  _b = __expectObject;
2967
2736
  return [4, parseBody(output.body, context)];
2968
2737
  case 1:
2969
2738
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2970
- if (data.LifecyclePolicies !== undefined && data.LifecyclePolicies !== null) {
2739
+ if (data.LifecyclePolicies != null) {
2971
2740
  contents.LifecyclePolicies = deserializeAws_restJson1LifecyclePolicies(data.LifecyclePolicies, context);
2972
2741
  }
2973
- return [2, Promise.resolve(contents)];
2742
+ return [2, contents];
2974
2743
  }
2975
2744
  });
2976
2745
  }); };
2977
2746
  var deserializeAws_restJson1PutLifecycleConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2978
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2747
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2979
2748
  var _c;
2980
2749
  return __generator(this, function (_d) {
2981
2750
  switch (_d.label) {
@@ -3008,14 +2777,14 @@ var deserializeAws_restJson1PutLifecycleConfigurationCommandError = function (ou
3008
2777
  case 9: throw _d.sent();
3009
2778
  case 10:
3010
2779
  parsedBody = parsedOutput.body;
3011
- $metadata = deserializeMetadata(output);
3012
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3013
- response = new __BaseException({
3014
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3015
- $fault: "client",
3016
- $metadata: $metadata,
2780
+ throwDefaultError({
2781
+ output: output,
2782
+ parsedBody: parsedBody,
2783
+ exceptionCtor: __BaseException,
2784
+ errorCode: errorCode,
3017
2785
  });
3018
- throw __decorateServiceException(response, parsedBody);
2786
+ _d.label = 11;
2787
+ case 11: return [2];
3019
2788
  }
3020
2789
  });
3021
2790
  }); };
@@ -3027,18 +2796,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
3027
2796
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3028
2797
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
3029
2798
  }
3030
- contents = {
2799
+ contents = map({
3031
2800
  $metadata: deserializeMetadata(output),
3032
- };
2801
+ });
3033
2802
  return [4, collectBody(output.body, context)];
3034
2803
  case 1:
3035
2804
  _a.sent();
3036
- return [2, Promise.resolve(contents)];
2805
+ return [2, contents];
3037
2806
  }
3038
2807
  });
3039
2808
  }); };
3040
2809
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3041
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2810
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3042
2811
  var _c;
3043
2812
  return __generator(this, function (_d) {
3044
2813
  switch (_d.label) {
@@ -3071,14 +2840,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
3071
2840
  case 9: throw _d.sent();
3072
2841
  case 10:
3073
2842
  parsedBody = parsedOutput.body;
3074
- $metadata = deserializeMetadata(output);
3075
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3076
- response = new __BaseException({
3077
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3078
- $fault: "client",
3079
- $metadata: $metadata,
2843
+ throwDefaultError({
2844
+ output: output,
2845
+ parsedBody: parsedBody,
2846
+ exceptionCtor: __BaseException,
2847
+ errorCode: errorCode,
3080
2848
  });
3081
- throw __decorateServiceException(response, parsedBody);
2849
+ _d.label = 11;
2850
+ case 11: return [2];
3082
2851
  }
3083
2852
  });
3084
2853
  }); };
@@ -3090,18 +2859,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
3090
2859
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3091
2860
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
3092
2861
  }
3093
- contents = {
2862
+ contents = map({
3094
2863
  $metadata: deserializeMetadata(output),
3095
- };
2864
+ });
3096
2865
  return [4, collectBody(output.body, context)];
3097
2866
  case 1:
3098
2867
  _a.sent();
3099
- return [2, Promise.resolve(contents)];
2868
+ return [2, contents];
3100
2869
  }
3101
2870
  });
3102
2871
  }); };
3103
2872
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3104
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2873
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3105
2874
  var _c;
3106
2875
  return __generator(this, function (_d) {
3107
2876
  switch (_d.label) {
@@ -3134,14 +2903,14 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
3134
2903
  case 9: throw _d.sent();
3135
2904
  case 10:
3136
2905
  parsedBody = parsedOutput.body;
3137
- $metadata = deserializeMetadata(output);
3138
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3139
- response = new __BaseException({
3140
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3141
- $fault: "client",
3142
- $metadata: $metadata,
2906
+ throwDefaultError({
2907
+ output: output,
2908
+ parsedBody: parsedBody,
2909
+ exceptionCtor: __BaseException,
2910
+ errorCode: errorCode,
3143
2911
  });
3144
- throw __decorateServiceException(response, parsedBody);
2912
+ _d.label = 11;
2913
+ case 11: return [2];
3145
2914
  }
3146
2915
  });
3147
2916
  }); };
@@ -3153,88 +2922,71 @@ export var deserializeAws_restJson1UpdateFileSystemCommand = function (output, c
3153
2922
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3154
2923
  return [2, deserializeAws_restJson1UpdateFileSystemCommandError(output, context)];
3155
2924
  }
3156
- contents = {
2925
+ contents = map({
3157
2926
  $metadata: deserializeMetadata(output),
3158
- AvailabilityZoneId: undefined,
3159
- AvailabilityZoneName: undefined,
3160
- CreationTime: undefined,
3161
- CreationToken: undefined,
3162
- Encrypted: undefined,
3163
- FileSystemArn: undefined,
3164
- FileSystemId: undefined,
3165
- KmsKeyId: undefined,
3166
- LifeCycleState: undefined,
3167
- Name: undefined,
3168
- NumberOfMountTargets: undefined,
3169
- OwnerId: undefined,
3170
- PerformanceMode: undefined,
3171
- ProvisionedThroughputInMibps: undefined,
3172
- SizeInBytes: undefined,
3173
- Tags: undefined,
3174
- ThroughputMode: undefined,
3175
- };
2927
+ });
3176
2928
  _a = __expectNonNull;
3177
2929
  _b = __expectObject;
3178
2930
  return [4, parseBody(output.body, context)];
3179
2931
  case 1:
3180
2932
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3181
- if (data.AvailabilityZoneId !== undefined && data.AvailabilityZoneId !== null) {
2933
+ if (data.AvailabilityZoneId != null) {
3182
2934
  contents.AvailabilityZoneId = __expectString(data.AvailabilityZoneId);
3183
2935
  }
3184
- if (data.AvailabilityZoneName !== undefined && data.AvailabilityZoneName !== null) {
2936
+ if (data.AvailabilityZoneName != null) {
3185
2937
  contents.AvailabilityZoneName = __expectString(data.AvailabilityZoneName);
3186
2938
  }
3187
- if (data.CreationTime !== undefined && data.CreationTime !== null) {
2939
+ if (data.CreationTime != null) {
3188
2940
  contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
3189
2941
  }
3190
- if (data.CreationToken !== undefined && data.CreationToken !== null) {
2942
+ if (data.CreationToken != null) {
3191
2943
  contents.CreationToken = __expectString(data.CreationToken);
3192
2944
  }
3193
- if (data.Encrypted !== undefined && data.Encrypted !== null) {
2945
+ if (data.Encrypted != null) {
3194
2946
  contents.Encrypted = __expectBoolean(data.Encrypted);
3195
2947
  }
3196
- if (data.FileSystemArn !== undefined && data.FileSystemArn !== null) {
2948
+ if (data.FileSystemArn != null) {
3197
2949
  contents.FileSystemArn = __expectString(data.FileSystemArn);
3198
2950
  }
3199
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
2951
+ if (data.FileSystemId != null) {
3200
2952
  contents.FileSystemId = __expectString(data.FileSystemId);
3201
2953
  }
3202
- if (data.KmsKeyId !== undefined && data.KmsKeyId !== null) {
2954
+ if (data.KmsKeyId != null) {
3203
2955
  contents.KmsKeyId = __expectString(data.KmsKeyId);
3204
2956
  }
3205
- if (data.LifeCycleState !== undefined && data.LifeCycleState !== null) {
2957
+ if (data.LifeCycleState != null) {
3206
2958
  contents.LifeCycleState = __expectString(data.LifeCycleState);
3207
2959
  }
3208
- if (data.Name !== undefined && data.Name !== null) {
2960
+ if (data.Name != null) {
3209
2961
  contents.Name = __expectString(data.Name);
3210
2962
  }
3211
- if (data.NumberOfMountTargets !== undefined && data.NumberOfMountTargets !== null) {
2963
+ if (data.NumberOfMountTargets != null) {
3212
2964
  contents.NumberOfMountTargets = __expectInt32(data.NumberOfMountTargets);
3213
2965
  }
3214
- if (data.OwnerId !== undefined && data.OwnerId !== null) {
2966
+ if (data.OwnerId != null) {
3215
2967
  contents.OwnerId = __expectString(data.OwnerId);
3216
2968
  }
3217
- if (data.PerformanceMode !== undefined && data.PerformanceMode !== null) {
2969
+ if (data.PerformanceMode != null) {
3218
2970
  contents.PerformanceMode = __expectString(data.PerformanceMode);
3219
2971
  }
3220
- if (data.ProvisionedThroughputInMibps !== undefined && data.ProvisionedThroughputInMibps !== null) {
2972
+ if (data.ProvisionedThroughputInMibps != null) {
3221
2973
  contents.ProvisionedThroughputInMibps = __limitedParseDouble(data.ProvisionedThroughputInMibps);
3222
2974
  }
3223
- if (data.SizeInBytes !== undefined && data.SizeInBytes !== null) {
2975
+ if (data.SizeInBytes != null) {
3224
2976
  contents.SizeInBytes = deserializeAws_restJson1FileSystemSize(data.SizeInBytes, context);
3225
2977
  }
3226
- if (data.Tags !== undefined && data.Tags !== null) {
2978
+ if (data.Tags != null) {
3227
2979
  contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
3228
2980
  }
3229
- if (data.ThroughputMode !== undefined && data.ThroughputMode !== null) {
2981
+ if (data.ThroughputMode != null) {
3230
2982
  contents.ThroughputMode = __expectString(data.ThroughputMode);
3231
2983
  }
3232
- return [2, Promise.resolve(contents)];
2984
+ return [2, contents];
3233
2985
  }
3234
2986
  });
3235
2987
  }); };
3236
2988
  var deserializeAws_restJson1UpdateFileSystemCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3237
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2989
+ var parsedOutput, _a, errorCode, _b, parsedBody;
3238
2990
  var _c;
3239
2991
  return __generator(this, function (_d) {
3240
2992
  switch (_d.label) {
@@ -3279,29 +3031,30 @@ var deserializeAws_restJson1UpdateFileSystemCommandError = function (output, con
3279
3031
  case 15: throw _d.sent();
3280
3032
  case 16:
3281
3033
  parsedBody = parsedOutput.body;
3282
- $metadata = deserializeMetadata(output);
3283
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3284
- response = new __BaseException({
3285
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3286
- $fault: "client",
3287
- $metadata: $metadata,
3034
+ throwDefaultError({
3035
+ output: output,
3036
+ parsedBody: parsedBody,
3037
+ exceptionCtor: __BaseException,
3038
+ errorCode: errorCode,
3288
3039
  });
3289
- throw __decorateServiceException(response, parsedBody);
3040
+ _d.label = 17;
3041
+ case 17: return [2];
3290
3042
  }
3291
3043
  });
3292
3044
  }); };
3045
+ var map = __map;
3293
3046
  var deserializeAws_restJson1AccessPointAlreadyExistsResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3294
3047
  var contents, data, exception;
3295
3048
  return __generator(this, function (_a) {
3296
- contents = {};
3049
+ contents = map({});
3297
3050
  data = parsedOutput.body;
3298
- if (data.AccessPointId !== undefined && data.AccessPointId !== null) {
3051
+ if (data.AccessPointId != null) {
3299
3052
  contents.AccessPointId = __expectString(data.AccessPointId);
3300
3053
  }
3301
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3054
+ if (data.ErrorCode != null) {
3302
3055
  contents.ErrorCode = __expectString(data.ErrorCode);
3303
3056
  }
3304
- if (data.Message !== undefined && data.Message !== null) {
3057
+ if (data.Message != null) {
3305
3058
  contents.Message = __expectString(data.Message);
3306
3059
  }
3307
3060
  exception = new AccessPointAlreadyExists(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3311,12 +3064,12 @@ var deserializeAws_restJson1AccessPointAlreadyExistsResponse = function (parsedO
3311
3064
  var deserializeAws_restJson1AccessPointLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3312
3065
  var contents, data, exception;
3313
3066
  return __generator(this, function (_a) {
3314
- contents = {};
3067
+ contents = map({});
3315
3068
  data = parsedOutput.body;
3316
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3069
+ if (data.ErrorCode != null) {
3317
3070
  contents.ErrorCode = __expectString(data.ErrorCode);
3318
3071
  }
3319
- if (data.Message !== undefined && data.Message !== null) {
3072
+ if (data.Message != null) {
3320
3073
  contents.Message = __expectString(data.Message);
3321
3074
  }
3322
3075
  exception = new AccessPointLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3326,12 +3079,12 @@ var deserializeAws_restJson1AccessPointLimitExceededResponse = function (parsedO
3326
3079
  var deserializeAws_restJson1AccessPointNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3327
3080
  var contents, data, exception;
3328
3081
  return __generator(this, function (_a) {
3329
- contents = {};
3082
+ contents = map({});
3330
3083
  data = parsedOutput.body;
3331
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3084
+ if (data.ErrorCode != null) {
3332
3085
  contents.ErrorCode = __expectString(data.ErrorCode);
3333
3086
  }
3334
- if (data.Message !== undefined && data.Message !== null) {
3087
+ if (data.Message != null) {
3335
3088
  contents.Message = __expectString(data.Message);
3336
3089
  }
3337
3090
  exception = new AccessPointNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3341,12 +3094,12 @@ var deserializeAws_restJson1AccessPointNotFoundResponse = function (parsedOutput
3341
3094
  var deserializeAws_restJson1AvailabilityZonesMismatchResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3342
3095
  var contents, data, exception;
3343
3096
  return __generator(this, function (_a) {
3344
- contents = {};
3097
+ contents = map({});
3345
3098
  data = parsedOutput.body;
3346
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3099
+ if (data.ErrorCode != null) {
3347
3100
  contents.ErrorCode = __expectString(data.ErrorCode);
3348
3101
  }
3349
- if (data.Message !== undefined && data.Message !== null) {
3102
+ if (data.Message != null) {
3350
3103
  contents.Message = __expectString(data.Message);
3351
3104
  }
3352
3105
  exception = new AvailabilityZonesMismatch(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3356,12 +3109,12 @@ var deserializeAws_restJson1AvailabilityZonesMismatchResponse = function (parsed
3356
3109
  var deserializeAws_restJson1BadRequestResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3357
3110
  var contents, data, exception;
3358
3111
  return __generator(this, function (_a) {
3359
- contents = {};
3112
+ contents = map({});
3360
3113
  data = parsedOutput.body;
3361
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3114
+ if (data.ErrorCode != null) {
3362
3115
  contents.ErrorCode = __expectString(data.ErrorCode);
3363
3116
  }
3364
- if (data.Message !== undefined && data.Message !== null) {
3117
+ if (data.Message != null) {
3365
3118
  contents.Message = __expectString(data.Message);
3366
3119
  }
3367
3120
  exception = new BadRequest(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3371,12 +3124,12 @@ var deserializeAws_restJson1BadRequestResponse = function (parsedOutput, context
3371
3124
  var deserializeAws_restJson1DependencyTimeoutResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3372
3125
  var contents, data, exception;
3373
3126
  return __generator(this, function (_a) {
3374
- contents = {};
3127
+ contents = map({});
3375
3128
  data = parsedOutput.body;
3376
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3129
+ if (data.ErrorCode != null) {
3377
3130
  contents.ErrorCode = __expectString(data.ErrorCode);
3378
3131
  }
3379
- if (data.Message !== undefined && data.Message !== null) {
3132
+ if (data.Message != null) {
3380
3133
  contents.Message = __expectString(data.Message);
3381
3134
  }
3382
3135
  exception = new DependencyTimeout(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3386,15 +3139,15 @@ var deserializeAws_restJson1DependencyTimeoutResponse = function (parsedOutput,
3386
3139
  var deserializeAws_restJson1FileSystemAlreadyExistsResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3387
3140
  var contents, data, exception;
3388
3141
  return __generator(this, function (_a) {
3389
- contents = {};
3142
+ contents = map({});
3390
3143
  data = parsedOutput.body;
3391
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3144
+ if (data.ErrorCode != null) {
3392
3145
  contents.ErrorCode = __expectString(data.ErrorCode);
3393
3146
  }
3394
- if (data.FileSystemId !== undefined && data.FileSystemId !== null) {
3147
+ if (data.FileSystemId != null) {
3395
3148
  contents.FileSystemId = __expectString(data.FileSystemId);
3396
3149
  }
3397
- if (data.Message !== undefined && data.Message !== null) {
3150
+ if (data.Message != null) {
3398
3151
  contents.Message = __expectString(data.Message);
3399
3152
  }
3400
3153
  exception = new FileSystemAlreadyExists(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3404,12 +3157,12 @@ var deserializeAws_restJson1FileSystemAlreadyExistsResponse = function (parsedOu
3404
3157
  var deserializeAws_restJson1FileSystemInUseResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3405
3158
  var contents, data, exception;
3406
3159
  return __generator(this, function (_a) {
3407
- contents = {};
3160
+ contents = map({});
3408
3161
  data = parsedOutput.body;
3409
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3162
+ if (data.ErrorCode != null) {
3410
3163
  contents.ErrorCode = __expectString(data.ErrorCode);
3411
3164
  }
3412
- if (data.Message !== undefined && data.Message !== null) {
3165
+ if (data.Message != null) {
3413
3166
  contents.Message = __expectString(data.Message);
3414
3167
  }
3415
3168
  exception = new FileSystemInUse(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3419,12 +3172,12 @@ var deserializeAws_restJson1FileSystemInUseResponse = function (parsedOutput, co
3419
3172
  var deserializeAws_restJson1FileSystemLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3420
3173
  var contents, data, exception;
3421
3174
  return __generator(this, function (_a) {
3422
- contents = {};
3175
+ contents = map({});
3423
3176
  data = parsedOutput.body;
3424
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3177
+ if (data.ErrorCode != null) {
3425
3178
  contents.ErrorCode = __expectString(data.ErrorCode);
3426
3179
  }
3427
- if (data.Message !== undefined && data.Message !== null) {
3180
+ if (data.Message != null) {
3428
3181
  contents.Message = __expectString(data.Message);
3429
3182
  }
3430
3183
  exception = new FileSystemLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3434,12 +3187,12 @@ var deserializeAws_restJson1FileSystemLimitExceededResponse = function (parsedOu
3434
3187
  var deserializeAws_restJson1FileSystemNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3435
3188
  var contents, data, exception;
3436
3189
  return __generator(this, function (_a) {
3437
- contents = {};
3190
+ contents = map({});
3438
3191
  data = parsedOutput.body;
3439
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3192
+ if (data.ErrorCode != null) {
3440
3193
  contents.ErrorCode = __expectString(data.ErrorCode);
3441
3194
  }
3442
- if (data.Message !== undefined && data.Message !== null) {
3195
+ if (data.Message != null) {
3443
3196
  contents.Message = __expectString(data.Message);
3444
3197
  }
3445
3198
  exception = new FileSystemNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3449,12 +3202,12 @@ var deserializeAws_restJson1FileSystemNotFoundResponse = function (parsedOutput,
3449
3202
  var deserializeAws_restJson1IncorrectFileSystemLifeCycleStateResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3450
3203
  var contents, data, exception;
3451
3204
  return __generator(this, function (_a) {
3452
- contents = {};
3205
+ contents = map({});
3453
3206
  data = parsedOutput.body;
3454
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3207
+ if (data.ErrorCode != null) {
3455
3208
  contents.ErrorCode = __expectString(data.ErrorCode);
3456
3209
  }
3457
- if (data.Message !== undefined && data.Message !== null) {
3210
+ if (data.Message != null) {
3458
3211
  contents.Message = __expectString(data.Message);
3459
3212
  }
3460
3213
  exception = new IncorrectFileSystemLifeCycleState(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3464,12 +3217,12 @@ var deserializeAws_restJson1IncorrectFileSystemLifeCycleStateResponse = function
3464
3217
  var deserializeAws_restJson1IncorrectMountTargetStateResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3465
3218
  var contents, data, exception;
3466
3219
  return __generator(this, function (_a) {
3467
- contents = {};
3220
+ contents = map({});
3468
3221
  data = parsedOutput.body;
3469
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3222
+ if (data.ErrorCode != null) {
3470
3223
  contents.ErrorCode = __expectString(data.ErrorCode);
3471
3224
  }
3472
- if (data.Message !== undefined && data.Message !== null) {
3225
+ if (data.Message != null) {
3473
3226
  contents.Message = __expectString(data.Message);
3474
3227
  }
3475
3228
  exception = new IncorrectMountTargetState(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3479,12 +3232,12 @@ var deserializeAws_restJson1IncorrectMountTargetStateResponse = function (parsed
3479
3232
  var deserializeAws_restJson1InsufficientThroughputCapacityResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3480
3233
  var contents, data, exception;
3481
3234
  return __generator(this, function (_a) {
3482
- contents = {};
3235
+ contents = map({});
3483
3236
  data = parsedOutput.body;
3484
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3237
+ if (data.ErrorCode != null) {
3485
3238
  contents.ErrorCode = __expectString(data.ErrorCode);
3486
3239
  }
3487
- if (data.Message !== undefined && data.Message !== null) {
3240
+ if (data.Message != null) {
3488
3241
  contents.Message = __expectString(data.Message);
3489
3242
  }
3490
3243
  exception = new InsufficientThroughputCapacity(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3494,12 +3247,12 @@ var deserializeAws_restJson1InsufficientThroughputCapacityResponse = function (p
3494
3247
  var deserializeAws_restJson1InternalServerErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3495
3248
  var contents, data, exception;
3496
3249
  return __generator(this, function (_a) {
3497
- contents = {};
3250
+ contents = map({});
3498
3251
  data = parsedOutput.body;
3499
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3252
+ if (data.ErrorCode != null) {
3500
3253
  contents.ErrorCode = __expectString(data.ErrorCode);
3501
3254
  }
3502
- if (data.Message !== undefined && data.Message !== null) {
3255
+ if (data.Message != null) {
3503
3256
  contents.Message = __expectString(data.Message);
3504
3257
  }
3505
3258
  exception = new InternalServerError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3509,12 +3262,12 @@ var deserializeAws_restJson1InternalServerErrorResponse = function (parsedOutput
3509
3262
  var deserializeAws_restJson1InvalidPolicyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3510
3263
  var contents, data, exception;
3511
3264
  return __generator(this, function (_a) {
3512
- contents = {};
3265
+ contents = map({});
3513
3266
  data = parsedOutput.body;
3514
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3267
+ if (data.ErrorCode != null) {
3515
3268
  contents.ErrorCode = __expectString(data.ErrorCode);
3516
3269
  }
3517
- if (data.Message !== undefined && data.Message !== null) {
3270
+ if (data.Message != null) {
3518
3271
  contents.Message = __expectString(data.Message);
3519
3272
  }
3520
3273
  exception = new InvalidPolicyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3524,12 +3277,12 @@ var deserializeAws_restJson1InvalidPolicyExceptionResponse = function (parsedOut
3524
3277
  var deserializeAws_restJson1IpAddressInUseResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3525
3278
  var contents, data, exception;
3526
3279
  return __generator(this, function (_a) {
3527
- contents = {};
3280
+ contents = map({});
3528
3281
  data = parsedOutput.body;
3529
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3282
+ if (data.ErrorCode != null) {
3530
3283
  contents.ErrorCode = __expectString(data.ErrorCode);
3531
3284
  }
3532
- if (data.Message !== undefined && data.Message !== null) {
3285
+ if (data.Message != null) {
3533
3286
  contents.Message = __expectString(data.Message);
3534
3287
  }
3535
3288
  exception = new IpAddressInUse(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3539,12 +3292,12 @@ var deserializeAws_restJson1IpAddressInUseResponse = function (parsedOutput, con
3539
3292
  var deserializeAws_restJson1MountTargetConflictResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3540
3293
  var contents, data, exception;
3541
3294
  return __generator(this, function (_a) {
3542
- contents = {};
3295
+ contents = map({});
3543
3296
  data = parsedOutput.body;
3544
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3297
+ if (data.ErrorCode != null) {
3545
3298
  contents.ErrorCode = __expectString(data.ErrorCode);
3546
3299
  }
3547
- if (data.Message !== undefined && data.Message !== null) {
3300
+ if (data.Message != null) {
3548
3301
  contents.Message = __expectString(data.Message);
3549
3302
  }
3550
3303
  exception = new MountTargetConflict(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3554,12 +3307,12 @@ var deserializeAws_restJson1MountTargetConflictResponse = function (parsedOutput
3554
3307
  var deserializeAws_restJson1MountTargetNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3555
3308
  var contents, data, exception;
3556
3309
  return __generator(this, function (_a) {
3557
- contents = {};
3310
+ contents = map({});
3558
3311
  data = parsedOutput.body;
3559
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3312
+ if (data.ErrorCode != null) {
3560
3313
  contents.ErrorCode = __expectString(data.ErrorCode);
3561
3314
  }
3562
- if (data.Message !== undefined && data.Message !== null) {
3315
+ if (data.Message != null) {
3563
3316
  contents.Message = __expectString(data.Message);
3564
3317
  }
3565
3318
  exception = new MountTargetNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3569,12 +3322,12 @@ var deserializeAws_restJson1MountTargetNotFoundResponse = function (parsedOutput
3569
3322
  var deserializeAws_restJson1NetworkInterfaceLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3570
3323
  var contents, data, exception;
3571
3324
  return __generator(this, function (_a) {
3572
- contents = {};
3325
+ contents = map({});
3573
3326
  data = parsedOutput.body;
3574
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3327
+ if (data.ErrorCode != null) {
3575
3328
  contents.ErrorCode = __expectString(data.ErrorCode);
3576
3329
  }
3577
- if (data.Message !== undefined && data.Message !== null) {
3330
+ if (data.Message != null) {
3578
3331
  contents.Message = __expectString(data.Message);
3579
3332
  }
3580
3333
  exception = new NetworkInterfaceLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3584,12 +3337,12 @@ var deserializeAws_restJson1NetworkInterfaceLimitExceededResponse = function (pa
3584
3337
  var deserializeAws_restJson1NoFreeAddressesInSubnetResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3585
3338
  var contents, data, exception;
3586
3339
  return __generator(this, function (_a) {
3587
- contents = {};
3340
+ contents = map({});
3588
3341
  data = parsedOutput.body;
3589
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3342
+ if (data.ErrorCode != null) {
3590
3343
  contents.ErrorCode = __expectString(data.ErrorCode);
3591
3344
  }
3592
- if (data.Message !== undefined && data.Message !== null) {
3345
+ if (data.Message != null) {
3593
3346
  contents.Message = __expectString(data.Message);
3594
3347
  }
3595
3348
  exception = new NoFreeAddressesInSubnet(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3599,12 +3352,12 @@ var deserializeAws_restJson1NoFreeAddressesInSubnetResponse = function (parsedOu
3599
3352
  var deserializeAws_restJson1PolicyNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3600
3353
  var contents, data, exception;
3601
3354
  return __generator(this, function (_a) {
3602
- contents = {};
3355
+ contents = map({});
3603
3356
  data = parsedOutput.body;
3604
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3357
+ if (data.ErrorCode != null) {
3605
3358
  contents.ErrorCode = __expectString(data.ErrorCode);
3606
3359
  }
3607
- if (data.Message !== undefined && data.Message !== null) {
3360
+ if (data.Message != null) {
3608
3361
  contents.Message = __expectString(data.Message);
3609
3362
  }
3610
3363
  exception = new PolicyNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3614,12 +3367,12 @@ var deserializeAws_restJson1PolicyNotFoundResponse = function (parsedOutput, con
3614
3367
  var deserializeAws_restJson1ReplicationNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3615
3368
  var contents, data, exception;
3616
3369
  return __generator(this, function (_a) {
3617
- contents = {};
3370
+ contents = map({});
3618
3371
  data = parsedOutput.body;
3619
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3372
+ if (data.ErrorCode != null) {
3620
3373
  contents.ErrorCode = __expectString(data.ErrorCode);
3621
3374
  }
3622
- if (data.Message !== undefined && data.Message !== null) {
3375
+ if (data.Message != null) {
3623
3376
  contents.Message = __expectString(data.Message);
3624
3377
  }
3625
3378
  exception = new ReplicationNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3629,12 +3382,12 @@ var deserializeAws_restJson1ReplicationNotFoundResponse = function (parsedOutput
3629
3382
  var deserializeAws_restJson1SecurityGroupLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3630
3383
  var contents, data, exception;
3631
3384
  return __generator(this, function (_a) {
3632
- contents = {};
3385
+ contents = map({});
3633
3386
  data = parsedOutput.body;
3634
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3387
+ if (data.ErrorCode != null) {
3635
3388
  contents.ErrorCode = __expectString(data.ErrorCode);
3636
3389
  }
3637
- if (data.Message !== undefined && data.Message !== null) {
3390
+ if (data.Message != null) {
3638
3391
  contents.Message = __expectString(data.Message);
3639
3392
  }
3640
3393
  exception = new SecurityGroupLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3644,12 +3397,12 @@ var deserializeAws_restJson1SecurityGroupLimitExceededResponse = function (parse
3644
3397
  var deserializeAws_restJson1SecurityGroupNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3645
3398
  var contents, data, exception;
3646
3399
  return __generator(this, function (_a) {
3647
- contents = {};
3400
+ contents = map({});
3648
3401
  data = parsedOutput.body;
3649
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3402
+ if (data.ErrorCode != null) {
3650
3403
  contents.ErrorCode = __expectString(data.ErrorCode);
3651
3404
  }
3652
- if (data.Message !== undefined && data.Message !== null) {
3405
+ if (data.Message != null) {
3653
3406
  contents.Message = __expectString(data.Message);
3654
3407
  }
3655
3408
  exception = new SecurityGroupNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3659,12 +3412,12 @@ var deserializeAws_restJson1SecurityGroupNotFoundResponse = function (parsedOutp
3659
3412
  var deserializeAws_restJson1SubnetNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3660
3413
  var contents, data, exception;
3661
3414
  return __generator(this, function (_a) {
3662
- contents = {};
3415
+ contents = map({});
3663
3416
  data = parsedOutput.body;
3664
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3417
+ if (data.ErrorCode != null) {
3665
3418
  contents.ErrorCode = __expectString(data.ErrorCode);
3666
3419
  }
3667
- if (data.Message !== undefined && data.Message !== null) {
3420
+ if (data.Message != null) {
3668
3421
  contents.Message = __expectString(data.Message);
3669
3422
  }
3670
3423
  exception = new SubnetNotFound(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3674,12 +3427,12 @@ var deserializeAws_restJson1SubnetNotFoundResponse = function (parsedOutput, con
3674
3427
  var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3675
3428
  var contents, data, exception;
3676
3429
  return __generator(this, function (_a) {
3677
- contents = {};
3430
+ contents = map({});
3678
3431
  data = parsedOutput.body;
3679
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3432
+ if (data.ErrorCode != null) {
3680
3433
  contents.ErrorCode = __expectString(data.ErrorCode);
3681
3434
  }
3682
- if (data.Message !== undefined && data.Message !== null) {
3435
+ if (data.Message != null) {
3683
3436
  contents.Message = __expectString(data.Message);
3684
3437
  }
3685
3438
  exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3689,12 +3442,12 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
3689
3442
  var deserializeAws_restJson1ThroughputLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3690
3443
  var contents, data, exception;
3691
3444
  return __generator(this, function (_a) {
3692
- contents = {};
3445
+ contents = map({});
3693
3446
  data = parsedOutput.body;
3694
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3447
+ if (data.ErrorCode != null) {
3695
3448
  contents.ErrorCode = __expectString(data.ErrorCode);
3696
3449
  }
3697
- if (data.Message !== undefined && data.Message !== null) {
3450
+ if (data.Message != null) {
3698
3451
  contents.Message = __expectString(data.Message);
3699
3452
  }
3700
3453
  exception = new ThroughputLimitExceeded(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3704,12 +3457,12 @@ var deserializeAws_restJson1ThroughputLimitExceededResponse = function (parsedOu
3704
3457
  var deserializeAws_restJson1TooManyRequestsResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3705
3458
  var contents, data, exception;
3706
3459
  return __generator(this, function (_a) {
3707
- contents = {};
3460
+ contents = map({});
3708
3461
  data = parsedOutput.body;
3709
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3462
+ if (data.ErrorCode != null) {
3710
3463
  contents.ErrorCode = __expectString(data.ErrorCode);
3711
3464
  }
3712
- if (data.Message !== undefined && data.Message !== null) {
3465
+ if (data.Message != null) {
3713
3466
  contents.Message = __expectString(data.Message);
3714
3467
  }
3715
3468
  exception = new TooManyRequests(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3719,12 +3472,12 @@ var deserializeAws_restJson1TooManyRequestsResponse = function (parsedOutput, co
3719
3472
  var deserializeAws_restJson1UnsupportedAvailabilityZoneResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3720
3473
  var contents, data, exception;
3721
3474
  return __generator(this, function (_a) {
3722
- contents = {};
3475
+ contents = map({});
3723
3476
  data = parsedOutput.body;
3724
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3477
+ if (data.ErrorCode != null) {
3725
3478
  contents.ErrorCode = __expectString(data.ErrorCode);
3726
3479
  }
3727
- if (data.Message !== undefined && data.Message !== null) {
3480
+ if (data.Message != null) {
3728
3481
  contents.Message = __expectString(data.Message);
3729
3482
  }
3730
3483
  exception = new UnsupportedAvailabilityZone(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3734,12 +3487,12 @@ var deserializeAws_restJson1UnsupportedAvailabilityZoneResponse = function (pars
3734
3487
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3735
3488
  var contents, data, exception;
3736
3489
  return __generator(this, function (_a) {
3737
- contents = {};
3490
+ contents = map({});
3738
3491
  data = parsedOutput.body;
3739
- if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
3492
+ if (data.ErrorCode != null) {
3740
3493
  contents.ErrorCode = __expectString(data.ErrorCode);
3741
3494
  }
3742
- if (data.Message !== undefined && data.Message !== null) {
3495
+ if (data.Message != null) {
3743
3496
  contents.Message = __expectString(data.Message);
3744
3497
  }
3745
3498
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -3756,9 +3509,6 @@ var serializeAws_restJson1DestinationsToCreate = function (input, context) {
3756
3509
  return input
3757
3510
  .filter(function (e) { return e != null; })
3758
3511
  .map(function (entry) {
3759
- if (entry === null) {
3760
- return null;
3761
- }
3762
3512
  return serializeAws_restJson1DestinationToCreate(entry, context);
3763
3513
  });
3764
3514
  };
@@ -3769,9 +3519,6 @@ var serializeAws_restJson1LifecyclePolicies = function (input, context) {
3769
3519
  return input
3770
3520
  .filter(function (e) { return e != null; })
3771
3521
  .map(function (entry) {
3772
- if (entry === null) {
3773
- return null;
3774
- }
3775
3522
  return serializeAws_restJson1LifecyclePolicy(entry, context);
3776
3523
  });
3777
3524
  };
@@ -3794,9 +3541,6 @@ var serializeAws_restJson1SecondaryGids = function (input, context) {
3794
3541
  return input
3795
3542
  .filter(function (e) { return e != null; })
3796
3543
  .map(function (entry) {
3797
- if (entry === null) {
3798
- return null;
3799
- }
3800
3544
  return entry;
3801
3545
  });
3802
3546
  };
@@ -3804,9 +3548,6 @@ var serializeAws_restJson1SecurityGroups = function (input, context) {
3804
3548
  return input
3805
3549
  .filter(function (e) { return e != null; })
3806
3550
  .map(function (entry) {
3807
- if (entry === null) {
3808
- return null;
3809
- }
3810
3551
  return entry;
3811
3552
  });
3812
3553
  };
@@ -3817,9 +3558,6 @@ var serializeAws_restJson1TagKeys = function (input, context) {
3817
3558
  return input
3818
3559
  .filter(function (e) { return e != null; })
3819
3560
  .map(function (entry) {
3820
- if (entry === null) {
3821
- return null;
3822
- }
3823
3561
  return entry;
3824
3562
  });
3825
3563
  };
@@ -3827,9 +3565,6 @@ var serializeAws_restJson1Tags = function (input, context) {
3827
3565
  return input
3828
3566
  .filter(function (e) { return e != null; })
3829
3567
  .map(function (entry) {
3830
- if (entry === null) {
3831
- return null;
3832
- }
3833
3568
  return serializeAws_restJson1Tag(entry, context);
3834
3569
  });
3835
3570
  };