@aws-sdk/client-chime-sdk-media-pipelines 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.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { ChimeSDKMediaPipelinesServiceException as __BaseException } from "../models/ChimeSDKMediaPipelinesServiceException";
6
6
  import { BadRequestException, ForbiddenException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
@@ -32,7 +32,7 @@ export var serializeAws_restJson1CreateMediaCapturePipelineCommand = function (i
32
32
  });
33
33
  }); };
34
34
  export var serializeAws_restJson1DeleteMediaCapturePipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
35
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
35
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
36
36
  return __generator(this, function (_c) {
37
37
  switch (_c.label) {
38
38
  case 0: return [4, context.endpoint()];
@@ -41,16 +41,7 @@ export var serializeAws_restJson1DeleteMediaCapturePipelineCommand = function (i
41
41
  headers = {};
42
42
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
43
43
  "/sdk-media-capture-pipelines/{MediaPipelineId}";
44
- if (input.MediaPipelineId !== undefined) {
45
- labelValue = input.MediaPipelineId;
46
- if (labelValue.length <= 0) {
47
- throw new Error("Empty value provided for input HTTP label: MediaPipelineId.");
48
- }
49
- resolvedPath = resolvedPath.replace("{MediaPipelineId}", __extendedEncodeURIComponent(labelValue));
50
- }
51
- else {
52
- throw new Error("No value provided for input HTTP label: MediaPipelineId.");
53
- }
44
+ resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", function () { return input.MediaPipelineId; }, "{MediaPipelineId}", false);
54
45
  return [2, new __HttpRequest({
55
46
  protocol: protocol,
56
47
  hostname: hostname,
@@ -64,7 +55,7 @@ export var serializeAws_restJson1DeleteMediaCapturePipelineCommand = function (i
64
55
  });
65
56
  }); };
66
57
  export var serializeAws_restJson1GetMediaCapturePipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
67
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
58
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
68
59
  return __generator(this, function (_c) {
69
60
  switch (_c.label) {
70
61
  case 0: return [4, context.endpoint()];
@@ -73,16 +64,7 @@ export var serializeAws_restJson1GetMediaCapturePipelineCommand = function (inpu
73
64
  headers = {};
74
65
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
75
66
  "/sdk-media-capture-pipelines/{MediaPipelineId}";
76
- if (input.MediaPipelineId !== undefined) {
77
- labelValue = input.MediaPipelineId;
78
- if (labelValue.length <= 0) {
79
- throw new Error("Empty value provided for input HTTP label: MediaPipelineId.");
80
- }
81
- resolvedPath = resolvedPath.replace("{MediaPipelineId}", __extendedEncodeURIComponent(labelValue));
82
- }
83
- else {
84
- throw new Error("No value provided for input HTTP label: MediaPipelineId.");
85
- }
67
+ resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", function () { return input.MediaPipelineId; }, "{MediaPipelineId}", false);
86
68
  return [2, new __HttpRequest({
87
69
  protocol: protocol,
88
70
  hostname: hostname,
@@ -104,7 +86,10 @@ export var serializeAws_restJson1ListMediaCapturePipelinesCommand = function (in
104
86
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
105
87
  headers = {};
106
88
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-capture-pipelines";
107
- query = __assign(__assign({}, (input.NextToken !== undefined && { "next-token": input.NextToken })), (input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }));
89
+ query = map({
90
+ "next-token": [, input.NextToken],
91
+ "max-results": [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
92
+ });
108
93
  return [2, new __HttpRequest({
109
94
  protocol: protocol,
110
95
  hostname: hostname,
@@ -127,7 +112,9 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
127
112
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
128
113
  headers = {};
129
114
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags";
130
- query = __assign({}, (input.ResourceARN !== undefined && { arn: input.ResourceARN }));
115
+ query = map({
116
+ arn: [, input.ResourceARN],
117
+ });
131
118
  return [2, new __HttpRequest({
132
119
  protocol: protocol,
133
120
  hostname: hostname,
@@ -152,9 +139,9 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
152
139
  "content-type": "application/json",
153
140
  };
154
141
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags";
155
- query = {
156
- operation: "tag-resource",
157
- };
142
+ query = map({
143
+ operation: [, "tag-resource"],
144
+ });
158
145
  body = JSON.stringify(__assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
159
146
  return [2, new __HttpRequest({
160
147
  protocol: protocol,
@@ -180,9 +167,9 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
180
167
  "content-type": "application/json",
181
168
  };
182
169
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags";
183
- query = {
184
- operation: "untag-resource",
185
- };
170
+ query = map({
171
+ operation: [, "untag-resource"],
172
+ });
186
173
  body = JSON.stringify(__assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) })));
187
174
  return [2, new __HttpRequest({
188
175
  protocol: protocol,
@@ -205,24 +192,23 @@ export var deserializeAws_restJson1CreateMediaCapturePipelineCommand = function
205
192
  if (output.statusCode !== 201 && output.statusCode >= 300) {
206
193
  return [2, deserializeAws_restJson1CreateMediaCapturePipelineCommandError(output, context)];
207
194
  }
208
- contents = {
195
+ contents = map({
209
196
  $metadata: deserializeMetadata(output),
210
- MediaCapturePipeline: undefined,
211
- };
197
+ });
212
198
  _a = __expectNonNull;
213
199
  _b = __expectObject;
214
200
  return [4, parseBody(output.body, context)];
215
201
  case 1:
216
202
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
217
- if (data.MediaCapturePipeline !== undefined && data.MediaCapturePipeline !== null) {
203
+ if (data.MediaCapturePipeline != null) {
218
204
  contents.MediaCapturePipeline = deserializeAws_restJson1MediaCapturePipeline(data.MediaCapturePipeline, context);
219
205
  }
220
- return [2, Promise.resolve(contents)];
206
+ return [2, contents];
221
207
  }
222
208
  });
223
209
  }); };
224
210
  var deserializeAws_restJson1CreateMediaCapturePipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
225
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
211
+ var parsedOutput, _a, errorCode, _b, parsedBody;
226
212
  var _c;
227
213
  return __generator(this, function (_d) {
228
214
  switch (_d.label) {
@@ -267,14 +253,14 @@ var deserializeAws_restJson1CreateMediaCapturePipelineCommandError = function (o
267
253
  case 15: throw _d.sent();
268
254
  case 16:
269
255
  parsedBody = parsedOutput.body;
270
- $metadata = deserializeMetadata(output);
271
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
272
- response = new __BaseException({
273
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
274
- $fault: "client",
275
- $metadata: $metadata,
256
+ throwDefaultError({
257
+ output: output,
258
+ parsedBody: parsedBody,
259
+ exceptionCtor: __BaseException,
260
+ errorCode: errorCode,
276
261
  });
277
- throw __decorateServiceException(response, parsedBody);
262
+ _d.label = 17;
263
+ case 17: return [2];
278
264
  }
279
265
  });
280
266
  }); };
@@ -286,18 +272,18 @@ export var deserializeAws_restJson1DeleteMediaCapturePipelineCommand = function
286
272
  if (output.statusCode !== 204 && output.statusCode >= 300) {
287
273
  return [2, deserializeAws_restJson1DeleteMediaCapturePipelineCommandError(output, context)];
288
274
  }
289
- contents = {
275
+ contents = map({
290
276
  $metadata: deserializeMetadata(output),
291
- };
277
+ });
292
278
  return [4, collectBody(output.body, context)];
293
279
  case 1:
294
280
  _a.sent();
295
- return [2, Promise.resolve(contents)];
281
+ return [2, contents];
296
282
  }
297
283
  });
298
284
  }); };
299
285
  var deserializeAws_restJson1DeleteMediaCapturePipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
300
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
286
+ var parsedOutput, _a, errorCode, _b, parsedBody;
301
287
  var _c;
302
288
  return __generator(this, function (_d) {
303
289
  switch (_d.label) {
@@ -342,14 +328,14 @@ var deserializeAws_restJson1DeleteMediaCapturePipelineCommandError = function (o
342
328
  case 15: throw _d.sent();
343
329
  case 16:
344
330
  parsedBody = parsedOutput.body;
345
- $metadata = deserializeMetadata(output);
346
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
347
- response = new __BaseException({
348
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
349
- $fault: "client",
350
- $metadata: $metadata,
331
+ throwDefaultError({
332
+ output: output,
333
+ parsedBody: parsedBody,
334
+ exceptionCtor: __BaseException,
335
+ errorCode: errorCode,
351
336
  });
352
- throw __decorateServiceException(response, parsedBody);
337
+ _d.label = 17;
338
+ case 17: return [2];
353
339
  }
354
340
  });
355
341
  }); };
@@ -361,24 +347,23 @@ export var deserializeAws_restJson1GetMediaCapturePipelineCommand = function (ou
361
347
  if (output.statusCode !== 200 && output.statusCode >= 300) {
362
348
  return [2, deserializeAws_restJson1GetMediaCapturePipelineCommandError(output, context)];
363
349
  }
364
- contents = {
350
+ contents = map({
365
351
  $metadata: deserializeMetadata(output),
366
- MediaCapturePipeline: undefined,
367
- };
352
+ });
368
353
  _a = __expectNonNull;
369
354
  _b = __expectObject;
370
355
  return [4, parseBody(output.body, context)];
371
356
  case 1:
372
357
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
373
- if (data.MediaCapturePipeline !== undefined && data.MediaCapturePipeline !== null) {
358
+ if (data.MediaCapturePipeline != null) {
374
359
  contents.MediaCapturePipeline = deserializeAws_restJson1MediaCapturePipeline(data.MediaCapturePipeline, context);
375
360
  }
376
- return [2, Promise.resolve(contents)];
361
+ return [2, contents];
377
362
  }
378
363
  });
379
364
  }); };
380
365
  var deserializeAws_restJson1GetMediaCapturePipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
381
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
366
+ var parsedOutput, _a, errorCode, _b, parsedBody;
382
367
  var _c;
383
368
  return __generator(this, function (_d) {
384
369
  switch (_d.label) {
@@ -423,14 +408,14 @@ var deserializeAws_restJson1GetMediaCapturePipelineCommandError = function (outp
423
408
  case 15: throw _d.sent();
424
409
  case 16:
425
410
  parsedBody = parsedOutput.body;
426
- $metadata = deserializeMetadata(output);
427
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
428
- response = new __BaseException({
429
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
430
- $fault: "client",
431
- $metadata: $metadata,
411
+ throwDefaultError({
412
+ output: output,
413
+ parsedBody: parsedBody,
414
+ exceptionCtor: __BaseException,
415
+ errorCode: errorCode,
432
416
  });
433
- throw __decorateServiceException(response, parsedBody);
417
+ _d.label = 17;
418
+ case 17: return [2];
434
419
  }
435
420
  });
436
421
  }); };
@@ -442,28 +427,26 @@ export var deserializeAws_restJson1ListMediaCapturePipelinesCommand = function (
442
427
  if (output.statusCode !== 200 && output.statusCode >= 300) {
443
428
  return [2, deserializeAws_restJson1ListMediaCapturePipelinesCommandError(output, context)];
444
429
  }
445
- contents = {
430
+ contents = map({
446
431
  $metadata: deserializeMetadata(output),
447
- MediaCapturePipelines: undefined,
448
- NextToken: undefined,
449
- };
432
+ });
450
433
  _a = __expectNonNull;
451
434
  _b = __expectObject;
452
435
  return [4, parseBody(output.body, context)];
453
436
  case 1:
454
437
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
455
- if (data.MediaCapturePipelines !== undefined && data.MediaCapturePipelines !== null) {
438
+ if (data.MediaCapturePipelines != null) {
456
439
  contents.MediaCapturePipelines = deserializeAws_restJson1MediaCapturePipelineSummaryList(data.MediaCapturePipelines, context);
457
440
  }
458
- if (data.NextToken !== undefined && data.NextToken !== null) {
441
+ if (data.NextToken != null) {
459
442
  contents.NextToken = __expectString(data.NextToken);
460
443
  }
461
- return [2, Promise.resolve(contents)];
444
+ return [2, contents];
462
445
  }
463
446
  });
464
447
  }); };
