@aws-sdk/client-mediaconvert 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 (73) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/AssociateCertificateCommand.js +2 -2
  4. package/dist-cjs/commands/CancelJobCommand.js +2 -2
  5. package/dist-cjs/commands/CreateJobCommand.js +2 -2
  6. package/dist-cjs/commands/CreateJobTemplateCommand.js +2 -2
  7. package/dist-cjs/commands/CreatePresetCommand.js +2 -2
  8. package/dist-cjs/commands/CreateQueueCommand.js +2 -2
  9. package/dist-cjs/commands/DeleteJobTemplateCommand.js +2 -2
  10. package/dist-cjs/commands/DeletePolicyCommand.js +2 -2
  11. package/dist-cjs/commands/DeletePresetCommand.js +2 -2
  12. package/dist-cjs/commands/DeleteQueueCommand.js +2 -2
  13. package/dist-cjs/commands/DescribeEndpointsCommand.js +2 -2
  14. package/dist-cjs/commands/DisassociateCertificateCommand.js +2 -2
  15. package/dist-cjs/commands/GetJobCommand.js +2 -2
  16. package/dist-cjs/commands/GetJobTemplateCommand.js +2 -2
  17. package/dist-cjs/commands/GetPolicyCommand.js +2 -2
  18. package/dist-cjs/commands/GetPresetCommand.js +2 -2
  19. package/dist-cjs/commands/GetQueueCommand.js +2 -2
  20. package/dist-cjs/commands/ListJobTemplatesCommand.js +2 -2
  21. package/dist-cjs/commands/ListJobsCommand.js +2 -2
  22. package/dist-cjs/commands/ListPresetsCommand.js +2 -2
  23. package/dist-cjs/commands/ListQueuesCommand.js +2 -2
  24. package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
  25. package/dist-cjs/commands/PutPolicyCommand.js +2 -2
  26. package/dist-cjs/commands/TagResourceCommand.js +2 -2
  27. package/dist-cjs/commands/UntagResourceCommand.js +2 -2
  28. package/dist-cjs/commands/UpdateJobTemplateCommand.js +2 -2
  29. package/dist-cjs/commands/UpdatePresetCommand.js +2 -2
  30. package/dist-cjs/commands/UpdateQueueCommand.js +2 -2
  31. package/dist-cjs/models/models_0.js +442 -660
  32. package/dist-cjs/models/models_1.js +390 -582
  33. package/dist-cjs/models/models_2.js +89 -133
  34. package/dist-cjs/protocols/Aws_restJson1.js +302 -628
  35. package/dist-es/commands/AssociateCertificateCommand.js +3 -3
  36. package/dist-es/commands/CancelJobCommand.js +3 -3
  37. package/dist-es/commands/CreateJobCommand.js +3 -3
  38. package/dist-es/commands/CreateJobTemplateCommand.js +3 -3
  39. package/dist-es/commands/CreatePresetCommand.js +3 -3
  40. package/dist-es/commands/CreateQueueCommand.js +3 -3
  41. package/dist-es/commands/DeleteJobTemplateCommand.js +3 -3
  42. package/dist-es/commands/DeletePolicyCommand.js +3 -3
  43. package/dist-es/commands/DeletePresetCommand.js +3 -3
  44. package/dist-es/commands/DeleteQueueCommand.js +3 -3
  45. package/dist-es/commands/DescribeEndpointsCommand.js +3 -3
  46. package/dist-es/commands/DisassociateCertificateCommand.js +3 -3
  47. package/dist-es/commands/GetJobCommand.js +3 -3
  48. package/dist-es/commands/GetJobTemplateCommand.js +3 -3
  49. package/dist-es/commands/GetPolicyCommand.js +3 -3
  50. package/dist-es/commands/GetPresetCommand.js +3 -3
  51. package/dist-es/commands/GetQueueCommand.js +3 -3
  52. package/dist-es/commands/ListJobTemplatesCommand.js +3 -3
  53. package/dist-es/commands/ListJobsCommand.js +4 -4
  54. package/dist-es/commands/ListPresetsCommand.js +3 -3
  55. package/dist-es/commands/ListQueuesCommand.js +3 -3
  56. package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
  57. package/dist-es/commands/PutPolicyCommand.js +3 -3
  58. package/dist-es/commands/TagResourceCommand.js +3 -3
  59. package/dist-es/commands/UntagResourceCommand.js +3 -3
  60. package/dist-es/commands/UpdateJobTemplateCommand.js +3 -3
  61. package/dist-es/commands/UpdatePresetCommand.js +3 -3
  62. package/dist-es/commands/UpdateQueueCommand.js +3 -3
  63. package/dist-es/models/models_0.js +109 -436
  64. package/dist-es/models/models_1.js +96 -384
  65. package/dist-es/models/models_2.js +22 -88
  66. package/dist-es/protocols/Aws_restJson1.js +401 -620
  67. package/dist-types/models/models_0.d.ts +436 -654
  68. package/dist-types/models/models_1.d.ts +384 -576
  69. package/dist-types/models/models_2.d.ts +88 -132
  70. package/dist-types/ts3.4/models/models_0.d.ts +218 -436
  71. package/dist-types/ts3.4/models/models_1.d.ts +192 -384
  72. package/dist-types/ts3.4/models/models_2.d.ts +44 -88
  73. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, 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, expectInt32 as __expectInt32, 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 { MediaConvertServiceException as __BaseException } from "../models/MediaConvertServiceException";
6
6
  import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, TooManyRequestsException, } from "../models/models_1";
@@ -29,7 +29,7 @@ export var serializeAws_restJson1AssociateCertificateCommand = function (input,
29
29
  });
30
30
  }); };
31
31
  export var serializeAws_restJson1CancelJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
