@aws-sdk/client-mediapackage 3.310.0 → 3.315.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.
@@ -13,12 +13,10 @@ const se_ConfigureLogsCommand = async (input, context) => {
13
13
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}/configure_logs";
14
14
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.EgressAccessLogs != null && { egressAccessLogs: se_EgressAccessLogs(input.EgressAccessLogs, context) }),
18
- ...(input.IngressAccessLogs != null && {
19
- ingressAccessLogs: se_IngressAccessLogs(input.IngressAccessLogs, context),
20
- }),
21
- });
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
18
+ ingressAccessLogs: [, (_) => se_IngressAccessLogs(_, context), `IngressAccessLogs`],
19
+ }));
22
20
  return new protocol_http_1.HttpRequest({
23
21
  protocol,
24
22
  hostname,
@@ -37,11 +35,11 @@ const se_CreateChannelCommand = async (input, context) => {
37
35
  };
38
36
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
39
37
  let body;
40
- body = JSON.stringify({
41
- ...(input.Description != null && { description: input.Description }),
42
- ...(input.Id != null && { id: input.Id }),
43
- ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }),
44
- });
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ description: [, , `Description`],
40
+ id: [, , `Id`],
41
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
42
+ }));
45
43
  return new protocol_http_1.HttpRequest({
46
44
  protocol,
47
45
  hostname,
@@ -60,13 +58,13 @@ const se_CreateHarvestJobCommand = async (input, context) => {
60
58
  };
61
59
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs";
62
60
  let body;
63
- body = JSON.stringify({
64
- ...(input.EndTime != null && { endTime: input.EndTime }),
65
- ...(input.Id != null && { id: input.Id }),
66
- ...(input.OriginEndpointId != null && { originEndpointId: input.OriginEndpointId }),
67
- ...(input.S3Destination != null && { s3Destination: se_S3Destination(input.S3Destination, context) }),
68
- ...(input.StartTime != null && { startTime: input.StartTime }),
69
- });
61
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
62
+ endTime: [, , `EndTime`],
63
+ id: [, , `Id`],
64
+ originEndpointId: [, , `OriginEndpointId`],
65
+ s3Destination: [, (_) => se_S3Destination(_, context), `S3Destination`],
66
+ startTime: [, , `StartTime`],
67
+ }));
70
68
  return new protocol_http_1.HttpRequest({
71
69
  protocol,
72
70
  hostname,
@@ -85,24 +83,22 @@ const se_CreateOriginEndpointCommand = async (input, context) => {
85
83
  };
86
84
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints";
87
85
  let body;
88
- body = JSON.stringify({
89
- ...(input.Authorization != null && { authorization: se_Authorization(input.Authorization, context) }),
90
- ...(input.ChannelId != null && { channelId: input.ChannelId }),
91
- ...(input.CmafPackage != null && {
92
- cmafPackage: se_CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
93
- }),
94
- ...(input.DashPackage != null && { dashPackage: se_DashPackage(input.DashPackage, context) }),
95
- ...(input.Description != null && { description: input.Description }),
96
- ...(input.HlsPackage != null && { hlsPackage: se_HlsPackage(input.HlsPackage, context) }),
97
- ...(input.Id != null && { id: input.Id }),
98
- ...(input.ManifestName != null && { manifestName: input.ManifestName }),
99
- ...(input.MssPackage != null && { mssPackage: se_MssPackage(input.MssPackage, context) }),
100
- ...(input.Origination != null && { origination: input.Origination }),
101
- ...(input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds }),
102
- ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }),
103
- ...(input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds }),
104
- ...(input.Whitelist != null && { whitelist: se___listOf__string(input.Whitelist, context) }),
105
- });
86
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
87
+ authorization: [, (_) => se_Authorization(_, context), `Authorization`],
88
+ channelId: [, , `ChannelId`],
89
+ cmafPackage: [, (_) => se_CmafPackageCreateOrUpdateParameters(_, context), `CmafPackage`],
90
+ dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`],
91
+ description: [, , `Description`],
92
+ hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`],
93
+ id: [, , `Id`],
94
+ manifestName: [, , `ManifestName`],
95
+ mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`],
96
+ origination: [, , `Origination`],
97
+ startoverWindowSeconds: [, , `StartoverWindowSeconds`],
98
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
99
+ timeDelaySeconds: [, , `TimeDelaySeconds`],
100
+ whitelist: [, (_) => (0, smithy_client_1._json)(_), `Whitelist`],
101
+ }));
106
102
  return new protocol_http_1.HttpRequest({
107
103
  protocol,
108
104
  hostname,
@@ -203,7 +199,7 @@ const se_ListChannelsCommand = async (input, context) => {
203
199
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
200
  const headers = {};
205
201
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
206
- const query = map({
202
+ const query = (0, smithy_client_1.map)({
207
203
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
208
204
  nextToken: [, input.NextToken],
209
205
  });
@@ -224,7 +220,7 @@ const se_ListHarvestJobsCommand = async (input, context) => {
224
220
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
221
  const headers = {};
226
222
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs";
227
- const query = map({
223
+ const query = (0, smithy_client_1.map)({
228
224
  includeChannelId: [, input.IncludeChannelId],
229
225
  includeStatus: [, input.IncludeStatus],
230
226
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -247,7 +243,7 @@ const se_ListOriginEndpointsCommand = async (input, context) => {
247
243
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
248
244
  const headers = {};
249
245
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints";
250
- const query = map({
246
+ const query = (0, smithy_client_1.map)({
251
247
  channelId: [, input.ChannelId],
252
248
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
253
249
  nextToken: [, input.NextToken],
@@ -326,9 +322,9 @@ const se_TagResourceCommand = async (input, context) => {
326
322
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
327
323
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
328
324
  let body;
329
- body = JSON.stringify({
330
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
331
- });
325
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
326
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
327
+ }));
332
328
  return new protocol_http_1.HttpRequest({
333
329
  protocol,
334
330
  hostname,
@@ -345,7 +341,7 @@ const se_UntagResourceCommand = async (input, context) => {
345
341
  const headers = {};
346
342
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
347
343
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
348
- const query = map({
344
+ const query = (0, smithy_client_1.map)({
349
345
  tagKeys: [
350
346
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
351
347
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -372,9 +368,9 @@ const se_UpdateChannelCommand = async (input, context) => {
372
368
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
373
369
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
374
370
  let body;
375
- body = JSON.stringify({
376
- ...(input.Description != null && { description: input.Description }),
377
- });
371
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
372
+ description: [, , `Description`],
373
+ }));
378
374
  return new protocol_http_1.HttpRequest({
379
375
  protocol,
380
376
  hostname,
@@ -394,21 +390,19 @@ const se_UpdateOriginEndpointCommand = async (input, context) => {
394
390
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
395
391
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
396
392
  let body;
397
- body = JSON.stringify({
398
- ...(input.Authorization != null && { authorization: se_Authorization(input.Authorization, context) }),
399
- ...(input.CmafPackage != null && {
400
- cmafPackage: se_CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
401
- }),
402
- ...(input.DashPackage != null && { dashPackage: se_DashPackage(input.DashPackage, context) }),
403
- ...(input.Description != null && { description: input.Description }),
404
- ...(input.HlsPackage != null && { hlsPackage: se_HlsPackage(input.HlsPackage, context) }),
405
- ...(input.ManifestName != null && { manifestName: input.ManifestName }),
406
- ...(input.MssPackage != null && { mssPackage: se_MssPackage(input.MssPackage, context) }),
407
- ...(input.Origination != null && { origination: input.Origination }),
408
- ...(input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds }),
409
- ...(input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds }),
410
- ...(input.Whitelist != null && { whitelist: se___listOf__string(input.Whitelist, context) }),
411
- });
393
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
394
+ authorization: [, (_) => se_Authorization(_, context), `Authorization`],
395
+ cmafPackage: [, (_) => se_CmafPackageCreateOrUpdateParameters(_, context), `CmafPackage`],
396
+ dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`],
397
+ description: [, , `Description`],
398
+ hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`],
399
+ manifestName: [, , `ManifestName`],
400
+ mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`],
401
+ origination: [, , `Origination`],
402
+ startoverWindowSeconds: [, , `StartoverWindowSeconds`],
403
+ timeDelaySeconds: [, , `TimeDelaySeconds`],
404
+ whitelist: [, (_) => (0, smithy_client_1._json)(_), `Whitelist`],
405
+ }));
412
406
  return new protocol_http_1.HttpRequest({
413
407
  protocol,
414
408
  hostname,
@@ -424,34 +418,21 @@ const de_ConfigureLogsCommand = async (output, context) => {
424
418
  if (output.statusCode !== 200 && output.statusCode >= 300) {
425
419
  return de_ConfigureLogsCommandError(output, context);
426
420
  }
427
- const contents = map({
421
+ const contents = (0, smithy_client_1.map)({
428
422
  $metadata: deserializeMetadata(output),
429
423
  });
430
424
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
431
- if (data.arn != null) {
432
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
433
- }
434
- if (data.createdAt != null) {
435
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
436
- }
437
- if (data.description != null) {
438
- contents.Description = (0, smithy_client_1.expectString)(data.description);
439
- }
440
- if (data.egressAccessLogs != null) {
441
- contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context);
442
- }
443
- if (data.hlsIngest != null) {
444
- contents.HlsIngest = de_HlsIngest(data.hlsIngest, context);
445
- }
446
- if (data.id != null) {
447
- contents.Id = (0, smithy_client_1.expectString)(data.id);
448
- }
449
- if (data.ingressAccessLogs != null) {
450
- contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context);
451
- }
452
- if (data.tags != null) {
453
- contents.Tags = de_Tags(data.tags, context);
454
- }
425
+ const doc = (0, smithy_client_1.take)(data, {
426
+ Arn: [, smithy_client_1.expectString, `arn`],
427
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
428
+ Description: [, smithy_client_1.expectString, `description`],
429
+ EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
430
+ HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
431
+ Id: [, smithy_client_1.expectString, `id`],
432
+ IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
433
+ Tags: [, smithy_client_1._json, `tags`],
434
+ });
435
+ Object.assign(contents, doc);
455
436
  return contents;
456
437
  };
457
438
  exports.de_ConfigureLogsCommand = de_ConfigureLogsCommand;
@@ -482,10 +463,9 @@ const de_ConfigureLogsCommandError = async (output, context) => {
482
463
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
483
464
  default:
484
465
  const parsedBody = parsedOutput.body;
485
- (0, smithy_client_1.throwDefaultError)({
466
+ return throwDefaultError({
486
467
  output,
487
468
  parsedBody,
488
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
489
469
  errorCode,
490
470
  });
491
471
  }
@@ -494,34 +474,21 @@ const de_CreateChannelCommand = async (output, context) => {
494
474
  if (output.statusCode !== 200 && output.statusCode >= 300) {
495
475
  return de_CreateChannelCommandError(output, context);
496
476
  }
497
- const contents = map({
477
+ const contents = (0, smithy_client_1.map)({
498
478
  $metadata: deserializeMetadata(output),
499
479
  });
500
480
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
501
- if (data.arn != null) {
502
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
503
- }
504
- if (data.createdAt != null) {
505
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
506
- }
507
- if (data.description != null) {
508
- contents.Description = (0, smithy_client_1.expectString)(data.description);
509
- }
510
- if (data.egressAccessLogs != null) {
511
- contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context);
512
- }
513
- if (data.hlsIngest != null) {
514
- contents.HlsIngest = de_HlsIngest(data.hlsIngest, context);
515
- }
516
- if (data.id != null) {
517
- contents.Id = (0, smithy_client_1.expectString)(data.id);
518
- }
519
- if (data.ingressAccessLogs != null) {
520
- contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context);
521
- }
522
- if (data.tags != null) {
523
- contents.Tags = de_Tags(data.tags, context);
524
- }
481
+ const doc = (0, smithy_client_1.take)(data, {
482
+ Arn: [, smithy_client_1.expectString, `arn`],
483
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
484
+ Description: [, smithy_client_1.expectString, `description`],
485
+ EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
486
+ HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
487
+ Id: [, smithy_client_1.expectString, `id`],
488
+ IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
489
+ Tags: [, smithy_client_1._json, `tags`],
490
+ });
491
+ Object.assign(contents, doc);
525
492
  return contents;
526
493
  };
527
494
  exports.de_CreateChannelCommand = de_CreateChannelCommand;
@@ -552,10 +519,9 @@ const de_CreateChannelCommandError = async (output, context) => {
552
519
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
553
520
  default:
554
521
  const parsedBody = parsedOutput.body;
555
- (0, smithy_client_1.throwDefaultError)({
522
+ return throwDefaultError({
556
523
  output,
557
524
  parsedBody,
558
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
559
525
  errorCode,
560
526
  });
561
527
  }
@@ -564,37 +530,22 @@ const de_CreateHarvestJobCommand = async (output, context) => {
564
530
  if (output.statusCode !== 200 && output.statusCode >= 300) {
565
531
  return de_CreateHarvestJobCommandError(output, context);
566
532
  }
567
- const contents = map({
533
+ const contents = (0, smithy_client_1.map)({
568
534
  $metadata: deserializeMetadata(output),
569
535
  });
570
536
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
571
- if (data.arn != null) {
572
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
573
- }
574
- if (data.channelId != null) {
575
- contents.ChannelId = (0, smithy_client_1.expectString)(data.channelId);
576
- }
577
- if (data.createdAt != null) {
578
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
579
- }
580
- if (data.endTime != null) {
581
- contents.EndTime = (0, smithy_client_1.expectString)(data.endTime);
582
- }
583
- if (data.id != null) {
584
- contents.Id = (0, smithy_client_1.expectString)(data.id);
585
- }
586
- if (data.originEndpointId != null) {
587
- contents.OriginEndpointId = (0, smithy_client_1.expectString)(data.originEndpointId);
588
- }
589
- if (data.s3Destination != null) {
590
- contents.S3Destination = de_S3Destination(data.s3Destination, context);
591
- }
592
- if (data.startTime != null) {
593
- contents.StartTime = (0, smithy_client_1.expectString)(data.startTime);
594
- }
595
- if (data.status != null) {
596
- contents.Status = (0, smithy_client_1.expectString)(data.status);
597
- }
537
+ const doc = (0, smithy_client_1.take)(data, {
538
+ Arn: [, smithy_client_1.expectString, `arn`],
539
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
540
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
541
+ EndTime: [, smithy_client_1.expectString, `endTime`],
542
+ Id: [, smithy_client_1.expectString, `id`],
543
+ OriginEndpointId: [, smithy_client_1.expectString, `originEndpointId`],
544
+ S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`],
545
+ StartTime: [, smithy_client_1.expectString, `startTime`],
546
+ Status: [, smithy_client_1.expectString, `status`],
547
+ });
548
+ Object.assign(contents, doc);
598
549
  return contents;
599
550
  };
600
551
  exports.de_CreateHarvestJobCommand = de_CreateHarvestJobCommand;
@@ -625,10 +576,9 @@ const de_CreateHarvestJobCommandError = async (output, context) => {
625
576
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
626
577
  default:
627
578
  const parsedBody = parsedOutput.body;
628
- (0, smithy_client_1.throwDefaultError)({
579
+ return throwDefaultError({
629
580
  output,
630
581
  parsedBody,
631
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
632
582
  errorCode,
633
583
  });
634
584
  }
@@ -637,61 +587,30 @@ const de_CreateOriginEndpointCommand = async (output, context) => {
637
587
  if (output.statusCode !== 200 && output.statusCode >= 300) {
638
588
  return de_CreateOriginEndpointCommandError(output, context);
639
589
  }
640
- const contents = map({
590
+ const contents = (0, smithy_client_1.map)({
641
591
  $metadata: deserializeMetadata(output),
642
592
  });
643
593
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
644
- if (data.arn != null) {
645
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
646
- }
647
- if (data.authorization != null) {
648
- contents.Authorization = de_Authorization(data.authorization, context);
649
- }
650
- if (data.channelId != null) {
651
- contents.ChannelId = (0, smithy_client_1.expectString)(data.channelId);
652
- }
653
- if (data.cmafPackage != null) {
654
- contents.CmafPackage = de_CmafPackage(data.cmafPackage, context);
655
- }
656
- if (data.createdAt != null) {
657
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
658
- }
659
- if (data.dashPackage != null) {
660
- contents.DashPackage = de_DashPackage(data.dashPackage, context);
661
- }
662
- if (data.description != null) {
663
- contents.Description = (0, smithy_client_1.expectString)(data.description);
664
- }
665
- if (data.hlsPackage != null) {
666
- contents.HlsPackage = de_HlsPackage(data.hlsPackage, context);
667
- }
668
- if (data.id != null) {
669
- contents.Id = (0, smithy_client_1.expectString)(data.id);
670
- }
671
- if (data.manifestName != null) {
672
- contents.ManifestName = (0, smithy_client_1.expectString)(data.manifestName);
673
- }
674
- if (data.mssPackage != null) {
675
- contents.MssPackage = de_MssPackage(data.mssPackage, context);
676
- }
677
- if (data.origination != null) {
678
- contents.Origination = (0, smithy_client_1.expectString)(data.origination);
679
- }
680
- if (data.startoverWindowSeconds != null) {
681
- contents.StartoverWindowSeconds = (0, smithy_client_1.expectInt32)(data.startoverWindowSeconds);
682
- }
683
- if (data.tags != null) {
684
- contents.Tags = de_Tags(data.tags, context);
685
- }
686
- if (data.timeDelaySeconds != null) {
687
- contents.TimeDelaySeconds = (0, smithy_client_1.expectInt32)(data.timeDelaySeconds);
688
- }
689
- if (data.url != null) {
690
- contents.Url = (0, smithy_client_1.expectString)(data.url);
691
- }
692
- if (data.whitelist != null) {
693
- contents.Whitelist = de___listOf__string(data.whitelist, context);
694
- }
594
+ const doc = (0, smithy_client_1.take)(data, {
595
+ Arn: [, smithy_client_1.expectString, `arn`],
596
+ Authorization: [, (_) => de_Authorization(_, context), `authorization`],
597
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
598
+ CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
599
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
600
+ DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
601
+ Description: [, smithy_client_1.expectString, `description`],
602
+ HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
603
+ Id: [, smithy_client_1.expectString, `id`],
604
+ ManifestName: [, smithy_client_1.expectString, `manifestName`],
605
+ MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
606
+ Origination: [, smithy_client_1.expectString, `origination`],
607
+ StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
608
+ Tags: [, smithy_client_1._json, `tags`],
609
+ TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
610
+ Url: [, smithy_client_1.expectString, `url`],
611
+ Whitelist: [, smithy_client_1._json, `whitelist`],
612
+ });
613
+ Object.assign(contents, doc);
695
614
  return contents;
696
615
  };
697
616
  exports.de_CreateOriginEndpointCommand = de_CreateOriginEndpointCommand;
@@ -722,10 +641,9 @@ const de_CreateOriginEndpointCommandError = async (output, context) => {
722
641
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
723
642
  default:
724
643
  const parsedBody = parsedOutput.body;
725
- (0, smithy_client_1.throwDefaultError)({
644
+ return throwDefaultError({
726
645
  output,
727
646
  parsedBody,
728
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
729
647
  errorCode,
730
648
  });
731
649
  }
@@ -734,7 +652,7 @@ const de_DeleteChannelCommand = async (output, context) => {
734
652
  if (output.statusCode !== 202 && output.statusCode >= 300) {
735
653
  return de_DeleteChannelCommandError(output, context);
736
654
  }
737
- const contents = map({
655
+ const contents = (0, smithy_client_1.map)({
738
656
  $metadata: deserializeMetadata(output),
739
657
  });
740
658
  await collectBody(output.body, context);
@@ -768,10 +686,9 @@ const de_DeleteChannelCommandError = async (output, context) => {
768
686
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
769
687
  default:
770
688
  const parsedBody = parsedOutput.body;
771
- (0, smithy_client_1.throwDefaultError)({
689
+ return throwDefaultError({
772
690
  output,
773
691
  parsedBody,
774
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
775
692
  errorCode,
776
693
  });
777
694
  }
@@ -780,7 +697,7 @@ const de_DeleteOriginEndpointCommand = async (output, context) => {
780
697
  if (output.statusCode !== 202 && output.statusCode >= 300) {
781
698
  return de_DeleteOriginEndpointCommandError(output, context);
782
699
  }
783
- const contents = map({
700
+ const contents = (0, smithy_client_1.map)({
784
701
  $metadata: deserializeMetadata(output),
785
702
  });
786
703
  await collectBody(output.body, context);
@@ -814,10 +731,9 @@ const de_DeleteOriginEndpointCommandError = async (output, context) => {
814
731
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
815
732
  default:
816
733
  const parsedBody = parsedOutput.body;
817
- (0, smithy_client_1.throwDefaultError)({
734
+ return throwDefaultError({
818
735
  output,
819
736
  parsedBody,
820
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
821
737
  errorCode,
822
738
  });
823
739
  }
@@ -826,34 +742,21 @@ const de_DescribeChannelCommand = async (output, context) => {
826
742
  if (output.statusCode !== 200 && output.statusCode >= 300) {
827
743
  return de_DescribeChannelCommandError(output, context);
828
744
  }
829
- const contents = map({
745
+ const contents = (0, smithy_client_1.map)({
830
746
  $metadata: deserializeMetadata(output),
831
747
  });
832
748
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
833
- if (data.arn != null) {
834
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
835
- }
836
- if (data.createdAt != null) {
837
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
838
- }
839
- if (data.description != null) {
840
- contents.Description = (0, smithy_client_1.expectString)(data.description);
841
- }
842
- if (data.egressAccessLogs != null) {
843
- contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context);
844
- }
845
- if (data.hlsIngest != null) {
846
- contents.HlsIngest = de_HlsIngest(data.hlsIngest, context);
847
- }
848
- if (data.id != null) {
849
- contents.Id = (0, smithy_client_1.expectString)(data.id);
850
- }
851
- if (data.ingressAccessLogs != null) {
852
- contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context);
853
- }
854
- if (data.tags != null) {
855
- contents.Tags = de_Tags(data.tags, context);
856
- }
749
+ const doc = (0, smithy_client_1.take)(data, {
750
+ Arn: [, smithy_client_1.expectString, `arn`],
751
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
752
+ Description: [, smithy_client_1.expectString, `description`],
753
+ EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
754
+ HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
755
+ Id: [, smithy_client_1.expectString, `id`],
756
+ IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
757
+ Tags: [, smithy_client_1._json, `tags`],
758
+ });
759
+ Object.assign(contents, doc);
857
760
  return contents;
858
761
  };
859
762
  exports.de_DescribeChannelCommand = de_DescribeChannelCommand;
@@ -884,10 +787,9 @@ const de_DescribeChannelCommandError = async (output, context) => {
884
787
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
885
788
  default:
886
789
  const parsedBody = parsedOutput.body;
887
- (0, smithy_client_1.throwDefaultError)({
790
+ return throwDefaultError({
888
791
  output,
889
792
  parsedBody,
890
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
891
793
  errorCode,
892
794
  });
893
795
  }
@@ -896,37 +798,22 @@ const de_DescribeHarvestJobCommand = async (output, context) => {
896
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
897
799
  return de_DescribeHarvestJobCommandError(output, context);
898
800
  }
899
- const contents = map({
801
+ const contents = (0, smithy_client_1.map)({
900
802
  $metadata: deserializeMetadata(output),
901
803
  });
902
804
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
903
- if (data.arn != null) {
904
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
905
- }
906
- if (data.channelId != null) {
907
- contents.ChannelId = (0, smithy_client_1.expectString)(data.channelId);
908
- }
909
- if (data.createdAt != null) {
910
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
911
- }
912
- if (data.endTime != null) {
913
- contents.EndTime = (0, smithy_client_1.expectString)(data.endTime);
914
- }
915
- if (data.id != null) {
916
- contents.Id = (0, smithy_client_1.expectString)(data.id);
917
- }
918
- if (data.originEndpointId != null) {
919
- contents.OriginEndpointId = (0, smithy_client_1.expectString)(data.originEndpointId);
920
- }
921
- if (data.s3Destination != null) {
922
- contents.S3Destination = de_S3Destination(data.s3Destination, context);
923
- }
924
- if (data.startTime != null) {
925
- contents.StartTime = (0, smithy_client_1.expectString)(data.startTime);
926
- }
927
- if (data.status != null) {
928
- contents.Status = (0, smithy_client_1.expectString)(data.status);
929
- }
805
+ const doc = (0, smithy_client_1.take)(data, {
806
+ Arn: [, smithy_client_1.expectString, `arn`],
807
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
808
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
809
+ EndTime: [, smithy_client_1.expectString, `endTime`],
810
+ Id: [, smithy_client_1.expectString, `id`],
811
+ OriginEndpointId: [, smithy_client_1.expectString, `originEndpointId`],
812
+ S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`],
813
+ StartTime: [, smithy_client_1.expectString, `startTime`],
814
+ Status: [, smithy_client_1.expectString, `status`],
815
+ });
816
+ Object.assign(contents, doc);
930
817
  return contents;
931
818
  };
932
819
  exports.de_DescribeHarvestJobCommand = de_DescribeHarvestJobCommand;
@@ -957,10 +844,9 @@ const de_DescribeHarvestJobCommandError = async (output, context) => {
957
844
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
958
845
  default:
959
846
  const parsedBody = parsedOutput.body;
960
- (0, smithy_client_1.throwDefaultError)({
847
+ return throwDefaultError({
961
848
  output,
962
849
  parsedBody,
963
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
964
850
  errorCode,
965
851
  });
966
852
  }
@@ -969,61 +855,30 @@ const de_DescribeOriginEndpointCommand = async (output, context) => {
969
855
  if (output.statusCode !== 200 && output.statusCode >= 300) {
970
856
  return de_DescribeOriginEndpointCommandError(output, context);
971
857
  }
972
- const contents = map({
858
+ const contents = (0, smithy_client_1.map)({
973
859
  $metadata: deserializeMetadata(output),
974
860
  });
975
861
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
976
- if (data.arn != null) {
977
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
978
- }
979
- if (data.authorization != null) {
980
- contents.Authorization = de_Authorization(data.authorization, context);
981
- }
982
- if (data.channelId != null) {
983
- contents.ChannelId = (0, smithy_client_1.expectString)(data.channelId);
984
- }
985
- if (data.cmafPackage != null) {
986
- contents.CmafPackage = de_CmafPackage(data.cmafPackage, context);
987
- }
988
- if (data.createdAt != null) {
989
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
990
- }
991
- if (data.dashPackage != null) {
992
- contents.DashPackage = de_DashPackage(data.dashPackage, context);
993
- }
994
- if (data.description != null) {
995
- contents.Description = (0, smithy_client_1.expectString)(data.description);
996
- }
997
- if (data.hlsPackage != null) {
998
- contents.HlsPackage = de_HlsPackage(data.hlsPackage, context);
999
- }
1000
- if (data.id != null) {
1001
- contents.Id = (0, smithy_client_1.expectString)(data.id);
1002
- }
1003
- if (data.manifestName != null) {
1004
- contents.ManifestName = (0, smithy_client_1.expectString)(data.manifestName);
1005
- }
1006
- if (data.mssPackage != null) {
1007
- contents.MssPackage = de_MssPackage(data.mssPackage, context);
1008
- }
1009
- if (data.origination != null) {
1010
- contents.Origination = (0, smithy_client_1.expectString)(data.origination);
1011
- }
1012
- if (data.startoverWindowSeconds != null) {
1013
- contents.StartoverWindowSeconds = (0, smithy_client_1.expectInt32)(data.startoverWindowSeconds);
1014
- }
1015
- if (data.tags != null) {
1016
- contents.Tags = de_Tags(data.tags, context);
1017
- }
1018
- if (data.timeDelaySeconds != null) {
1019
- contents.TimeDelaySeconds = (0, smithy_client_1.expectInt32)(data.timeDelaySeconds);
1020
- }
1021
- if (data.url != null) {
1022
- contents.Url = (0, smithy_client_1.expectString)(data.url);
1023
- }
1024
- if (data.whitelist != null) {
1025
- contents.Whitelist = de___listOf__string(data.whitelist, context);
1026
- }
862
+ const doc = (0, smithy_client_1.take)(data, {
863
+ Arn: [, smithy_client_1.expectString, `arn`],
864
+ Authorization: [, (_) => de_Authorization(_, context), `authorization`],
865
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
866
+ CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
867
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
868
+ DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
869
+ Description: [, smithy_client_1.expectString, `description`],
870
+ HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
871
+ Id: [, smithy_client_1.expectString, `id`],
872
+ ManifestName: [, smithy_client_1.expectString, `manifestName`],
873
+ MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
874
+ Origination: [, smithy_client_1.expectString, `origination`],
875
+ StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
876
+ Tags: [, smithy_client_1._json, `tags`],
877
+ TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
878
+ Url: [, smithy_client_1.expectString, `url`],
879
+ Whitelist: [, smithy_client_1._json, `whitelist`],
880
+ });
881
+ Object.assign(contents, doc);
1027
882
  return contents;
1028
883
  };
1029
884
  exports.de_DescribeOriginEndpointCommand = de_DescribeOriginEndpointCommand;
@@ -1054,10 +909,9 @@ const de_DescribeOriginEndpointCommandError = async (output, context) => {
1054
909
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1055
910
  default:
1056
911
  const parsedBody = parsedOutput.body;
1057
- (0, smithy_client_1.throwDefaultError)({
912
+ return throwDefaultError({
1058
913
  output,
1059
914
  parsedBody,
1060
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1061
915
  errorCode,
1062
916
  });
1063
917
  }
@@ -1066,16 +920,15 @@ const de_ListChannelsCommand = async (output, context) => {
1066
920
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1067
921
  return de_ListChannelsCommandError(output, context);
1068
922
  }
1069
- const contents = map({
923
+ const contents = (0, smithy_client_1.map)({
1070
924
  $metadata: deserializeMetadata(output),
1071
925
  });
1072
926
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1073
- if (data.channels != null) {
1074
- contents.Channels = de___listOfChannel(data.channels, context);
1075
- }
1076
- if (data.nextToken != null) {
1077
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1078
- }
927
+ const doc = (0, smithy_client_1.take)(data, {
928
+ Channels: [, (_) => de___listOfChannel(_, context), `channels`],
929
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
930
+ });
931
+ Object.assign(contents, doc);
1079
932
  return contents;
1080
933
  };
1081
934
  exports.de_ListChannelsCommand = de_ListChannelsCommand;
@@ -1106,10 +959,9 @@ const de_ListChannelsCommandError = async (output, context) => {
1106
959
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1107
960
  default:
1108
961
  const parsedBody = parsedOutput.body;
1109
- (0, smithy_client_1.throwDefaultError)({
962
+ return throwDefaultError({
1110
963
  output,
1111
964
  parsedBody,
1112
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1113
965
  errorCode,
1114
966
  });
1115
967
  }
@@ -1118,16 +970,15 @@ const de_ListHarvestJobsCommand = async (output, context) => {
1118
970
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
971
  return de_ListHarvestJobsCommandError(output, context);
1120
972
  }
1121
- const contents = map({
973
+ const contents = (0, smithy_client_1.map)({
1122
974
  $metadata: deserializeMetadata(output),
1123
975
  });
1124
976
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1125
- if (data.harvestJobs != null) {
1126
- contents.HarvestJobs = de___listOfHarvestJob(data.harvestJobs, context);
1127
- }
1128
- if (data.nextToken != null) {
1129
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1130
- }
977
+ const doc = (0, smithy_client_1.take)(data, {
978
+ HarvestJobs: [, (_) => de___listOfHarvestJob(_, context), `harvestJobs`],
979
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
980
+ });
981
+ Object.assign(contents, doc);
1131
982
  return contents;
1132
983
  };
1133
984
  exports.de_ListHarvestJobsCommand = de_ListHarvestJobsCommand;
@@ -1158,10 +1009,9 @@ const de_ListHarvestJobsCommandError = async (output, context) => {
1158
1009
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1159
1010
  default:
1160
1011
  const parsedBody = parsedOutput.body;
1161
- (0, smithy_client_1.throwDefaultError)({
1012
+ return throwDefaultError({
1162
1013
  output,
1163
1014
  parsedBody,
1164
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1165
1015
  errorCode,
1166
1016
  });
1167
1017
  }
@@ -1170,16 +1020,15 @@ const de_ListOriginEndpointsCommand = async (output, context) => {
1170
1020
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1171
1021
  return de_ListOriginEndpointsCommandError(output, context);
1172
1022
  }
1173
- const contents = map({
1023
+ const contents = (0, smithy_client_1.map)({
1174
1024
  $metadata: deserializeMetadata(output),
1175
1025
  });
1176
1026
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1177
- if (data.nextToken != null) {
1178
- contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
1179
- }
1180
- if (data.originEndpoints != null) {
1181
- contents.OriginEndpoints = de___listOfOriginEndpoint(data.originEndpoints, context);
1182
- }
1027
+ const doc = (0, smithy_client_1.take)(data, {
1028
+ NextToken: [, smithy_client_1.expectString, `nextToken`],
1029
+ OriginEndpoints: [, (_) => de___listOfOriginEndpoint(_, context), `originEndpoints`],
1030
+ });
1031
+ Object.assign(contents, doc);
1183
1032
  return contents;
1184
1033
  };
1185
1034
  exports.de_ListOriginEndpointsCommand = de_ListOriginEndpointsCommand;
@@ -1210,10 +1059,9 @@ const de_ListOriginEndpointsCommandError = async (output, context) => {
1210
1059
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1211
1060
  default:
1212
1061
  const parsedBody = parsedOutput.body;
1213
- (0, smithy_client_1.throwDefaultError)({
1062
+ return throwDefaultError({
1214
1063
  output,
1215
1064
  parsedBody,
1216
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1217
1065
  errorCode,
1218
1066
  });
1219
1067
  }
@@ -1222,13 +1070,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1222
1070
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1223
1071
  return de_ListTagsForResourceCommandError(output, context);
1224
1072
  }
1225
- const contents = map({
1073
+ const contents = (0, smithy_client_1.map)({
1226
1074
  $metadata: deserializeMetadata(output),
1227
1075
  });
1228
1076
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1229
- if (data.tags != null) {
1230
- contents.Tags = de___mapOf__string(data.tags, context);
1231
- }
1077
+ const doc = (0, smithy_client_1.take)(data, {
1078
+ Tags: [, smithy_client_1._json, `tags`],
1079
+ });
1080
+ Object.assign(contents, doc);
1232
1081
  return contents;
1233
1082
  };
1234
1083
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1239,10 +1088,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1239
1088
  };
1240
1089
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1241
1090
  const parsedBody = parsedOutput.body;
1242
- (0, smithy_client_1.throwDefaultError)({
1091
+ return throwDefaultError({
1243
1092
  output,
1244
1093
  parsedBody,
1245
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1246
1094
  errorCode,
1247
1095
  });
1248
1096
  };
@@ -1250,34 +1098,21 @@ const de_RotateChannelCredentialsCommand = async (output, context) => {
1250
1098
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1251
1099
  return de_RotateChannelCredentialsCommandError(output, context);
1252
1100
  }
1253
- const contents = map({
1101
+ const contents = (0, smithy_client_1.map)({
1254
1102
  $metadata: deserializeMetadata(output),
1255
1103
  });
1256
1104
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1257
- if (data.arn != null) {
1258
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1259
- }
1260
- if (data.createdAt != null) {
1261
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
1262
- }
1263
- if (data.description != null) {
1264
- contents.Description = (0, smithy_client_1.expectString)(data.description);
1265
- }
1266
- if (data.egressAccessLogs != null) {
1267
- contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context);
1268
- }
1269
- if (data.hlsIngest != null) {
1270
- contents.HlsIngest = de_HlsIngest(data.hlsIngest, context);
1271
- }
1272
- if (data.id != null) {
1273
- contents.Id = (0, smithy_client_1.expectString)(data.id);
1274
- }
1275
- if (data.ingressAccessLogs != null) {
1276
- contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context);
1277
- }
1278
- if (data.tags != null) {
1279
- contents.Tags = de_Tags(data.tags, context);
1280
- }
1105
+ const doc = (0, smithy_client_1.take)(data, {
1106
+ Arn: [, smithy_client_1.expectString, `arn`],
1107
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1108
+ Description: [, smithy_client_1.expectString, `description`],
1109
+ EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
1110
+ HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
1111
+ Id: [, smithy_client_1.expectString, `id`],
1112
+ IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1113
+ Tags: [, smithy_client_1._json, `tags`],
1114
+ });
1115
+ Object.assign(contents, doc);
1281
1116
  return contents;
1282
1117
  };
1283
1118
  exports.de_RotateChannelCredentialsCommand = de_RotateChannelCredentialsCommand;
@@ -1308,10 +1143,9 @@ const de_RotateChannelCredentialsCommandError = async (output, context) => {
1308
1143
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1309
1144
  default:
1310
1145
  const parsedBody = parsedOutput.body;
1311
- (0, smithy_client_1.throwDefaultError)({
1146
+ return throwDefaultError({
1312
1147
  output,
1313
1148
  parsedBody,
1314
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1315
1149
  errorCode,
1316
1150
  });
1317
1151
  }
@@ -1320,34 +1154,21 @@ const de_RotateIngestEndpointCredentialsCommand = async (output, context) => {
1320
1154
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1321
1155
  return de_RotateIngestEndpointCredentialsCommandError(output, context);
1322
1156
  }
1323
- const contents = map({
1157
+ const contents = (0, smithy_client_1.map)({
1324
1158
  $metadata: deserializeMetadata(output),
1325
1159
  });
1326
1160
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1327
- if (data.arn != null) {
1328
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1329
- }
1330
- if (data.createdAt != null) {
1331
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
1332
- }
1333
- if (data.description != null) {
1334
- contents.Description = (0, smithy_client_1.expectString)(data.description);
1335
- }
1336
- if (data.egressAccessLogs != null) {
1337
- contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context);
1338
- }
1339
- if (data.hlsIngest != null) {
1340
- contents.HlsIngest = de_HlsIngest(data.hlsIngest, context);
1341
- }
1342
- if (data.id != null) {
1343
- contents.Id = (0, smithy_client_1.expectString)(data.id);
1344
- }
1345
- if (data.ingressAccessLogs != null) {
1346
- contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context);
1347
- }
1348
- if (data.tags != null) {
1349
- contents.Tags = de_Tags(data.tags, context);
1350
- }
1161
+ const doc = (0, smithy_client_1.take)(data, {
1162
+ Arn: [, smithy_client_1.expectString, `arn`],
1163
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1164
+ Description: [, smithy_client_1.expectString, `description`],
1165
+ EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
1166
+ HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
1167
+ Id: [, smithy_client_1.expectString, `id`],
1168
+ IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1169
+ Tags: [, smithy_client_1._json, `tags`],
1170
+ });
1171
+ Object.assign(contents, doc);
1351
1172
  return contents;
1352
1173
  };
1353
1174
  exports.de_RotateIngestEndpointCredentialsCommand = de_RotateIngestEndpointCredentialsCommand;
@@ -1378,10 +1199,9 @@ const de_RotateIngestEndpointCredentialsCommandError = async (output, context) =
1378
1199
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1379
1200
  default:
1380
1201
  const parsedBody = parsedOutput.body;
1381
- (0, smithy_client_1.throwDefaultError)({
1202
+ return throwDefaultError({
1382
1203
  output,
1383
1204
  parsedBody,
1384
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1385
1205
  errorCode,
1386
1206
  });
1387
1207
  }
@@ -1390,7 +1210,7 @@ const de_TagResourceCommand = async (output, context) => {
1390
1210
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1391
1211
  return de_TagResourceCommandError(output, context);
1392
1212
  }
1393
- const contents = map({
1213
+ const contents = (0, smithy_client_1.map)({
1394
1214
  $metadata: deserializeMetadata(output),
1395
1215
  });
1396
1216
  await collectBody(output.body, context);
@@ -1404,10 +1224,9 @@ const de_TagResourceCommandError = async (output, context) => {
1404
1224
  };
1405
1225
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1406
1226
  const parsedBody = parsedOutput.body;
1407
- (0, smithy_client_1.throwDefaultError)({
1227
+ return throwDefaultError({
1408
1228
  output,
1409
1229
  parsedBody,
1410
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1411
1230
  errorCode,
1412
1231
  });
1413
1232
  };
@@ -1415,7 +1234,7 @@ const de_UntagResourceCommand = async (output, context) => {
1415
1234
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1416
1235
  return de_UntagResourceCommandError(output, context);
1417
1236
  }
1418
- const contents = map({
1237
+ const contents = (0, smithy_client_1.map)({
1419
1238
  $metadata: deserializeMetadata(output),
1420
1239
  });
1421
1240
  await collectBody(output.body, context);
@@ -1429,10 +1248,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1429
1248
  };
1430
1249
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1431
1250
  const parsedBody = parsedOutput.body;
1432
- (0, smithy_client_1.throwDefaultError)({
1251
+ return throwDefaultError({
1433
1252
  output,
1434
1253
  parsedBody,
1435
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1436
1254
  errorCode,
1437
1255
  });
1438
1256
  };
@@ -1440,34 +1258,21 @@ const de_UpdateChannelCommand = async (output, context) => {
1440
1258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1441
1259
  return de_UpdateChannelCommandError(output, context);
1442
1260
  }
1443
- const contents = map({
1261
+ const contents = (0, smithy_client_1.map)({
1444
1262
  $metadata: deserializeMetadata(output),
1445
1263
  });
1446
1264
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1447
- if (data.arn != null) {
1448
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1449
- }
1450
- if (data.createdAt != null) {
1451
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
1452
- }
1453
- if (data.description != null) {
1454
- contents.Description = (0, smithy_client_1.expectString)(data.description);
1455
- }
1456
- if (data.egressAccessLogs != null) {
1457
- contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context);
1458
- }
1459
- if (data.hlsIngest != null) {
1460
- contents.HlsIngest = de_HlsIngest(data.hlsIngest, context);
1461
- }
1462
- if (data.id != null) {
1463
- contents.Id = (0, smithy_client_1.expectString)(data.id);
1464
- }
1465
- if (data.ingressAccessLogs != null) {
1466
- contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context);
1467
- }
1468
- if (data.tags != null) {
1469
- contents.Tags = de_Tags(data.tags, context);
1470
- }
1265
+ const doc = (0, smithy_client_1.take)(data, {
1266
+ Arn: [, smithy_client_1.expectString, `arn`],
1267
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1268
+ Description: [, smithy_client_1.expectString, `description`],
1269
+ EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
1270
+ HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
1271
+ Id: [, smithy_client_1.expectString, `id`],
1272
+ IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1273
+ Tags: [, smithy_client_1._json, `tags`],
1274
+ });
1275
+ Object.assign(contents, doc);
1471
1276
  return contents;
1472
1277
  };
1473
1278
  exports.de_UpdateChannelCommand = de_UpdateChannelCommand;
@@ -1498,10 +1303,9 @@ const de_UpdateChannelCommandError = async (output, context) => {
1498
1303
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1499
1304
  default:
1500
1305
  const parsedBody = parsedOutput.body;
1501
- (0, smithy_client_1.throwDefaultError)({
1306
+ return throwDefaultError({
1502
1307
  output,
1503
1308
  parsedBody,
1504
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1505
1309
  errorCode,
1506
1310
  });
1507
1311
  }
@@ -1510,61 +1314,30 @@ const de_UpdateOriginEndpointCommand = async (output, context) => {
1510
1314
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
1315
  return de_UpdateOriginEndpointCommandError(output, context);
1512
1316
  }
1513
- const contents = map({
1317
+ const contents = (0, smithy_client_1.map)({
1514
1318
  $metadata: deserializeMetadata(output),
1515
1319
  });
1516
1320
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1517
- if (data.arn != null) {
1518
- contents.Arn = (0, smithy_client_1.expectString)(data.arn);
1519
- }
1520
- if (data.authorization != null) {
1521
- contents.Authorization = de_Authorization(data.authorization, context);
1522
- }
1523
- if (data.channelId != null) {
1524
- contents.ChannelId = (0, smithy_client_1.expectString)(data.channelId);
1525
- }
1526
- if (data.cmafPackage != null) {
1527
- contents.CmafPackage = de_CmafPackage(data.cmafPackage, context);
1528
- }
1529
- if (data.createdAt != null) {
1530
- contents.CreatedAt = (0, smithy_client_1.expectString)(data.createdAt);
1531
- }
1532
- if (data.dashPackage != null) {
1533
- contents.DashPackage = de_DashPackage(data.dashPackage, context);
1534
- }
1535
- if (data.description != null) {
1536
- contents.Description = (0, smithy_client_1.expectString)(data.description);
1537
- }
1538
- if (data.hlsPackage != null) {
1539
- contents.HlsPackage = de_HlsPackage(data.hlsPackage, context);
1540
- }
1541
- if (data.id != null) {
1542
- contents.Id = (0, smithy_client_1.expectString)(data.id);
1543
- }
1544
- if (data.manifestName != null) {
1545
- contents.ManifestName = (0, smithy_client_1.expectString)(data.manifestName);
1546
- }
1547
- if (data.mssPackage != null) {
1548
- contents.MssPackage = de_MssPackage(data.mssPackage, context);
1549
- }
1550
- if (data.origination != null) {
1551
- contents.Origination = (0, smithy_client_1.expectString)(data.origination);
1552
- }
1553
- if (data.startoverWindowSeconds != null) {
1554
- contents.StartoverWindowSeconds = (0, smithy_client_1.expectInt32)(data.startoverWindowSeconds);
1555
- }
1556
- if (data.tags != null) {
1557
- contents.Tags = de_Tags(data.tags, context);
1558
- }
1559
- if (data.timeDelaySeconds != null) {
1560
- contents.TimeDelaySeconds = (0, smithy_client_1.expectInt32)(data.timeDelaySeconds);
1561
- }
1562
- if (data.url != null) {
1563
- contents.Url = (0, smithy_client_1.expectString)(data.url);
1564
- }
1565
- if (data.whitelist != null) {
1566
- contents.Whitelist = de___listOf__string(data.whitelist, context);
1567
- }
1321
+ const doc = (0, smithy_client_1.take)(data, {
1322
+ Arn: [, smithy_client_1.expectString, `arn`],
1323
+ Authorization: [, (_) => de_Authorization(_, context), `authorization`],
1324
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
1325
+ CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
1326
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1327
+ DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
1328
+ Description: [, smithy_client_1.expectString, `description`],
1329
+ HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
1330
+ Id: [, smithy_client_1.expectString, `id`],
1331
+ ManifestName: [, smithy_client_1.expectString, `manifestName`],
1332
+ MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
1333
+ Origination: [, smithy_client_1.expectString, `origination`],
1334
+ StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
1335
+ Tags: [, smithy_client_1._json, `tags`],
1336
+ TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
1337
+ Url: [, smithy_client_1.expectString, `url`],
1338
+ Whitelist: [, smithy_client_1._json, `whitelist`],
1339
+ });
1340
+ Object.assign(contents, doc);
1568
1341
  return contents;
1569
1342
  };
1570
1343
  exports.de_UpdateOriginEndpointCommand = de_UpdateOriginEndpointCommand;
@@ -1595,21 +1368,21 @@ const de_UpdateOriginEndpointCommandError = async (output, context) => {
1595
1368
  throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1596
1369
  default:
1597
1370
  const parsedBody = parsedOutput.body;
1598
- (0, smithy_client_1.throwDefaultError)({
1371
+ return throwDefaultError({
1599
1372
  output,
1600
1373
  parsedBody,
1601
- exceptionCtor: MediaPackageServiceException_1.MediaPackageServiceException,
1602
1374
  errorCode,
1603
1375
  });
1604
1376
  }
1605
1377
  };
1606
- const map = smithy_client_1.map;
1378
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MediaPackageServiceException_1.MediaPackageServiceException);
1607
1379
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1608
- const contents = map({});
1380
+ const contents = (0, smithy_client_1.map)({});
1609
1381
  const data = parsedOutput.body;
1610
- if (data.message != null) {
1611
- contents.Message = (0, smithy_client_1.expectString)(data.message);
1612
- }
1382
+ const doc = (0, smithy_client_1.take)(data, {
1383
+ Message: [, smithy_client_1.expectString, `message`],
1384
+ });
1385
+ Object.assign(contents, doc);
1613
1386
  const exception = new models_0_1.ForbiddenException({
1614
1387
  $metadata: deserializeMetadata(parsedOutput),
1615
1388
  ...contents,
@@ -1617,11 +1390,12 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1617
1390
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1618
1391
  };
1619
1392
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1620
- const contents = map({});
1393
+ const contents = (0, smithy_client_1.map)({});
1621
1394
  const data = parsedOutput.body;
1622
- if (data.message != null) {
1623
- contents.Message = (0, smithy_client_1.expectString)(data.message);
1624
- }
1395
+ const doc = (0, smithy_client_1.take)(data, {
1396
+ Message: [, smithy_client_1.expectString, `message`],
1397
+ });
1398
+ Object.assign(contents, doc);
1625
1399
  const exception = new models_0_1.InternalServerErrorException({
1626
1400
  $metadata: deserializeMetadata(parsedOutput),
1627
1401
  ...contents,
@@ -1629,11 +1403,12 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1629
1403
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1630
1404
  };
1631
1405
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1632
- const contents = map({});
1406
+ const contents = (0, smithy_client_1.map)({});
1633
1407
  const data = parsedOutput.body;
1634
- if (data.message != null) {
1635
- contents.Message = (0, smithy_client_1.expectString)(data.message);
1636
- }
1408
+ const doc = (0, smithy_client_1.take)(data, {
1409
+ Message: [, smithy_client_1.expectString, `message`],
1410
+ });
1411
+ Object.assign(contents, doc);
1637
1412
  const exception = new models_0_1.NotFoundException({
1638
1413
  $metadata: deserializeMetadata(parsedOutput),
1639
1414
  ...contents,
@@ -1641,11 +1416,12 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1641
1416
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1642
1417
  };
1643
1418
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1644
- const contents = map({});
1419
+ const contents = (0, smithy_client_1.map)({});
1645
1420
  const data = parsedOutput.body;
1646
- if (data.message != null) {
1647
- contents.Message = (0, smithy_client_1.expectString)(data.message);
1648
- }
1421
+ const doc = (0, smithy_client_1.take)(data, {
1422
+ Message: [, smithy_client_1.expectString, `message`],
1423
+ });
1424
+ Object.assign(contents, doc);
1649
1425
  const exception = new models_0_1.ServiceUnavailableException({
1650
1426
  $metadata: deserializeMetadata(parsedOutput),
1651
1427
  ...contents,
@@ -1653,11 +1429,12 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1653
1429
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1654
1430
  };
1655
1431
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1656
- const contents = map({});
1432
+ const contents = (0, smithy_client_1.map)({});
1657
1433
  const data = parsedOutput.body;
1658
- if (data.message != null) {
1659
- contents.Message = (0, smithy_client_1.expectString)(data.message);
1660
- }
1434
+ const doc = (0, smithy_client_1.take)(data, {
1435
+ Message: [, smithy_client_1.expectString, `message`],
1436
+ });
1437
+ Object.assign(contents, doc);
1661
1438
  const exception = new models_0_1.TooManyRequestsException({
1662
1439
  $metadata: deserializeMetadata(parsedOutput),
1663
1440
  ...contents,
@@ -1665,31 +1442,18 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1665
1442
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1666
1443
  };
1667
1444
  const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
1668
- const contents = map({});
1445
+ const contents = (0, smithy_client_1.map)({});
1669
1446
  const data = parsedOutput.body;
1670
- if (data.message != null) {
1671
- contents.Message = (0, smithy_client_1.expectString)(data.message);
1672
- }
1447
+ const doc = (0, smithy_client_1.take)(data, {
1448
+ Message: [, smithy_client_1.expectString, `message`],
1449
+ });
1450
+ Object.assign(contents, doc);
1673
1451
  const exception = new models_0_1.UnprocessableEntityException({
1674
1452
  $metadata: deserializeMetadata(parsedOutput),
1675
1453
  ...contents,
1676
1454
  });
1677
1455
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1678
1456
  };
1679
- const se___listOf__PeriodTriggersElement = (input, context) => {
1680
- return input
1681
- .filter((e) => e != null)
1682
- .map((entry) => {
1683
- return entry;
1684
- });
1685
- };
1686
- const se___listOf__string = (input, context) => {
1687
- return input
1688
- .filter((e) => e != null)
1689
- .map((entry) => {
1690
- return entry;
1691
- });
1692
- };
1693
1457
  const se___listOfHlsManifestCreateOrUpdateParameters = (input, context) => {
1694
1458
  return input
1695
1459
  .filter((e) => e != null)
@@ -1697,216 +1461,154 @@ const se___listOfHlsManifestCreateOrUpdateParameters = (input, context) => {
1697
1461
  return se_HlsManifestCreateOrUpdateParameters(entry, context);
1698
1462
  });
1699
1463
  };
1700
- const se___mapOf__string = (input, context) => {
1701
- return Object.entries(input).reduce((acc, [key, value]) => {
1702
- if (value === null) {
1703
- return acc;
1704
- }
1705
- acc[key] = value;
1706
- return acc;
1707
- }, {});
1708
- };
1709
- const se_AdTriggers = (input, context) => {
1710
- return input
1711
- .filter((e) => e != null)
1712
- .map((entry) => {
1713
- return entry;
1714
- });
1715
- };
1716
1464
  const se_Authorization = (input, context) => {
1717
- return {
1718
- ...(input.CdnIdentifierSecret != null && { cdnIdentifierSecret: input.CdnIdentifierSecret }),
1719
- ...(input.SecretsRoleArn != null && { secretsRoleArn: input.SecretsRoleArn }),
1720
- };
1465
+ return (0, smithy_client_1.take)(input, {
1466
+ cdnIdentifierSecret: [, , `CdnIdentifierSecret`],
1467
+ secretsRoleArn: [, , `SecretsRoleArn`],
1468
+ });
1721
1469
  };
1722
1470
  const se_CmafEncryption = (input, context) => {
1723
- return {
1724
- ...(input.ConstantInitializationVector != null && {
1725
- constantInitializationVector: input.ConstantInitializationVector,
1726
- }),
1727
- ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }),
1728
- ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
1729
- ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }),
1730
- };
1471
+ return (0, smithy_client_1.take)(input, {
1472
+ constantInitializationVector: [, , `ConstantInitializationVector`],
1473
+ encryptionMethod: [, , `EncryptionMethod`],
1474
+ keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`],
1475
+ spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1476
+ });
1731
1477
  };
1732
1478
  const se_CmafPackageCreateOrUpdateParameters = (input, context) => {
1733
- return {
1734
- ...(input.Encryption != null && { encryption: se_CmafEncryption(input.Encryption, context) }),
1735
- ...(input.HlsManifests != null && {
1736
- hlsManifests: se___listOfHlsManifestCreateOrUpdateParameters(input.HlsManifests, context),
1737
- }),
1738
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1739
- ...(input.SegmentPrefix != null && { segmentPrefix: input.SegmentPrefix }),
1740
- ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }),
1741
- };
1479
+ return (0, smithy_client_1.take)(input, {
1480
+ encryption: [, (_) => se_CmafEncryption(_, context), `Encryption`],
1481
+ hlsManifests: [, (_) => se___listOfHlsManifestCreateOrUpdateParameters(_, context), `HlsManifests`],
1482
+ segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1483
+ segmentPrefix: [, , `SegmentPrefix`],
1484
+ streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1485
+ });
1742
1486
  };
1743
1487
  const se_DashEncryption = (input, context) => {
1744
- return {
1745
- ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
1746
- ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }),
1747
- };
1488
+ return (0, smithy_client_1.take)(input, {
1489
+ keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`],
1490
+ spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1491
+ });
1748
1492
  };
1749
1493
  const se_DashPackage = (input, context) => {
1750
- return {
1751
- ...(input.AdTriggers != null && { adTriggers: se_AdTriggers(input.AdTriggers, context) }),
1752
- ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
1753
- ...(input.Encryption != null && { encryption: se_DashEncryption(input.Encryption, context) }),
1754
- ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1755
- ...(input.ManifestLayout != null && { manifestLayout: input.ManifestLayout }),
1756
- ...(input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds }),
1757
- ...(input.MinBufferTimeSeconds != null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }),
1758
- ...(input.MinUpdatePeriodSeconds != null && { minUpdatePeriodSeconds: input.MinUpdatePeriodSeconds }),
1759
- ...(input.PeriodTriggers != null && {
1760
- periodTriggers: se___listOf__PeriodTriggersElement(input.PeriodTriggers, context),
1761
- }),
1762
- ...(input.Profile != null && { profile: input.Profile }),
1763
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1764
- ...(input.SegmentTemplateFormat != null && { segmentTemplateFormat: input.SegmentTemplateFormat }),
1765
- ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }),
1766
- ...(input.SuggestedPresentationDelaySeconds != null && {
1767
- suggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds,
1768
- }),
1769
- ...(input.UtcTiming != null && { utcTiming: input.UtcTiming }),
1770
- ...(input.UtcTimingUri != null && { utcTimingUri: input.UtcTimingUri }),
1771
- };
1494
+ return (0, smithy_client_1.take)(input, {
1495
+ adTriggers: [, smithy_client_1._json, `AdTriggers`],
1496
+ adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`],
1497
+ encryption: [, (_) => se_DashEncryption(_, context), `Encryption`],
1498
+ includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
1499
+ manifestLayout: [, , `ManifestLayout`],
1500
+ manifestWindowSeconds: [, , `ManifestWindowSeconds`],
1501
+ minBufferTimeSeconds: [, , `MinBufferTimeSeconds`],
1502
+ minUpdatePeriodSeconds: [, , `MinUpdatePeriodSeconds`],
1503
+ periodTriggers: [, smithy_client_1._json, `PeriodTriggers`],
1504
+ profile: [, , `Profile`],
1505
+ segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1506
+ segmentTemplateFormat: [, , `SegmentTemplateFormat`],
1507
+ streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1508
+ suggestedPresentationDelaySeconds: [, , `SuggestedPresentationDelaySeconds`],
1509
+ utcTiming: [, , `UtcTiming`],
1510
+ utcTimingUri: [, , `UtcTimingUri`],
1511
+ });
1772
1512
  };
1773
1513
  const se_EgressAccessLogs = (input, context) => {
1774
- return {
1775
- ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }),
1776
- };
1514
+ return (0, smithy_client_1.take)(input, {
1515
+ logGroupName: [, , `LogGroupName`],
1516
+ });
1777
1517
  };
1778
1518
  const se_EncryptionContractConfiguration = (input, context) => {
1779
- return {
1780
- ...(input.PresetSpeke20Audio != null && { presetSpeke20Audio: input.PresetSpeke20Audio }),
1781
- ...(input.PresetSpeke20Video != null && { presetSpeke20Video: input.PresetSpeke20Video }),
1782
- };
1519
+ return (0, smithy_client_1.take)(input, {
1520
+ presetSpeke20Audio: [, , `PresetSpeke20Audio`],
1521
+ presetSpeke20Video: [, , `PresetSpeke20Video`],
1522
+ });
1783
1523
  };
1784
1524
  const se_HlsEncryption = (input, context) => {
1785
- return {
1786
- ...(input.ConstantInitializationVector != null && {
1787
- constantInitializationVector: input.ConstantInitializationVector,
1788
- }),
1789
- ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }),
1790
- ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
1791
- ...(input.RepeatExtXKey != null && { repeatExtXKey: input.RepeatExtXKey }),
1792
- ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }),
1793
- };
1525
+ return (0, smithy_client_1.take)(input, {
1526
+ constantInitializationVector: [, , `ConstantInitializationVector`],
1527
+ encryptionMethod: [, , `EncryptionMethod`],
1528
+ keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`],
1529
+ repeatExtXKey: [, , `RepeatExtXKey`],
1530
+ spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1531
+ });
1794
1532
  };
1795
1533
  const se_HlsManifestCreateOrUpdateParameters = (input, context) => {
1796
- return {
1797
- ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }),
1798
- ...(input.AdTriggers != null && { adTriggers: se_AdTriggers(input.AdTriggers, context) }),
1799
- ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
1800
- ...(input.Id != null && { id: input.Id }),
1801
- ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1802
- ...(input.ManifestName != null && { manifestName: input.ManifestName }),
1803
- ...(input.PlaylistType != null && { playlistType: input.PlaylistType }),
1804
- ...(input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds }),
1805
- ...(input.ProgramDateTimeIntervalSeconds != null && {
1806
- programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
1807
- }),
1808
- };
1534
+ return (0, smithy_client_1.take)(input, {
1535
+ adMarkers: [, , `AdMarkers`],
1536
+ adTriggers: [, smithy_client_1._json, `AdTriggers`],
1537
+ adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`],
1538
+ id: [, , `Id`],
1539
+ includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
1540
+ manifestName: [, , `ManifestName`],
1541
+ playlistType: [, , `PlaylistType`],
1542
+ playlistWindowSeconds: [, , `PlaylistWindowSeconds`],
1543
+ programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`],
1544
+ });
1809
1545
  };
1810
1546
  const se_HlsPackage = (input, context) => {
1811
- return {
1812
- ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }),
1813
- ...(input.AdTriggers != null && { adTriggers: se_AdTriggers(input.AdTriggers, context) }),
1814
- ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
1815
- ...(input.Encryption != null && { encryption: se_HlsEncryption(input.Encryption, context) }),
1816
- ...(input.IncludeDvbSubtitles != null && { includeDvbSubtitles: input.IncludeDvbSubtitles }),
1817
- ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1818
- ...(input.PlaylistType != null && { playlistType: input.PlaylistType }),
1819
- ...(input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds }),
1820
- ...(input.ProgramDateTimeIntervalSeconds != null && {
1821
- programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
1822
- }),
1823
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1824
- ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }),
1825
- ...(input.UseAudioRenditionGroup != null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }),
1826
- };
1547
+ return (0, smithy_client_1.take)(input, {
1548
+ adMarkers: [, , `AdMarkers`],
1549
+ adTriggers: [, smithy_client_1._json, `AdTriggers`],
1550
+ adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`],
1551
+ encryption: [, (_) => se_HlsEncryption(_, context), `Encryption`],
1552
+ includeDvbSubtitles: [, , `IncludeDvbSubtitles`],
1553
+ includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
1554
+ playlistType: [, , `PlaylistType`],
1555
+ playlistWindowSeconds: [, , `PlaylistWindowSeconds`],
1556
+ programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`],
1557
+ segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1558
+ streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1559
+ useAudioRenditionGroup: [, , `UseAudioRenditionGroup`],
1560
+ });
1827
1561
  };
1828
1562
  const se_IngressAccessLogs = (input, context) => {
1829
- return {
1830
- ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }),
1831
- };
1563
+ return (0, smithy_client_1.take)(input, {
1564
+ logGroupName: [, , `LogGroupName`],
1565
+ });
1832
1566
  };
1833
1567
  const se_MssEncryption = (input, context) => {
1834
- return {
1835
- ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }),
1836
- };
1568
+ return (0, smithy_client_1.take)(input, {
1569
+ spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1570
+ });
1837
1571
  };
1838
1572
  const se_MssPackage = (input, context) => {
1839
- return {
1840
- ...(input.Encryption != null && { encryption: se_MssEncryption(input.Encryption, context) }),
1841
- ...(input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds }),
1842
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1843
- ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }),
1844
- };
1573
+ return (0, smithy_client_1.take)(input, {
1574
+ encryption: [, (_) => se_MssEncryption(_, context), `Encryption`],
1575
+ manifestWindowSeconds: [, , `ManifestWindowSeconds`],
1576
+ segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1577
+ streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1578
+ });
1845
1579
  };
1846
1580
  const se_S3Destination = (input, context) => {
1847
- return {
1848
- ...(input.BucketName != null && { bucketName: input.BucketName }),
1849
- ...(input.ManifestKey != null && { manifestKey: input.ManifestKey }),
1850
- ...(input.RoleArn != null && { roleArn: input.RoleArn }),
1851
- };
1581
+ return (0, smithy_client_1.take)(input, {
1582
+ bucketName: [, , `BucketName`],
1583
+ manifestKey: [, , `ManifestKey`],
1584
+ roleArn: [, , `RoleArn`],
1585
+ });
1852
1586
  };
1853
1587
  const se_SpekeKeyProvider = (input, context) => {
1854
- return {
1855
- ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }),
1856
- ...(input.EncryptionContractConfiguration != null && {
1857
- encryptionContractConfiguration: se_EncryptionContractConfiguration(input.EncryptionContractConfiguration, context),
1858
- }),
1859
- ...(input.ResourceId != null && { resourceId: input.ResourceId }),
1860
- ...(input.RoleArn != null && { roleArn: input.RoleArn }),
1861
- ...(input.SystemIds != null && { systemIds: se___listOf__string(input.SystemIds, context) }),
1862
- ...(input.Url != null && { url: input.Url }),
1863
- };
1864
- };
1865
- const se_StreamSelection = (input, context) => {
1866
- return {
1867
- ...(input.MaxVideoBitsPerSecond != null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }),
1868
- ...(input.MinVideoBitsPerSecond != null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }),
1869
- ...(input.StreamOrder != null && { streamOrder: input.StreamOrder }),
1870
- };
1871
- };
1872
- const se_Tags = (input, context) => {
1873
- return Object.entries(input).reduce((acc, [key, value]) => {
1874
- if (value === null) {
1875
- return acc;
1876
- }
1877
- acc[key] = value;
1878
- return acc;
1879
- }, {});
1880
- };
1881
- const de___listOf__PeriodTriggersElement = (output, context) => {
1882
- const retVal = (output || [])
1883
- .filter((e) => e != null)
1884
- .map((entry) => {
1885
- if (entry === null) {
1886
- return null;
1887
- }
1888
- return (0, smithy_client_1.expectString)(entry);
1588
+ return (0, smithy_client_1.take)(input, {
1589
+ certificateArn: [, , `CertificateArn`],
1590
+ encryptionContractConfiguration: [
1591
+ ,
1592
+ (_) => se_EncryptionContractConfiguration(_, context),
1593
+ `EncryptionContractConfiguration`,
1594
+ ],
1595
+ resourceId: [, , `ResourceId`],
1596
+ roleArn: [, , `RoleArn`],
1597
+ systemIds: [, smithy_client_1._json, `SystemIds`],
1598
+ url: [, , `Url`],
1889
1599
  });
1890
- return retVal;
1891
1600
  };
1892
- const de___listOf__string = (output, context) => {
1893
- const retVal = (output || [])
1894
- .filter((e) => e != null)
1895
- .map((entry) => {
1896
- if (entry === null) {
1897
- return null;
1898
- }
1899
- return (0, smithy_client_1.expectString)(entry);
1601
+ const se_StreamSelection = (input, context) => {
1602
+ return (0, smithy_client_1.take)(input, {
1603
+ maxVideoBitsPerSecond: [, , `MaxVideoBitsPerSecond`],
1604
+ minVideoBitsPerSecond: [, , `MinVideoBitsPerSecond`],
1605
+ streamOrder: [, , `StreamOrder`],
1900
1606
  });
1901
- return retVal;
1902
1607
  };
1903
1608
  const de___listOfChannel = (output, context) => {
1904
1609
  const retVal = (output || [])
1905
1610
  .filter((e) => e != null)
1906
1611
  .map((entry) => {
1907
- if (entry === null) {
1908
- return null;
1909
- }
1910
1612
  return de_Channel(entry, context);
1911
1613
  });
1912
1614
  return retVal;
@@ -1915,9 +1617,6 @@ const de___listOfHarvestJob = (output, context) => {
1915
1617
  const retVal = (output || [])
1916
1618
  .filter((e) => e != null)
1917
1619
  .map((entry) => {
1918
- if (entry === null) {
1919
- return null;
1920
- }
1921
1620
  return de_HarvestJob(entry, context);
1922
1621
  });
1923
1622
  return retVal;
@@ -1926,9 +1625,6 @@ const de___listOfHlsManifest = (output, context) => {
1926
1625
  const retVal = (output || [])
1927
1626
  .filter((e) => e != null)
1928
1627
  .map((entry) => {
1929
- if (entry === null) {
1930
- return null;
1931
- }
1932
1628
  return de_HlsManifest(entry, context);
1933
1629
  });
1934
1630
  return retVal;
@@ -1937,9 +1633,6 @@ const de___listOfIngestEndpoint = (output, context) => {
1937
1633
  const retVal = (output || [])
1938
1634
  .filter((e) => e != null)
1939
1635
  .map((entry) => {
1940
- if (entry === null) {
1941
- return null;
1942
- }
1943
1636
  return de_IngestEndpoint(entry, context);
1944
1637
  });
1945
1638
  return retVal;
@@ -1948,243 +1641,213 @@ const de___listOfOriginEndpoint = (output, context) => {
1948
1641
  const retVal = (output || [])
1949
1642
  .filter((e) => e != null)
1950
1643
  .map((entry) => {
1951
- if (entry === null) {
1952
- return null;
1953
- }
1954
1644
  return de_OriginEndpoint(entry, context);
1955
1645
  });
1956
1646
  return retVal;
1957
1647
  };
1958
- const de___mapOf__string = (output, context) => {
1959
- return Object.entries(output).reduce((acc, [key, value]) => {
1960
- if (value === null) {
1961
- return acc;
1962
- }
1963
- acc[key] = (0, smithy_client_1.expectString)(value);
1964
- return acc;
1965
- }, {});
1966
- };
1967
- const de_AdTriggers = (output, context) => {
1968
- const retVal = (output || [])
1969
- .filter((e) => e != null)
1970
- .map((entry) => {
1971
- if (entry === null) {
1972
- return null;
1973
- }
1974
- return (0, smithy_client_1.expectString)(entry);
1975
- });
1976
- return retVal;
1977
- };
1978
1648
  const de_Authorization = (output, context) => {
1979
- return {
1980
- CdnIdentifierSecret: (0, smithy_client_1.expectString)(output.cdnIdentifierSecret),
1981
- SecretsRoleArn: (0, smithy_client_1.expectString)(output.secretsRoleArn),
1982
- };
1649
+ return (0, smithy_client_1.take)(output, {
1650
+ CdnIdentifierSecret: [, smithy_client_1.expectString, `cdnIdentifierSecret`],
1651
+ SecretsRoleArn: [, smithy_client_1.expectString, `secretsRoleArn`],
1652
+ });
1983
1653
  };
1984
1654
  const de_Channel = (output, context) => {
1985
- return {
1986
- Arn: (0, smithy_client_1.expectString)(output.arn),
1987
- CreatedAt: (0, smithy_client_1.expectString)(output.createdAt),
1988
- Description: (0, smithy_client_1.expectString)(output.description),
1989
- EgressAccessLogs: output.egressAccessLogs != null ? de_EgressAccessLogs(output.egressAccessLogs, context) : undefined,
1990
- HlsIngest: output.hlsIngest != null ? de_HlsIngest(output.hlsIngest, context) : undefined,
1991
- Id: (0, smithy_client_1.expectString)(output.id),
1992
- IngressAccessLogs: output.ingressAccessLogs != null ? de_IngressAccessLogs(output.ingressAccessLogs, context) : undefined,
1993
- Tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
1994
- };
1655
+ return (0, smithy_client_1.take)(output, {
1656
+ Arn: [, smithy_client_1.expectString, `arn`],
1657
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1658
+ Description: [, smithy_client_1.expectString, `description`],
1659
+ EgressAccessLogs: (_) => [, de_EgressAccessLogs(_, context), `egressAccessLogs`],
1660
+ HlsIngest: (_) => [, de_HlsIngest(_, context), `hlsIngest`],
1661
+ Id: [, smithy_client_1.expectString, `id`],
1662
+ IngressAccessLogs: (_) => [, de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1663
+ Tags: [, smithy_client_1._json, `tags`],
1664
+ });
1995
1665
  };
1996
1666
  const de_CmafEncryption = (output, context) => {
1997
- return {
1998
- ConstantInitializationVector: (0, smithy_client_1.expectString)(output.constantInitializationVector),
1999
- EncryptionMethod: (0, smithy_client_1.expectString)(output.encryptionMethod),
2000
- KeyRotationIntervalSeconds: (0, smithy_client_1.expectInt32)(output.keyRotationIntervalSeconds),
2001
- SpekeKeyProvider: output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined,
2002
- };
1667
+ return (0, smithy_client_1.take)(output, {
1668
+ ConstantInitializationVector: [, smithy_client_1.expectString, `constantInitializationVector`],
1669
+ EncryptionMethod: [, smithy_client_1.expectString, `encryptionMethod`],
1670
+ KeyRotationIntervalSeconds: [, smithy_client_1.expectInt32, `keyRotationIntervalSeconds`],
1671
+ SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1672
+ });
2003
1673
  };
2004
1674
  const de_CmafPackage = (output, context) => {
2005
- return {
2006
- Encryption: output.encryption != null ? de_CmafEncryption(output.encryption, context) : undefined,
2007
- HlsManifests: output.hlsManifests != null ? de___listOfHlsManifest(output.hlsManifests, context) : undefined,
2008
- SegmentDurationSeconds: (0, smithy_client_1.expectInt32)(output.segmentDurationSeconds),
2009
- SegmentPrefix: (0, smithy_client_1.expectString)(output.segmentPrefix),
2010
- StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined,
2011
- };
1675
+ return (0, smithy_client_1.take)(output, {
1676
+ Encryption: (_) => [, de_CmafEncryption(_, context), `encryption`],
1677
+ HlsManifests: (_) => [, de___listOfHlsManifest(_, context), `hlsManifests`],
1678
+ SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1679
+ SegmentPrefix: [, smithy_client_1.expectString, `segmentPrefix`],
1680
+ StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`],
1681
+ });
2012
1682
  };
2013
1683
  const de_DashEncryption = (output, context) => {
2014
- return {
2015
- KeyRotationIntervalSeconds: (0, smithy_client_1.expectInt32)(output.keyRotationIntervalSeconds),
2016
- SpekeKeyProvider: output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined,
2017
- };
1684
+ return (0, smithy_client_1.take)(output, {
1685
+ KeyRotationIntervalSeconds: [, smithy_client_1.expectInt32, `keyRotationIntervalSeconds`],
1686
+ SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1687
+ });
2018
1688
  };
2019
1689
  const de_DashPackage = (output, context) => {
2020
- return {
2021
- AdTriggers: output.adTriggers != null ? de_AdTriggers(output.adTriggers, context) : undefined,
2022
- AdsOnDeliveryRestrictions: (0, smithy_client_1.expectString)(output.adsOnDeliveryRestrictions),
2023
- Encryption: output.encryption != null ? de_DashEncryption(output.encryption, context) : undefined,
2024
- IncludeIframeOnlyStream: (0, smithy_client_1.expectBoolean)(output.includeIframeOnlyStream),
2025
- ManifestLayout: (0, smithy_client_1.expectString)(output.manifestLayout),
2026
- ManifestWindowSeconds: (0, smithy_client_1.expectInt32)(output.manifestWindowSeconds),
2027
- MinBufferTimeSeconds: (0, smithy_client_1.expectInt32)(output.minBufferTimeSeconds),
2028
- MinUpdatePeriodSeconds: (0, smithy_client_1.expectInt32)(output.minUpdatePeriodSeconds),
2029
- PeriodTriggers: output.periodTriggers != null ? de___listOf__PeriodTriggersElement(output.periodTriggers, context) : undefined,
2030
- Profile: (0, smithy_client_1.expectString)(output.profile),
2031
- SegmentDurationSeconds: (0, smithy_client_1.expectInt32)(output.segmentDurationSeconds),
2032
- SegmentTemplateFormat: (0, smithy_client_1.expectString)(output.segmentTemplateFormat),
2033
- StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined,
2034
- SuggestedPresentationDelaySeconds: (0, smithy_client_1.expectInt32)(output.suggestedPresentationDelaySeconds),
2035
- UtcTiming: (0, smithy_client_1.expectString)(output.utcTiming),
2036
- UtcTimingUri: (0, smithy_client_1.expectString)(output.utcTimingUri),
2037
- };
1690
+ return (0, smithy_client_1.take)(output, {
1691
+ AdTriggers: [, smithy_client_1._json, `adTriggers`],
1692
+ AdsOnDeliveryRestrictions: [, smithy_client_1.expectString, `adsOnDeliveryRestrictions`],
1693
+ Encryption: (_) => [, de_DashEncryption(_, context), `encryption`],
1694
+ IncludeIframeOnlyStream: [, smithy_client_1.expectBoolean, `includeIframeOnlyStream`],
1695
+ ManifestLayout: [, smithy_client_1.expectString, `manifestLayout`],
1696
+ ManifestWindowSeconds: [, smithy_client_1.expectInt32, `manifestWindowSeconds`],
1697
+ MinBufferTimeSeconds: [, smithy_client_1.expectInt32, `minBufferTimeSeconds`],
1698
+ MinUpdatePeriodSeconds: [, smithy_client_1.expectInt32, `minUpdatePeriodSeconds`],
1699
+ PeriodTriggers: [, smithy_client_1._json, `periodTriggers`],
1700
+ Profile: [, smithy_client_1.expectString, `profile`],
1701
+ SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1702
+ SegmentTemplateFormat: [, smithy_client_1.expectString, `segmentTemplateFormat`],
1703
+ StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`],
1704
+ SuggestedPresentationDelaySeconds: [, smithy_client_1.expectInt32, `suggestedPresentationDelaySeconds`],
1705
+ UtcTiming: [, smithy_client_1.expectString, `utcTiming`],
1706
+ UtcTimingUri: [, smithy_client_1.expectString, `utcTimingUri`],
1707
+ });
2038
1708
  };
2039
1709
  const de_EgressAccessLogs = (output, context) => {
2040
- return {
2041
- LogGroupName: (0, smithy_client_1.expectString)(output.logGroupName),
2042
- };
1710
+ return (0, smithy_client_1.take)(output, {
1711
+ LogGroupName: [, smithy_client_1.expectString, `logGroupName`],
1712
+ });
2043
1713
  };
2044
1714
  const de_EncryptionContractConfiguration = (output, context) => {
2045
- return {
2046
- PresetSpeke20Audio: (0, smithy_client_1.expectString)(output.presetSpeke20Audio),
2047
- PresetSpeke20Video: (0, smithy_client_1.expectString)(output.presetSpeke20Video),
2048
- };
1715
+ return (0, smithy_client_1.take)(output, {
1716
+ PresetSpeke20Audio: [, smithy_client_1.expectString, `presetSpeke20Audio`],
1717
+ PresetSpeke20Video: [, smithy_client_1.expectString, `presetSpeke20Video`],
1718
+ });
2049
1719
  };
2050
1720
  const de_HarvestJob = (output, context) => {
2051
- return {
2052
- Arn: (0, smithy_client_1.expectString)(output.arn),
2053
- ChannelId: (0, smithy_client_1.expectString)(output.channelId),
2054
- CreatedAt: (0, smithy_client_1.expectString)(output.createdAt),
2055
- EndTime: (0, smithy_client_1.expectString)(output.endTime),
2056
- Id: (0, smithy_client_1.expectString)(output.id),
2057
- OriginEndpointId: (0, smithy_client_1.expectString)(output.originEndpointId),
2058
- S3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined,
2059
- StartTime: (0, smithy_client_1.expectString)(output.startTime),
2060
- Status: (0, smithy_client_1.expectString)(output.status),
2061
- };
1721
+ return (0, smithy_client_1.take)(output, {
1722
+ Arn: [, smithy_client_1.expectString, `arn`],
1723
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
1724
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1725
+ EndTime: [, smithy_client_1.expectString, `endTime`],
1726
+ Id: [, smithy_client_1.expectString, `id`],
1727
+ OriginEndpointId: [, smithy_client_1.expectString, `originEndpointId`],
1728
+ S3Destination: (_) => [, de_S3Destination(_, context), `s3Destination`],
1729
+ StartTime: [, smithy_client_1.expectString, `startTime`],
1730
+ Status: [, smithy_client_1.expectString, `status`],
1731
+ });
2062
1732
  };
2063
1733
  const de_HlsEncryption = (output, context) => {
2064
- return {
2065
- ConstantInitializationVector: (0, smithy_client_1.expectString)(output.constantInitializationVector),
2066
- EncryptionMethod: (0, smithy_client_1.expectString)(output.encryptionMethod),
2067
- KeyRotationIntervalSeconds: (0, smithy_client_1.expectInt32)(output.keyRotationIntervalSeconds),
2068
- RepeatExtXKey: (0, smithy_client_1.expectBoolean)(output.repeatExtXKey),
2069
- SpekeKeyProvider: output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined,
2070
- };
1734
+ return (0, smithy_client_1.take)(output, {
1735
+ ConstantInitializationVector: [, smithy_client_1.expectString, `constantInitializationVector`],
1736
+ EncryptionMethod: [, smithy_client_1.expectString, `encryptionMethod`],
1737
+ KeyRotationIntervalSeconds: [, smithy_client_1.expectInt32, `keyRotationIntervalSeconds`],
1738
+ RepeatExtXKey: [, smithy_client_1.expectBoolean, `repeatExtXKey`],
1739
+ SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1740
+ });
2071
1741
  };
2072
1742
  const de_HlsIngest = (output, context) => {
2073
- return {
2074
- IngestEndpoints: output.ingestEndpoints != null ? de___listOfIngestEndpoint(output.ingestEndpoints, context) : undefined,
2075
- };
1743
+ return (0, smithy_client_1.take)(output, {
1744
+ IngestEndpoints: (_) => [, de___listOfIngestEndpoint(_, context), `ingestEndpoints`],
1745
+ });
2076
1746
  };
2077
1747
  const de_HlsManifest = (output, context) => {
2078
- return {
2079
- AdMarkers: (0, smithy_client_1.expectString)(output.adMarkers),
2080
- AdTriggers: output.adTriggers != null ? de_AdTriggers(output.adTriggers, context) : undefined,
2081
- AdsOnDeliveryRestrictions: (0, smithy_client_1.expectString)(output.adsOnDeliveryRestrictions),
2082
- Id: (0, smithy_client_1.expectString)(output.id),
2083
- IncludeIframeOnlyStream: (0, smithy_client_1.expectBoolean)(output.includeIframeOnlyStream),
2084
- ManifestName: (0, smithy_client_1.expectString)(output.manifestName),
2085
- PlaylistType: (0, smithy_client_1.expectString)(output.playlistType),
2086
- PlaylistWindowSeconds: (0, smithy_client_1.expectInt32)(output.playlistWindowSeconds),
2087
- ProgramDateTimeIntervalSeconds: (0, smithy_client_1.expectInt32)(output.programDateTimeIntervalSeconds),
2088
- Url: (0, smithy_client_1.expectString)(output.url),
2089
- };
1748
+ return (0, smithy_client_1.take)(output, {
1749
+ AdMarkers: [, smithy_client_1.expectString, `adMarkers`],
1750
+ AdTriggers: [, smithy_client_1._json, `adTriggers`],
1751
+ AdsOnDeliveryRestrictions: [, smithy_client_1.expectString, `adsOnDeliveryRestrictions`],
1752
+ Id: [, smithy_client_1.expectString, `id`],
1753
+ IncludeIframeOnlyStream: [, smithy_client_1.expectBoolean, `includeIframeOnlyStream`],
1754
+ ManifestName: [, smithy_client_1.expectString, `manifestName`],
1755
+ PlaylistType: [, smithy_client_1.expectString, `playlistType`],
1756
+ PlaylistWindowSeconds: [, smithy_client_1.expectInt32, `playlistWindowSeconds`],
1757
+ ProgramDateTimeIntervalSeconds: [, smithy_client_1.expectInt32, `programDateTimeIntervalSeconds`],
1758
+ Url: [, smithy_client_1.expectString, `url`],
1759
+ });
2090
1760
  };
2091
1761
  const de_HlsPackage = (output, context) => {
2092
- return {
2093
- AdMarkers: (0, smithy_client_1.expectString)(output.adMarkers),
2094
- AdTriggers: output.adTriggers != null ? de_AdTriggers(output.adTriggers, context) : undefined,
2095
- AdsOnDeliveryRestrictions: (0, smithy_client_1.expectString)(output.adsOnDeliveryRestrictions),
2096
- Encryption: output.encryption != null ? de_HlsEncryption(output.encryption, context) : undefined,
2097
- IncludeDvbSubtitles: (0, smithy_client_1.expectBoolean)(output.includeDvbSubtitles),
2098
- IncludeIframeOnlyStream: (0, smithy_client_1.expectBoolean)(output.includeIframeOnlyStream),
2099
- PlaylistType: (0, smithy_client_1.expectString)(output.playlistType),
2100
- PlaylistWindowSeconds: (0, smithy_client_1.expectInt32)(output.playlistWindowSeconds),
2101
- ProgramDateTimeIntervalSeconds: (0, smithy_client_1.expectInt32)(output.programDateTimeIntervalSeconds),
2102
- SegmentDurationSeconds: (0, smithy_client_1.expectInt32)(output.segmentDurationSeconds),
2103
- StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined,
2104
- UseAudioRenditionGroup: (0, smithy_client_1.expectBoolean)(output.useAudioRenditionGroup),
2105
- };
1762
+ return (0, smithy_client_1.take)(output, {
1763
+ AdMarkers: [, smithy_client_1.expectString, `adMarkers`],
1764
+ AdTriggers: [, smithy_client_1._json, `adTriggers`],
1765
+ AdsOnDeliveryRestrictions: [, smithy_client_1.expectString, `adsOnDeliveryRestrictions`],
1766
+ Encryption: (_) => [, de_HlsEncryption(_, context), `encryption`],
1767
+ IncludeDvbSubtitles: [, smithy_client_1.expectBoolean, `includeDvbSubtitles`],
1768
+ IncludeIframeOnlyStream: [, smithy_client_1.expectBoolean, `includeIframeOnlyStream`],
1769
+ PlaylistType: [, smithy_client_1.expectString, `playlistType`],
1770
+ PlaylistWindowSeconds: [, smithy_client_1.expectInt32, `playlistWindowSeconds`],
1771
+ ProgramDateTimeIntervalSeconds: [, smithy_client_1.expectInt32, `programDateTimeIntervalSeconds`],
1772
+ SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1773
+ StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`],
1774
+ UseAudioRenditionGroup: [, smithy_client_1.expectBoolean, `useAudioRenditionGroup`],
1775
+ });
2106
1776
  };
2107
1777
  const de_IngestEndpoint = (output, context) => {
2108
- return {
2109
- Id: (0, smithy_client_1.expectString)(output.id),
2110
- Password: (0, smithy_client_1.expectString)(output.password),
2111
- Url: (0, smithy_client_1.expectString)(output.url),
2112
- Username: (0, smithy_client_1.expectString)(output.username),
2113
- };
1778
+ return (0, smithy_client_1.take)(output, {
1779
+ Id: [, smithy_client_1.expectString, `id`],
1780
+ Password: [, smithy_client_1.expectString, `password`],
1781
+ Url: [, smithy_client_1.expectString, `url`],
1782
+ Username: [, smithy_client_1.expectString, `username`],
1783
+ });
2114
1784
  };
2115
1785
  const de_IngressAccessLogs = (output, context) => {
2116
- return {
2117
- LogGroupName: (0, smithy_client_1.expectString)(output.logGroupName),
2118
- };
1786
+ return (0, smithy_client_1.take)(output, {
1787
+ LogGroupName: [, smithy_client_1.expectString, `logGroupName`],
1788
+ });
2119
1789
  };
2120
1790
  const de_MssEncryption = (output, context) => {
2121
- return {
2122
- SpekeKeyProvider: output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined,
2123
- };
1791
+ return (0, smithy_client_1.take)(output, {
1792
+ SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1793
+ });
2124
1794
  };
2125
1795
  const de_MssPackage = (output, context) => {
2126
- return {
2127
- Encryption: output.encryption != null ? de_MssEncryption(output.encryption, context) : undefined,
2128
- ManifestWindowSeconds: (0, smithy_client_1.expectInt32)(output.manifestWindowSeconds),
2129
- SegmentDurationSeconds: (0, smithy_client_1.expectInt32)(output.segmentDurationSeconds),
2130
- StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined,
2131
- };
1796
+ return (0, smithy_client_1.take)(output, {
1797
+ Encryption: (_) => [, de_MssEncryption(_, context), `encryption`],
1798
+ ManifestWindowSeconds: [, smithy_client_1.expectInt32, `manifestWindowSeconds`],
1799
+ SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1800
+ StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`],
1801
+ });
2132
1802
  };
2133
1803
  const de_OriginEndpoint = (output, context) => {
2134
- return {
2135
- Arn: (0, smithy_client_1.expectString)(output.arn),
2136
- Authorization: output.authorization != null ? de_Authorization(output.authorization, context) : undefined,
2137
- ChannelId: (0, smithy_client_1.expectString)(output.channelId),
2138
- CmafPackage: output.cmafPackage != null ? de_CmafPackage(output.cmafPackage, context) : undefined,
2139
- CreatedAt: (0, smithy_client_1.expectString)(output.createdAt),
2140
- DashPackage: output.dashPackage != null ? de_DashPackage(output.dashPackage, context) : undefined,
2141
- Description: (0, smithy_client_1.expectString)(output.description),
2142
- HlsPackage: output.hlsPackage != null ? de_HlsPackage(output.hlsPackage, context) : undefined,
2143
- Id: (0, smithy_client_1.expectString)(output.id),
2144
- ManifestName: (0, smithy_client_1.expectString)(output.manifestName),
2145
- MssPackage: output.mssPackage != null ? de_MssPackage(output.mssPackage, context) : undefined,
2146
- Origination: (0, smithy_client_1.expectString)(output.origination),
2147
- StartoverWindowSeconds: (0, smithy_client_1.expectInt32)(output.startoverWindowSeconds),
2148
- Tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
2149
- TimeDelaySeconds: (0, smithy_client_1.expectInt32)(output.timeDelaySeconds),
2150
- Url: (0, smithy_client_1.expectString)(output.url),
2151
- Whitelist: output.whitelist != null ? de___listOf__string(output.whitelist, context) : undefined,
2152
- };
1804
+ return (0, smithy_client_1.take)(output, {
1805
+ Arn: [, smithy_client_1.expectString, `arn`],
1806
+ Authorization: (_) => [, de_Authorization(_, context), `authorization`],
1807
+ ChannelId: [, smithy_client_1.expectString, `channelId`],
1808
+ CmafPackage: (_) => [, de_CmafPackage(_, context), `cmafPackage`],
1809
+ CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1810
+ DashPackage: (_) => [, de_DashPackage(_, context), `dashPackage`],
1811
+ Description: [, smithy_client_1.expectString, `description`],
1812
+ HlsPackage: (_) => [, de_HlsPackage(_, context), `hlsPackage`],
1813
+ Id: [, smithy_client_1.expectString, `id`],
1814
+ ManifestName: [, smithy_client_1.expectString, `manifestName`],
1815
+ MssPackage: (_) => [, de_MssPackage(_, context), `mssPackage`],
1816
+ Origination: [, smithy_client_1.expectString, `origination`],
1817
+ StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
1818
+ Tags: [, smithy_client_1._json, `tags`],
1819
+ TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
1820
+ Url: [, smithy_client_1.expectString, `url`],
1821
+ Whitelist: [, smithy_client_1._json, `whitelist`],
1822
+ });
2153
1823
  };
2154
1824
  const de_S3Destination = (output, context) => {
2155
- return {
2156
- BucketName: (0, smithy_client_1.expectString)(output.bucketName),
2157
- ManifestKey: (0, smithy_client_1.expectString)(output.manifestKey),
2158
- RoleArn: (0, smithy_client_1.expectString)(output.roleArn),
2159
- };
1825
+ return (0, smithy_client_1.take)(output, {
1826
+ BucketName: [, smithy_client_1.expectString, `bucketName`],
1827
+ ManifestKey: [, smithy_client_1.expectString, `manifestKey`],
1828
+ RoleArn: [, smithy_client_1.expectString, `roleArn`],
1829
+ });
2160
1830
  };
2161
1831
  const de_SpekeKeyProvider = (output, context) => {
2162
- return {
2163
- CertificateArn: (0, smithy_client_1.expectString)(output.certificateArn),
2164
- EncryptionContractConfiguration: output.encryptionContractConfiguration != null
2165
- ? de_EncryptionContractConfiguration(output.encryptionContractConfiguration, context)
2166
- : undefined,
2167
- ResourceId: (0, smithy_client_1.expectString)(output.resourceId),
2168
- RoleArn: (0, smithy_client_1.expectString)(output.roleArn),
2169
- SystemIds: output.systemIds != null ? de___listOf__string(output.systemIds, context) : undefined,
2170
- Url: (0, smithy_client_1.expectString)(output.url),
2171
- };
1832
+ return (0, smithy_client_1.take)(output, {
1833
+ CertificateArn: [, smithy_client_1.expectString, `certificateArn`],
1834
+ EncryptionContractConfiguration: (_) => [
1835
+ ,
1836
+ de_EncryptionContractConfiguration(_, context),
1837
+ `encryptionContractConfiguration`,
1838
+ ],
1839
+ ResourceId: [, smithy_client_1.expectString, `resourceId`],
1840
+ RoleArn: [, smithy_client_1.expectString, `roleArn`],
1841
+ SystemIds: [, smithy_client_1._json, `systemIds`],
1842
+ Url: [, smithy_client_1.expectString, `url`],
1843
+ });
2172
1844
  };
2173
1845
  const de_StreamSelection = (output, context) => {
2174
- return {
2175
- MaxVideoBitsPerSecond: (0, smithy_client_1.expectInt32)(output.maxVideoBitsPerSecond),
2176
- MinVideoBitsPerSecond: (0, smithy_client_1.expectInt32)(output.minVideoBitsPerSecond),
2177
- StreamOrder: (0, smithy_client_1.expectString)(output.streamOrder),
2178
- };
2179
- };
2180
- const de_Tags = (output, context) => {
2181
- return Object.entries(output).reduce((acc, [key, value]) => {
2182
- if (value === null) {
2183
- return acc;
2184
- }
2185
- acc[key] = (0, smithy_client_1.expectString)(value);
2186
- return acc;
2187
- }, {});
1846
+ return (0, smithy_client_1.take)(output, {
1847
+ MaxVideoBitsPerSecond: [, smithy_client_1.expectInt32, `maxVideoBitsPerSecond`],
1848
+ MinVideoBitsPerSecond: [, smithy_client_1.expectInt32, `minVideoBitsPerSecond`],
1849
+ StreamOrder: [, smithy_client_1.expectString, `streamOrder`],
1850
+ });
2188
1851
  };
2189
1852
  const deserializeMetadata = (output) => ({
2190
1853
  httpStatusCode: output.statusCode,