465
448
  var deserializeAws_restJson1ListMediaCapturePipelinesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
466
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
449
+ var parsedOutput, _a, errorCode, _b, parsedBody;
467
450
  var _c;
468
451
  return __generator(this, function (_d) {
469
452
  switch (_d.label) {
@@ -508,14 +491,14 @@ var deserializeAws_restJson1ListMediaCapturePipelinesCommandError = function (ou
508
491
  case 15: throw _d.sent();
509
492
  case 16:
510
493
  parsedBody = parsedOutput.body;
511
- $metadata = deserializeMetadata(output);
512
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
513
- response = new __BaseException({
514
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
515
- $fault: "client",
516
- $metadata: $metadata,
494
+ throwDefaultError({
495
+ output: output,
496
+ parsedBody: parsedBody,
497
+ exceptionCtor: __BaseException,
498
+ errorCode: errorCode,
517
499
  });
518
- throw __decorateServiceException(response, parsedBody);
500
+ _d.label = 17;
501
+ case 17: return [2];
519
502
  }
520
503
  });
521
504
  }); };
@@ -527,24 +510,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
527
510
  if (output.statusCode !== 200 && output.statusCode >= 300) {
528
511
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
529
512
  }
530
- contents = {
513
+ contents = map({
531
514
  $metadata: deserializeMetadata(output),
532
- Tags: undefined,
533
- };
515
+ });
534
516
  _a = __expectNonNull;