32
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
32
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
33
33
  return __generator(this, function (_c) {
34
34
  switch (_c.label) {
35
35
  case 0: return [4, context.endpoint()];
@@ -37,16 +37,7 @@ export var serializeAws_restJson1CancelJobCommand = function (input, context) {
37
37
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
38
38
  headers = {};
39
39
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobs/{Id}";
40
- if (input.Id !== undefined) {
41
- labelValue = input.Id;
42
- if (labelValue.length <= 0) {
43
- throw new Error("Empty value provided for input HTTP label: Id.");
44
- }
45
- resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
46
- }
47
- else {
48
- throw new Error("No value provided for input HTTP label: Id.");
49
- }
40
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
50
41
  return [2, new __HttpRequest({
51
42
  protocol: protocol,
52
43
  hostname: hostname,
@@ -169,7 +160,7 @@ export var serializeAws_restJson1CreateQueueCommand = function (input, context)
169
160
  });
170
161
  }); };
171
162
  export var serializeAws_restJson1DeleteJobTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
163
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
173
164
  return __generator(this, function (_c) {
174
165
  switch (_c.label) {
175
166
  case 0: return [4, context.endpoint()];
@@ -177,16 +168,7 @@ export var serializeAws_restJson1DeleteJobTemplateCommand = function (input, con
177
168
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
178
169
  headers = {};
179
170
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobTemplates/{Name}";
180
- if (input.Name !== undefined) {
181
- labelValue = input.Name;
182
- if (labelValue.length <= 0) {
183
- throw new Error("Empty value provided for input HTTP label: Name.");
184
- }
185
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
186
- }
187
- else {
188
- throw new Error("No value provided for input HTTP label: Name.");
189
- }
171
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
190
172
  return [2, new __HttpRequest({
191
173
  protocol: protocol,
192
174
  hostname: hostname,
@@ -224,7 +206,7 @@ export var serializeAws_restJson1DeletePolicyCommand = function (input, context)
224
206
  });
225
207
  }); };
226
208
  export var serializeAws_restJson1DeletePresetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
227
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
209
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
228
210
  return __generator(this, function (_c) {
229
211
  switch (_c.label) {
230
212
  case 0: return [4, context.endpoint()];
@@ -232,16 +214,7 @@ export var serializeAws_restJson1DeletePresetCommand = function (input, context)
232
214
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
233
215
  headers = {};
234
216
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/presets/{Name}";
235
- if (input.Name !== undefined) {
236
- labelValue = input.Name;
237
- if (labelValue.length <= 0) {
238
- throw new Error("Empty value provided for input HTTP label: Name.");
239
- }
240
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
241
- }
242
- else {
243
- throw new Error("No value provided for input HTTP label: Name.");
244
- }
217
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
245
218
  return [2, new __HttpRequest({
246
219
  protocol: protocol,
247
220
  hostname: hostname,
@@ -255,7 +228,7 @@ export var serializeAws_restJson1DeletePresetCommand = function (input, context)
255
228
  });
256
229
  }); };
257
230
  export var serializeAws_restJson1DeleteQueueCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
258
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
231
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
259
232
  return __generator(this, function (_c) {
260
233
  switch (_c.label) {
261
234
  case 0: return [4, context.endpoint()];
@@ -263,16 +236,7 @@ export var serializeAws_restJson1DeleteQueueCommand = function (input, context)
263
236
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
264
237
  headers = {};
265
238
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/queues/{Name}";
266
- if (input.Name !== undefined) {
267
- labelValue = input.Name;
268
- if (labelValue.length <= 0) {
269
- throw new Error("Empty value provided for input HTTP label: Name.");
270
- }
271
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
272
- }
273
- else {
274
- throw new Error("No value provided for input HTTP label: Name.");
275
- }
239
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
276
240
  return [2, new __HttpRequest({
277
241
  protocol: protocol,
278
242
  hostname: hostname,
@@ -310,7 +274,7 @@ export var serializeAws_restJson1DescribeEndpointsCommand = function (input, con
310
274
  });
311
275
  }); };
312
276
  export var serializeAws_restJson1DisassociateCertificateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
313
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
277
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
314
278
  return __generator(this, function (_c) {
315
279
  switch (_c.label) {
316
280
  case 0: return [4, context.endpoint()];
@@ -318,16 +282,7 @@ export var serializeAws_restJson1DisassociateCertificateCommand = function (inpu
318
282
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
319
283
  headers = {};
320
284
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/certificates/{Arn}";
321
- if (input.Arn !== undefined) {
322
- labelValue = input.Arn;
323
- if (labelValue.length <= 0) {
324
- throw new Error("Empty value provided for input HTTP label: Arn.");
325
- }
326
- resolvedPath = resolvedPath.replace("{Arn}", __extendedEncodeURIComponent(labelValue));
327
- }
328
- else {
329
- throw new Error("No value provided for input HTTP label: Arn.");
330
- }
285
+ resolvedPath = __resolvedPath(resolvedPath, input, "Arn", function () { return input.Arn; }, "{Arn}", false);
331
286
  return [2, new __HttpRequest({
332
287
  protocol: protocol,
333
288
  hostname: hostname,
@@ -341,7 +296,7 @@ export var serializeAws_restJson1DisassociateCertificateCommand = function (inpu
341
296
  });
342
297
  }); };
343
298
  export var serializeAws_restJson1GetJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
344
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
299
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
345
300
  return __generator(this, function (_c) {
346
301
  switch (_c.label) {
347
302
  case 0: return [4, context.endpoint()];
@@ -349,16 +304,7 @@ export var serializeAws_restJson1GetJobCommand = function (input, context) { ret
349
304
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
350
305
  headers = {};
351
306
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobs/{Id}";
352
- if (input.Id !== undefined) {
353
- labelValue = input.Id;
354
- if (labelValue.length <= 0) {
355
- throw new Error("Empty value provided for input HTTP label: Id.");
356
- }
357
- resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
358
- }
359
- else {
360
- throw new Error("No value provided for input HTTP label: Id.");
361
- }
307
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
362
308
  return [2, new __HttpRequest({
363
309
  protocol: protocol,
364
310
  hostname: hostname,
@@ -372,7 +318,7 @@ export var serializeAws_restJson1GetJobCommand = function (input, context) { ret
372
318
  });
373
319
  }); };
374
320
  export var serializeAws_restJson1GetJobTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
375
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
321
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
376
322
  return __generator(this, function (_c) {
377
323
  switch (_c.label) {
378
324
  case 0: return [4, context.endpoint()];
@@ -380,16 +326,7 @@ export var serializeAws_restJson1GetJobTemplateCommand = function (input, contex
380
326
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
381
327
  headers = {};
382
328
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobTemplates/{Name}";
383
- if (input.Name !== undefined) {
384
- labelValue = input.Name;
385
- if (labelValue.length <= 0) {
386
- throw new Error("Empty value provided for input HTTP label: Name.");
387
- }
388
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
389
- }
390
- else {
391
- throw new Error("No value provided for input HTTP label: Name.");
392
- }
329
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
393
330
  return [2, new __HttpRequest({
394
331
  protocol: protocol,
395
332
  hostname: hostname,
@@ -427,7 +364,7 @@ export var serializeAws_restJson1GetPolicyCommand = function (input, context) {
427
364
  });
428
365
  }); };
429
366
  export var serializeAws_restJson1GetPresetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
430
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
367
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
431
368
  return __generator(this, function (_c) {
432
369
  switch (_c.label) {
433
370
  case 0: return [4, context.endpoint()];
@@ -435,16 +372,7 @@ export var serializeAws_restJson1GetPresetCommand = function (input, context) {
435
372
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
436
373
  headers = {};
437
374
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/presets/{Name}";
438
- if (input.Name !== undefined) {
439
- labelValue = input.Name;
440
- if (labelValue.length <= 0) {
441
- throw new Error("Empty value provided for input HTTP label: Name.");
442
- }
443
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
444
- }
445
- else {
446
- throw new Error("No value provided for input HTTP label: Name.");
447
- }
375
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
448
376
  return [2, new __HttpRequest({
449
377
  protocol: protocol,
450
378
  hostname: hostname,
@@ -458,7 +386,7 @@ export var serializeAws_restJson1GetPresetCommand = function (input, context) {
458
386
  });
459
387
  }); };
460
388
  export var serializeAws_restJson1GetQueueCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
461
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
389
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
462
390
  return __generator(this, function (_c) {
463
391
  switch (_c.label) {
464
392
  case 0: return [4, context.endpoint()];
@@ -466,16 +394,7 @@ export var serializeAws_restJson1GetQueueCommand = function (input, context) { r
466
394
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
467
395
  headers = {};
468
396
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/queues/{Name}";
469
- if (input.Name !== undefined) {
470
- labelValue = input.Name;
471
- if (labelValue.length <= 0) {
472
- throw new Error("Empty value provided for input HTTP label: Name.");
473
- }
474
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
475
- }
476
- else {
477
- throw new Error("No value provided for input HTTP label: Name.");
478
- }
397
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
479
398
  return [2, new __HttpRequest({
480
399
  protocol: protocol,
481
400
  hostname: hostname,
@@ -497,7 +416,13 @@ export var serializeAws_restJson1ListJobsCommand = function (input, context) { r
497
416
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
498
417
  headers = {};
499
418
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobs";
500
- query = __assign(__assign(__assign(__assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.Order !== undefined && { order: input.Order })), (input.Queue !== undefined && { queue: input.Queue })), (input.Status !== undefined && { status: input.Status }));
419
+ query = map({
420
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
421
+ nextToken: [, input.NextToken],
422
+ order: [, input.Order],
423
+ queue: [, input.Queue],
424
+ status: [, input.Status],
425
+ });
501
426
  return [2, new __HttpRequest({
502
427
  protocol: protocol,
503
428
  hostname: hostname,
@@ -520,7 +445,13 @@ export var serializeAws_restJson1ListJobTemplatesCommand = function (input, cont
520
445
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
521
446
  headers = {};
522
447
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobTemplates";
523
- query = __assign(__assign(__assign(__assign(__assign({}, (input.Category !== undefined && { category: input.Category })), (input.ListBy !== undefined && { listBy: input.ListBy })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.Order !== undefined && { order: input.Order }));
448
+ query = map({
449
+ category: [, input.Category],
450
+ listBy: [, input.ListBy],
451
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
452
+ nextToken: [, input.NextToken],
453
+ order: [, input.Order],
454
+ });
524
455
  return [2, new __HttpRequest({
525
456
  protocol: protocol,
526
457
  hostname: hostname,
@@ -543,7 +474,13 @@ export var serializeAws_restJson1ListPresetsCommand = function (input, context)
543
474
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
544
475
  headers = {};
545
476
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/presets";
546
- query = __assign(__assign(__assign(__assign(__assign({}, (input.Category !== undefined && { category: input.Category })), (input.ListBy !== undefined && { listBy: input.ListBy })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.Order !== undefined && { order: input.Order }));
477
+ query = map({
478
+ category: [, input.Category],
479
+ listBy: [, input.ListBy],
480
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
481
+ nextToken: [, input.NextToken],
482
+ order: [, input.Order],
483
+ });
547
484
  return [2, new __HttpRequest({
548
485
  protocol: protocol,
549
486
  hostname: hostname,
@@ -566,7 +503,12 @@ export var serializeAws_restJson1ListQueuesCommand = function (input, context) {
566
503
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
567
504
  headers = {};
568
505
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/queues";
569
- query = __assign(__assign(__assign(__assign({}, (input.ListBy !== undefined && { listBy: input.ListBy })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.Order !== undefined && { order: input.Order }));
506
+ query = map({
507
+ listBy: [, input.ListBy],
508
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
509
+ nextToken: [, input.NextToken],
510
+ order: [, input.Order],
511
+ });
570
512
  return [2, new __HttpRequest({
571
513
  protocol: protocol,
572
514
  hostname: hostname,
@@ -581,7 +523,7 @@ export var serializeAws_restJson1ListQueuesCommand = function (input, context) {
581
523
  });
582
524
  }); };
583
525
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
584
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
526
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
585
527
  return __generator(this, function (_c) {
586
528
  switch (_c.label) {
587
529
  case 0: return [4, context.endpoint()];
@@ -589,16 +531,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
589
531
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
590
532
  headers = {};
591
533
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/tags/{Arn}";
592
- if (input.Arn !== undefined) {
593
- labelValue = input.Arn;
594
- if (labelValue.length <= 0) {
595
- throw new Error("Empty value provided for input HTTP label: Arn.");
596
- }
597
- resolvedPath = resolvedPath.replace("{Arn}", __extendedEncodeURIComponent(labelValue));
598
- }
599
- else {
600
- throw new Error("No value provided for input HTTP label: Arn.");
601
- }
534
+ resolvedPath = __resolvedPath(resolvedPath, input, "Arn", function () { return input.Arn; }, "{Arn}", false);
602
535
  return [2, new __HttpRequest({
603
536
  protocol: protocol,
604
537
  hostname: hostname,
@@ -660,7 +593,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
660
593
  });
661
594
  }); };
662
595
  export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
663
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
596
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
664
597
  return __generator(this, function (_c) {
665
598
  switch (_c.label) {
666
599
  case 0: return [4, context.endpoint()];
@@ -670,16 +603,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
670
603
  "content-type": "application/json",
671
604
  };
672
605
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/tags/{Arn}";
673
- if (input.Arn !== undefined) {
674
- labelValue = input.Arn;
675
- if (labelValue.length <= 0) {
676
- throw new Error("Empty value provided for input HTTP label: Arn.");
677
- }
678
- resolvedPath = resolvedPath.replace("{Arn}", __extendedEncodeURIComponent(labelValue));
679
- }
680
- else {
681
- throw new Error("No value provided for input HTTP label: Arn.");
682
- }
606
+ resolvedPath = __resolvedPath(resolvedPath, input, "Arn", function () { return input.Arn; }, "{Arn}", false);
683
607
  body = JSON.stringify(__assign({}, (input.TagKeys != null && { tagKeys: serializeAws_restJson1__listOf__string(input.TagKeys, context) })));
684
608
  return [2, new __HttpRequest({
685
609
  protocol: protocol,
@@ -694,7 +618,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
694
618
  });
695
619
  }); };
696
620
  export var serializeAws_restJson1UpdateJobTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
697
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
621
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
698
622
  return __generator(this, function (_c) {
699
623
  switch (_c.label) {
700
624
  case 0: return [4, context.endpoint()];
@@ -704,16 +628,7 @@ export var serializeAws_restJson1UpdateJobTemplateCommand = function (input, con
704
628
  "content-type": "application/json",
705
629
  };
706
630
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/jobTemplates/{Name}";
707
- if (input.Name !== undefined) {
708
- labelValue = input.Name;
709
- if (labelValue.length <= 0) {
710
- throw new Error("Empty value provided for input HTTP label: Name.");
711
- }
712
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
713
- }
714
- else {
715
- throw new Error("No value provided for input HTTP label: Name.");
716
- }
631
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
717
632
  body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AccelerationSettings != null && {
718
633
  accelerationSettings: serializeAws_restJson1AccelerationSettings(input.AccelerationSettings, context),
719
634
  })), (input.Category != null && { category: input.Category })), (input.Description != null && { description: input.Description })), (input.HopDestinations != null && {
@@ -732,7 +647,7 @@ export var serializeAws_restJson1UpdateJobTemplateCommand = function (input, con
732
647
  });
733
648
  }); };
734
649
  export var serializeAws_restJson1UpdatePresetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
735
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
650
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
736
651
  return __generator(this, function (_c) {
737
652
  switch (_c.label) {
738
653
  case 0: return [4, context.endpoint()];
@@ -742,16 +657,7 @@ export var serializeAws_restJson1UpdatePresetCommand = function (input, context)
742
657
  "content-type": "application/json",
743
658
  };
744
659
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/presets/{Name}";
745
- if (input.Name !== undefined) {
746
- labelValue = input.Name;
747
- if (labelValue.length <= 0) {
748
- throw new Error("Empty value provided for input HTTP label: Name.");
749
- }
750
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
751
- }
752
- else {
753
- throw new Error("No value provided for input HTTP label: Name.");
754
- }
660
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
755
661
  body = JSON.stringify(__assign(__assign(__assign({}, (input.Category != null && { category: input.Category })), (input.Description != null && { description: input.Description })), (input.Settings != null && { settings: serializeAws_restJson1PresetSettings(input.Settings, context) })));
756
662
  return [2, new __HttpRequest({
757
663
  protocol: protocol,
@@ -766,7 +672,7 @@ export var serializeAws_restJson1UpdatePresetCommand = function (input, context)
766
672
  });
767
673
  }); };
768
674
  export var serializeAws_restJson1UpdateQueueCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
769
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
675
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
770
676
  return __generator(this, function (_c) {
771
677
  switch (_c.label) {
772
678
  case 0: return [4, context.endpoint()];
@@ -776,16 +682,7 @@ export var serializeAws_restJson1UpdateQueueCommand = function (input, context)
776
682
  "content-type": "application/json",
777
683
  };
778
684
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2017-08-29/queues/{Name}";
779
- if (input.Name !== undefined) {
780
- labelValue = input.Name;
781
- if (labelValue.length <= 0) {
782
- throw new Error("Empty value provided for input HTTP label: Name.");
783
- }
784
- resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
785
- }
786
- else {
787
- throw new Error("No value provided for input HTTP label: Name.");
788
- }
685
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
789
686
  body = JSON.stringify(__assign(__assign(__assign({}, (input.Description != null && { description: input.Description })), (input.ReservationPlanSettings != null && {
790
687
  reservationPlanSettings: serializeAws_restJson1ReservationPlanSettings(input.ReservationPlanSettings, context),
791
688
  })), (input.Status != null && { status: input.Status })));
@@ -809,18 +706,18 @@ export var deserializeAws_restJson1AssociateCertificateCommand = function (outpu
809
706
  if (output.statusCode !== 201 && output.statusCode >= 300) {
810
707
  return [2, deserializeAws_restJson1AssociateCertificateCommandError(output, context)];
811
708
  }
812
- contents = {
709
+ contents = map({
813
710
  $metadata: deserializeMetadata(output),
814
- };
711
+ });
815
712
  return [4, collectBody(output.body, context)];
816
713
  case 1:
817
714
  _a.sent();
818
- return [2, Promise.resolve(contents)];
715
+ return [2, contents];
819
716
  }
820
717
  });
821
718
  }); };
822
719
  var deserializeAws_restJson1AssociateCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
823
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
720
+ var parsedOutput, _a, errorCode, _b, parsedBody;
824
721
  var _c;
825
722
  return __generator(this, function (_d) {
826
723
  switch (_d.label) {
@@ -861,14 +758,14 @@ var deserializeAws_restJson1AssociateCertificateCommandError = function (output,
861
758
  case 13: throw _d.sent();
862
759
  case 14:
863
760
  parsedBody = parsedOutput.body;
864
- $metadata = deserializeMetadata(output);
865
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
866
- response = new __BaseException({
867
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
868
- $fault: "client",
869
- $metadata: $metadata,
761
+ throwDefaultError({
762
+ output: output,
763
+ parsedBody: parsedBody,
764
+ exceptionCtor: __BaseException,
765
+ errorCode: errorCode,
870
766
  });
871
- throw __decorateServiceException(response, parsedBody);
767
+ _d.label = 15;
768
+ case 15: return [2];
872
769
  }
873
770
  });
874
771
  }); };
@@ -880,18 +777,18 @@ export var deserializeAws_restJson1CancelJobCommand = function (output, context)
880
777
  if (output.statusCode !== 202 && output.statusCode >= 300) {
881
778
  return [2, deserializeAws_restJson1CancelJobCommandError(output, context)];
882
779
  }
883
- contents = {
780
+ contents = map({
884
781
  $metadata: deserializeMetadata(output),
885
- };
782
+ });
886
783
  return [4, collectBody(output.body, context)];
887
784
  case 1:
888
785
  _a.sent();
889
- return [2, Promise.resolve(contents)];
786
+ return [2, contents];
890
787
  }
891
788
  });
892
789
  }); };
893
790
  var deserializeAws_restJson1CancelJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
894
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
791
+ var parsedOutput, _a, errorCode, _b, parsedBody;
895
792
  var _c;
896
793
  return __generator(this, function (_d) {
897
794
  switch (_d.label) {
@@ -932,14 +829,14 @@ var deserializeAws_restJson1CancelJobCommandError = function (output, context) {
932
829
  case 13: throw _d.sent();
933
830
  case 14:
934
831
  parsedBody = parsedOutput.body;
935
- $metadata = deserializeMetadata(output);
936
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
937
- response = new __BaseException({
938
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
939
- $fault: "client",
940
- $metadata: $metadata,
832
+ throwDefaultError({
833
+ output: output,
834
+ parsedBody: parsedBody,
835
+ exceptionCtor: __BaseException,
836
+ errorCode: errorCode,
941
837
  });
942
- throw __decorateServiceException(response, parsedBody);
838
+ _d.label = 15;
839
+ case 15: return [2];
943
840
  }
944
841
  });
945
842
  }); };
@@ -951,24 +848,23 @@ export var deserializeAws_restJson1CreateJobCommand = function (output, context)
951
848
  if (output.statusCode !== 201 && output.statusCode >= 300) {
952
849
  return [2, deserializeAws_restJson1CreateJobCommandError(output, context)];
953
850
  }
954
- contents = {
851
+ contents = map({
955
852
  $metadata: deserializeMetadata(output),
956
- Job: undefined,
957
- };
853
+ });
958
854
  _a = __expectNonNull;
959
855
  _b = __expectObject;
960
856
  return [4, parseBody(output.body, context)];
961
857
  case 1:
962
858
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
963
- if (data.job !== undefined && data.job !== null) {
859
+ if (data.job != null) {
964
860
  contents.Job = deserializeAws_restJson1Job(data.job, context);
965
861
  }
966
- return [2, Promise.resolve(contents)];
862
+ return [2, contents];
967
863
  }
968
864
  });
969
865
  }); };
970
866
  var deserializeAws_restJson1CreateJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
971
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
867
+ var parsedOutput, _a, errorCode, _b, parsedBody;
972
868
  var _c;
973
869
  return __generator(this, function (_d) {
974
870
  switch (_d.label) {
@@ -1009,14 +905,14 @@ var deserializeAws_restJson1CreateJobCommandError = function (output, context) {
1009
905
  case 13: throw _d.sent();
1010
906
  case 14:
1011
907
  parsedBody = parsedOutput.body;
1012
- $metadata = deserializeMetadata(output);
1013
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1014
- response = new __BaseException({
1015
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1016
- $fault: "client",
1017
- $metadata: $metadata,
908
+ throwDefaultError({
909
+ output: output,
910
+ parsedBody: parsedBody,
911
+ exceptionCtor: __BaseException,
912
+ errorCode: errorCode,
1018
913
  });
1019
- throw __decorateServiceException(response, parsedBody);
914
+ _d.label = 15;
915
+ case 15: return [2];
1020
916
  }
1021
917
  });
1022
918
  }); };
@@ -1028,24 +924,23 @@ export var deserializeAws_restJson1CreateJobTemplateCommand = function (output,
1028
924
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1029
925
  return [2, deserializeAws_restJson1CreateJobTemplateCommandError(output, context)];
1030
926
  }
1031
- contents = {
927
+ contents = map({
1032
928
  $metadata: deserializeMetadata(output),
1033
- JobTemplate: undefined,
1034
- };
929
+ });
1035
930
  _a = __expectNonNull;
1036
931
  _b = __expectObject;
1037
932
  return [4, parseBody(output.body, context)];
1038
933
  case 1:
1039
934
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1040
- if (data.jobTemplate !== undefined && data.jobTemplate !== null) {
935
+ if (data.jobTemplate != null) {
1041
936
  contents.JobTemplate = deserializeAws_restJson1JobTemplate(data.jobTemplate, context);
1042
937
  }
1043
- return [2, Promise.resolve(contents)];
938
+ return [2, contents];
1044
939
  }
1045
940
  });
1046
941
  }); };
1047
942
  var deserializeAws_restJson1CreateJobTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1048
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
943
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1049
944
  var _c;
1050
945
  return __generator(this, function (_d) {
1051
946
  switch (_d.label) {
@@ -1086,14 +981,14 @@ var deserializeAws_restJson1CreateJobTemplateCommandError = function (output, co
1086
981
  case 13: throw _d.sent();
1087
982
  case 14:
1088
983
  parsedBody = parsedOutput.body;
1089
- $metadata = deserializeMetadata(output);
1090
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1091
- response = new __BaseException({
1092
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1093
- $fault: "client",
1094
- $metadata: $metadata,
984
+ throwDefaultError({
985
+ output: output,
986
+ parsedBody: parsedBody,
987
+ exceptionCtor: __BaseException,
988
+ errorCode: errorCode,
1095
989
  });
1096
- throw __decorateServiceException(response, parsedBody);
990
+ _d.label = 15;
991
+ case 15: return [2];
1097
992
  }
1098
993
  });
1099
994
  }); };
@@ -1105,24 +1000,23 @@ export var deserializeAws_restJson1CreatePresetCommand = function (output, conte
1105
1000
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1106
1001
  return [2, deserializeAws_restJson1CreatePresetCommandError(output, context)];
1107
1002
  }
1108
- contents = {
1003
+ contents = map({
1109
1004
  $metadata: deserializeMetadata(output),
1110
- Preset: undefined,
1111
- };
1005
+ });
1112
1006
  _a = __expectNonNull;
1113
1007
  _b = __expectObject;
1114
1008
  return [4, parseBody(output.body, context)];
1115
1009
  case 1:
1116
1010
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1117
- if (data.preset !== undefined && data.preset !== null) {
1011
+ if (data.preset != null) {
1118
1012
  contents.Preset = deserializeAws_restJson1Preset(data.preset, context);
1119
1013
  }
1120
- return [2, Promise.resolve(contents)];
1014
+ return [2, contents];
1121
1015
  }
1122
1016
  });
1123
1017
  }); };
1124
1018
  var deserializeAws_restJson1CreatePresetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1125
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1019
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1126
1020
  var _c;
1127
1021
  return __generator(this, function (_d) {
1128
1022
  switch (_d.label) {
@@ -1163,14 +1057,14 @@ var deserializeAws_restJson1CreatePresetCommandError = function (output, context
1163
1057
  case 13: throw _d.sent();
1164
1058
  case 14:
1165
1059
  parsedBody = parsedOutput.body;
1166
- $metadata = deserializeMetadata(output);
1167
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1168
- response = new __BaseException({
1169
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1170
- $fault: "client",
1171
- $metadata: $metadata,
1060
+ throwDefaultError({
1061
+ output: output,
1062
+ parsedBody: parsedBody,
1063
+ exceptionCtor: __BaseException,
1064
+ errorCode: errorCode,
1172
1065
  });
1173
- throw __decorateServiceException(response, parsedBody);
1066
+ _d.label = 15;
1067
+ case 15: return [2];
1174
1068
  }
1175
1069
  });
1176
1070
  }); };
@@ -1182,24 +1076,23 @@ export var deserializeAws_restJson1CreateQueueCommand = function (output, contex
1182
1076
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1183
1077
  return [2, deserializeAws_restJson1CreateQueueCommandError(output, context)];
1184
1078
  }
1185
- contents = {
1079
+ contents = map({
1186
1080
  $metadata: deserializeMetadata(output),
1187
- Queue: undefined,
1188
- };
1081
+ });
1189
1082
  _a = __expectNonNull;
1190
1083
  _b = __expectObject;
1191
1084
  return [4, parseBody(output.body, context)];
1192
1085
  case 1:
1193
1086
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1194
- if (data.queue !== undefined && data.queue !== null) {
1087
+ if (data.queue != null) {
1195
1088
  contents.Queue = deserializeAws_restJson1Queue(data.queue, context);
1196
1089
  }
1197
- return [2, Promise.resolve(contents)];
1090
+ return [2, contents];
1198
1091
  }
1199
1092
  });
1200
1093
  }); };
1201
1094
  var deserializeAws_restJson1CreateQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1202
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1095
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1203
1096
  var _c;
1204
1097
  return __generator(this, function (_d) {
1205
1098
  switch (_d.label) {
@@ -1240,14 +1133,14 @@ var deserializeAws_restJson1CreateQueueCommandError = function (output, context)
1240
1133
  case 13: throw _d.sent();
1241
1134
  case 14:
1242
1135
  parsedBody = parsedOutput.body;
1243
- $metadata = deserializeMetadata(output);
1244
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1245
- response = new __BaseException({
1246
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1247
- $fault: "client",
1248
- $metadata: $metadata,
1136
+ throwDefaultError({
1137
+ output: output,
1138
+ parsedBody: parsedBody,
1139
+ exceptionCtor: __BaseException,
1140
+ errorCode: errorCode,
1249
1141
  });
1250
- throw __decorateServiceException(response, parsedBody);
1142
+ _d.label = 15;
1143
+ case 15: return [2];
1251
1144
  }
1252
1145
  });
1253
1146
  }); };
@@ -1259,18 +1152,18 @@ export var deserializeAws_restJson1DeleteJobTemplateCommand = function (output,
1259
1152
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1260
1153
  return [2, deserializeAws_restJson1DeleteJobTemplateCommandError(output, context)];
1261
1154
  }
1262
- contents = {
1155
+ contents = map({
1263
1156
  $metadata: deserializeMetadata(output),
1264
- };
1157
+ });
1265
1158
  return [4, collectBody(output.body, context)];
1266
1159
  case 1:
1267
1160
  _a.sent();
1268
- return [2, Promise.resolve(contents)];
1161
+ return [2, contents];
1269
1162
  }
1270
1163
  });
1271
1164
  }); };
1272
1165
  var deserializeAws_restJson1DeleteJobTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1273
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1166
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1274
1167
  var _c;
1275
1168
  return __generator(this, function (_d) {
1276
1169
  switch (_d.label) {
@@ -1311,14 +1204,14 @@ var deserializeAws_restJson1DeleteJobTemplateCommandError = function (output, co
1311
1204
  case 13: throw _d.sent();
1312
1205
  case 14:
1313
1206
  parsedBody = parsedOutput.body;
1314
- $metadata = deserializeMetadata(output);
1315
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1316
- response = new __BaseException({
1317
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1318
- $fault: "client",
1319
- $metadata: $metadata,
1207
+ throwDefaultError({
1208
+ output: output,
1209
+ parsedBody: parsedBody,
1210
+ exceptionCtor: __BaseException,
1211
+ errorCode: errorCode,
1320
1212
  });
1321
- throw __decorateServiceException(response, parsedBody);
1213
+ _d.label = 15;
1214
+ case 15: return [2];
1322
1215
  }
1323
1216
  });
1324
1217
  }); };
@@ -1330,18 +1223,18 @@ export var deserializeAws_restJson1DeletePolicyCommand = function (output, conte
1330
1223
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1331
1224
  return [2, deserializeAws_restJson1DeletePolicyCommandError(output, context)];
1332
1225
  }
1333
- contents = {
1226
+ contents = map({
1334
1227
  $metadata: deserializeMetadata(output),
1335
- };
1228
+ });
1336
1229
  return [4, collectBody(output.body, context)];
1337
1230
  case 1:
1338
1231
  _a.sent();
1339
- return [2, Promise.resolve(contents)];
1232
+ return [2, contents];
1340
1233
  }
1341
1234
  });
1342
1235
  }); };
1343
1236
  var deserializeAws_restJson1DeletePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1344
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1237
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1345
1238
  var _c;
1346
1239
  return __generator(this, function (_d) {
1347
1240
  switch (_d.label) {
@@ -1382,14 +1275,14 @@ var deserializeAws_restJson1DeletePolicyCommandError = function (output, context
1382
1275
  case 13: throw _d.sent();
1383
1276
  case 14:
1384
1277
  parsedBody = parsedOutput.body;
1385
- $metadata = deserializeMetadata(output);
1386
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1387
- response = new __BaseException({
1388
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1389
- $fault: "client",
1390
- $metadata: $metadata,
1278
+ throwDefaultError({
1279
+ output: output,
1280
+ parsedBody: parsedBody,
1281
+ exceptionCtor: __BaseException,
1282
+ errorCode: errorCode,
1391
1283
  });
1392
- throw __decorateServiceException(response, parsedBody);
1284
+ _d.label = 15;
1285
+ case 15: return [2];
1393
1286
  }
1394
1287
  });
1395
1288
  }); };
@@ -1401,18 +1294,18 @@ export var deserializeAws_restJson1DeletePresetCommand = function (output, conte
1401
1294
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1402
1295
  return [2, deserializeAws_restJson1DeletePresetCommandError(output, context)];
1403
1296
  }