535
517
  _b = __expectObject;
536
518
  return [4, parseBody(output.body, context)];
537
519
  case 1:
538
520
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
539
- if (data.Tags !== undefined && data.Tags !== null) {
521
+ if (data.Tags != null) {
540
522
  contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
541
523
  }
542
- return [2, Promise.resolve(contents)];
524
+ return [2, contents];
543
525
  }
544
526
  });
545
527
  }); };
546
528
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
547
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
529
+ var parsedOutput, _a, errorCode, _b, parsedBody;
548
530
  var _c;
549
531
  return __generator(this, function (_d) {
550
532
  switch (_d.label) {
@@ -589,14 +571,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
589
571
  case 15: throw _d.sent();
590
572
  case 16:
591
573
  parsedBody = parsedOutput.body;
592
- $metadata = deserializeMetadata(output);
593
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
594
- response = new __BaseException({
595
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
596
- $fault: "client",
597
- $metadata: $metadata,
574
+ throwDefaultError({
575
+ output: output,
576
+ parsedBody: parsedBody,
577
+ exceptionCtor: __BaseException,
578
+ errorCode: errorCode,
598
579
  });
599
- throw __decorateServiceException(response, parsedBody);
580
+ _d.label = 17;
581
+ case 17: return [2];
600
582
  }
601
583
  });
602
584
  }); };