1404
- contents = {
1297
+ contents = map({
1405
1298
  $metadata: deserializeMetadata(output),
1406
- };
1299
+ });
1407
1300
  return [4, collectBody(output.body, context)];
1408
1301
  case 1:
1409
1302
  _a.sent();
1410
- return [2, Promise.resolve(contents)];
1303
+ return [2, contents];
1411
1304
  }
1412
1305
  });
1413
1306
  }); };
1414
1307
  var deserializeAws_restJson1DeletePresetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1415
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1308
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1416
1309
  var _c;
1417
1310
  return __generator(this, function (_d) {
1418
1311
  switch (_d.label) {
@@ -1453,14 +1346,14 @@ var deserializeAws_restJson1DeletePresetCommandError = function (output, context
1453
1346
  case 13: throw _d.sent();
1454
1347
  case 14:
1455
1348
  parsedBody = parsedOutput.body;
1456
- $metadata = deserializeMetadata(output);
1457
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1458
- response = new __BaseException({
1459
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1460
- $fault: "client",
1461
- $metadata: $metadata,
1349
+ throwDefaultError({
1350
+ output: output,
1351
+ parsedBody: parsedBody,
1352
+ exceptionCtor: __BaseException,
1353
+ errorCode: errorCode,
1462
1354
  });
1463
- throw __decorateServiceException(response, parsedBody);
1355
+ _d.label = 15;
1356
+ case 15: return [2];
1464
1357
  }
1465
1358
  });
1466
1359
  }); };
@@ -1472,18 +1365,18 @@ export var deserializeAws_restJson1DeleteQueueCommand = function (output, contex
1472
1365
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1473
1366
  return [2, deserializeAws_restJson1DeleteQueueCommandError(output, context)];
1474
1367
  }
1475
- contents = {
1368
+ contents = map({
1476
1369
  $metadata: deserializeMetadata(output),
1477
- };
1370
+ });
1478
1371
  return [4, collectBody(output.body, context)];
1479
1372
  case 1:
1480
1373
  _a.sent();
1481
- return [2, Promise.resolve(contents)];
1374
+ return [2, contents];
1482
1375
  }
1483
1376
  });
1484
1377
  }); };
1485
1378
  var deserializeAws_restJson1DeleteQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1486
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1379
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1487
1380
  var _c;
1488
1381
  return __generator(this, function (_d) {
1489
1382
  switch (_d.label) {
@@ -1524,14 +1417,14 @@ var deserializeAws_restJson1DeleteQueueCommandError = function (output, context)
1524
1417
  case 13: throw _d.sent();
1525
1418
  case 14:
1526
1419
  parsedBody = parsedOutput.body;
1527
- $metadata = deserializeMetadata(output);
1528
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1529
- response = new __BaseException({
1530
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1531
- $fault: "client",
1532
- $metadata: $metadata,
1420
+ throwDefaultError({
1421
+ output: output,
1422
+ parsedBody: parsedBody,
1423
+ exceptionCtor: __BaseException,
1424
+ errorCode: errorCode,
1533
1425
  });
1534
- throw __decorateServiceException(response, parsedBody);
1426
+ _d.label = 15;
1427
+ case 15: return [2];
1535
1428
  }
1536
1429
  });
1537
1430
  }); };
@@ -1543,28 +1436,26 @@ export var deserializeAws_restJson1DescribeEndpointsCommand = function (output,
1543
1436
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1544
1437
  return [2, deserializeAws_restJson1DescribeEndpointsCommandError(output, context)];
1545
1438
  }
1546
- contents = {
1439
+ contents = map({
1547
1440
  $metadata: deserializeMetadata(output),
1548
- Endpoints: undefined,
1549
- NextToken: undefined,
1550
- };
1441
+ });
1551
1442
  _a = __expectNonNull;
1552
1443
  _b = __expectObject;
1553
1444
  return [4, parseBody(output.body, context)];
1554
1445
  case 1:
1555
1446
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1556
- if (data.endpoints !== undefined && data.endpoints !== null) {
1447
+ if (data.endpoints != null) {
1557
1448
  contents.Endpoints = deserializeAws_restJson1__listOfEndpoint(data.endpoints, context);
1558
1449
  }
1559
- if (data.nextToken !== undefined && data.nextToken !== null) {
1450
+ if (data.nextToken != null) {
1560
1451
  contents.NextToken = __expectString(data.nextToken);
1561
1452
  }
1562
- return [2, Promise.resolve(contents)];
1453
+ return [2, contents];
1563
1454
  }
1564
1455
  });
1565
1456
  }); };
1566
1457
  var deserializeAws_restJson1DescribeEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1567
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1458
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1568
1459
  var _c;
1569
1460
  return __generator(this, function (_d) {
1570
1461
  switch (_d.label) {
@@ -1605,14 +1496,14 @@ var deserializeAws_restJson1DescribeEndpointsCommandError = function (output, co
1605
1496
  case 13: throw _d.sent();
1606
1497
  case 14:
1607
1498
  parsedBody = parsedOutput.body;
1608
- $metadata = deserializeMetadata(output);
1609
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1610
- response = new __BaseException({
1611
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1612
- $fault: "client",
1613
- $metadata: $metadata,
1499
+ throwDefaultError({
1500
+ output: output,
1501
+ parsedBody: parsedBody,
1502
+ exceptionCtor: __BaseException,
1503
+ errorCode: errorCode,
1614
1504
  });
1615
- throw __decorateServiceException(response, parsedBody);
1505
+ _d.label = 15;
1506
+ case 15: return [2];
1616
1507
  }
1617
1508
  });
1618
1509
  }); };
@@ -1624,18 +1515,18 @@ export var deserializeAws_restJson1DisassociateCertificateCommand = function (ou
1624
1515
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1625
1516
  return [2, deserializeAws_restJson1DisassociateCertificateCommandError(output, context)];
1626
1517
  }
1627
- contents = {
1518
+ contents = map({
1628
1519
  $metadata: deserializeMetadata(output),
1629
- };
1520
+ });
1630
1521
  return [4, collectBody(output.body, context)];
1631
1522
  case 1:
1632
1523
  _a.sent();
1633
- return [2, Promise.resolve(contents)];
1524
+ return [2, contents];
1634
1525
  }
1635
1526
  });
1636
1527
  }); };
1637
1528
  var deserializeAws_restJson1DisassociateCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1638
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1529
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1639
1530
  var _c;
1640
1531
  return __generator(this, function (_d) {
1641
1532
  switch (_d.label) {
@@ -1676,14 +1567,14 @@ var deserializeAws_restJson1DisassociateCertificateCommandError = function (outp
1676
1567
  case 13: throw _d.sent();
1677
1568
  case 14:
1678
1569
  parsedBody = parsedOutput.body;
1679
- $metadata = deserializeMetadata(output);
1680
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1681
- response = new __BaseException({
1682
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1683
- $fault: "client",
1684
- $metadata: $metadata,
1570
+ throwDefaultError({
1571
+ output: output,
1572
+ parsedBody: parsedBody,
1573
+ exceptionCtor: __BaseException,
1574
+ errorCode: errorCode,
1685
1575
  });
1686
- throw __decorateServiceException(response, parsedBody);
1576
+ _d.label = 15;
1577
+ case 15: return [2];
1687
1578
  }
1688
1579
  });
1689
1580
  }); };
@@ -1695,24 +1586,23 @@ export var deserializeAws_restJson1GetJobCommand = function (output, context) {
1695
1586
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1696
1587
  return [2, deserializeAws_restJson1GetJobCommandError(output, context)];
1697
1588
  }
1698
- contents = {
1589
+ contents = map({
1699
1590
  $metadata: deserializeMetadata(output),
1700
- Job: undefined,
1701
- };
1591
+ });
1702
1592
  _a = __expectNonNull;
1703
1593
  _b = __expectObject;
1704
1594
  return [4, parseBody(output.body, context)];
1705
1595
  case 1:
1706
1596
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1707
- if (data.job !== undefined && data.job !== null) {
1597
+ if (data.job != null) {
1708
1598
  contents.Job = deserializeAws_restJson1Job(data.job, context);
1709
1599
  }
1710
- return [2, Promise.resolve(contents)];
1600
+ return [2, contents];
1711
1601
  }
1712
1602
  });
1713
1603
  }); };
1714
1604
  var deserializeAws_restJson1GetJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1715
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1605
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1716
1606
  var _c;
1717
1607
  return __generator(this, function (_d) {
1718
1608
  switch (_d.label) {
@@ -1753,14 +1643,14 @@ var deserializeAws_restJson1GetJobCommandError = function (output, context) { re
1753
1643
  case 13: throw _d.sent();
1754
1644
  case 14:
1755
1645
  parsedBody = parsedOutput.body;
1756
- $metadata = deserializeMetadata(output);
1757
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1758
- response = new __BaseException({
1759
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1760
- $fault: "client",
1761
- $metadata: $metadata,
1646
+ throwDefaultError({
1647
+ output: output,
1648
+ parsedBody: parsedBody,
1649
+ exceptionCtor: __BaseException,
1650
+ errorCode: errorCode,
1762
1651
  });
1763
- throw __decorateServiceException(response, parsedBody);
1652
+ _d.label = 15;
1653
+ case 15: return [2];
1764
1654
  }
1765
1655
  });
1766
1656
  }); };
@@ -1772,24 +1662,23 @@ export var deserializeAws_restJson1GetJobTemplateCommand = function (output, con
1772
1662
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1773
1663
  return [2, deserializeAws_restJson1GetJobTemplateCommandError(output, context)];
1774
1664
  }
1775
- contents = {
1665
+ contents = map({
1776
1666
  $metadata: deserializeMetadata(output),
1777
- JobTemplate: undefined,
1778
- };
1667
+ });
1779
1668
  _a = __expectNonNull;
1780
1669
  _b = __expectObject;
1781
1670
  return [4, parseBody(output.body, context)];
1782
1671
  case 1:
1783
1672
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1784
- if (data.jobTemplate !== undefined && data.jobTemplate !== null) {
1673
+ if (data.jobTemplate != null) {
1785
1674
  contents.JobTemplate = deserializeAws_restJson1JobTemplate(data.jobTemplate, context);
1786
1675
  }
1787
- return [2, Promise.resolve(contents)];
1676
+ return [2, contents];
1788
1677
  }
1789
1678
  });
1790
1679
  }); };
1791
1680
  var deserializeAws_restJson1GetJobTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1792
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1681
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1793
1682
  var _c;
1794
1683
  return __generator(this, function (_d) {
1795
1684
  switch (_d.label) {
@@ -1830,14 +1719,14 @@ var deserializeAws_restJson1GetJobTemplateCommandError = function (output, conte
1830
1719
  case 13: throw _d.sent();
1831
1720
  case 14:
1832
1721
  parsedBody = parsedOutput.body;
1833
- $metadata = deserializeMetadata(output);
1834
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1835
- response = new __BaseException({
1836
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1837
- $fault: "client",
1838
- $metadata: $metadata,
1722
+ throwDefaultError({
1723
+ output: output,
1724
+ parsedBody: parsedBody,
1725
+ exceptionCtor: __BaseException,
1726
+ errorCode: errorCode,
1839
1727
  });
1840
- throw __decorateServiceException(response, parsedBody);
1728
+ _d.label = 15;
1729
+ case 15: return [2];
1841
1730
  }
1842
1731
  });
1843
1732
  }); };
@@ -1849,24 +1738,23 @@ export var deserializeAws_restJson1GetPolicyCommand = function (output, context)
1849
1738
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1850
1739
  return [2, deserializeAws_restJson1GetPolicyCommandError(output, context)];
1851
1740
  }
1852
- contents = {
1741
+ contents = map({
1853
1742
  $metadata: deserializeMetadata(output),
1854
- Policy: undefined,
1855
- };
1743
+ });
1856
1744
  _a = __expectNonNull;
1857
1745
  _b = __expectObject;
1858
1746
  return [4, parseBody(output.body, context)];
1859
1747
  case 1:
1860
1748
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1861
- if (data.policy !== undefined && data.policy !== null) {
1749
+ if (data.policy != null) {
1862
1750
  contents.Policy = deserializeAws_restJson1Policy(data.policy, context);
1863
1751
  }
1864
- return [2, Promise.resolve(contents)];
1752
+ return [2, contents];
1865
1753
  }
1866
1754
  });
1867
1755
  }); };
1868
1756
  var deserializeAws_restJson1GetPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1869
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1757
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1870
1758
  var _c;
1871
1759
  return __generator(this, function (_d) {
1872
1760
  switch (_d.label) {
@@ -1907,14 +1795,14 @@ var deserializeAws_restJson1GetPolicyCommandError = function (output, context) {
1907
1795
  case 13: throw _d.sent();
1908
1796
  case 14:
1909
1797
  parsedBody = parsedOutput.body;
1910
- $metadata = deserializeMetadata(output);
1911
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1912
- response = new __BaseException({
1913
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1914
- $fault: "client",
1915
- $metadata: $metadata,
1798
+ throwDefaultError({
1799
+ output: output,
1800
+ parsedBody: parsedBody,
1801
+ exceptionCtor: __BaseException,
1802
+ errorCode: errorCode,
1916
1803
  });
1917
- throw __decorateServiceException(response, parsedBody);
1804
+ _d.label = 15;
1805
+ case 15: return [2];
1918
1806
  }
1919
1807
  });
1920
1808
  }); };
@@ -1926,24 +1814,23 @@ export var deserializeAws_restJson1GetPresetCommand = function (output, context)
1926
1814
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1927
1815
  return [2, deserializeAws_restJson1GetPresetCommandError(output, context)];
1928
1816
  }
1929
- contents = {
1817
+ contents = map({
1930
1818
  $metadata: deserializeMetadata(output),
1931
- Preset: undefined,
1932
- };
1819
+ });
1933
1820
  _a = __expectNonNull;
1934
1821
  _b = __expectObject;
1935
1822
  return [4, parseBody(output.body, context)];
1936
1823
  case 1:
1937
1824
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1938
- if (data.preset !== undefined && data.preset !== null) {
1825
+ if (data.preset != null) {
1939
1826
  contents.Preset = deserializeAws_restJson1Preset(data.preset, context);
1940
1827
  }
1941
- return [2, Promise.resolve(contents)];
1828
+ return [2, contents];
1942
1829
  }
1943
1830
  });
1944
1831
  }); };
1945
1832
  var deserializeAws_restJson1GetPresetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1946
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1833
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1947
1834
  var _c;
1948
1835
  return __generator(this, function (_d) {
1949
1836
  switch (_d.label) {
@@ -1984,14 +1871,14 @@ var deserializeAws_restJson1GetPresetCommandError = function (output, context) {
1984
1871
  case 13: throw _d.sent();
1985
1872
  case 14:
1986
1873
  parsedBody = parsedOutput.body;
1987
- $metadata = deserializeMetadata(output);
1988
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1989
- response = new __BaseException({
1990
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1991
- $fault: "client",
1992
- $metadata: $metadata,
1874
+ throwDefaultError({
1875
+ output: output,
1876
+ parsedBody: parsedBody,
1877
+ exceptionCtor: __BaseException,
1878
+ errorCode: errorCode,
1993
1879
  });
1994
- throw __decorateServiceException(response, parsedBody);
1880
+ _d.label = 15;
1881
+ case 15: return [2];
1995
1882
  }
1996
1883
  });
1997
1884
  }); };
@@ -2003,24 +1890,23 @@ export var deserializeAws_restJson1GetQueueCommand = function (output, context)
2003
1890
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2004
1891
  return [2, deserializeAws_restJson1GetQueueCommandError(output, context)];
2005
1892
  }
2006
- contents = {
1893
+ contents = map({
2007
1894
  $metadata: deserializeMetadata(output),
2008
- Queue: undefined,
2009
- };
1895
+ });
2010
1896
  _a = __expectNonNull;
2011
1897
  _b = __expectObject;
2012
1898
  return [4, parseBody(output.body, context)];
2013
1899
  case 1:
2014
1900
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2015
- if (data.queue !== undefined && data.queue !== null) {
1901
+ if (data.queue != null) {
2016
1902
  contents.Queue = deserializeAws_restJson1Queue(data.queue, context);
2017
1903
  }
2018
- return [2, Promise.resolve(contents)];
1904
+ return [2, contents];
2019
1905
  }
2020
1906
  });
2021
1907
  }); };
2022
1908
  var deserializeAws_restJson1GetQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2023
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1909
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2024
1910
  var _c;
2025
1911
  return __generator(this, function (_d) {
2026
1912
  switch (_d.label) {
@@ -2061,14 +1947,14 @@ var deserializeAws_restJson1GetQueueCommandError = function (output, context) {
2061
1947
  case 13: throw _d.sent();
2062
1948
  case 14:
2063
1949
  parsedBody = parsedOutput.body;
2064
- $metadata = deserializeMetadata(output);
2065
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2066
- response = new __BaseException({
2067
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2068
- $fault: "client",
2069
- $metadata: $metadata,
1950
+ throwDefaultError({
1951
+ output: output,
1952
+ parsedBody: parsedBody,
1953
+ exceptionCtor: __BaseException,
1954
+ errorCode: errorCode,
2070
1955
  });
2071
- throw __decorateServiceException(response, parsedBody);
1956
+ _d.label = 15;
1957
+ case 15: return [2];
2072
1958
  }
2073
1959
  });
2074
1960
  }); };
@@ -2080,28 +1966,26 @@ export var deserializeAws_restJson1ListJobsCommand = function (output, context)
2080
1966
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2081
1967
  return [2, deserializeAws_restJson1ListJobsCommandError(output, context)];
2082
1968
  }
2083
- contents = {
1969
+ contents = map({
2084
1970
  $metadata: deserializeMetadata(output),
2085
- Jobs: undefined,
2086
- NextToken: undefined,
2087
- };
1971
+ });
2088
1972
  _a = __expectNonNull;
2089
1973
  _b = __expectObject;
2090
1974
  return [4, parseBody(output.body, context)];
2091
1975
  case 1:
2092
1976
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2093
- if (data.jobs !== undefined && data.jobs !== null) {
1977
+ if (data.jobs != null) {
2094
1978
  contents.Jobs = deserializeAws_restJson1__listOfJob(data.jobs, context);
2095
1979
  }
2096
- if (data.nextToken !== undefined && data.nextToken !== null) {
1980
+ if (data.nextToken != null) {
2097
1981
  contents.NextToken = __expectString(data.nextToken);
2098
1982
  }
2099
- return [2, Promise.resolve(contents)];
1983
+ return [2, contents];
2100
1984
  }
2101
1985
  });
2102
1986
  }); };
2103
1987
  var deserializeAws_restJson1ListJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2104
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1988
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2105
1989
  var _c;
2106
1990
  return __generator(this, function (_d) {
2107
1991
  switch (_d.label) {
@@ -2142,14 +2026,14 @@ var deserializeAws_restJson1ListJobsCommandError = function (output, context) {
2142
2026
  case 13: throw _d.sent();
2143
2027
  case 14:
2144
2028
  parsedBody = parsedOutput.body;
2145
- $metadata = deserializeMetadata(output);
2146
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2147
- response = new __BaseException({
2148
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2149
- $fault: "client",
2150
- $metadata: $metadata,
2029
+ throwDefaultError({
2030
+ output: output,
2031
+ parsedBody: parsedBody,
2032
+ exceptionCtor: __BaseException,
2033
+ errorCode: errorCode,
2151
2034
  });
2152
- throw __decorateServiceException(response, parsedBody);
2035
+ _d.label = 15;
2036
+ case 15: return [2];
2153
2037
  }
2154
2038
  });
2155
2039
  }); };
@@ -2161,28 +2045,26 @@ export var deserializeAws_restJson1ListJobTemplatesCommand = function (output, c
2161
2045
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2162
2046
  return [2, deserializeAws_restJson1ListJobTemplatesCommandError(output, context)];
2163
2047
  }