@@ -608,18 +590,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
608
590
  if (output.statusCode !== 204 && output.statusCode >= 300) {
609
591
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
610
592
  }
611
- contents = {
593
+ contents = map({
612
594
  $metadata: deserializeMetadata(output),
613
- };
595
+ });
614
596
  return [4, collectBody(output.body, context)];
615
597
  case 1:
616
598
  _a.sent();
617
- return [2, Promise.resolve(contents)];
599
+ return [2, contents];
618
600
  }
619
601
  });
620
602
  }); };
621
603
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
622
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
604
+ var parsedOutput, _a, errorCode, _b, parsedBody;
623
605
  var _c;
624
606
  return __generator(this, function (_d) {
625
607
  switch (_d.label) {
@@ -664,14 +646,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
664
646
  case 15: throw _d.sent();
665
647
  case 16:
666
648
  parsedBody = parsedOutput.body;
667
- $metadata = deserializeMetadata(output);
668
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
669
- response = new __BaseException({
670
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
671
- $fault: "client",
672
- $metadata: $metadata,
649
+ throwDefaultError({
650
+ output: output,
651
+ parsedBody: parsedBody,
652
+ exceptionCtor: __BaseException,
653
+ errorCode: errorCode,
673
654
  });
674
- throw __decorateServiceException(response, parsedBody);
655
+ _d.label = 17;
656
+ case 17: return [2];
675
657
  }
676
658
  });
677
659
  }); };
@@ -683,18 +665,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
683
665
  if (output.statusCode !== 204 && output.statusCode >= 300) {
684
666
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
685
667
  }
686
- contents = {
668
+ contents = map({
687
669
  $metadata: deserializeMetadata(output),
688
- };
670
+ });
689
671
  return [4, collectBody(output.body, context)];
690
672
  case 1:
691
673
  _a.sent();
692
- return [2, Promise.resolve(contents)];
674
+ return [2, contents];
693
675
  }
694
676
  });
695
677
  }); };
696
678
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
697
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
679
+ var parsedOutput, _a, errorCode, _b, parsedBody;
698
680
  var _c;