2164
- contents = {
2048
+ contents = map({
2165
2049
  $metadata: deserializeMetadata(output),
2166
- JobTemplates: undefined,
2167
- NextToken: undefined,
2168
- };
2050
+ });
2169
2051
  _a = __expectNonNull;
2170
2052
  _b = __expectObject;
2171
2053
  return [4, parseBody(output.body, context)];
2172
2054
  case 1:
2173
2055
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2174
- if (data.jobTemplates !== undefined && data.jobTemplates !== null) {
2056
+ if (data.jobTemplates != null) {
2175
2057
  contents.JobTemplates = deserializeAws_restJson1__listOfJobTemplate(data.jobTemplates, context);
2176
2058
  }
2177
- if (data.nextToken !== undefined && data.nextToken !== null) {
2059
+ if (data.nextToken != null) {
2178
2060
  contents.NextToken = __expectString(data.nextToken);
2179
2061
  }
2180
- return [2, Promise.resolve(contents)];
2062
+ return [2, contents];
2181
2063
  }
2182
2064
  });
2183
2065
  }); };
2184
2066
  var deserializeAws_restJson1ListJobTemplatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2185
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2067
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2186
2068
  var _c;
2187
2069
  return __generator(this, function (_d) {
2188
2070
  switch (_d.label) {
@@ -2223,14 +2105,14 @@ var deserializeAws_restJson1ListJobTemplatesCommandError = function (output, con
2223
2105
  case 13: throw _d.sent();
2224
2106
  case 14:
2225
2107
  parsedBody = parsedOutput.body;
2226
- $metadata = deserializeMetadata(output);
2227
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2228
- response = new __BaseException({
2229
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2230
- $fault: "client",
2231
- $metadata: $metadata,
2108
+ throwDefaultError({
2109
+ output: output,
2110
+ parsedBody: parsedBody,
2111
+ exceptionCtor: __BaseException,
2112
+ errorCode: errorCode,
2232
2113
  });
2233
- throw __decorateServiceException(response, parsedBody);
2114
+ _d.label = 15;
2115
+ case 15: return [2];
2234
2116
  }
2235
2117
  });
2236
2118
  }); };
@@ -2242,28 +2124,26 @@ export var deserializeAws_restJson1ListPresetsCommand = function (output, contex
2242
2124
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2243
2125
  return [2, deserializeAws_restJson1ListPresetsCommandError(output, context)];
2244
2126
  }
2245
- contents = {
2127
+ contents = map({
2246
2128
  $metadata: deserializeMetadata(output),
2247
- NextToken: undefined,
2248
- Presets: undefined,
2249
- };
2129
+ });
2250
2130
  _a = __expectNonNull;
2251
2131
  _b = __expectObject;
2252
2132
  return [4, parseBody(output.body, context)];
2253
2133
  case 1:
2254
2134
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2255
- if (data.nextToken !== undefined && data.nextToken !== null) {
2135
+ if (data.nextToken != null) {
2256
2136
  contents.NextToken = __expectString(data.nextToken);
2257
2137
  }
2258
- if (data.presets !== undefined && data.presets !== null) {
2138
+ if (data.presets != null) {
2259
2139
  contents.Presets = deserializeAws_restJson1__listOfPreset(data.presets, context);
2260
2140
  }
2261
- return [2, Promise.resolve(contents)];
2141
+ return [2, contents];
2262
2142
  }
2263
2143
  });
2264
2144
  }); };
2265
2145
  var deserializeAws_restJson1ListPresetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2266
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2146
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2267
2147
  var _c;
2268
2148
  return __generator(this, function (_d) {
2269
2149
  switch (_d.label) {
@@ -2304,14 +2184,14 @@ var deserializeAws_restJson1ListPresetsCommandError = function (output, context)
2304
2184
  case 13: throw _d.sent();
2305
2185
  case 14:
2306
2186
  parsedBody = parsedOutput.body;
2307
- $metadata = deserializeMetadata(output);
2308
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2309
- response = new __BaseException({
2310
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2311
- $fault: "client",
2312
- $metadata: $metadata,
2187
+ throwDefaultError({
2188
+ output: output,
2189
+ parsedBody: parsedBody,
2190
+ exceptionCtor: __BaseException,
2191
+ errorCode: errorCode,
2313
2192
  });
2314
- throw __decorateServiceException(response, parsedBody);
2193
+ _d.label = 15;
2194
+ case 15: return [2];
2315
2195
  }
2316
2196
  });
2317
2197
  }); };
@@ -2323,28 +2203,26 @@ export var deserializeAws_restJson1ListQueuesCommand = function (output, context
2323
2203
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2324
2204
  return [2, deserializeAws_restJson1ListQueuesCommandError(output, context)];
2325
2205
  }
2326
- contents = {
2206
+ contents = map({
2327
2207
  $metadata: deserializeMetadata(output),
2328
- NextToken: undefined,
2329
- Queues: undefined,
2330
- };
2208
+ });
2331
2209
  _a = __expectNonNull;
2332
2210
  _b = __expectObject;
2333
2211
  return [4, parseBody(output.body, context)];
2334
2212
  case 1:
2335
2213
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2336
- if (data.nextToken !== undefined && data.nextToken !== null) {
2214
+ if (data.nextToken != null) {
2337
2215
  contents.NextToken = __expectString(data.nextToken);
2338
2216
  }
2339
- if (data.queues !== undefined && data.queues !== null) {
2217
+ if (data.queues != null) {
2340
2218
  contents.Queues = deserializeAws_restJson1__listOfQueue(data.queues, context);
2341
2219
  }
2342
- return [2, Promise.resolve(contents)];
2220
+ return [2, contents];
2343
2221
  }
2344
2222
  });
2345
2223
  }); };
2346
2224
  var deserializeAws_restJson1ListQueuesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2347
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2225
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2348
2226
  var _c;
2349
2227
  return __generator(this, function (_d) {
2350
2228
  switch (_d.label) {
@@ -2385,14 +2263,14 @@ var deserializeAws_restJson1ListQueuesCommandError = function (output, context)
2385
2263
  case 13: throw _d.sent();
2386
2264
  case 14:
2387
2265
  parsedBody = parsedOutput.body;
2388
- $metadata = deserializeMetadata(output);
2389
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2390
- response = new __BaseException({
2391
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2392
- $fault: "client",
2393
- $metadata: $metadata,
2266
+ throwDefaultError({
2267
+ output: output,
2268
+ parsedBody: parsedBody,
2269
+ exceptionCtor: __BaseException,
2270
+ errorCode: errorCode,
2394
2271
  });
2395
- throw __decorateServiceException(response, parsedBody);
2272
+ _d.label = 15;
2273
+ case 15: return [2];
2396
2274
  }
2397
2275
  });
2398
2276
  }); };
@@ -2404,24 +2282,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
2404
2282
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2405
2283
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
2406
2284
  }
2407
- contents = {
2285
+ contents = map({
2408
2286
  $metadata: deserializeMetadata(output),
2409
- ResourceTags: undefined,
2410
- };
2287
+ });
2411
2288
  _a = __expectNonNull;
2412
2289
  _b = __expectObject;
2413
2290
  return [4, parseBody(output.body, context)];
2414
2291
  case 1:
2415
2292
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2416
- if (data.resourceTags !== undefined && data.resourceTags !== null) {
2293
+ if (data.resourceTags != null) {
2417
2294
  contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.resourceTags, context);
2418
2295
  }
2419
- return [2, Promise.resolve(contents)];
2296
+ return [2, contents];
2420
2297
  }
2421
2298
  });
2422
2299
  }); };
2423
2300
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2424
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2301
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2425
2302
  var _c;
2426
2303
  return __generator(this, function (_d) {
2427
2304
  switch (_d.label) {
@@ -2462,14 +2339,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2462
2339
  case 13: throw _d.sent();
2463
2340
  case 14:
2464
2341
  parsedBody = parsedOutput.body;
2465
- $metadata = deserializeMetadata(output);
2466
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2467
- response = new __BaseException({
2468
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2469
- $fault: "client",
2470
- $metadata: $metadata,
2342
+ throwDefaultError({
2343
+ output: output,
2344
+ parsedBody: parsedBody,
2345
+ exceptionCtor: __BaseException,
2346
+ errorCode: errorCode,
2471
2347
  });
2472
- throw __decorateServiceException(response, parsedBody);
2348
+ _d.label = 15;
2349
+ case 15: return [2];
2473
2350
  }
2474
2351
  });
2475
2352
  }); };
@@ -2481,24 +2358,23 @@ export var deserializeAws_restJson1PutPolicyCommand = function (output, context)
2481
2358
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2482
2359
  return [2, deserializeAws_restJson1PutPolicyCommandError(output, context)];
2483
2360
  }
2484
- contents = {
2361
+ contents = map({
2485
2362
  $metadata: deserializeMetadata(output),
2486
- Policy: undefined,
2487
- };
2363
+ });
2488
2364
  _a = __expectNonNull;
2489
2365
  _b = __expectObject;
2490
2366
  return [4, parseBody(output.body, context)];
2491
2367
  case 1:
2492
2368
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2493
- if (data.policy !== undefined && data.policy !== null) {
2369
+ if (data.policy != null) {
2494
2370
  contents.Policy = deserializeAws_restJson1Policy(data.policy, context);
2495
2371
  }
2496
- return [2, Promise.resolve(contents)];
2372
+ return [2, contents];
2497
2373
  }
2498
2374
  });
2499
2375
  }); };
2500
2376
  var deserializeAws_restJson1PutPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2501
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2377
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2502
2378
  var _c;
2503
2379
  return __generator(this, function (_d) {
2504
2380
  switch (_d.label) {
@@ -2539,14 +2415,14 @@ var deserializeAws_restJson1PutPolicyCommandError = function (output, context) {
2539
2415
  case 13: throw _d.sent();
2540
2416
  case 14:
2541
2417
  parsedBody = parsedOutput.body;
2542
- $metadata = deserializeMetadata(output);
2543
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2544
- response = new __BaseException({
2545
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2546
- $fault: "client",
2547
- $metadata: $metadata,
2418
+ throwDefaultError({
2419
+ output: output,
2420
+ parsedBody: parsedBody,
2421
+ exceptionCtor: __BaseException,
2422
+ errorCode: errorCode,
2548
2423
  });
2549
- throw __decorateServiceException(response, parsedBody);
2424
+ _d.label = 15;
2425
+ case 15: return [2];
2550
2426
  }
2551
2427
  });
2552
2428
  }); };
@@ -2558,18 +2434,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
2558
2434
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2559
2435
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
2560
2436
  }
2561
- contents = {
2437
+ contents = map({
2562
2438
  $metadata: deserializeMetadata(output),
2563
- };
2439
+ });
2564
2440
  return [4, collectBody(output.body, context)];
2565
2441
  case 1:
2566
2442
  _a.sent();
2567
- return [2, Promise.resolve(contents)];
2443
+ return [2, contents];
2568
2444
  }
2569
2445
  });
2570
2446
  }); };
2571
2447
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2572
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2448
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2573
2449
  var _c;
2574
2450
  return __generator(this, function (_d) {
2575
2451
  switch (_d.label) {
@@ -2610,14 +2486,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2610
2486
  case 13: throw _d.sent();
2611
2487
  case 14:
2612
2488
  parsedBody = parsedOutput.body;
2613
- $metadata = deserializeMetadata(output);
2614
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2615
- response = new __BaseException({
2616
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2617
- $fault: "client",
2618
- $metadata: $metadata,
2489
+ throwDefaultError({
2490
+ output: output,
2491
+ parsedBody: parsedBody,
2492
+ exceptionCtor: __BaseException,
2493
+ errorCode: errorCode,
2619
2494
  });
2620
- throw __decorateServiceException(response, parsedBody);
2495
+ _d.label = 15;
2496
+ case 15: return [2];
2621
2497
  }
2622
2498
  });
2623
2499
  }); };
@@ -2629,18 +2505,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
2629
2505
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2630
2506
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
2631
2507
  }
2632
- contents = {
2508
+ contents = map({
2633
2509
  $metadata: deserializeMetadata(output),
2634
- };
2510
+ });
2635
2511
  return [4, collectBody(output.body, context)];
2636
2512
  case 1:
2637
2513
  _a.sent();
2638
- return [2, Promise.resolve(contents)];
2514
+ return [2, contents];
2639
2515
  }
2640
2516
  });
2641
2517
  }); };
2642
2518
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2643
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2519
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2644
2520
  var _c;
2645
2521
  return __generator(this, function (_d) {
2646
2522
  switch (_d.label) {
@@ -2681,14 +2557,14 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2681
2557
  case 13: throw _d.sent();
2682
2558
  case 14:
2683
2559
  parsedBody = parsedOutput.body;
2684
- $metadata = deserializeMetadata(output);
2685
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2686
- response = new __BaseException({
2687
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2688
- $fault: "client",
2689
- $metadata: $metadata,
2560
+ throwDefaultError({
2561
+ output: output,
2562
+ parsedBody: parsedBody,
2563
+ exceptionCtor: __BaseException,
2564
+ errorCode: errorCode,
2690
2565
  });
2691
- throw __decorateServiceException(response, parsedBody);
2566
+ _d.label = 15;
2567
+ case 15: return [2];
2692
2568
  }
2693
2569
  });
2694
2570
  }); };
@@ -2700,24 +2576,23 @@ export var deserializeAws_restJson1UpdateJobTemplateCommand = function (output,
2700
2576
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2701
2577
  return [2, deserializeAws_restJson1UpdateJobTemplateCommandError(output, context)];
2702
2578
  }
2703
- contents = {
2579
+ contents = map({
2704
2580
  $metadata: deserializeMetadata(output),
2705
- JobTemplate: undefined,
2706
- };
2581
+ });
2707
2582
  _a = __expectNonNull;
2708
2583
  _b = __expectObject;
2709
2584
  return [4, parseBody(output.body, context)];
2710
2585
  case 1:
2711
2586
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2712
- if (data.jobTemplate !== undefined && data.jobTemplate !== null) {
2587
+ if (data.jobTemplate != null) {
2713
2588
  contents.JobTemplate = deserializeAws_restJson1JobTemplate(data.jobTemplate, context);
2714
2589
  }
2715
- return [2, Promise.resolve(contents)];
2590
+ return [2, contents];
2716
2591
  }
2717
2592
  });
2718
2593
  }); };
2719
2594
  var deserializeAws_restJson1UpdateJobTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2720
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2595
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2721
2596
  var _c;
2722
2597
  return __generator(this, function (_d) {
2723
2598
  switch (_d.label) {
@@ -2758,14 +2633,14 @@ var deserializeAws_restJson1UpdateJobTemplateCommandError = function (output, co
2758
2633
  case 13: throw _d.sent();
2759
2634
  case 14:
2760
2635
  parsedBody = parsedOutput.body;
2761
- $metadata = deserializeMetadata(output);
2762
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2763
- response = new __BaseException({
2764
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2765
- $fault: "client",
2766
- $metadata: $metadata,
2636
+ throwDefaultError({
2637
+ output: output,
2638
+ parsedBody: parsedBody,
2639
+ exceptionCtor: __BaseException,
2640
+ errorCode: errorCode,
2767
2641
  });
2768
- throw __decorateServiceException(response, parsedBody);
2642
+ _d.label = 15;
2643
+ case 15: return [2];
2769
2644
  }
2770
2645
  });
2771
2646
  }); };
@@ -2777,24 +2652,23 @@ export var deserializeAws_restJson1UpdatePresetCommand = function (output, conte
2777
2652
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2778
2653
  return [2, deserializeAws_restJson1UpdatePresetCommandError(output, context)];
2779
2654
  }
2780
- contents = {
2655
+ contents = map({
2781
2656
  $metadata: deserializeMetadata(output),
2782
- Preset: undefined,
2783
- };
2657
+ });
2784
2658
  _a = __expectNonNull;
2785
2659
  _b = __expectObject;
2786
2660
  return [4, parseBody(output.body, context)];
2787
2661
  case 1:
2788
2662
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2789
- if (data.preset !== undefined && data.preset !== null) {
2663
+ if (data.preset != null) {
2790
2664
  contents.Preset = deserializeAws_restJson1Preset(data.preset, context);
2791
2665
  }
2792
- return [2, Promise.resolve(contents)];
2666
+ return [2, contents];
2793
2667
  }
2794
2668
  });
2795
2669
  }); };
2796
2670
  var deserializeAws_restJson1UpdatePresetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2797
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2671
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2798
2672
  var _c;
2799
2673
  return __generator(this, function (_d) {
2800
2674
  switch (_d.label) {
@@ -2835,14 +2709,14 @@ var deserializeAws_restJson1UpdatePresetCommandError = function (output, context
2835
2709
  case 13: throw _d.sent();
2836
2710
  case 14:
2837
2711
  parsedBody = parsedOutput.body;
2838
- $metadata = deserializeMetadata(output);
2839
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2840
- response = new __BaseException({
2841
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2842
- $fault: "client",
2843
- $metadata: $metadata,
2712
+ throwDefaultError({
2713
+ output: output,
2714
+ parsedBody: parsedBody,
2715
+ exceptionCtor: __BaseException,
2716
+ errorCode: errorCode,
2844
2717
  });
2845
- throw __decorateServiceException(response, parsedBody);
2718
+ _d.label = 15;
2719
+ case 15: return [2];
2846
2720
  }
2847
2721
  });
2848
2722
  }); };
@@ -2854,24 +2728,23 @@ export var deserializeAws_restJson1UpdateQueueCommand = function (output, contex
2854
2728
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2855
2729
  return [2, deserializeAws_restJson1UpdateQueueCommandError(output, context)];
2856
2730
  }
2857
- contents = {
2731
+ contents = map({
2858
2732
  $metadata: deserializeMetadata(output),
2859
- Queue: undefined,
2860
- };
2733
+ });
2861
2734
  _a = __expectNonNull;
2862
2735
  _b = __expectObject;
2863
2736
  return [4, parseBody(output.body, context)];
2864
2737
  case 1:
2865
2738
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2866
- if (data.queue !== undefined && data.queue !== null) {
2739
+ if (data.queue != null) {
2867
2740
  contents.Queue = deserializeAws_restJson1Queue(data.queue, context);
2868
2741
  }
2869
- return [2, Promise.resolve(contents)];
2742
+ return [2, contents];
2870
2743
  }
2871
2744
  });
2872
2745
  }); };
2873
2746
  var deserializeAws_restJson1UpdateQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2874
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2747
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2875
2748
  var _c;
2876
2749
  return __generator(this, function (_d) {
2877
2750
  switch (_d.label) {
@@ -2912,23 +2785,24 @@ var deserializeAws_restJson1UpdateQueueCommandError = function (output, context)
2912
2785
  case 13: throw _d.sent();
2913
2786
  case 14:
2914
2787
  parsedBody = parsedOutput.body;
2915
- $metadata = deserializeMetadata(output);
2916
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2917
- response = new __BaseException({
2918
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2919
- $fault: "client",
2920
- $metadata: $metadata,
2788
+ throwDefaultError({
2789
+ output: output,
2790
+ parsedBody: parsedBody,
2791
+ exceptionCtor: __BaseException,
2792
+ errorCode: errorCode,
2921
2793
  });
2922
- throw __decorateServiceException(response, parsedBody);
2794
+ _d.label = 15;
2795
+ case 15: return [2];
2923
2796
  }
2924
2797
  });
2925
2798
  }); };
2799
+ var map = __map;
2926
2800
  var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2927
2801
  var contents, data, exception;