699
681
  return __generator(this, function (_d) {
700
682
  switch (_d.label) {
@@ -739,29 +721,30 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
739
721
  case 15: throw _d.sent();
740
722
  case 16:
741
723
  parsedBody = parsedOutput.body;
742
- $metadata = deserializeMetadata(output);
743
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
744
- response = new __BaseException({
745
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
746
- $fault: "client",
747
- $metadata: $metadata,
724
+ throwDefaultError({
725
+ output: output,
726
+ parsedBody: parsedBody,
727
+ exceptionCtor: __BaseException,
728
+ errorCode: errorCode,
748
729
  });
749
- throw __decorateServiceException(response, parsedBody);
730
+ _d.label = 17;
731
+ case 17: return [2];
750
732
  }
751
733
  });
752
734
  }); };
735
+ var map = __map;
753
736
  var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
754
737
  var contents, data, exception;
755
738
  return __generator(this, function (_a) {
756
- contents = {};
739
+ contents = map({});
757
740
  data = parsedOutput.body;
758
- if (data.Code !== undefined && data.Code !== null) {
741
+ if (data.Code != null) {
759
742
  contents.Code = __expectString(data.Code);
760
743
  }
761
- if (data.Message !== undefined && data.Message !== null) {
744
+ if (data.Message != null) {
762
745
  contents.Message = __expectString(data.Message);
763
746
  }
764
- if (data.RequestId !== undefined && data.RequestId !== null) {
747
+ if (data.RequestId != null) {
765
748
  contents.RequestId = __expectString(data.RequestId);
766
749
  }
767
750
  exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -771,15 +754,15 @@ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput
771
754
  var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
772
755
  var contents, data, exception;
773
756
  return __generator(this, function (_a) {
774
- contents = {};
757
+ contents = map({});
775
758
  data = parsedOutput.body;
776
- if (data.Code !== undefined && data.Code !== null) {
759
+ if (data.Code != null) {
777
760
  contents.Code = __expectString(data.Code);
778
761
  }
779
- if (data.Message !== undefined && data.Message !== null) {
762
+ if (data.Message != null) {
780
763
  contents.Message = __expectString(data.Message);
781
764
  }
782
- if (data.RequestId !== undefined && data.RequestId !== null) {
765
+ if (data.RequestId != null) {
783
766
  contents.RequestId = __expectString(data.RequestId);
784
767
  }
785
768
  exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -789,15 +772,15 @@ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput,
789
772
  var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
790
773
  var contents, data, exception;
791
774
  return __generator(this, function (_a) {
792
- contents = {};
775
+ contents = map({});
793
776
  data = parsedOutput.body;
794
- if (data.Code !== undefined && data.Code !== null) {
777
+ if (data.Code != null) {
795
778
  contents.Code = __expectString(data.Code);
796
779
  }
797
- if (data.Message !== undefined && data.Message !== null) {
780
+ if (data.Message != null) {
798
781
  contents.Message = __expectString(data.Message);
799
782
  }
800
- if (data.RequestId !== undefined && data.RequestId !== null) {
783
+ if (data.RequestId != null) {
801
784
  contents.RequestId = __expectString(data.RequestId);
802
785
  }
803
786
  exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -807,15 +790,15 @@ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput,
807
790
  var deserializeAws_restJson1ResourceLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
808
791
  var contents, data, exception;
809
792
  return __generator(this, function (_a) {
810
- contents = {};
793
+ contents = map({});
811
794
  data = parsedOutput.body;
812
- if (data.Code !== undefined && data.Code !== null) {
795
+ if (data.Code != null) {
813
796
  contents.Code = __expectString(data.Code);
814
797
  }
815
- if (data.Message !== undefined && data.Message !== null) {
798
+ if (data.Message != null) {
816
799
  contents.Message = __expectString(data.Message);
817
800
  }
818
- if (data.RequestId !== undefined && data.RequestId !== null) {
801
+ if (data.RequestId != null) {
819
802
  contents.RequestId = __expectString(data.RequestId);
820
803
  }
821
804
  exception = new ResourceLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -825,15 +808,15 @@ var deserializeAws_restJson1ResourceLimitExceededExceptionResponse = function (p
825
808
  var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
826
809
  var contents, data, exception;
827
810
  return __generator(this, function (_a) {
828
- contents = {};
811
+ contents = map({});
829
812
  data = parsedOutput.body;
830
- if (data.Code !== undefined && data.Code !== null) {
813
+ if (data.Code != null) {
831
814
  contents.Code = __expectString(data.Code);
832
815
  }
833
- if (data.Message !== undefined && data.Message !== null) {
816
+ if (data.Message != null) {
834
817
  contents.Message = __expectString(data.Message);
835
818
  }
836
- if (data.RequestId !== undefined && data.RequestId !== null) {
819
+ if (data.RequestId != null) {
837
820
  contents.RequestId = __expectString(data.RequestId);
838
821
  }
839
822
  exception = new ServiceFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -843,15 +826,15 @@ var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOu
843
826
  var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
844
827
  var contents, data, exception;
845
828
  return __generator(this, function (_a) {
846
- contents = {};
829
+ contents = map({});
847
830
  data = parsedOutput.body;
848
- if (data.Code !== undefined && data.Code !== null) {
831
+ if (data.Code != null) {
849
832
  contents.Code = __expectString(data.Code);
850
833
  }
851
- if (data.Message !== undefined && data.Message !== null) {
834
+ if (data.Message != null) {
852
835
  contents.Message = __expectString(data.Message);
853
836
  }
854
- if (data.RequestId !== undefined && data.RequestId !== null) {
837
+ if (data.RequestId != null) {
855
838
  contents.RequestId = __expectString(data.RequestId);
856
839
  }
857
840
  exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -861,15 +844,15 @@ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (pars
861
844
  var deserializeAws_restJson1ThrottledClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
862
845
  var contents, data, exception;
863
846
  return __generator(this, function (_a) {
864
- contents = {};
847
+ contents = map({});
865
848
  data = parsedOutput.body;
866
- if (data.Code !== undefined && data.Code !== null) {
849
+ if (data.Code != null) {
867
850
  contents.Code = __expectString(data.Code);
868
851
  }
869
- if (data.Message !== undefined && data.Message !== null) {
852
+ if (data.Message != null) {
870
853
  contents.Message = __expectString(data.Message);
871
854
  }
872
- if (data.RequestId !== undefined && data.RequestId !== null) {
855
+ if (data.RequestId != null) {
873
856
  contents.RequestId = __expectString(data.RequestId);
874
857
  }
875
858
  exception = new ThrottledClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -879,15 +862,15 @@ var deserializeAws_restJson1ThrottledClientExceptionResponse = function (parsedO
879
862
  var deserializeAws_restJson1UnauthorizedClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
880
863
  var contents, data, exception;
881
864
  return __generator(this, function (_a) {
882
- contents = {};
865
+ contents = map({});
883
866
  data = parsedOutput.body;
884
- if (data.Code !== undefined && data.Code !== null) {
867
+ if (data.Code != null) {
885
868
  contents.Code = __expectString(data.Code);
886
869
  }
887
- if (data.Message !== undefined && data.Message !== null) {
870
+ if (data.Message != null) {
888
871
  contents.Message = __expectString(data.Message);
889
872
  }
890
- if (data.RequestId !== undefined && data.RequestId !== null) {
873
+ if (data.RequestId != null) {
891
874
  contents.RequestId = __expectString(data.RequestId);
892
875
  }
893
876
  exception = new UnauthorizedClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -903,9 +886,6 @@ var serializeAws_restJson1AttendeeIdList = function (input, context) {
903
886
  return input
904
887
  .filter(function (e) { return e != null; })
905
888
  .map(function (entry) {
906
- if (entry === null) {
907
- return null;
908
- }
909
889
  return entry;
910
890
  });
911
891
  };
@@ -926,9 +906,6 @@ var serializeAws_restJson1ExternalUserIdList = function (input, context) {
926
906
  return input
927
907
  .filter(function (e) { return e != null; })
928
908
  .map(function (entry) {
929
- if (entry === null) {
930
- return null;
931
- }
932
909
  return entry;
933
910
  });
934
911
  };
@@ -949,9 +926,6 @@ var serializeAws_restJson1TagKeyList = function (input, context) {
949
926
  return input
950
927
  .filter(function (e) { return e != null; })
951
928
  .map(function (entry) {
952
- if (entry === null) {
953
- return null;
954
- }
955
929
  return entry;
956
930
  });
957
931
  };
@@ -959,9 +933,6 @@ var serializeAws_restJson1TagList = function (input, context) {
959
933
  return input
960
934
  .filter(function (e) { return e != null; })
961
935
  .map(function (entry) {
962
- if (entry === null) {
963
- return null;
964
- }
965
936
  return serializeAws_restJson1Tag(entry, context);
966
937
  });
967
938
  };