2928
2802
  return __generator(this, function (_a) {
2929
- contents = {};
2803
+ contents = map({});
2930
2804
  data = parsedOutput.body;
2931
- if (data.message !== undefined && data.message !== null) {
2805
+ if (data.message != null) {
2932
2806
  contents.Message = __expectString(data.message);
2933
2807
  }
2934
2808
  exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2938,9 +2812,9 @@ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput
2938
2812
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2939
2813
  var contents, data, exception;
2940
2814
  return __generator(this, function (_a) {
2941
- contents = {};
2815
+ contents = map({});
2942
2816
  data = parsedOutput.body;
2943
- if (data.message !== undefined && data.message !== null) {
2817
+ if (data.message != null) {
2944
2818
  contents.Message = __expectString(data.message);
2945
2819
  }
2946
2820
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2950,9 +2824,9 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
2950
2824
  var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2951
2825
  var contents, data, exception;
2952
2826
  return __generator(this, function (_a) {
2953
- contents = {};
2827
+ contents = map({});
2954
2828
  data = parsedOutput.body;
2955
- if (data.message !== undefined && data.message !== null) {
2829
+ if (data.message != null) {
2956
2830
  contents.Message = __expectString(data.message);
2957
2831
  }
2958
2832
  exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2962,9 +2836,9 @@ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput,
2962
2836
  var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2963
2837
  var contents, data, exception;
2964
2838
  return __generator(this, function (_a) {
2965
- contents = {};
2839
+ contents = map({});
2966
2840
  data = parsedOutput.body;
2967
- if (data.message !== undefined && data.message !== null) {
2841
+ if (data.message != null) {
2968
2842
  contents.Message = __expectString(data.message);
2969
2843
  }
2970
2844
  exception = new InternalServerErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2974,9 +2848,9 @@ var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (par
2974
2848
  var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2975
2849
  var contents, data, exception;
2976
2850
  return __generator(this, function (_a) {
2977
- contents = {};
2851
+ contents = map({});
2978
2852
  data = parsedOutput.body;
2979
- if (data.message !== undefined && data.message !== null) {
2853
+ if (data.message != null) {
2980
2854
  contents.Message = __expectString(data.message);
2981
2855
  }
2982
2856
  exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2986,9 +2860,9 @@ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput,
2986
2860
  var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2987
2861
  var contents, data, exception;
2988
2862
  return __generator(this, function (_a) {
2989
- contents = {};
2863
+ contents = map({});
2990
2864
  data = parsedOutput.body;
2991
- if (data.message !== undefined && data.message !== null) {
2865
+ if (data.message != null) {
2992
2866
  contents.Message = __expectString(data.message);
2993
2867
  }
2994
2868
  exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -2999,9 +2873,6 @@ var serializeAws_restJson1__listOf__doubleMinNegative60Max6 = function (input, c
2999
2873
  return input
3000
2874
  .filter(function (e) { return e != null; })
3001
2875
  .map(function (entry) {
3002
- if (entry === null) {
3003
- return null;
3004
- }
3005
2876
  return __serializeFloat(entry);
3006
2877
  });
3007
2878
  };
@@ -3009,9 +2880,6 @@ var serializeAws_restJson1__listOf__integerMin1Max2147483647 = function (input,
3009
2880
  return input
3010
2881
  .filter(function (e) { return e != null; })
3011
2882
  .map(function (entry) {
3012
- if (entry === null) {
3013
- return null;
3014
- }
3015
2883
  return entry;
3016
2884
  });
3017
2885
  };
@@ -3019,9 +2887,6 @@ var serializeAws_restJson1__listOf__integerMin32Max8182 = function (input, conte
3019
2887
  return input
3020
2888
  .filter(function (e) { return e != null; })
3021
2889
  .map(function (entry) {
3022
- if (entry === null) {
3023
- return null;
3024
- }
3025
2890
  return entry;
3026
2891
  });
3027
2892
  };
@@ -3029,9 +2894,6 @@ var serializeAws_restJson1__listOf__integerMinNegative60Max6 = function (input,
3029
2894
  return input
3030
2895
  .filter(function (e) { return e != null; })
3031
2896
  .map(function (entry) {
3032
- if (entry === null) {
3033
- return null;
3034
- }
3035
2897
  return entry;
3036
2898
  });
3037
2899
  };
@@ -3039,9 +2901,6 @@ var serializeAws_restJson1__listOf__string = function (input, context) {
3039
2901
  return input
3040
2902
  .filter(function (e) { return e != null; })
3041
2903
  .map(function (entry) {
3042
- if (entry === null) {
3043
- return null;
3044
- }
3045
2904
  return entry;
3046
2905
  });
3047
2906
  };
@@ -3049,9 +2908,6 @@ var serializeAws_restJson1__listOf__stringMin1 = function (input, context) {
3049
2908
  return input
3050
2909
  .filter(function (e) { return e != null; })
3051
2910
  .map(function (entry) {
3052
- if (entry === null) {
3053
- return null;
3054
- }
3055
2911
  return entry;
3056
2912
  });
3057
2913
  };
@@ -3059,9 +2915,6 @@ var serializeAws_restJson1__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF4
3059
2915
  return input
3060
2916
  .filter(function (e) { return e != null; })
3061
2917
  .map(function (entry) {
3062
- if (entry === null) {
3063
- return null;
3064
- }
3065
2918
  return entry;
3066
2919
  });
3067
2920
  };
@@ -3069,9 +2922,6 @@ var serializeAws_restJson1__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409a
3069
2922
  return input
3070
2923
  .filter(function (e) { return e != null; })
3071
2924
  .map(function (entry) {
3072
- if (entry === null) {
3073
- return null;
3074
- }
3075
2925
  return entry;
3076
2926
  });
3077
2927
  };
@@ -3079,9 +2929,6 @@ var serializeAws_restJson1__listOf__stringPatternS3ASSETMAPXml = function (input
3079
2929
  return input
3080
2930
  .filter(function (e) { return e != null; })
3081
2931
  .map(function (entry) {
3082
- if (entry === null) {
3083
- return null;
3084
- }
3085
2932
  return entry;
3086
2933
  });
3087
2934
  };
@@ -3089,9 +2936,6 @@ var serializeAws_restJson1__listOfAllowedRenditionSize = function (input, contex
3089
2936
  return input
3090
2937
  .filter(function (e) { return e != null; })
3091
2938
  .map(function (entry) {
3092
- if (entry === null) {
3093
- return null;
3094
- }
3095
2939
  return serializeAws_restJson1AllowedRenditionSize(entry, context);
3096
2940
  });
3097
2941
  };
@@ -3099,9 +2943,6 @@ var serializeAws_restJson1__listOfAudioDescription = function (input, context) {
3099
2943
  return input
3100
2944
  .filter(function (e) { return e != null; })
3101
2945
  .map(function (entry) {
3102
- if (entry === null) {
3103
- return null;
3104
- }
3105
2946
  return serializeAws_restJson1AudioDescription(entry, context);
3106
2947
  });
3107
2948
  };
@@ -3109,9 +2950,6 @@ var serializeAws_restJson1__listOfAutomatedAbrRule = function (input, context) {
3109
2950
  return input
3110
2951
  .filter(function (e) { return e != null; })
3111
2952
  .map(function (entry) {
3112
- if (entry === null) {
3113
- return null;
3114
- }
3115
2953
  return serializeAws_restJson1AutomatedAbrRule(entry, context);
3116
2954
  });
3117
2955
  };
@@ -3119,9 +2957,6 @@ var serializeAws_restJson1__listOfCaptionDescription = function (input, context)
3119
2957
  return input
3120
2958
  .filter(function (e) { return e != null; })
3121
2959
  .map(function (entry) {
3122
- if (entry === null) {
3123
- return null;
3124
- }
3125
2960
  return serializeAws_restJson1CaptionDescription(entry, context);
3126
2961
  });
3127
2962
  };
@@ -3129,9 +2964,6 @@ var serializeAws_restJson1__listOfCaptionDescriptionPreset = function (input, co
3129
2964
  return input
3130
2965
  .filter(function (e) { return e != null; })
3131
2966
  .map(function (entry) {
3132
- if (entry === null) {
3133
- return null;
3134
- }
3135
2967
  return serializeAws_restJson1CaptionDescriptionPreset(entry, context);
3136
2968
  });
3137
2969
  };
@@ -3139,9 +2971,6 @@ var serializeAws_restJson1__listOfCmafAdditionalManifest = function (input, cont
3139
2971
  return input
3140
2972
  .filter(function (e) { return e != null; })
3141
2973
  .map(function (entry) {
3142
- if (entry === null) {
3143
- return null;
3144
- }
3145
2974
  return serializeAws_restJson1CmafAdditionalManifest(entry, context);
3146
2975
  });
3147
2976
  };
@@ -3149,9 +2978,6 @@ var serializeAws_restJson1__listOfDashAdditionalManifest = function (input, cont
3149
2978
  return input
3150
2979
  .filter(function (e) { return e != null; })
3151
2980
  .map(function (entry) {
3152
- if (entry === null) {
3153
- return null;
3154
- }
3155
2981
  return serializeAws_restJson1DashAdditionalManifest(entry, context);
3156
2982
  });
3157
2983
  };
@@ -3159,9 +2985,6 @@ var serializeAws_restJson1__listOfForceIncludeRenditionSize = function (input, c
3159
2985
  return input
3160
2986
  .filter(function (e) { return e != null; })
3161
2987
  .map(function (entry) {
3162
- if (entry === null) {
3163
- return null;
3164
- }
3165
2988
  return serializeAws_restJson1ForceIncludeRenditionSize(entry, context);
3166
2989
  });
3167
2990
  };
@@ -3169,9 +2992,6 @@ var serializeAws_restJson1__listOfHlsAdditionalManifest = function (input, conte
3169
2992
  return input
3170
2993
  .filter(function (e) { return e != null; })
3171
2994
  .map(function (entry) {
3172
- if (entry === null) {
3173
- return null;
3174
- }
3175
2995
  return serializeAws_restJson1HlsAdditionalManifest(entry, context);
3176
2996
  });
3177
2997
  };
@@ -3179,9 +2999,6 @@ var serializeAws_restJson1__listOfHlsAdMarkers = function (input, context) {
3179
2999
  return input
3180
3000
  .filter(function (e) { return e != null; })
3181
3001
  .map(function (entry) {
3182
- if (entry === null) {
3183
- return null;
3184
- }
3185
3002
  return entry;
3186
3003
  });
3187
3004
  };
@@ -3189,9 +3006,6 @@ var serializeAws_restJson1__listOfHlsCaptionLanguageMapping = function (input, c
3189
3006
  return input
3190
3007
  .filter(function (e) { return e != null; })
3191
3008
  .map(function (entry) {
3192
- if (entry === null) {
3193
- return null;
3194
- }
3195
3009
  return serializeAws_restJson1HlsCaptionLanguageMapping(entry, context);
3196
3010
  });
3197
3011
  };
@@ -3199,9 +3013,6 @@ var serializeAws_restJson1__listOfHopDestination = function (input, context) {
3199
3013
  return input
3200
3014
  .filter(function (e) { return e != null; })
3201
3015
  .map(function (entry) {
3202
- if (entry === null) {
3203
- return null;
3204
- }
3205
3016
  return serializeAws_restJson1HopDestination(entry, context);
3206
3017
  });
3207
3018
  };
@@ -3209,9 +3020,6 @@ var serializeAws_restJson1__listOfId3Insertion = function (input, context) {
3209
3020
  return input
3210
3021
  .filter(function (e) { return e != null; })
3211
3022
  .map(function (entry) {
3212
- if (entry === null) {
3213
- return null;
3214
- }
3215
3023
  return serializeAws_restJson1Id3Insertion(entry, context);
3216
3024
  });
3217
3025
  };
@@ -3219,9 +3027,6 @@ var serializeAws_restJson1__listOfInput = function (input, context) {
3219
3027
  return input
3220
3028
  .filter(function (e) { return e != null; })
3221
3029
  .map(function (entry) {
3222
- if (entry === null) {
3223
- return null;
3224
- }
3225
3030
  return serializeAws_restJson1Input(entry, context);
3226
3031
  });
3227
3032
  };
@@ -3229,9 +3034,6 @@ var serializeAws_restJson1__listOfInputClipping = function (input, context) {
3229
3034
  return input
3230
3035
  .filter(function (e) { return e != null; })
3231
3036
  .map(function (entry) {
3232
- if (entry === null) {
3233
- return null;
3234
- }
3235
3037
  return serializeAws_restJson1InputClipping(entry, context);
3236
3038
  });
3237
3039
  };
@@ -3239,9 +3041,6 @@ var serializeAws_restJson1__listOfInputTemplate = function (input, context) {
3239
3041
  return input
3240
3042
  .filter(function (e) { return e != null; })
3241
3043
  .map(function (entry) {
3242
- if (entry === null) {
3243
- return null;
3244
- }
3245
3044
  return serializeAws_restJson1InputTemplate(entry, context);
3246
3045
  });
3247
3046
  };
@@ -3249,9 +3048,6 @@ var serializeAws_restJson1__listOfInsertableImage = function (input, context) {
3249
3048
  return input
3250
3049
  .filter(function (e) { return e != null; })
3251
3050
  .map(function (entry) {
3252
- if (entry === null) {
3253
- return null;
3254
- }
3255
3051
  return serializeAws_restJson1InsertableImage(entry, context);
3256
3052
  });
3257
3053
  };
@@ -3259,9 +3055,6 @@ var serializeAws_restJson1__listOfMsSmoothAdditionalManifest = function (input,
3259
3055
  return input
3260
3056
  .filter(function (e) { return e != null; })
3261
3057
  .map(function (entry) {
3262
- if (entry === null) {
3263
- return null;
3264
- }
3265
3058
  return serializeAws_restJson1MsSmoothAdditionalManifest(entry, context);
3266
3059
  });
3267
3060
  };
@@ -3269,9 +3062,6 @@ var serializeAws_restJson1__listOfOutput = function (input, context) {
3269
3062
  return input
3270
3063
  .filter(function (e) { return e != null; })
3271
3064
  .map(function (entry) {
3272
- if (entry === null) {
3273
- return null;
3274
- }
3275
3065
  return serializeAws_restJson1Output(entry, context);
3276
3066
  });
3277
3067
  };
@@ -3279,9 +3069,6 @@ var serializeAws_restJson1__listOfOutputChannelMapping = function (input, contex
3279
3069
  return input
3280
3070
  .filter(function (e) { return e != null; })
3281
3071
  .map(function (entry) {
3282
- if (entry === null) {
3283
- return null;
3284
- }
3285
3072
  return serializeAws_restJson1OutputChannelMapping(entry, context);
3286
3073
  });
3287
3074
  };
@@ -3289,9 +3076,6 @@ var serializeAws_restJson1__listOfOutputGroup = function (input, context) {
3289
3076
  return input
3290
3077
  .filter(function (e) { return e != null; })
3291
3078
  .map(function (entry) {
3292
- if (entry === null) {
3293
- return null;
3294
- }
3295
3079
  return serializeAws_restJson1OutputGroup(entry, context);
3296
3080
  });
3297
3081
  };
@@ -3299,9 +3083,6 @@ var serializeAws_restJson1__listOfTeletextPageType = function (input, context) {
3299
3083
  return input
3300
3084
  .filter(function (e) { return e != null; })
3301
3085
  .map(function (entry) {
3302
- if (entry === null) {
3303
- return null;
3304
- }
3305
3086
  return entry;
3306
3087
  });
3307
3088
  };