@aws-sdk/client-mediatailor 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,10 +13,10 @@ const se_ConfigureLogsForChannelCommand = async (input, context) => {
13
13
  };
14
14
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configureLogs/channel";
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.ChannelName != null && { ChannelName: input.ChannelName }),
18
- ...(input.LogTypes != null && { LogTypes: se_LogTypes(input.LogTypes, context) }),
19
- });
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ ChannelName: [],
18
+ LogTypes: (_) => (0, smithy_client_1._json)(_),
19
+ }));
20
20
  return new protocol_http_1.HttpRequest({
21
21
  protocol,
22
22
  hostname,
@@ -35,10 +35,10 @@ const se_ConfigureLogsForPlaybackConfigurationCommand = async (input, context) =
35
35
  };
36
36
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configureLogs/playbackConfiguration";
37
37
  let body;
38
- body = JSON.stringify({
39
- ...(input.PercentEnabled != null && { PercentEnabled: input.PercentEnabled }),
40
- ...(input.PlaybackConfigurationName != null && { PlaybackConfigurationName: input.PlaybackConfigurationName }),
41
- });
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ PercentEnabled: [],
40
+ PlaybackConfigurationName: [],
41
+ }));
42
42
  return new protocol_http_1.HttpRequest({
43
43
  protocol,
44
44
  hostname,
@@ -58,13 +58,13 @@ const se_CreateChannelCommand = async (input, context) => {
58
58
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}";
59
59
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
60
60
  let body;
61
- body = JSON.stringify({
62
- ...(input.FillerSlate != null && { FillerSlate: se_SlateSource(input.FillerSlate, context) }),
63
- ...(input.Outputs != null && { Outputs: se_RequestOutputs(input.Outputs, context) }),
64
- ...(input.PlaybackMode != null && { PlaybackMode: input.PlaybackMode }),
65
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
66
- ...(input.Tier != null && { Tier: input.Tier }),
67
- });
61
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
62
+ FillerSlate: (_) => (0, smithy_client_1._json)(_),
63
+ Outputs: (_) => (0, smithy_client_1._json)(_),
64
+ PlaybackMode: [],
65
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
66
+ Tier: [],
67
+ }));
68
68
  return new protocol_http_1.HttpRequest({
69
69
  protocol,
70
70
  hostname,
@@ -86,12 +86,10 @@ const se_CreateLiveSourceCommand = async (input, context) => {
86
86
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
87
87
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
88
88
  let body;
89
- body = JSON.stringify({
90
- ...(input.HttpPackageConfigurations != null && {
91
- HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context),
92
- }),
93
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
94
- });
89
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
90
+ HttpPackageConfigurations: (_) => (0, smithy_client_1._json)(_),
91
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
92
+ }));
95
93
  return new protocol_http_1.HttpRequest({
96
94
  protocol,
97
95
  hostname,
@@ -113,11 +111,11 @@ const se_CreatePrefetchScheduleCommand = async (input, context) => {
113
111
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
114
112
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
115
113
  let body;
116
- body = JSON.stringify({
117
- ...(input.Consumption != null && { Consumption: se_PrefetchConsumption(input.Consumption, context) }),
118
- ...(input.Retrieval != null && { Retrieval: se_PrefetchRetrieval(input.Retrieval, context) }),
119
- ...(input.StreamId != null && { StreamId: input.StreamId }),
120
- });
114
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
115
+ Consumption: (_) => se_PrefetchConsumption(_, context),
116
+ Retrieval: (_) => se_PrefetchRetrieval(_, context),
117
+ StreamId: [],
118
+ }));
121
119
  return new protocol_http_1.HttpRequest({
122
120
  protocol,
123
121
  hostname,
@@ -139,15 +137,13 @@ const se_CreateProgramCommand = async (input, context) => {
139
137
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
140
138
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProgramName", () => input.ProgramName, "{ProgramName}", false);
141
139
  let body;
142
- body = JSON.stringify({
143
- ...(input.AdBreaks != null && { AdBreaks: se___listOfAdBreak(input.AdBreaks, context) }),
144
- ...(input.LiveSourceName != null && { LiveSourceName: input.LiveSourceName }),
145
- ...(input.ScheduleConfiguration != null && {
146
- ScheduleConfiguration: se_ScheduleConfiguration(input.ScheduleConfiguration, context),
147
- }),
148
- ...(input.SourceLocationName != null && { SourceLocationName: input.SourceLocationName }),
149
- ...(input.VodSourceName != null && { VodSourceName: input.VodSourceName }),
150
- });
140
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
141
+ AdBreaks: (_) => (0, smithy_client_1._json)(_),
142
+ LiveSourceName: [],
143
+ ScheduleConfiguration: (_) => (0, smithy_client_1._json)(_),
144
+ SourceLocationName: [],
145
+ VodSourceName: [],
146
+ }));
151
147
  return new protocol_http_1.HttpRequest({
152
148
  protocol,
153
149
  hostname,
@@ -167,21 +163,13 @@ const se_CreateSourceLocationCommand = async (input, context) => {
167
163
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocation/{SourceLocationName}";
168
164
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
169
165
  let body;
170
- body = JSON.stringify({
171
- ...(input.AccessConfiguration != null && {
172
- AccessConfiguration: se_AccessConfiguration(input.AccessConfiguration, context),
173
- }),
174
- ...(input.DefaultSegmentDeliveryConfiguration != null && {
175
- DefaultSegmentDeliveryConfiguration: se_DefaultSegmentDeliveryConfiguration(input.DefaultSegmentDeliveryConfiguration, context),
176
- }),
177
- ...(input.HttpConfiguration != null && {
178
- HttpConfiguration: se_HttpConfiguration(input.HttpConfiguration, context),
179
- }),
180
- ...(input.SegmentDeliveryConfigurations != null && {
181
- SegmentDeliveryConfigurations: se___listOfSegmentDeliveryConfiguration(input.SegmentDeliveryConfigurations, context),
182
- }),
183
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
184
- });
166
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
167
+ AccessConfiguration: (_) => (0, smithy_client_1._json)(_),
168
+ DefaultSegmentDeliveryConfiguration: (_) => (0, smithy_client_1._json)(_),
169
+ HttpConfiguration: (_) => (0, smithy_client_1._json)(_),
170
+ SegmentDeliveryConfigurations: (_) => (0, smithy_client_1._json)(_),
171
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
172
+ }));
185
173
  return new protocol_http_1.HttpRequest({
186
174
  protocol,
187
175
  hostname,
@@ -203,12 +191,10 @@ const se_CreateVodSourceCommand = async (input, context) => {
203
191
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
204
192
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
205
193
  let body;
206
- body = JSON.stringify({
207
- ...(input.HttpPackageConfigurations != null && {
208
- HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context),
209
- }),
210
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
211
- });
194
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
195
+ HttpPackageConfigurations: (_) => (0, smithy_client_1._json)(_),
196
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
197
+ }));
212
198
  return new protocol_http_1.HttpRequest({
213
199
  protocol,
214
200
  hostname,
@@ -477,7 +463,7 @@ const se_GetChannelScheduleCommand = async (input, context) => {
477
463
  const headers = {};
478
464
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/schedule";
479
465
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
480
- const query = map({
466
+ const query = (0, smithy_client_1.map)({
481
467
  durationMinutes: [, input.DurationMinutes],
482
468
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
483
469
  nextToken: [, input.NextToken],
@@ -535,7 +521,7 @@ const se_ListAlertsCommand = async (input, context) => {
535
521
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
536
522
  const headers = {};
537
523
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alerts";
538
- const query = map({
524
+ const query = (0, smithy_client_1.map)({
539
525
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
540
526
  nextToken: [, input.NextToken],
541
527
  resourceArn: [, (0, smithy_client_1.expectNonNull)(input.ResourceArn, `ResourceArn`)],
@@ -557,7 +543,7 @@ const se_ListChannelsCommand = async (input, context) => {
557
543
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
558
544
  const headers = {};
559
545
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
560
- const query = map({
546
+ const query = (0, smithy_client_1.map)({
561
547
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
562
548
  nextToken: [, input.NextToken],
563
549
  });
@@ -580,7 +566,7 @@ const se_ListLiveSourcesCommand = async (input, context) => {
580
566
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
581
567
  "/sourceLocation/{SourceLocationName}/liveSources";
582
568
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
583
- const query = map({
569
+ const query = (0, smithy_client_1.map)({
584
570
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
585
571
  nextToken: [, input.NextToken],
586
572
  });
@@ -601,7 +587,7 @@ const se_ListPlaybackConfigurationsCommand = async (input, context) => {
601
587
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
602
588
  const headers = {};
603
589
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfigurations";
604
- const query = map({
590
+ const query = (0, smithy_client_1.map)({
605
591
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
606
592
  NextToken: [, input.NextToken],
607
593
  });
@@ -627,11 +613,11 @@ const se_ListPrefetchSchedulesCommand = async (input, context) => {
627
613
  "/prefetchSchedule/{PlaybackConfigurationName}";
628
614
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PlaybackConfigurationName", () => input.PlaybackConfigurationName, "{PlaybackConfigurationName}", false);
629
615
  let body;
630
- body = JSON.stringify({
631
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
632
- ...(input.NextToken != null && { NextToken: input.NextToken }),
633
- ...(input.StreamId != null && { StreamId: input.StreamId }),
634
- });
616
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
617
+ MaxResults: [],
618
+ NextToken: [],
619
+ StreamId: [],
620
+ }));
635
621
  return new protocol_http_1.HttpRequest({
636
622
  protocol,
637
623
  hostname,
@@ -647,7 +633,7 @@ const se_ListSourceLocationsCommand = async (input, context) => {
647
633
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
648
634
  const headers = {};
649
635
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocations";
650
- const query = map({
636
+ const query = (0, smithy_client_1.map)({
651
637
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
652
638
  nextToken: [, input.NextToken],
653
639
  });
@@ -687,7 +673,7 @@ const se_ListVodSourcesCommand = async (input, context) => {
687
673
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
688
674
  "/sourceLocation/{SourceLocationName}/vodSources";
689
675
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
690
- const query = map({
676
+ const query = (0, smithy_client_1.map)({
691
677
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
692
678
  nextToken: [, input.NextToken],
693
679
  });
@@ -712,9 +698,9 @@ const se_PutChannelPolicyCommand = async (input, context) => {
712
698
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/policy";
713
699
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
714
700
  let body;
715
- body = JSON.stringify({
716
- ...(input.Policy != null && { Policy: input.Policy }),
717
- });
701
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
702
+ Policy: [],
703
+ }));
718
704
  return new protocol_http_1.HttpRequest({
719
705
  protocol,
720
706
  hostname,
@@ -733,32 +719,22 @@ const se_PutPlaybackConfigurationCommand = async (input, context) => {
733
719
  };
734
720
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfiguration";
735
721
  let body;
736
- body = JSON.stringify({
737
- ...(input.AdDecisionServerUrl != null && { AdDecisionServerUrl: input.AdDecisionServerUrl }),
738
- ...(input.AvailSuppression != null && { AvailSuppression: se_AvailSuppression(input.AvailSuppression, context) }),
739
- ...(input.Bumper != null && { Bumper: se_Bumper(input.Bumper, context) }),
740
- ...(input.CdnConfiguration != null && { CdnConfiguration: se_CdnConfiguration(input.CdnConfiguration, context) }),
741
- ...(input.ConfigurationAliases != null && {
742
- ConfigurationAliases: se_ConfigurationAliasesRequest(input.ConfigurationAliases, context),
743
- }),
744
- ...(input.DashConfiguration != null && {
745
- DashConfiguration: se_DashConfigurationForPut(input.DashConfiguration, context),
746
- }),
747
- ...(input.LivePreRollConfiguration != null && {
748
- LivePreRollConfiguration: se_LivePreRollConfiguration(input.LivePreRollConfiguration, context),
749
- }),
750
- ...(input.ManifestProcessingRules != null && {
751
- ManifestProcessingRules: se_ManifestProcessingRules(input.ManifestProcessingRules, context),
752
- }),
753
- ...(input.Name != null && { Name: input.Name }),
754
- ...(input.PersonalizationThresholdSeconds != null && {
755
- PersonalizationThresholdSeconds: input.PersonalizationThresholdSeconds,
756
- }),
757
- ...(input.SlateAdUrl != null && { SlateAdUrl: input.SlateAdUrl }),
758
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
759
- ...(input.TranscodeProfileName != null && { TranscodeProfileName: input.TranscodeProfileName }),
760
- ...(input.VideoContentSourceUrl != null && { VideoContentSourceUrl: input.VideoContentSourceUrl }),
761
- });
722
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
723
+ AdDecisionServerUrl: [],
724
+ AvailSuppression: (_) => (0, smithy_client_1._json)(_),
725
+ Bumper: (_) => (0, smithy_client_1._json)(_),
726
+ CdnConfiguration: (_) => (0, smithy_client_1._json)(_),
727
+ ConfigurationAliases: (_) => (0, smithy_client_1._json)(_),
728
+ DashConfiguration: (_) => (0, smithy_client_1._json)(_),
729
+ LivePreRollConfiguration: (_) => (0, smithy_client_1._json)(_),
730
+ ManifestProcessingRules: (_) => (0, smithy_client_1._json)(_),
731
+ Name: [],
732
+ PersonalizationThresholdSeconds: [],
733
+ SlateAdUrl: [],
734
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
735
+ TranscodeProfileName: [],
736
+ VideoContentSourceUrl: [],
737
+ }));
762
738
  return new protocol_http_1.HttpRequest({
763
739
  protocol,
764
740
  hostname,
@@ -812,9 +788,9 @@ const se_TagResourceCommand = async (input, context) => {
812
788
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
813
789
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
814
790
  let body;
815
- body = JSON.stringify({
816
- ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }),
817
- });
791
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
792
+ tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
793
+ }));
818
794
  return new protocol_http_1.HttpRequest({
819
795
  protocol,
820
796
  hostname,
@@ -831,7 +807,7 @@ const se_UntagResourceCommand = async (input, context) => {
831
807
  const headers = {};
832
808
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
833
809
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
834
- const query = map({
810
+ const query = (0, smithy_client_1.map)({
835
811
  tagKeys: [
836
812
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
837
813
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -858,10 +834,10 @@ const se_UpdateChannelCommand = async (input, context) => {
858
834
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}";
859
835
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
860
836
  let body;
861
- body = JSON.stringify({
862
- ...(input.FillerSlate != null && { FillerSlate: se_SlateSource(input.FillerSlate, context) }),
863
- ...(input.Outputs != null && { Outputs: se_RequestOutputs(input.Outputs, context) }),
864
- });
837
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
838
+ FillerSlate: (_) => (0, smithy_client_1._json)(_),
839
+ Outputs: (_) => (0, smithy_client_1._json)(_),
840
+ }));
865
841
  return new protocol_http_1.HttpRequest({
866
842
  protocol,
867
843
  hostname,
@@ -883,11 +859,9 @@ const se_UpdateLiveSourceCommand = async (input, context) => {
883
859
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LiveSourceName", () => input.LiveSourceName, "{LiveSourceName}", false);
884
860
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
885
861
  let body;
886
- body = JSON.stringify({
887
- ...(input.HttpPackageConfigurations != null && {
888
- HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context),
889
- }),
890
- });
862
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
863
+ HttpPackageConfigurations: (_) => (0, smithy_client_1._json)(_),
864
+ }));
891
865
  return new protocol_http_1.HttpRequest({
892
866
  protocol,
893
867
  hostname,
@@ -909,12 +883,10 @@ const se_UpdateProgramCommand = async (input, context) => {
909
883
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelName", () => input.ChannelName, "{ChannelName}", false);
910
884
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProgramName", () => input.ProgramName, "{ProgramName}", false);
911
885
  let body;
912
- body = JSON.stringify({
913
- ...(input.AdBreaks != null && { AdBreaks: se___listOfAdBreak(input.AdBreaks, context) }),
914
- ...(input.ScheduleConfiguration != null && {
915
- ScheduleConfiguration: se_UpdateProgramScheduleConfiguration(input.ScheduleConfiguration, context),
916
- }),
917
- });
886
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
887
+ AdBreaks: (_) => (0, smithy_client_1._json)(_),
888
+ ScheduleConfiguration: (_) => (0, smithy_client_1._json)(_),
889
+ }));
918
890
  return new protocol_http_1.HttpRequest({
919
891
  protocol,
920
892
  hostname,
@@ -934,20 +906,12 @@ const se_UpdateSourceLocationCommand = async (input, context) => {
934
906
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sourceLocation/{SourceLocationName}";
935
907
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
936
908
  let body;
937
- body = JSON.stringify({
938
- ...(input.AccessConfiguration != null && {
939
- AccessConfiguration: se_AccessConfiguration(input.AccessConfiguration, context),
940
- }),
941
- ...(input.DefaultSegmentDeliveryConfiguration != null && {
942
- DefaultSegmentDeliveryConfiguration: se_DefaultSegmentDeliveryConfiguration(input.DefaultSegmentDeliveryConfiguration, context),
943
- }),
944
- ...(input.HttpConfiguration != null && {
945
- HttpConfiguration: se_HttpConfiguration(input.HttpConfiguration, context),
946
- }),
947
- ...(input.SegmentDeliveryConfigurations != null && {
948
- SegmentDeliveryConfigurations: se___listOfSegmentDeliveryConfiguration(input.SegmentDeliveryConfigurations, context),
949
- }),
950
- });
909
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
910
+ AccessConfiguration: (_) => (0, smithy_client_1._json)(_),
911
+ DefaultSegmentDeliveryConfiguration: (_) => (0, smithy_client_1._json)(_),
912
+ HttpConfiguration: (_) => (0, smithy_client_1._json)(_),
913
+ SegmentDeliveryConfigurations: (_) => (0, smithy_client_1._json)(_),
914
+ }));
951
915
  return new protocol_http_1.HttpRequest({
952
916
  protocol,
953
917
  hostname,
@@ -969,11 +933,9 @@ const se_UpdateVodSourceCommand = async (input, context) => {
969
933
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceLocationName", () => input.SourceLocationName, "{SourceLocationName}", false);
970
934
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "VodSourceName", () => input.VodSourceName, "{VodSourceName}", false);
971
935
  let body;
972
- body = JSON.stringify({
973
- ...(input.HttpPackageConfigurations != null && {
974
- HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context),
975
- }),
976
- });
936
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
937
+ HttpPackageConfigurations: (_) => (0, smithy_client_1._json)(_),
938
+ }));
977
939
  return new protocol_http_1.HttpRequest({
978
940
  protocol,
979
941
  hostname,
@@ -989,16 +951,15 @@ const de_ConfigureLogsForChannelCommand = async (output, context) => {
989
951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
990
952
  return de_ConfigureLogsForChannelCommandError(output, context);
991
953
  }
992
- const contents = map({
954
+ const contents = (0, smithy_client_1.map)({
993
955
  $metadata: deserializeMetadata(output),
994
956
  });
995
957
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
996
- if (data.ChannelName != null) {
997
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
998
- }
999
- if (data.LogTypes != null) {
1000
- contents.LogTypes = de_LogTypes(data.LogTypes, context);
1001
- }
958
+ const doc = (0, smithy_client_1.take)(data, {
959
+ ChannelName: smithy_client_1.expectString,
960
+ LogTypes: smithy_client_1._json,
961
+ });
962
+ Object.assign(contents, doc);
1002
963
  return contents;
1003
964
  };
1004
965
  exports.de_ConfigureLogsForChannelCommand = de_ConfigureLogsForChannelCommand;
@@ -1009,10 +970,9 @@ const de_ConfigureLogsForChannelCommandError = async (output, context) => {
1009
970
  };
1010
971
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1011
972
  const parsedBody = parsedOutput.body;
1012
- (0, smithy_client_1.throwDefaultError)({
973
+ return throwDefaultError({
1013
974
  output,
1014
975
  parsedBody,
1015
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1016
976
  errorCode,
1017
977
  });
1018
978
  };
@@ -1020,16 +980,15 @@ const de_ConfigureLogsForPlaybackConfigurationCommand = async (output, context)
1020
980
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1021
981
  return de_ConfigureLogsForPlaybackConfigurationCommandError(output, context);
1022
982
  }
1023
- const contents = map({
983
+ const contents = (0, smithy_client_1.map)({
1024
984
  $metadata: deserializeMetadata(output),
1025
985
  });
1026
986
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1027
- if (data.PercentEnabled != null) {
1028
- contents.PercentEnabled = (0, smithy_client_1.expectInt32)(data.PercentEnabled);
1029
- }
1030
- if (data.PlaybackConfigurationName != null) {
1031
- contents.PlaybackConfigurationName = (0, smithy_client_1.expectString)(data.PlaybackConfigurationName);
1032
- }
987
+ const doc = (0, smithy_client_1.take)(data, {
988
+ PercentEnabled: smithy_client_1.expectInt32,
989
+ PlaybackConfigurationName: smithy_client_1.expectString,
990
+ });
991
+ Object.assign(contents, doc);
1033
992
  return contents;
1034
993
  };
1035
994
  exports.de_ConfigureLogsForPlaybackConfigurationCommand = de_ConfigureLogsForPlaybackConfigurationCommand;
@@ -1040,10 +999,9 @@ const de_ConfigureLogsForPlaybackConfigurationCommandError = async (output, cont
1040
999
  };
1041
1000
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1042
1001
  const parsedBody = parsedOutput.body;
1043
- (0, smithy_client_1.throwDefaultError)({
1002
+ return throwDefaultError({
1044
1003
  output,
1045
1004
  parsedBody,
1046
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1047
1005
  errorCode,
1048
1006
  });
1049
1007
  };
@@ -1051,40 +1009,23 @@ const de_CreateChannelCommand = async (output, context) => {
1051
1009
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1052
1010
  return de_CreateChannelCommandError(output, context);
1053
1011
  }
1054
- const contents = map({
1012
+ const contents = (0, smithy_client_1.map)({
1055
1013
  $metadata: deserializeMetadata(output),
1056
1014
  });
1057
1015
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1058
- if (data.Arn != null) {
1059
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1060
- }
1061
- if (data.ChannelName != null) {
1062
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
1063
- }
1064
- if (data.ChannelState != null) {
1065
- contents.ChannelState = (0, smithy_client_1.expectString)(data.ChannelState);
1066
- }
1067
- if (data.CreationTime != null) {
1068
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1069
- }
1070
- if (data.FillerSlate != null) {
1071
- contents.FillerSlate = de_SlateSource(data.FillerSlate, context);
1072
- }
1073
- if (data.LastModifiedTime != null) {
1074
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1075
- }
1076
- if (data.Outputs != null) {
1077
- contents.Outputs = de_ResponseOutputs(data.Outputs, context);
1078
- }
1079
- if (data.PlaybackMode != null) {
1080
- contents.PlaybackMode = (0, smithy_client_1.expectString)(data.PlaybackMode);
1081
- }
1082
- if (data.tags != null) {
1083
- contents.Tags = de___mapOf__string(data.tags, context);
1084
- }
1085
- if (data.Tier != null) {
1086
- contents.Tier = (0, smithy_client_1.expectString)(data.Tier);
1087
- }
1016
+ const doc = (0, smithy_client_1.take)(data, {
1017
+ Arn: smithy_client_1.expectString,
1018
+ ChannelName: smithy_client_1.expectString,
1019
+ ChannelState: smithy_client_1.expectString,
1020
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1021
+ FillerSlate: smithy_client_1._json,
1022
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1023
+ Outputs: smithy_client_1._json,
1024
+ PlaybackMode: smithy_client_1.expectString,
1025
+ Tags: [, smithy_client_1._json, `tags`],
1026
+ Tier: smithy_client_1.expectString,
1027
+ });
1028
+ Object.assign(contents, doc);
1088
1029
  return contents;
1089
1030
  };
1090
1031
  exports.de_CreateChannelCommand = de_CreateChannelCommand;
@@ -1095,10 +1036,9 @@ const de_CreateChannelCommandError = async (output, context) => {
1095
1036
  };
1096
1037
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1097
1038
  const parsedBody = parsedOutput.body;
1098
- (0, smithy_client_1.throwDefaultError)({
1039
+ return throwDefaultError({
1099
1040
  output,
1100
1041
  parsedBody,
1101
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1102
1042
  errorCode,
1103
1043
  });
1104
1044
  };
@@ -1106,31 +1046,20 @@ const de_CreateLiveSourceCommand = async (output, context) => {
1106
1046
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1107
1047
  return de_CreateLiveSourceCommandError(output, context);
1108
1048
  }
1109
- const contents = map({
1049
+ const contents = (0, smithy_client_1.map)({
1110
1050
  $metadata: deserializeMetadata(output),
1111
1051
  });
1112
1052
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1113
- if (data.Arn != null) {
1114
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1115
- }
1116
- if (data.CreationTime != null) {
1117
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1118
- }
1119
- if (data.HttpPackageConfigurations != null) {
1120
- contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context);
1121
- }
1122
- if (data.LastModifiedTime != null) {
1123
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1124
- }
1125
- if (data.LiveSourceName != null) {
1126
- contents.LiveSourceName = (0, smithy_client_1.expectString)(data.LiveSourceName);
1127
- }
1128
- if (data.SourceLocationName != null) {
1129
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1130
- }
1131
- if (data.tags != null) {
1132
- contents.Tags = de___mapOf__string(data.tags, context);
1133
- }
1053
+ const doc = (0, smithy_client_1.take)(data, {
1054
+ Arn: smithy_client_1.expectString,
1055
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1056
+ HttpPackageConfigurations: smithy_client_1._json,
1057
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1058
+ LiveSourceName: smithy_client_1.expectString,
1059
+ SourceLocationName: smithy_client_1.expectString,
1060
+ Tags: [, smithy_client_1._json, `tags`],
1061
+ });
1062
+ Object.assign(contents, doc);
1134
1063
  return contents;
1135
1064
  };
1136
1065
  exports.de_CreateLiveSourceCommand = de_CreateLiveSourceCommand;
@@ -1141,10 +1070,9 @@ const de_CreateLiveSourceCommandError = async (output, context) => {
1141
1070
  };
1142
1071
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1143
1072
  const parsedBody = parsedOutput.body;
1144
- (0, smithy_client_1.throwDefaultError)({
1073
+ return throwDefaultError({
1145
1074
  output,
1146
1075
  parsedBody,
1147
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1148
1076
  errorCode,
1149
1077
  });
1150
1078
  };
@@ -1152,28 +1080,19 @@ const de_CreatePrefetchScheduleCommand = async (output, context) => {
1152
1080
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1153
1081
  return de_CreatePrefetchScheduleCommandError(output, context);
1154
1082
  }
1155
- const contents = map({
1083
+ const contents = (0, smithy_client_1.map)({
1156
1084
  $metadata: deserializeMetadata(output),
1157
1085
  });
1158
1086
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1159
- if (data.Arn != null) {
1160
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1161
- }
1162
- if (data.Consumption != null) {
1163
- contents.Consumption = de_PrefetchConsumption(data.Consumption, context);
1164
- }
1165
- if (data.Name != null) {
1166
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
1167
- }
1168
- if (data.PlaybackConfigurationName != null) {
1169
- contents.PlaybackConfigurationName = (0, smithy_client_1.expectString)(data.PlaybackConfigurationName);
1170
- }
1171
- if (data.Retrieval != null) {
1172
- contents.Retrieval = de_PrefetchRetrieval(data.Retrieval, context);
1173
- }
1174
- if (data.StreamId != null) {
1175
- contents.StreamId = (0, smithy_client_1.expectString)(data.StreamId);
1176
- }
1087
+ const doc = (0, smithy_client_1.take)(data, {
1088
+ Arn: smithy_client_1.expectString,
1089
+ Consumption: (_) => de_PrefetchConsumption(_, context),
1090
+ Name: smithy_client_1.expectString,
1091
+ PlaybackConfigurationName: smithy_client_1.expectString,
1092
+ Retrieval: (_) => de_PrefetchRetrieval(_, context),
1093
+ StreamId: smithy_client_1.expectString,
1094
+ });
1095
+ Object.assign(contents, doc);
1177
1096
  return contents;
1178
1097
  };
1179
1098
  exports.de_CreatePrefetchScheduleCommand = de_CreatePrefetchScheduleCommand;
@@ -1184,10 +1103,9 @@ const de_CreatePrefetchScheduleCommandError = async (output, context) => {
1184
1103
  };
1185
1104
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1186
1105
  const parsedBody = parsedOutput.body;
1187
- (0, smithy_client_1.throwDefaultError)({
1106
+ return throwDefaultError({
1188
1107
  output,
1189
1108
  parsedBody,
1190
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1191
1109
  errorCode,
1192
1110
  });
1193
1111
  };
@@ -1195,43 +1113,24 @@ const de_CreateProgramCommand = async (output, context) => {
1195
1113
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1196
1114
  return de_CreateProgramCommandError(output, context);
1197
1115
  }
1198
- const contents = map({
1116
+ const contents = (0, smithy_client_1.map)({
1199
1117
  $metadata: deserializeMetadata(output),
1200
1118
  });
1201
1119
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1202
- if (data.AdBreaks != null) {
1203
- contents.AdBreaks = de___listOfAdBreak(data.AdBreaks, context);
1204
- }
1205
- if (data.Arn != null) {
1206
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1207
- }
1208
- if (data.ChannelName != null) {
1209
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
1210
- }
1211
- if (data.ClipRange != null) {
1212
- contents.ClipRange = de_ClipRange(data.ClipRange, context);
1213
- }
1214
- if (data.CreationTime != null) {
1215
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1216
- }
1217
- if (data.DurationMillis != null) {
1218
- contents.DurationMillis = (0, smithy_client_1.expectLong)(data.DurationMillis);
1219
- }
1220
- if (data.LiveSourceName != null) {
1221
- contents.LiveSourceName = (0, smithy_client_1.expectString)(data.LiveSourceName);
1222
- }
1223
- if (data.ProgramName != null) {
1224
- contents.ProgramName = (0, smithy_client_1.expectString)(data.ProgramName);
1225
- }
1226
- if (data.ScheduledStartTime != null) {
1227
- contents.ScheduledStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ScheduledStartTime)));
1228
- }
1229
- if (data.SourceLocationName != null) {
1230
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1231
- }
1232
- if (data.VodSourceName != null) {
1233
- contents.VodSourceName = (0, smithy_client_1.expectString)(data.VodSourceName);
1234
- }
1120
+ const doc = (0, smithy_client_1.take)(data, {
1121
+ AdBreaks: smithy_client_1._json,
1122
+ Arn: smithy_client_1.expectString,
1123
+ ChannelName: smithy_client_1.expectString,
1124
+ ClipRange: smithy_client_1._json,
1125
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1126
+ DurationMillis: smithy_client_1.expectLong,
1127
+ LiveSourceName: smithy_client_1.expectString,
1128
+ ProgramName: smithy_client_1.expectString,
1129
+ ScheduledStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1130
+ SourceLocationName: smithy_client_1.expectString,
1131
+ VodSourceName: smithy_client_1.expectString,
1132
+ });
1133
+ Object.assign(contents, doc);
1235
1134
  return contents;
1236
1135
  };
1237
1136
  exports.de_CreateProgramCommand = de_CreateProgramCommand;
@@ -1242,10 +1141,9 @@ const de_CreateProgramCommandError = async (output, context) => {
1242
1141
  };
1243
1142
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1244
1143
  const parsedBody = parsedOutput.body;
1245
- (0, smithy_client_1.throwDefaultError)({
1144
+ return throwDefaultError({
1246
1145
  output,
1247
1146
  parsedBody,
1248
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1249
1147
  errorCode,
1250
1148
  });
1251
1149
  };
@@ -1253,37 +1151,22 @@ const de_CreateSourceLocationCommand = async (output, context) => {
1253
1151
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1254
1152
  return de_CreateSourceLocationCommandError(output, context);
1255
1153
  }
1256
- const contents = map({
1154
+ const contents = (0, smithy_client_1.map)({
1257
1155
  $metadata: deserializeMetadata(output),
1258
1156
  });
1259
1157
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1260
- if (data.AccessConfiguration != null) {
1261
- contents.AccessConfiguration = de_AccessConfiguration(data.AccessConfiguration, context);
1262
- }
1263
- if (data.Arn != null) {
1264
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1265
- }
1266
- if (data.CreationTime != null) {
1267
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1268
- }
1269
- if (data.DefaultSegmentDeliveryConfiguration != null) {
1270
- contents.DefaultSegmentDeliveryConfiguration = de_DefaultSegmentDeliveryConfiguration(data.DefaultSegmentDeliveryConfiguration, context);
1271
- }
1272
- if (data.HttpConfiguration != null) {
1273
- contents.HttpConfiguration = de_HttpConfiguration(data.HttpConfiguration, context);
1274
- }
1275
- if (data.LastModifiedTime != null) {
1276
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1277
- }
1278
- if (data.SegmentDeliveryConfigurations != null) {
1279
- contents.SegmentDeliveryConfigurations = de___listOfSegmentDeliveryConfiguration(data.SegmentDeliveryConfigurations, context);
1280
- }
1281
- if (data.SourceLocationName != null) {
1282
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1283
- }
1284
- if (data.tags != null) {
1285
- contents.Tags = de___mapOf__string(data.tags, context);
1286
- }
1158
+ const doc = (0, smithy_client_1.take)(data, {
1159
+ AccessConfiguration: smithy_client_1._json,
1160
+ Arn: smithy_client_1.expectString,
1161
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1162
+ DefaultSegmentDeliveryConfiguration: smithy_client_1._json,
1163
+ HttpConfiguration: smithy_client_1._json,
1164
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1165
+ SegmentDeliveryConfigurations: smithy_client_1._json,
1166
+ SourceLocationName: smithy_client_1.expectString,
1167
+ Tags: [, smithy_client_1._json, `tags`],
1168
+ });
1169
+ Object.assign(contents, doc);
1287
1170
  return contents;
1288
1171
  };
1289
1172
  exports.de_CreateSourceLocationCommand = de_CreateSourceLocationCommand;
@@ -1294,10 +1177,9 @@ const de_CreateSourceLocationCommandError = async (output, context) => {
1294
1177
  };
1295
1178
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1296
1179
  const parsedBody = parsedOutput.body;
1297
- (0, smithy_client_1.throwDefaultError)({
1180
+ return throwDefaultError({
1298
1181
  output,
1299
1182
  parsedBody,
1300
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1301
1183
  errorCode,
1302
1184
  });
1303
1185
  };
@@ -1305,31 +1187,20 @@ const de_CreateVodSourceCommand = async (output, context) => {
1305
1187
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1306
1188
  return de_CreateVodSourceCommandError(output, context);
1307
1189
  }
1308
- const contents = map({
1190
+ const contents = (0, smithy_client_1.map)({
1309
1191
  $metadata: deserializeMetadata(output),
1310
1192
  });
1311
1193
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1312
- if (data.Arn != null) {
1313
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1314
- }
1315
- if (data.CreationTime != null) {
1316
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1317
- }
1318
- if (data.HttpPackageConfigurations != null) {
1319
- contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context);
1320
- }
1321
- if (data.LastModifiedTime != null) {
1322
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1323
- }
1324
- if (data.SourceLocationName != null) {
1325
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1326
- }
1327
- if (data.tags != null) {
1328
- contents.Tags = de___mapOf__string(data.tags, context);
1329
- }
1330
- if (data.VodSourceName != null) {
1331
- contents.VodSourceName = (0, smithy_client_1.expectString)(data.VodSourceName);
1332
- }
1194
+ const doc = (0, smithy_client_1.take)(data, {
1195
+ Arn: smithy_client_1.expectString,
1196
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1197
+ HttpPackageConfigurations: smithy_client_1._json,
1198
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1199
+ SourceLocationName: smithy_client_1.expectString,
1200
+ Tags: [, smithy_client_1._json, `tags`],
1201
+ VodSourceName: smithy_client_1.expectString,
1202
+ });
1203
+ Object.assign(contents, doc);
1333
1204
  return contents;
1334
1205
  };
1335
1206
  exports.de_CreateVodSourceCommand = de_CreateVodSourceCommand;
@@ -1340,10 +1211,9 @@ const de_CreateVodSourceCommandError = async (output, context) => {
1340
1211
  };
1341
1212
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1342
1213
  const parsedBody = parsedOutput.body;
1343
- (0, smithy_client_1.throwDefaultError)({
1214
+ return throwDefaultError({
1344
1215
  output,
1345
1216
  parsedBody,
1346
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1347
1217
  errorCode,
1348
1218
  });
1349
1219
  };
@@ -1351,7 +1221,7 @@ const de_DeleteChannelCommand = async (output, context) => {
1351
1221
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
1222
  return de_DeleteChannelCommandError(output, context);
1353
1223
  }
1354
- const contents = map({
1224
+ const contents = (0, smithy_client_1.map)({
1355
1225
  $metadata: deserializeMetadata(output),
1356
1226
  });
1357
1227
  await collectBody(output.body, context);
@@ -1365,10 +1235,9 @@ const de_DeleteChannelCommandError = async (output, context) => {
1365
1235
  };
1366
1236
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1367
1237
  const parsedBody = parsedOutput.body;
1368
- (0, smithy_client_1.throwDefaultError)({
1238
+ return throwDefaultError({
1369
1239
  output,
1370
1240
  parsedBody,
1371
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1372
1241
  errorCode,
1373
1242
  });
1374
1243
  };
@@ -1376,7 +1245,7 @@ const de_DeleteChannelPolicyCommand = async (output, context) => {
1376
1245
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1377
1246
  return de_DeleteChannelPolicyCommandError(output, context);
1378
1247
  }
1379
- const contents = map({
1248
+ const contents = (0, smithy_client_1.map)({
1380
1249
  $metadata: deserializeMetadata(output),
1381
1250
  });
1382
1251
  await collectBody(output.body, context);
@@ -1390,10 +1259,9 @@ const de_DeleteChannelPolicyCommandError = async (output, context) => {
1390
1259
  };
1391
1260
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1392
1261
  const parsedBody = parsedOutput.body;
1393
- (0, smithy_client_1.throwDefaultError)({
1262
+ return throwDefaultError({
1394
1263
  output,
1395
1264
  parsedBody,
1396
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1397
1265
  errorCode,
1398
1266
  });
1399
1267
  };
@@ -1401,7 +1269,7 @@ const de_DeleteLiveSourceCommand = async (output, context) => {
1401
1269
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1402
1270
  return de_DeleteLiveSourceCommandError(output, context);
1403
1271
  }
1404
- const contents = map({
1272
+ const contents = (0, smithy_client_1.map)({
1405
1273
  $metadata: deserializeMetadata(output),
1406
1274
  });
1407
1275
  await collectBody(output.body, context);
@@ -1415,10 +1283,9 @@ const de_DeleteLiveSourceCommandError = async (output, context) => {
1415
1283
  };
1416
1284
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1417
1285
  const parsedBody = parsedOutput.body;
1418
- (0, smithy_client_1.throwDefaultError)({
1286
+ return throwDefaultError({
1419
1287
  output,
1420
1288
  parsedBody,
1421
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1422
1289
  errorCode,
1423
1290
  });
1424
1291
  };
@@ -1426,7 +1293,7 @@ const de_DeletePlaybackConfigurationCommand = async (output, context) => {
1426
1293
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1427
1294
  return de_DeletePlaybackConfigurationCommandError(output, context);
1428
1295
  }
1429
- const contents = map({
1296
+ const contents = (0, smithy_client_1.map)({
1430
1297
  $metadata: deserializeMetadata(output),
1431
1298
  });
1432
1299
  await collectBody(output.body, context);
@@ -1440,10 +1307,9 @@ const de_DeletePlaybackConfigurationCommandError = async (output, context) => {
1440
1307
  };
1441
1308
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1442
1309
  const parsedBody = parsedOutput.body;
1443
- (0, smithy_client_1.throwDefaultError)({
1310
+ return throwDefaultError({
1444
1311
  output,
1445
1312
  parsedBody,
1446
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1447
1313
  errorCode,
1448
1314
  });
1449
1315
  };
@@ -1451,7 +1317,7 @@ const de_DeletePrefetchScheduleCommand = async (output, context) => {
1451
1317
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1452
1318
  return de_DeletePrefetchScheduleCommandError(output, context);
1453
1319
  }
1454
- const contents = map({
1320
+ const contents = (0, smithy_client_1.map)({
1455
1321
  $metadata: deserializeMetadata(output),
1456
1322
  });
1457
1323
  await collectBody(output.body, context);
@@ -1465,10 +1331,9 @@ const de_DeletePrefetchScheduleCommandError = async (output, context) => {
1465
1331
  };
1466
1332
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1467
1333
  const parsedBody = parsedOutput.body;
1468
- (0, smithy_client_1.throwDefaultError)({
1334
+ return throwDefaultError({
1469
1335
  output,
1470
1336
  parsedBody,
1471
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1472
1337
  errorCode,
1473
1338
  });
1474
1339
  };
@@ -1476,7 +1341,7 @@ const de_DeleteProgramCommand = async (output, context) => {
1476
1341
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1477
1342
  return de_DeleteProgramCommandError(output, context);
1478
1343
  }
1479
- const contents = map({
1344
+ const contents = (0, smithy_client_1.map)({
1480
1345
  $metadata: deserializeMetadata(output),
1481
1346
  });
1482
1347
  await collectBody(output.body, context);
@@ -1490,10 +1355,9 @@ const de_DeleteProgramCommandError = async (output, context) => {
1490
1355
  };
1491
1356
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1492
1357
  const parsedBody = parsedOutput.body;
1493
- (0, smithy_client_1.throwDefaultError)({
1358
+ return throwDefaultError({
1494
1359
  output,
1495
1360
  parsedBody,
1496
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1497
1361
  errorCode,
1498
1362
  });
1499
1363
  };
@@ -1501,7 +1365,7 @@ const de_DeleteSourceLocationCommand = async (output, context) => {
1501
1365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1502
1366
  return de_DeleteSourceLocationCommandError(output, context);
1503
1367
  }
1504
- const contents = map({
1368
+ const contents = (0, smithy_client_1.map)({
1505
1369
  $metadata: deserializeMetadata(output),
1506
1370
  });
1507
1371
  await collectBody(output.body, context);
@@ -1515,10 +1379,9 @@ const de_DeleteSourceLocationCommandError = async (output, context) => {
1515
1379
  };
1516
1380
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1517
1381
  const parsedBody = parsedOutput.body;
1518
- (0, smithy_client_1.throwDefaultError)({
1382
+ return throwDefaultError({
1519
1383
  output,
1520
1384
  parsedBody,
1521
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1522
1385
  errorCode,
1523
1386
  });
1524
1387
  };
@@ -1526,7 +1389,7 @@ const de_DeleteVodSourceCommand = async (output, context) => {
1526
1389
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1527
1390
  return de_DeleteVodSourceCommandError(output, context);
1528
1391
  }
1529
- const contents = map({
1392
+ const contents = (0, smithy_client_1.map)({
1530
1393
  $metadata: deserializeMetadata(output),
1531
1394
  });
1532
1395
  await collectBody(output.body, context);
@@ -1540,10 +1403,9 @@ const de_DeleteVodSourceCommandError = async (output, context) => {
1540
1403
  };
1541
1404
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1542
1405
  const parsedBody = parsedOutput.body;
1543
- (0, smithy_client_1.throwDefaultError)({
1406
+ return throwDefaultError({
1544
1407
  output,
1545
1408
  parsedBody,
1546
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1547
1409
  errorCode,
1548
1410
  });
1549
1411
  };
@@ -1551,43 +1413,24 @@ const de_DescribeChannelCommand = async (output, context) => {
1551
1413
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1552
1414
  return de_DescribeChannelCommandError(output, context);
1553
1415
  }
1554
- const contents = map({
1416
+ const contents = (0, smithy_client_1.map)({
1555
1417
  $metadata: deserializeMetadata(output),
1556
1418
  });
1557
1419
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1558
- if (data.Arn != null) {
1559
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1560
- }
1561
- if (data.ChannelName != null) {
1562
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
1563
- }
1564
- if (data.ChannelState != null) {
1565
- contents.ChannelState = (0, smithy_client_1.expectString)(data.ChannelState);
1566
- }
1567
- if (data.CreationTime != null) {
1568
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1569
- }
1570
- if (data.FillerSlate != null) {
1571
- contents.FillerSlate = de_SlateSource(data.FillerSlate, context);
1572
- }
1573
- if (data.LastModifiedTime != null) {
1574
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1575
- }
1576
- if (data.LogConfiguration != null) {
1577
- contents.LogConfiguration = de_LogConfigurationForChannel(data.LogConfiguration, context);
1578
- }
1579
- if (data.Outputs != null) {
1580
- contents.Outputs = de_ResponseOutputs(data.Outputs, context);
1581
- }
1582
- if (data.PlaybackMode != null) {
1583
- contents.PlaybackMode = (0, smithy_client_1.expectString)(data.PlaybackMode);
1584
- }
1585
- if (data.tags != null) {
1586
- contents.Tags = de___mapOf__string(data.tags, context);
1587
- }
1588
- if (data.Tier != null) {
1589
- contents.Tier = (0, smithy_client_1.expectString)(data.Tier);
1590
- }
1420
+ const doc = (0, smithy_client_1.take)(data, {
1421
+ Arn: smithy_client_1.expectString,
1422
+ ChannelName: smithy_client_1.expectString,
1423
+ ChannelState: smithy_client_1.expectString,
1424
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1425
+ FillerSlate: smithy_client_1._json,
1426
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1427
+ LogConfiguration: smithy_client_1._json,
1428
+ Outputs: smithy_client_1._json,
1429
+ PlaybackMode: smithy_client_1.expectString,
1430
+ Tags: [, smithy_client_1._json, `tags`],
1431
+ Tier: smithy_client_1.expectString,
1432
+ });
1433
+ Object.assign(contents, doc);
1591
1434
  return contents;
1592
1435
  };
1593
1436
  exports.de_DescribeChannelCommand = de_DescribeChannelCommand;
@@ -1598,10 +1441,9 @@ const de_DescribeChannelCommandError = async (output, context) => {
1598
1441
  };
1599
1442
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1600
1443
  const parsedBody = parsedOutput.body;
1601
- (0, smithy_client_1.throwDefaultError)({
1444
+ return throwDefaultError({
1602
1445
  output,
1603
1446
  parsedBody,
1604
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1605
1447
  errorCode,
1606
1448
  });
1607
1449
  };
@@ -1609,31 +1451,20 @@ const de_DescribeLiveSourceCommand = async (output, context) => {
1609
1451
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1610
1452
  return de_DescribeLiveSourceCommandError(output, context);
1611
1453
  }
1612
- const contents = map({
1454
+ const contents = (0, smithy_client_1.map)({
1613
1455
  $metadata: deserializeMetadata(output),
1614
1456
  });
1615
1457
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1616
- if (data.Arn != null) {
1617
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1618
- }
1619
- if (data.CreationTime != null) {
1620
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1621
- }
1622
- if (data.HttpPackageConfigurations != null) {
1623
- contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context);
1624
- }
1625
- if (data.LastModifiedTime != null) {
1626
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1627
- }
1628
- if (data.LiveSourceName != null) {
1629
- contents.LiveSourceName = (0, smithy_client_1.expectString)(data.LiveSourceName);
1630
- }
1631
- if (data.SourceLocationName != null) {
1632
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1633
- }
1634
- if (data.tags != null) {
1635
- contents.Tags = de___mapOf__string(data.tags, context);
1636
- }
1458
+ const doc = (0, smithy_client_1.take)(data, {
1459
+ Arn: smithy_client_1.expectString,
1460
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1461
+ HttpPackageConfigurations: smithy_client_1._json,
1462
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1463
+ LiveSourceName: smithy_client_1.expectString,
1464
+ SourceLocationName: smithy_client_1.expectString,
1465
+ Tags: [, smithy_client_1._json, `tags`],
1466
+ });
1467
+ Object.assign(contents, doc);
1637
1468
  return contents;
1638
1469
  };
1639
1470
  exports.de_DescribeLiveSourceCommand = de_DescribeLiveSourceCommand;
@@ -1644,10 +1475,9 @@ const de_DescribeLiveSourceCommandError = async (output, context) => {
1644
1475
  };
1645
1476
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1646
1477
  const parsedBody = parsedOutput.body;
1647
- (0, smithy_client_1.throwDefaultError)({
1478
+ return throwDefaultError({
1648
1479
  output,
1649
1480
  parsedBody,
1650
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1651
1481
  errorCode,
1652
1482
  });
1653
1483
  };
@@ -1655,43 +1485,24 @@ const de_DescribeProgramCommand = async (output, context) => {
1655
1485
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1656
1486
  return de_DescribeProgramCommandError(output, context);
1657
1487
  }
1658
- const contents = map({
1488
+ const contents = (0, smithy_client_1.map)({
1659
1489
  $metadata: deserializeMetadata(output),
1660
1490
  });
1661
1491
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1662
- if (data.AdBreaks != null) {
1663
- contents.AdBreaks = de___listOfAdBreak(data.AdBreaks, context);
1664
- }
1665
- if (data.Arn != null) {
1666
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1667
- }
1668
- if (data.ChannelName != null) {
1669
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
1670
- }
1671
- if (data.ClipRange != null) {
1672
- contents.ClipRange = de_ClipRange(data.ClipRange, context);
1673
- }
1674
- if (data.CreationTime != null) {
1675
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1676
- }
1677
- if (data.DurationMillis != null) {
1678
- contents.DurationMillis = (0, smithy_client_1.expectLong)(data.DurationMillis);
1679
- }
1680
- if (data.LiveSourceName != null) {
1681
- contents.LiveSourceName = (0, smithy_client_1.expectString)(data.LiveSourceName);
1682
- }
1683
- if (data.ProgramName != null) {
1684
- contents.ProgramName = (0, smithy_client_1.expectString)(data.ProgramName);
1685
- }
1686
- if (data.ScheduledStartTime != null) {
1687
- contents.ScheduledStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ScheduledStartTime)));
1688
- }
1689
- if (data.SourceLocationName != null) {
1690
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1691
- }
1692
- if (data.VodSourceName != null) {
1693
- contents.VodSourceName = (0, smithy_client_1.expectString)(data.VodSourceName);
1694
- }
1492
+ const doc = (0, smithy_client_1.take)(data, {
1493
+ AdBreaks: smithy_client_1._json,
1494
+ Arn: smithy_client_1.expectString,
1495
+ ChannelName: smithy_client_1.expectString,
1496
+ ClipRange: smithy_client_1._json,
1497
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1498
+ DurationMillis: smithy_client_1.expectLong,
1499
+ LiveSourceName: smithy_client_1.expectString,
1500
+ ProgramName: smithy_client_1.expectString,
1501
+ ScheduledStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1502
+ SourceLocationName: smithy_client_1.expectString,
1503
+ VodSourceName: smithy_client_1.expectString,
1504
+ });
1505
+ Object.assign(contents, doc);
1695
1506
  return contents;
1696
1507
  };
1697
1508
  exports.de_DescribeProgramCommand = de_DescribeProgramCommand;
@@ -1702,10 +1513,9 @@ const de_DescribeProgramCommandError = async (output, context) => {
1702
1513
  };
1703
1514
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1704
1515
  const parsedBody = parsedOutput.body;
1705
- (0, smithy_client_1.throwDefaultError)({
1516
+ return throwDefaultError({
1706
1517
  output,
1707
1518
  parsedBody,
1708
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1709
1519
  errorCode,
1710
1520
  });
1711
1521
  };
@@ -1713,37 +1523,22 @@ const de_DescribeSourceLocationCommand = async (output, context) => {
1713
1523
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1714
1524
  return de_DescribeSourceLocationCommandError(output, context);
1715
1525
  }
1716
- const contents = map({
1526
+ const contents = (0, smithy_client_1.map)({
1717
1527
  $metadata: deserializeMetadata(output),
1718
1528
  });
1719
1529
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1720
- if (data.AccessConfiguration != null) {
1721
- contents.AccessConfiguration = de_AccessConfiguration(data.AccessConfiguration, context);
1722
- }
1723
- if (data.Arn != null) {
1724
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1725
- }
1726
- if (data.CreationTime != null) {
1727
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1728
- }
1729
- if (data.DefaultSegmentDeliveryConfiguration != null) {
1730
- contents.DefaultSegmentDeliveryConfiguration = de_DefaultSegmentDeliveryConfiguration(data.DefaultSegmentDeliveryConfiguration, context);
1731
- }
1732
- if (data.HttpConfiguration != null) {
1733
- contents.HttpConfiguration = de_HttpConfiguration(data.HttpConfiguration, context);
1734
- }
1735
- if (data.LastModifiedTime != null) {
1736
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1737
- }
1738
- if (data.SegmentDeliveryConfigurations != null) {
1739
- contents.SegmentDeliveryConfigurations = de___listOfSegmentDeliveryConfiguration(data.SegmentDeliveryConfigurations, context);
1740
- }
1741
- if (data.SourceLocationName != null) {
1742
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1743
- }
1744
- if (data.tags != null) {
1745
- contents.Tags = de___mapOf__string(data.tags, context);
1746
- }
1530
+ const doc = (0, smithy_client_1.take)(data, {
1531
+ AccessConfiguration: smithy_client_1._json,
1532
+ Arn: smithy_client_1.expectString,
1533
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1534
+ DefaultSegmentDeliveryConfiguration: smithy_client_1._json,
1535
+ HttpConfiguration: smithy_client_1._json,
1536
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1537
+ SegmentDeliveryConfigurations: smithy_client_1._json,
1538
+ SourceLocationName: smithy_client_1.expectString,
1539
+ Tags: [, smithy_client_1._json, `tags`],
1540
+ });
1541
+ Object.assign(contents, doc);
1747
1542
  return contents;
1748
1543
  };
1749
1544
  exports.de_DescribeSourceLocationCommand = de_DescribeSourceLocationCommand;
@@ -1754,10 +1549,9 @@ const de_DescribeSourceLocationCommandError = async (output, context) => {
1754
1549
  };
1755
1550
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1756
1551
  const parsedBody = parsedOutput.body;
1757
- (0, smithy_client_1.throwDefaultError)({
1552
+ return throwDefaultError({
1758
1553
  output,
1759
1554
  parsedBody,
1760
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1761
1555
  errorCode,
1762
1556
  });
1763
1557
  };
@@ -1765,31 +1559,20 @@ const de_DescribeVodSourceCommand = async (output, context) => {
1765
1559
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1766
1560
  return de_DescribeVodSourceCommandError(output, context);
1767
1561
  }
1768
- const contents = map({
1562
+ const contents = (0, smithy_client_1.map)({
1769
1563
  $metadata: deserializeMetadata(output),
1770
1564
  });
1771
1565
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1772
- if (data.Arn != null) {
1773
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1774
- }
1775
- if (data.CreationTime != null) {
1776
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
1777
- }
1778
- if (data.HttpPackageConfigurations != null) {
1779
- contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context);
1780
- }
1781
- if (data.LastModifiedTime != null) {
1782
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
1783
- }
1784
- if (data.SourceLocationName != null) {
1785
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
1786
- }
1787
- if (data.tags != null) {
1788
- contents.Tags = de___mapOf__string(data.tags, context);
1789
- }
1790
- if (data.VodSourceName != null) {
1791
- contents.VodSourceName = (0, smithy_client_1.expectString)(data.VodSourceName);
1792
- }
1566
+ const doc = (0, smithy_client_1.take)(data, {
1567
+ Arn: smithy_client_1.expectString,
1568
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1569
+ HttpPackageConfigurations: smithy_client_1._json,
1570
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1571
+ SourceLocationName: smithy_client_1.expectString,
1572
+ Tags: [, smithy_client_1._json, `tags`],
1573
+ VodSourceName: smithy_client_1.expectString,
1574
+ });
1575
+ Object.assign(contents, doc);
1793
1576
  return contents;
1794
1577
  };
1795
1578
  exports.de_DescribeVodSourceCommand = de_DescribeVodSourceCommand;
@@ -1800,10 +1583,9 @@ const de_DescribeVodSourceCommandError = async (output, context) => {
1800
1583
  };
1801
1584
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1802
1585
  const parsedBody = parsedOutput.body;
1803
- (0, smithy_client_1.throwDefaultError)({
1586
+ return throwDefaultError({
1804
1587
  output,
1805
1588
  parsedBody,
1806
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1807
1589
  errorCode,
1808
1590
  });
1809
1591
  };
@@ -1811,13 +1593,14 @@ const de_GetChannelPolicyCommand = async (output, context) => {
1811
1593
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1812
1594
  return de_GetChannelPolicyCommandError(output, context);
1813
1595
  }
1814
- const contents = map({
1596
+ const contents = (0, smithy_client_1.map)({
1815
1597
  $metadata: deserializeMetadata(output),
1816
1598
  });
1817
1599
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1818
- if (data.Policy != null) {
1819
- contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
1820
- }
1600
+ const doc = (0, smithy_client_1.take)(data, {
1601
+ Policy: smithy_client_1.expectString,
1602
+ });
1603
+ Object.assign(contents, doc);
1821
1604
  return contents;
1822
1605
  };
1823
1606
  exports.de_GetChannelPolicyCommand = de_GetChannelPolicyCommand;
@@ -1828,10 +1611,9 @@ const de_GetChannelPolicyCommandError = async (output, context) => {
1828
1611
  };
1829
1612
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1830
1613
  const parsedBody = parsedOutput.body;
1831
- (0, smithy_client_1.throwDefaultError)({
1614
+ return throwDefaultError({
1832
1615
  output,
1833
1616
  parsedBody,
1834
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1835
1617
  errorCode,
1836
1618
  });
1837
1619
  };
@@ -1839,16 +1621,15 @@ const de_GetChannelScheduleCommand = async (output, context) => {
1839
1621
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1840
1622
  return de_GetChannelScheduleCommandError(output, context);
1841
1623
  }
1842
- const contents = map({
1624
+ const contents = (0, smithy_client_1.map)({
1843
1625
  $metadata: deserializeMetadata(output),
1844
1626
  });
1845
1627
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1846
- if (data.Items != null) {
1847
- contents.Items = de___listOfScheduleEntry(data.Items, context);
1848
- }
1849
- if (data.NextToken != null) {
1850
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1851
- }
1628
+ const doc = (0, smithy_client_1.take)(data, {
1629
+ Items: (_) => de___listOfScheduleEntry(_, context),
1630
+ NextToken: smithy_client_1.expectString,
1631
+ });
1632
+ Object.assign(contents, doc);
1852
1633
  return contents;
1853
1634
  };
1854
1635
  exports.de_GetChannelScheduleCommand = de_GetChannelScheduleCommand;
@@ -1859,10 +1640,9 @@ const de_GetChannelScheduleCommandError = async (output, context) => {
1859
1640
  };
1860
1641
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1861
1642
  const parsedBody = parsedOutput.body;
1862
- (0, smithy_client_1.throwDefaultError)({
1643
+ return throwDefaultError({
1863
1644
  output,
1864
1645
  parsedBody,
1865
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1866
1646
  errorCode,
1867
1647
  });
1868
1648
  };
@@ -1870,67 +1650,32 @@ const de_GetPlaybackConfigurationCommand = async (output, context) => {
1870
1650
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1871
1651
  return de_GetPlaybackConfigurationCommandError(output, context);
1872
1652
  }
1873
- const contents = map({
1653
+ const contents = (0, smithy_client_1.map)({
1874
1654
  $metadata: deserializeMetadata(output),
1875
1655
  });
1876
1656
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1877
- if (data.AdDecisionServerUrl != null) {
1878
- contents.AdDecisionServerUrl = (0, smithy_client_1.expectString)(data.AdDecisionServerUrl);
1879
- }
1880
- if (data.AvailSuppression != null) {
1881
- contents.AvailSuppression = de_AvailSuppression(data.AvailSuppression, context);
1882
- }
1883
- if (data.Bumper != null) {
1884
- contents.Bumper = de_Bumper(data.Bumper, context);
1885
- }
1886
- if (data.CdnConfiguration != null) {
1887
- contents.CdnConfiguration = de_CdnConfiguration(data.CdnConfiguration, context);
1888
- }
1889
- if (data.ConfigurationAliases != null) {
1890
- contents.ConfigurationAliases = de_ConfigurationAliasesResponse(data.ConfigurationAliases, context);
1891
- }
1892
- if (data.DashConfiguration != null) {
1893
- contents.DashConfiguration = de_DashConfiguration(data.DashConfiguration, context);
1894
- }
1895
- if (data.HlsConfiguration != null) {
1896
- contents.HlsConfiguration = de_HlsConfiguration(data.HlsConfiguration, context);
1897
- }
1898
- if (data.LivePreRollConfiguration != null) {
1899
- contents.LivePreRollConfiguration = de_LivePreRollConfiguration(data.LivePreRollConfiguration, context);
1900
- }
1901
- if (data.LogConfiguration != null) {
1902
- contents.LogConfiguration = de_LogConfiguration(data.LogConfiguration, context);
1903
- }
1904
- if (data.ManifestProcessingRules != null) {
1905
- contents.ManifestProcessingRules = de_ManifestProcessingRules(data.ManifestProcessingRules, context);
1906
- }
1907
- if (data.Name != null) {
1908
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
1909
- }
1910
- if (data.PersonalizationThresholdSeconds != null) {
1911
- contents.PersonalizationThresholdSeconds = (0, smithy_client_1.expectInt32)(data.PersonalizationThresholdSeconds);
1912
- }
1913
- if (data.PlaybackConfigurationArn != null) {
1914
- contents.PlaybackConfigurationArn = (0, smithy_client_1.expectString)(data.PlaybackConfigurationArn);
1915
- }
1916
- if (data.PlaybackEndpointPrefix != null) {
1917
- contents.PlaybackEndpointPrefix = (0, smithy_client_1.expectString)(data.PlaybackEndpointPrefix);
1918
- }
1919
- if (data.SessionInitializationEndpointPrefix != null) {
1920
- contents.SessionInitializationEndpointPrefix = (0, smithy_client_1.expectString)(data.SessionInitializationEndpointPrefix);
1921
- }
1922
- if (data.SlateAdUrl != null) {
1923
- contents.SlateAdUrl = (0, smithy_client_1.expectString)(data.SlateAdUrl);
1924
- }
1925
- if (data.tags != null) {
1926
- contents.Tags = de___mapOf__string(data.tags, context);
1927
- }
1928
- if (data.TranscodeProfileName != null) {
1929
- contents.TranscodeProfileName = (0, smithy_client_1.expectString)(data.TranscodeProfileName);
1930
- }
1931
- if (data.VideoContentSourceUrl != null) {
1932
- contents.VideoContentSourceUrl = (0, smithy_client_1.expectString)(data.VideoContentSourceUrl);
1933
- }
1657
+ const doc = (0, smithy_client_1.take)(data, {
1658
+ AdDecisionServerUrl: smithy_client_1.expectString,
1659
+ AvailSuppression: smithy_client_1._json,
1660
+ Bumper: smithy_client_1._json,
1661
+ CdnConfiguration: smithy_client_1._json,
1662
+ ConfigurationAliases: smithy_client_1._json,
1663
+ DashConfiguration: smithy_client_1._json,
1664
+ HlsConfiguration: smithy_client_1._json,
1665
+ LivePreRollConfiguration: smithy_client_1._json,
1666
+ LogConfiguration: smithy_client_1._json,
1667
+ ManifestProcessingRules: smithy_client_1._json,
1668
+ Name: smithy_client_1.expectString,
1669
+ PersonalizationThresholdSeconds: smithy_client_1.expectInt32,
1670
+ PlaybackConfigurationArn: smithy_client_1.expectString,
1671
+ PlaybackEndpointPrefix: smithy_client_1.expectString,
1672
+ SessionInitializationEndpointPrefix: smithy_client_1.expectString,
1673
+ SlateAdUrl: smithy_client_1.expectString,
1674
+ Tags: [, smithy_client_1._json, `tags`],
1675
+ TranscodeProfileName: smithy_client_1.expectString,
1676
+ VideoContentSourceUrl: smithy_client_1.expectString,
1677
+ });
1678
+ Object.assign(contents, doc);
1934
1679
  return contents;
1935
1680
  };
1936
1681
  exports.de_GetPlaybackConfigurationCommand = de_GetPlaybackConfigurationCommand;
@@ -1941,10 +1686,9 @@ const de_GetPlaybackConfigurationCommandError = async (output, context) => {
1941
1686
  };
1942
1687
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1943
1688
  const parsedBody = parsedOutput.body;
1944
- (0, smithy_client_1.throwDefaultError)({
1689
+ return throwDefaultError({
1945
1690
  output,
1946
1691
  parsedBody,
1947
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1948
1692
  errorCode,
1949
1693
  });
1950
1694
  };
@@ -1952,28 +1696,19 @@ const de_GetPrefetchScheduleCommand = async (output, context) => {
1952
1696
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1953
1697
  return de_GetPrefetchScheduleCommandError(output, context);
1954
1698
  }
1955
- const contents = map({
1699
+ const contents = (0, smithy_client_1.map)({
1956
1700
  $metadata: deserializeMetadata(output),
1957
1701
  });
1958
1702
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1959
- if (data.Arn != null) {
1960
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1961
- }
1962
- if (data.Consumption != null) {
1963
- contents.Consumption = de_PrefetchConsumption(data.Consumption, context);
1964
- }
1965
- if (data.Name != null) {
1966
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
1967
- }
1968
- if (data.PlaybackConfigurationName != null) {
1969
- contents.PlaybackConfigurationName = (0, smithy_client_1.expectString)(data.PlaybackConfigurationName);
1970
- }
1971
- if (data.Retrieval != null) {
1972
- contents.Retrieval = de_PrefetchRetrieval(data.Retrieval, context);
1973
- }
1974
- if (data.StreamId != null) {
1975
- contents.StreamId = (0, smithy_client_1.expectString)(data.StreamId);
1976
- }
1703
+ const doc = (0, smithy_client_1.take)(data, {
1704
+ Arn: smithy_client_1.expectString,
1705
+ Consumption: (_) => de_PrefetchConsumption(_, context),
1706
+ Name: smithy_client_1.expectString,
1707
+ PlaybackConfigurationName: smithy_client_1.expectString,
1708
+ Retrieval: (_) => de_PrefetchRetrieval(_, context),
1709
+ StreamId: smithy_client_1.expectString,
1710
+ });
1711
+ Object.assign(contents, doc);
1977
1712
  return contents;
1978
1713
  };
1979
1714
  exports.de_GetPrefetchScheduleCommand = de_GetPrefetchScheduleCommand;
@@ -1984,10 +1719,9 @@ const de_GetPrefetchScheduleCommandError = async (output, context) => {
1984
1719
  };
1985
1720
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1986
1721
  const parsedBody = parsedOutput.body;
1987
- (0, smithy_client_1.throwDefaultError)({
1722
+ return throwDefaultError({
1988
1723
  output,
1989
1724
  parsedBody,
1990
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
1991
1725
  errorCode,
1992
1726
  });
1993
1727
  };
@@ -1995,16 +1729,15 @@ const de_ListAlertsCommand = async (output, context) => {
1995
1729
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1996
1730
  return de_ListAlertsCommandError(output, context);
1997
1731
  }
1998
- const contents = map({
1732
+ const contents = (0, smithy_client_1.map)({
1999
1733
  $metadata: deserializeMetadata(output),
2000
1734
  });
2001
1735
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2002
- if (data.Items != null) {
2003
- contents.Items = de___listOfAlert(data.Items, context);
2004
- }
2005
- if (data.NextToken != null) {
2006
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2007
- }
1736
+ const doc = (0, smithy_client_1.take)(data, {
1737
+ Items: (_) => de___listOfAlert(_, context),
1738
+ NextToken: smithy_client_1.expectString,
1739
+ });
1740
+ Object.assign(contents, doc);
2008
1741
  return contents;
2009
1742
  };
2010
1743
  exports.de_ListAlertsCommand = de_ListAlertsCommand;
@@ -2015,10 +1748,9 @@ const de_ListAlertsCommandError = async (output, context) => {
2015
1748
  };
2016
1749
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2017
1750
  const parsedBody = parsedOutput.body;
2018
- (0, smithy_client_1.throwDefaultError)({
1751
+ return throwDefaultError({
2019
1752
  output,
2020
1753
  parsedBody,
2021
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2022
1754
  errorCode,
2023
1755
  });
2024
1756
  };
@@ -2026,16 +1758,15 @@ const de_ListChannelsCommand = async (output, context) => {
2026
1758
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2027
1759
  return de_ListChannelsCommandError(output, context);
2028
1760
  }
2029
- const contents = map({
1761
+ const contents = (0, smithy_client_1.map)({
2030
1762
  $metadata: deserializeMetadata(output),
2031
1763
  });
2032
1764
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2033
- if (data.Items != null) {
2034
- contents.Items = de___listOfChannel(data.Items, context);
2035
- }
2036
- if (data.NextToken != null) {
2037
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2038
- }
1765
+ const doc = (0, smithy_client_1.take)(data, {
1766
+ Items: (_) => de___listOfChannel(_, context),
1767
+ NextToken: smithy_client_1.expectString,
1768
+ });
1769
+ Object.assign(contents, doc);
2039
1770
  return contents;
2040
1771
  };
2041
1772
  exports.de_ListChannelsCommand = de_ListChannelsCommand;
@@ -2046,10 +1777,9 @@ const de_ListChannelsCommandError = async (output, context) => {
2046
1777
  };
2047
1778
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2048
1779
  const parsedBody = parsedOutput.body;
2049
- (0, smithy_client_1.throwDefaultError)({
1780
+ return throwDefaultError({
2050
1781
  output,
2051
1782
  parsedBody,
2052
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2053
1783
  errorCode,
2054
1784
  });
2055
1785
  };
@@ -2057,16 +1787,15 @@ const de_ListLiveSourcesCommand = async (output, context) => {
2057
1787
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2058
1788
  return de_ListLiveSourcesCommandError(output, context);
2059
1789
  }
2060
- const contents = map({
1790
+ const contents = (0, smithy_client_1.map)({
2061
1791
  $metadata: deserializeMetadata(output),
2062
1792
  });
2063
1793
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2064
- if (data.Items != null) {
2065
- contents.Items = de___listOfLiveSource(data.Items, context);
2066
- }
2067
- if (data.NextToken != null) {
2068
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2069
- }
1794
+ const doc = (0, smithy_client_1.take)(data, {
1795
+ Items: (_) => de___listOfLiveSource(_, context),
1796
+ NextToken: smithy_client_1.expectString,
1797
+ });
1798
+ Object.assign(contents, doc);
2070
1799
  return contents;
2071
1800
  };
2072
1801
  exports.de_ListLiveSourcesCommand = de_ListLiveSourcesCommand;
@@ -2077,10 +1806,9 @@ const de_ListLiveSourcesCommandError = async (output, context) => {
2077
1806
  };
2078
1807
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2079
1808
  const parsedBody = parsedOutput.body;
2080
- (0, smithy_client_1.throwDefaultError)({
1809
+ return throwDefaultError({
2081
1810
  output,
2082
1811
  parsedBody,
2083
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2084
1812
  errorCode,
2085
1813
  });
2086
1814
  };
@@ -2088,16 +1816,15 @@ const de_ListPlaybackConfigurationsCommand = async (output, context) => {
2088
1816
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2089
1817
  return de_ListPlaybackConfigurationsCommandError(output, context);
2090
1818
  }
2091
- const contents = map({
1819
+ const contents = (0, smithy_client_1.map)({
2092
1820
  $metadata: deserializeMetadata(output),
2093
1821
  });
2094
1822
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2095
- if (data.Items != null) {
2096
- contents.Items = de___listOfPlaybackConfiguration(data.Items, context);
2097
- }
2098
- if (data.NextToken != null) {
2099
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2100
- }
1823
+ const doc = (0, smithy_client_1.take)(data, {
1824
+ Items: (_) => de___listOfPlaybackConfiguration(_, context),
1825
+ NextToken: smithy_client_1.expectString,
1826
+ });
1827
+ Object.assign(contents, doc);
2101
1828
  return contents;
2102
1829
  };
2103
1830
  exports.de_ListPlaybackConfigurationsCommand = de_ListPlaybackConfigurationsCommand;
@@ -2108,10 +1835,9 @@ const de_ListPlaybackConfigurationsCommandError = async (output, context) => {
2108
1835
  };
2109
1836
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2110
1837
  const parsedBody = parsedOutput.body;
2111
- (0, smithy_client_1.throwDefaultError)({
1838
+ return throwDefaultError({
2112
1839
  output,
2113
1840
  parsedBody,
2114
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2115
1841
  errorCode,
2116
1842
  });
2117
1843
  };
@@ -2119,16 +1845,15 @@ const de_ListPrefetchSchedulesCommand = async (output, context) => {
2119
1845
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2120
1846
  return de_ListPrefetchSchedulesCommandError(output, context);
2121
1847
  }
2122
- const contents = map({
1848
+ const contents = (0, smithy_client_1.map)({
2123
1849
  $metadata: deserializeMetadata(output),
2124
1850
  });
2125
1851
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2126
- if (data.Items != null) {
2127
- contents.Items = de___listOfPrefetchSchedule(data.Items, context);
2128
- }
2129
- if (data.NextToken != null) {
2130
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2131
- }
1852
+ const doc = (0, smithy_client_1.take)(data, {
1853
+ Items: (_) => de___listOfPrefetchSchedule(_, context),
1854
+ NextToken: smithy_client_1.expectString,
1855
+ });
1856
+ Object.assign(contents, doc);
2132
1857
  return contents;
2133
1858
  };
2134
1859
  exports.de_ListPrefetchSchedulesCommand = de_ListPrefetchSchedulesCommand;
@@ -2139,10 +1864,9 @@ const de_ListPrefetchSchedulesCommandError = async (output, context) => {
2139
1864
  };
2140
1865
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2141
1866
  const parsedBody = parsedOutput.body;
2142
- (0, smithy_client_1.throwDefaultError)({
1867
+ return throwDefaultError({
2143
1868
  output,
2144
1869
  parsedBody,
2145
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2146
1870
  errorCode,
2147
1871
  });
2148
1872
  };
@@ -2150,16 +1874,15 @@ const de_ListSourceLocationsCommand = async (output, context) => {
2150
1874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2151
1875
  return de_ListSourceLocationsCommandError(output, context);
2152
1876
  }
2153
- const contents = map({
1877
+ const contents = (0, smithy_client_1.map)({
2154
1878
  $metadata: deserializeMetadata(output),
2155
1879
  });
2156
1880
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2157
- if (data.Items != null) {
2158
- contents.Items = de___listOfSourceLocation(data.Items, context);
2159
- }
2160
- if (data.NextToken != null) {
2161
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2162
- }
1881
+ const doc = (0, smithy_client_1.take)(data, {
1882
+ Items: (_) => de___listOfSourceLocation(_, context),
1883
+ NextToken: smithy_client_1.expectString,
1884
+ });
1885
+ Object.assign(contents, doc);
2163
1886
  return contents;
2164
1887
  };
2165
1888
  exports.de_ListSourceLocationsCommand = de_ListSourceLocationsCommand;
@@ -2170,10 +1893,9 @@ const de_ListSourceLocationsCommandError = async (output, context) => {
2170
1893
  };
2171
1894
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2172
1895
  const parsedBody = parsedOutput.body;
2173
- (0, smithy_client_1.throwDefaultError)({
1896
+ return throwDefaultError({
2174
1897
  output,
2175
1898
  parsedBody,
2176
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2177
1899
  errorCode,
2178
1900
  });
2179
1901
  };
@@ -2181,13 +1903,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2181
1903
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2182
1904
  return de_ListTagsForResourceCommandError(output, context);
2183
1905
  }
2184
- const contents = map({
1906
+ const contents = (0, smithy_client_1.map)({
2185
1907
  $metadata: deserializeMetadata(output),
2186
1908
  });
2187
1909
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2188
- if (data.tags != null) {
2189
- contents.Tags = de___mapOf__string(data.tags, context);
2190
- }
1910
+ const doc = (0, smithy_client_1.take)(data, {
1911
+ Tags: [, smithy_client_1._json, `tags`],
1912
+ });
1913
+ Object.assign(contents, doc);
2191
1914
  return contents;
2192
1915
  };
2193
1916
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2203,10 +1926,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2203
1926
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2204
1927
  default:
2205
1928
  const parsedBody = parsedOutput.body;
2206
- (0, smithy_client_1.throwDefaultError)({
1929
+ return throwDefaultError({
2207
1930
  output,
2208
1931
  parsedBody,
2209
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2210
1932
  errorCode,
2211
1933
  });
2212
1934
  }
@@ -2215,16 +1937,15 @@ const de_ListVodSourcesCommand = async (output, context) => {
2215
1937
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2216
1938
  return de_ListVodSourcesCommandError(output, context);
2217
1939
  }
2218
- const contents = map({
1940
+ const contents = (0, smithy_client_1.map)({
2219
1941
  $metadata: deserializeMetadata(output),
2220
1942
  });
2221
1943
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2222
- if (data.Items != null) {
2223
- contents.Items = de___listOfVodSource(data.Items, context);
2224
- }
2225
- if (data.NextToken != null) {
2226
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2227
- }
1944
+ const doc = (0, smithy_client_1.take)(data, {
1945
+ Items: (_) => de___listOfVodSource(_, context),
1946
+ NextToken: smithy_client_1.expectString,
1947
+ });
1948
+ Object.assign(contents, doc);
2228
1949
  return contents;
2229
1950
  };
2230
1951
  exports.de_ListVodSourcesCommand = de_ListVodSourcesCommand;
@@ -2235,10 +1956,9 @@ const de_ListVodSourcesCommandError = async (output, context) => {
2235
1956
  };
2236
1957
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2237
1958
  const parsedBody = parsedOutput.body;
2238
- (0, smithy_client_1.throwDefaultError)({
1959
+ return throwDefaultError({
2239
1960
  output,
2240
1961
  parsedBody,
2241
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2242
1962
  errorCode,
2243
1963
  });
2244
1964
  };
@@ -2246,7 +1966,7 @@ const de_PutChannelPolicyCommand = async (output, context) => {
2246
1966
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2247
1967
  return de_PutChannelPolicyCommandError(output, context);
2248
1968
  }
2249
- const contents = map({
1969
+ const contents = (0, smithy_client_1.map)({
2250
1970
  $metadata: deserializeMetadata(output),
2251
1971
  });
2252
1972
  await collectBody(output.body, context);
@@ -2260,10 +1980,9 @@ const de_PutChannelPolicyCommandError = async (output, context) => {
2260
1980
  };
2261
1981
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2262
1982
  const parsedBody = parsedOutput.body;
2263
- (0, smithy_client_1.throwDefaultError)({
1983
+ return throwDefaultError({
2264
1984
  output,
2265
1985
  parsedBody,
2266
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2267
1986
  errorCode,
2268
1987
  });
2269
1988
  };
@@ -2271,67 +1990,32 @@ const de_PutPlaybackConfigurationCommand = async (output, context) => {
2271
1990
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2272
1991
  return de_PutPlaybackConfigurationCommandError(output, context);
2273
1992
  }
2274
- const contents = map({
1993
+ const contents = (0, smithy_client_1.map)({
2275
1994
  $metadata: deserializeMetadata(output),
2276
1995
  });
2277
1996
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2278
- if (data.AdDecisionServerUrl != null) {
2279
- contents.AdDecisionServerUrl = (0, smithy_client_1.expectString)(data.AdDecisionServerUrl);
2280
- }
2281
- if (data.AvailSuppression != null) {
2282
- contents.AvailSuppression = de_AvailSuppression(data.AvailSuppression, context);
2283
- }
2284
- if (data.Bumper != null) {
2285
- contents.Bumper = de_Bumper(data.Bumper, context);
2286
- }
2287
- if (data.CdnConfiguration != null) {
2288
- contents.CdnConfiguration = de_CdnConfiguration(data.CdnConfiguration, context);
2289
- }
2290
- if (data.ConfigurationAliases != null) {
2291
- contents.ConfigurationAliases = de_ConfigurationAliasesResponse(data.ConfigurationAliases, context);
2292
- }
2293
- if (data.DashConfiguration != null) {
2294
- contents.DashConfiguration = de_DashConfiguration(data.DashConfiguration, context);
2295
- }
2296
- if (data.HlsConfiguration != null) {
2297
- contents.HlsConfiguration = de_HlsConfiguration(data.HlsConfiguration, context);
2298
- }
2299
- if (data.LivePreRollConfiguration != null) {
2300
- contents.LivePreRollConfiguration = de_LivePreRollConfiguration(data.LivePreRollConfiguration, context);
2301
- }
2302
- if (data.LogConfiguration != null) {
2303
- contents.LogConfiguration = de_LogConfiguration(data.LogConfiguration, context);
2304
- }
2305
- if (data.ManifestProcessingRules != null) {
2306
- contents.ManifestProcessingRules = de_ManifestProcessingRules(data.ManifestProcessingRules, context);
2307
- }
2308
- if (data.Name != null) {
2309
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
2310
- }
2311
- if (data.PersonalizationThresholdSeconds != null) {
2312
- contents.PersonalizationThresholdSeconds = (0, smithy_client_1.expectInt32)(data.PersonalizationThresholdSeconds);
2313
- }
2314
- if (data.PlaybackConfigurationArn != null) {
2315
- contents.PlaybackConfigurationArn = (0, smithy_client_1.expectString)(data.PlaybackConfigurationArn);
2316
- }
2317
- if (data.PlaybackEndpointPrefix != null) {
2318
- contents.PlaybackEndpointPrefix = (0, smithy_client_1.expectString)(data.PlaybackEndpointPrefix);
2319
- }
2320
- if (data.SessionInitializationEndpointPrefix != null) {
2321
- contents.SessionInitializationEndpointPrefix = (0, smithy_client_1.expectString)(data.SessionInitializationEndpointPrefix);
2322
- }
2323
- if (data.SlateAdUrl != null) {
2324
- contents.SlateAdUrl = (0, smithy_client_1.expectString)(data.SlateAdUrl);
2325
- }
2326
- if (data.tags != null) {
2327
- contents.Tags = de___mapOf__string(data.tags, context);
2328
- }
2329
- if (data.TranscodeProfileName != null) {
2330
- contents.TranscodeProfileName = (0, smithy_client_1.expectString)(data.TranscodeProfileName);
2331
- }
2332
- if (data.VideoContentSourceUrl != null) {
2333
- contents.VideoContentSourceUrl = (0, smithy_client_1.expectString)(data.VideoContentSourceUrl);
2334
- }
1997
+ const doc = (0, smithy_client_1.take)(data, {
1998
+ AdDecisionServerUrl: smithy_client_1.expectString,
1999
+ AvailSuppression: smithy_client_1._json,
2000
+ Bumper: smithy_client_1._json,
2001
+ CdnConfiguration: smithy_client_1._json,
2002
+ ConfigurationAliases: smithy_client_1._json,
2003
+ DashConfiguration: smithy_client_1._json,
2004
+ HlsConfiguration: smithy_client_1._json,
2005
+ LivePreRollConfiguration: smithy_client_1._json,
2006
+ LogConfiguration: smithy_client_1._json,
2007
+ ManifestProcessingRules: smithy_client_1._json,
2008
+ Name: smithy_client_1.expectString,
2009
+ PersonalizationThresholdSeconds: smithy_client_1.expectInt32,
2010
+ PlaybackConfigurationArn: smithy_client_1.expectString,
2011
+ PlaybackEndpointPrefix: smithy_client_1.expectString,
2012
+ SessionInitializationEndpointPrefix: smithy_client_1.expectString,
2013
+ SlateAdUrl: smithy_client_1.expectString,
2014
+ Tags: [, smithy_client_1._json, `tags`],
2015
+ TranscodeProfileName: smithy_client_1.expectString,
2016
+ VideoContentSourceUrl: smithy_client_1.expectString,
2017
+ });
2018
+ Object.assign(contents, doc);
2335
2019
  return contents;
2336
2020
  };
2337
2021
  exports.de_PutPlaybackConfigurationCommand = de_PutPlaybackConfigurationCommand;
@@ -2342,10 +2026,9 @@ const de_PutPlaybackConfigurationCommandError = async (output, context) => {
2342
2026
  };
2343
2027
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2344
2028
  const parsedBody = parsedOutput.body;
2345
- (0, smithy_client_1.throwDefaultError)({
2029
+ return throwDefaultError({
2346
2030
  output,
2347
2031
  parsedBody,
2348
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2349
2032
  errorCode,
2350
2033
  });
2351
2034
  };
@@ -2353,7 +2036,7 @@ const de_StartChannelCommand = async (output, context) => {
2353
2036
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2354
2037
  return de_StartChannelCommandError(output, context);
2355
2038
  }
2356
- const contents = map({
2039
+ const contents = (0, smithy_client_1.map)({
2357
2040
  $metadata: deserializeMetadata(output),
2358
2041
  });
2359
2042
  await collectBody(output.body, context);
@@ -2367,10 +2050,9 @@ const de_StartChannelCommandError = async (output, context) => {
2367
2050
  };
2368
2051
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2369
2052
  const parsedBody = parsedOutput.body;
2370
- (0, smithy_client_1.throwDefaultError)({
2053
+ return throwDefaultError({
2371
2054
  output,
2372
2055
  parsedBody,
2373
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2374
2056
  errorCode,
2375
2057
  });
2376
2058
  };
@@ -2378,7 +2060,7 @@ const de_StopChannelCommand = async (output, context) => {
2378
2060
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2379
2061
  return de_StopChannelCommandError(output, context);
2380
2062
  }
2381
- const contents = map({
2063
+ const contents = (0, smithy_client_1.map)({
2382
2064
  $metadata: deserializeMetadata(output),
2383
2065
  });
2384
2066
  await collectBody(output.body, context);
@@ -2392,10 +2074,9 @@ const de_StopChannelCommandError = async (output, context) => {
2392
2074
  };
2393
2075
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2394
2076
  const parsedBody = parsedOutput.body;
2395
- (0, smithy_client_1.throwDefaultError)({
2077
+ return throwDefaultError({
2396
2078
  output,
2397
2079
  parsedBody,
2398
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2399
2080
  errorCode,
2400
2081
  });
2401
2082
  };
@@ -2403,7 +2084,7 @@ const de_TagResourceCommand = async (output, context) => {
2403
2084
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2404
2085
  return de_TagResourceCommandError(output, context);
2405
2086
  }
2406
- const contents = map({
2087
+ const contents = (0, smithy_client_1.map)({
2407
2088
  $metadata: deserializeMetadata(output),
2408
2089
  });
2409
2090
  await collectBody(output.body, context);
@@ -2422,10 +2103,9 @@ const de_TagResourceCommandError = async (output, context) => {
2422
2103
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2423
2104
  default:
2424
2105
  const parsedBody = parsedOutput.body;
2425
- (0, smithy_client_1.throwDefaultError)({
2106
+ return throwDefaultError({
2426
2107
  output,
2427
2108
  parsedBody,
2428
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2429
2109
  errorCode,
2430
2110
  });
2431
2111
  }
@@ -2434,7 +2114,7 @@ const de_UntagResourceCommand = async (output, context) => {
2434
2114
  if (output.statusCode !== 204 && output.statusCode >= 300) {
2435
2115
  return de_UntagResourceCommandError(output, context);
2436
2116
  }
2437
- const contents = map({
2117
+ const contents = (0, smithy_client_1.map)({
2438
2118
  $metadata: deserializeMetadata(output),
2439
2119
  });
2440
2120
  await collectBody(output.body, context);
@@ -2453,10 +2133,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2453
2133
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2454
2134
  default:
2455
2135
  const parsedBody = parsedOutput.body;
2456
- (0, smithy_client_1.throwDefaultError)({
2136
+ return throwDefaultError({
2457
2137
  output,
2458
2138
  parsedBody,
2459
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2460
2139
  errorCode,
2461
2140
  });
2462
2141
  }
@@ -2465,40 +2144,23 @@ const de_UpdateChannelCommand = async (output, context) => {
2465
2144
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2466
2145
  return de_UpdateChannelCommandError(output, context);
2467
2146
  }
2468
- const contents = map({
2147
+ const contents = (0, smithy_client_1.map)({
2469
2148
  $metadata: deserializeMetadata(output),
2470
2149
  });
2471
2150
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2472
- if (data.Arn != null) {
2473
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2474
- }
2475
- if (data.ChannelName != null) {
2476
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
2477
- }
2478
- if (data.ChannelState != null) {
2479
- contents.ChannelState = (0, smithy_client_1.expectString)(data.ChannelState);
2480
- }
2481
- if (data.CreationTime != null) {
2482
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
2483
- }
2484
- if (data.FillerSlate != null) {
2485
- contents.FillerSlate = de_SlateSource(data.FillerSlate, context);
2486
- }
2487
- if (data.LastModifiedTime != null) {
2488
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
2489
- }
2490
- if (data.Outputs != null) {
2491
- contents.Outputs = de_ResponseOutputs(data.Outputs, context);
2492
- }
2493
- if (data.PlaybackMode != null) {
2494
- contents.PlaybackMode = (0, smithy_client_1.expectString)(data.PlaybackMode);
2495
- }
2496
- if (data.tags != null) {
2497
- contents.Tags = de___mapOf__string(data.tags, context);
2498
- }
2499
- if (data.Tier != null) {
2500
- contents.Tier = (0, smithy_client_1.expectString)(data.Tier);
2501
- }
2151
+ const doc = (0, smithy_client_1.take)(data, {
2152
+ Arn: smithy_client_1.expectString,
2153
+ ChannelName: smithy_client_1.expectString,
2154
+ ChannelState: smithy_client_1.expectString,
2155
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2156
+ FillerSlate: smithy_client_1._json,
2157
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2158
+ Outputs: smithy_client_1._json,
2159
+ PlaybackMode: smithy_client_1.expectString,
2160
+ Tags: [, smithy_client_1._json, `tags`],
2161
+ Tier: smithy_client_1.expectString,
2162
+ });
2163
+ Object.assign(contents, doc);
2502
2164
  return contents;
2503
2165
  };
2504
2166
  exports.de_UpdateChannelCommand = de_UpdateChannelCommand;
@@ -2509,10 +2171,9 @@ const de_UpdateChannelCommandError = async (output, context) => {
2509
2171
  };
2510
2172
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2511
2173
  const parsedBody = parsedOutput.body;
2512
- (0, smithy_client_1.throwDefaultError)({
2174
+ return throwDefaultError({
2513
2175
  output,
2514
2176
  parsedBody,
2515
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2516
2177
  errorCode,
2517
2178
  });
2518
2179
  };
@@ -2520,31 +2181,20 @@ const de_UpdateLiveSourceCommand = async (output, context) => {
2520
2181
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2521
2182
  return de_UpdateLiveSourceCommandError(output, context);
2522
2183
  }
2523
- const contents = map({
2184
+ const contents = (0, smithy_client_1.map)({
2524
2185
  $metadata: deserializeMetadata(output),
2525
2186
  });
2526
2187
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2527
- if (data.Arn != null) {
2528
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2529
- }
2530
- if (data.CreationTime != null) {
2531
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
2532
- }
2533
- if (data.HttpPackageConfigurations != null) {
2534
- contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context);
2535
- }
2536
- if (data.LastModifiedTime != null) {
2537
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
2538
- }
2539
- if (data.LiveSourceName != null) {
2540
- contents.LiveSourceName = (0, smithy_client_1.expectString)(data.LiveSourceName);
2541
- }
2542
- if (data.SourceLocationName != null) {
2543
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
2544
- }
2545
- if (data.tags != null) {
2546
- contents.Tags = de___mapOf__string(data.tags, context);
2547
- }
2188
+ const doc = (0, smithy_client_1.take)(data, {
2189
+ Arn: smithy_client_1.expectString,
2190
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2191
+ HttpPackageConfigurations: smithy_client_1._json,
2192
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2193
+ LiveSourceName: smithy_client_1.expectString,
2194
+ SourceLocationName: smithy_client_1.expectString,
2195
+ Tags: [, smithy_client_1._json, `tags`],
2196
+ });
2197
+ Object.assign(contents, doc);
2548
2198
  return contents;
2549
2199
  };
2550
2200
  exports.de_UpdateLiveSourceCommand = de_UpdateLiveSourceCommand;
@@ -2555,10 +2205,9 @@ const de_UpdateLiveSourceCommandError = async (output, context) => {
2555
2205
  };
2556
2206
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2557
2207
  const parsedBody = parsedOutput.body;
2558
- (0, smithy_client_1.throwDefaultError)({
2208
+ return throwDefaultError({
2559
2209
  output,
2560
2210
  parsedBody,
2561
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2562
2211
  errorCode,
2563
2212
  });
2564
2213
  };
@@ -2566,43 +2215,24 @@ const de_UpdateProgramCommand = async (output, context) => {
2566
2215
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2567
2216
  return de_UpdateProgramCommandError(output, context);
2568
2217
  }
2569
- const contents = map({
2218
+ const contents = (0, smithy_client_1.map)({
2570
2219
  $metadata: deserializeMetadata(output),
2571
2220
  });
2572
2221
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2573
- if (data.AdBreaks != null) {
2574
- contents.AdBreaks = de___listOfAdBreak(data.AdBreaks, context);
2575
- }
2576
- if (data.Arn != null) {
2577
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2578
- }
2579
- if (data.ChannelName != null) {
2580
- contents.ChannelName = (0, smithy_client_1.expectString)(data.ChannelName);
2581
- }
2582
- if (data.ClipRange != null) {
2583
- contents.ClipRange = de_ClipRange(data.ClipRange, context);
2584
- }
2585
- if (data.CreationTime != null) {
2586
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
2587
- }
2588
- if (data.DurationMillis != null) {
2589
- contents.DurationMillis = (0, smithy_client_1.expectLong)(data.DurationMillis);
2590
- }
2591
- if (data.LiveSourceName != null) {
2592
- contents.LiveSourceName = (0, smithy_client_1.expectString)(data.LiveSourceName);
2593
- }
2594
- if (data.ProgramName != null) {
2595
- contents.ProgramName = (0, smithy_client_1.expectString)(data.ProgramName);
2596
- }
2597
- if (data.ScheduledStartTime != null) {
2598
- contents.ScheduledStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ScheduledStartTime)));
2599
- }
2600
- if (data.SourceLocationName != null) {
2601
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
2602
- }
2603
- if (data.VodSourceName != null) {
2604
- contents.VodSourceName = (0, smithy_client_1.expectString)(data.VodSourceName);
2605
- }
2222
+ const doc = (0, smithy_client_1.take)(data, {
2223
+ AdBreaks: smithy_client_1._json,
2224
+ Arn: smithy_client_1.expectString,
2225
+ ChannelName: smithy_client_1.expectString,
2226
+ ClipRange: smithy_client_1._json,
2227
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2228
+ DurationMillis: smithy_client_1.expectLong,
2229
+ LiveSourceName: smithy_client_1.expectString,
2230
+ ProgramName: smithy_client_1.expectString,
2231
+ ScheduledStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2232
+ SourceLocationName: smithy_client_1.expectString,
2233
+ VodSourceName: smithy_client_1.expectString,
2234
+ });
2235
+ Object.assign(contents, doc);
2606
2236
  return contents;
2607
2237
  };
2608
2238
  exports.de_UpdateProgramCommand = de_UpdateProgramCommand;
@@ -2613,10 +2243,9 @@ const de_UpdateProgramCommandError = async (output, context) => {
2613
2243
  };
2614
2244
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2615
2245
  const parsedBody = parsedOutput.body;
2616
- (0, smithy_client_1.throwDefaultError)({
2246
+ return throwDefaultError({
2617
2247
  output,
2618
2248
  parsedBody,
2619
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2620
2249
  errorCode,
2621
2250
  });
2622
2251
  };
@@ -2624,37 +2253,22 @@ const de_UpdateSourceLocationCommand = async (output, context) => {
2624
2253
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2625
2254
  return de_UpdateSourceLocationCommandError(output, context);
2626
2255
  }
2627
- const contents = map({
2256
+ const contents = (0, smithy_client_1.map)({
2628
2257
  $metadata: deserializeMetadata(output),
2629
2258
  });
2630
2259
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2631
- if (data.AccessConfiguration != null) {
2632
- contents.AccessConfiguration = de_AccessConfiguration(data.AccessConfiguration, context);
2633
- }
2634
- if (data.Arn != null) {
2635
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2636
- }
2637
- if (data.CreationTime != null) {
2638
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
2639
- }
2640
- if (data.DefaultSegmentDeliveryConfiguration != null) {
2641
- contents.DefaultSegmentDeliveryConfiguration = de_DefaultSegmentDeliveryConfiguration(data.DefaultSegmentDeliveryConfiguration, context);
2642
- }
2643
- if (data.HttpConfiguration != null) {
2644
- contents.HttpConfiguration = de_HttpConfiguration(data.HttpConfiguration, context);
2645
- }
2646
- if (data.LastModifiedTime != null) {
2647
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
2648
- }
2649
- if (data.SegmentDeliveryConfigurations != null) {
2650
- contents.SegmentDeliveryConfigurations = de___listOfSegmentDeliveryConfiguration(data.SegmentDeliveryConfigurations, context);
2651
- }
2652
- if (data.SourceLocationName != null) {
2653
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
2654
- }
2655
- if (data.tags != null) {
2656
- contents.Tags = de___mapOf__string(data.tags, context);
2657
- }
2260
+ const doc = (0, smithy_client_1.take)(data, {
2261
+ AccessConfiguration: smithy_client_1._json,
2262
+ Arn: smithy_client_1.expectString,
2263
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2264
+ DefaultSegmentDeliveryConfiguration: smithy_client_1._json,
2265
+ HttpConfiguration: smithy_client_1._json,
2266
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2267
+ SegmentDeliveryConfigurations: smithy_client_1._json,
2268
+ SourceLocationName: smithy_client_1.expectString,
2269
+ Tags: [, smithy_client_1._json, `tags`],
2270
+ });
2271
+ Object.assign(contents, doc);
2658
2272
  return contents;
2659
2273
  };
2660
2274
  exports.de_UpdateSourceLocationCommand = de_UpdateSourceLocationCommand;
@@ -2665,10 +2279,9 @@ const de_UpdateSourceLocationCommandError = async (output, context) => {
2665
2279
  };
2666
2280
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2667
2281
  const parsedBody = parsedOutput.body;
2668
- (0, smithy_client_1.throwDefaultError)({
2282
+ return throwDefaultError({
2669
2283
  output,
2670
2284
  parsedBody,
2671
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2672
2285
  errorCode,
2673
2286
  });
2674
2287
  };
@@ -2676,31 +2289,20 @@ const de_UpdateVodSourceCommand = async (output, context) => {
2676
2289
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2677
2290
  return de_UpdateVodSourceCommandError(output, context);
2678
2291
  }
2679
- const contents = map({
2292
+ const contents = (0, smithy_client_1.map)({
2680
2293
  $metadata: deserializeMetadata(output),
2681
2294
  });
2682
2295
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2683
- if (data.Arn != null) {
2684
- contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2685
- }
2686
- if (data.CreationTime != null) {
2687
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
2688
- }
2689
- if (data.HttpPackageConfigurations != null) {
2690
- contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context);
2691
- }
2692
- if (data.LastModifiedTime != null) {
2693
- contents.LastModifiedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastModifiedTime)));
2694
- }
2695
- if (data.SourceLocationName != null) {
2696
- contents.SourceLocationName = (0, smithy_client_1.expectString)(data.SourceLocationName);
2697
- }
2698
- if (data.tags != null) {
2699
- contents.Tags = de___mapOf__string(data.tags, context);
2700
- }
2701
- if (data.VodSourceName != null) {
2702
- contents.VodSourceName = (0, smithy_client_1.expectString)(data.VodSourceName);
2703
- }
2296
+ const doc = (0, smithy_client_1.take)(data, {
2297
+ Arn: smithy_client_1.expectString,
2298
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2299
+ HttpPackageConfigurations: smithy_client_1._json,
2300
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2301
+ SourceLocationName: smithy_client_1.expectString,
2302
+ Tags: [, smithy_client_1._json, `tags`],
2303
+ VodSourceName: smithy_client_1.expectString,
2304
+ });
2305
+ Object.assign(contents, doc);
2704
2306
  return contents;
2705
2307
  };
2706
2308
  exports.de_UpdateVodSourceCommand = de_UpdateVodSourceCommand;
@@ -2711,351 +2313,52 @@ const de_UpdateVodSourceCommandError = async (output, context) => {
2711
2313
  };
2712
2314
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2713
2315
  const parsedBody = parsedOutput.body;
2714
- (0, smithy_client_1.throwDefaultError)({
2316
+ return throwDefaultError({
2715
2317
  output,
2716
2318
  parsedBody,
2717
- exceptionCtor: MediaTailorServiceException_1.MediaTailorServiceException,
2718
2319
  errorCode,
2719
2320
  });
2720
2321
  };
2721
- const map = smithy_client_1.map;
2322
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MediaTailorServiceException_1.MediaTailorServiceException);
2722
2323
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2723
- const contents = map({});
2324
+ const contents = (0, smithy_client_1.map)({});
2724
2325
  const data = parsedOutput.body;
2725
- if (data.Message != null) {
2726
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2727
- }
2326
+ const doc = (0, smithy_client_1.take)(data, {
2327
+ Message: smithy_client_1.expectString,
2328
+ });
2329
+ Object.assign(contents, doc);
2728
2330
  const exception = new models_0_1.BadRequestException({
2729
2331
  $metadata: deserializeMetadata(parsedOutput),
2730
2332
  ...contents,
2731
2333
  });
2732
2334
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2733
2335
  };
2734
- const se___listOfAdBreak = (input, context) => {
2735
- return input
2736
- .filter((e) => e != null)
2737
- .map((entry) => {
2738
- return se_AdBreak(entry, context);
2739
- });
2740
- };
2741
- const se___listOfAvailMatchingCriteria = (input, context) => {
2742
- return input
2743
- .filter((e) => e != null)
2744
- .map((entry) => {
2745
- return se_AvailMatchingCriteria(entry, context);
2746
- });
2747
- };
2748
- const se___listOfSegmentDeliveryConfiguration = (input, context) => {
2749
- return input
2750
- .filter((e) => e != null)
2751
- .map((entry) => {
2752
- return se_SegmentDeliveryConfiguration(entry, context);
2753
- });
2754
- };
2755
- const se___mapOf__string = (input, context) => {
2756
- return Object.entries(input).reduce((acc, [key, value]) => {
2757
- if (value === null) {
2758
- return acc;
2759
- }
2760
- acc[key] = value;
2761
- return acc;
2762
- }, {});
2763
- };
2764
- const se_AccessConfiguration = (input, context) => {
2765
- return {
2766
- ...(input.AccessType != null && { AccessType: input.AccessType }),
2767
- ...(input.SecretsManagerAccessTokenConfiguration != null && {
2768
- SecretsManagerAccessTokenConfiguration: se_SecretsManagerAccessTokenConfiguration(input.SecretsManagerAccessTokenConfiguration, context),
2769
- }),
2770
- };
2771
- };
2772
- const se_AdBreak = (input, context) => {
2773
- return {
2774
- ...(input.MessageType != null && { MessageType: input.MessageType }),
2775
- ...(input.OffsetMillis != null && { OffsetMillis: input.OffsetMillis }),
2776
- ...(input.Slate != null && { Slate: se_SlateSource(input.Slate, context) }),
2777
- ...(input.SpliceInsertMessage != null && {
2778
- SpliceInsertMessage: se_SpliceInsertMessage(input.SpliceInsertMessage, context),
2779
- }),
2780
- ...(input.TimeSignalMessage != null && {
2781
- TimeSignalMessage: se_TimeSignalMessage(input.TimeSignalMessage, context),
2782
- }),
2783
- };
2784
- };
2785
- const se_AdMarkerPassthrough = (input, context) => {
2786
- return {
2787
- ...(input.Enabled != null && { Enabled: input.Enabled }),
2788
- };
2789
- };
2790
- const se_AvailMatchingCriteria = (input, context) => {
2791
- return {
2792
- ...(input.DynamicVariable != null && { DynamicVariable: input.DynamicVariable }),
2793
- ...(input.Operator != null && { Operator: input.Operator }),
2794
- };
2795
- };
2796
- const se_AvailSuppression = (input, context) => {
2797
- return {
2798
- ...(input.Mode != null && { Mode: input.Mode }),
2799
- ...(input.Value != null && { Value: input.Value }),
2800
- };
2801
- };
2802
- const se_Bumper = (input, context) => {
2803
- return {
2804
- ...(input.EndUrl != null && { EndUrl: input.EndUrl }),
2805
- ...(input.StartUrl != null && { StartUrl: input.StartUrl }),
2806
- };
2807
- };
2808
- const se_CdnConfiguration = (input, context) => {
2809
- return {
2810
- ...(input.AdSegmentUrlPrefix != null && { AdSegmentUrlPrefix: input.AdSegmentUrlPrefix }),
2811
- ...(input.ContentSegmentUrlPrefix != null && { ContentSegmentUrlPrefix: input.ContentSegmentUrlPrefix }),
2812
- };
2813
- };
2814
- const se_ClipRange = (input, context) => {
2815
- return {
2816
- ...(input.EndOffsetMillis != null && { EndOffsetMillis: input.EndOffsetMillis }),
2817
- };
2818
- };
2819
- const se_ConfigurationAliasesRequest = (input, context) => {
2820
- return Object.entries(input).reduce((acc, [key, value]) => {
2821
- if (value === null) {
2822
- return acc;
2823
- }
2824
- acc[key] = se___mapOf__string(value, context);
2825
- return acc;
2826
- }, {});
2827
- };
2828
- const se_DashConfigurationForPut = (input, context) => {
2829
- return {
2830
- ...(input.MpdLocation != null && { MpdLocation: input.MpdLocation }),
2831
- ...(input.OriginManifestType != null && { OriginManifestType: input.OriginManifestType }),
2832
- };
2833
- };
2834
- const se_DashPlaylistSettings = (input, context) => {
2835
- return {
2836
- ...(input.ManifestWindowSeconds != null && { ManifestWindowSeconds: input.ManifestWindowSeconds }),
2837
- ...(input.MinBufferTimeSeconds != null && { MinBufferTimeSeconds: input.MinBufferTimeSeconds }),
2838
- ...(input.MinUpdatePeriodSeconds != null && { MinUpdatePeriodSeconds: input.MinUpdatePeriodSeconds }),
2839
- ...(input.SuggestedPresentationDelaySeconds != null && {
2840
- SuggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds,
2841
- }),
2842
- };
2843
- };
2844
- const se_DefaultSegmentDeliveryConfiguration = (input, context) => {
2845
- return {
2846
- ...(input.BaseUrl != null && { BaseUrl: input.BaseUrl }),
2847
- };
2848
- };
2849
- const se_HlsPlaylistSettings = (input, context) => {
2850
- return {
2851
- ...(input.ManifestWindowSeconds != null && { ManifestWindowSeconds: input.ManifestWindowSeconds }),
2852
- };
2853
- };
2854
- const se_HttpConfiguration = (input, context) => {
2855
- return {
2856
- ...(input.BaseUrl != null && { BaseUrl: input.BaseUrl }),
2857
- };
2858
- };
2859
- const se_HttpPackageConfiguration = (input, context) => {
2860
- return {
2861
- ...(input.Path != null && { Path: input.Path }),
2862
- ...(input.SourceGroup != null && { SourceGroup: input.SourceGroup }),
2863
- ...(input.Type != null && { Type: input.Type }),
2864
- };
2865
- };
2866
- const se_HttpPackageConfigurations = (input, context) => {
2867
- return input
2868
- .filter((e) => e != null)
2869
- .map((entry) => {
2870
- return se_HttpPackageConfiguration(entry, context);
2871
- });
2872
- };
2873
- const se_LivePreRollConfiguration = (input, context) => {
2874
- return {
2875
- ...(input.AdDecisionServerUrl != null && { AdDecisionServerUrl: input.AdDecisionServerUrl }),
2876
- ...(input.MaxDurationSeconds != null && { MaxDurationSeconds: input.MaxDurationSeconds }),
2877
- };
2878
- };
2879
- const se_LogTypes = (input, context) => {
2880
- return input
2881
- .filter((e) => e != null)
2882
- .map((entry) => {
2883
- return entry;
2884
- });
2885
- };
2886
- const se_ManifestProcessingRules = (input, context) => {
2887
- return {
2888
- ...(input.AdMarkerPassthrough != null && {
2889
- AdMarkerPassthrough: se_AdMarkerPassthrough(input.AdMarkerPassthrough, context),
2890
- }),
2891
- };
2892
- };
2893
2336
  const se_PrefetchConsumption = (input, context) => {
2894
- return {
2895
- ...(input.AvailMatchingCriteria != null && {
2896
- AvailMatchingCriteria: se___listOfAvailMatchingCriteria(input.AvailMatchingCriteria, context),
2897
- }),
2898
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
2899
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
2900
- };
2901
- };
2902
- const se_PrefetchRetrieval = (input, context) => {
2903
- return {
2904
- ...(input.DynamicVariables != null && { DynamicVariables: se___mapOf__string(input.DynamicVariables, context) }),
2905
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
2906
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
2907
- };
2908
- };
2909
- const se_RequestOutputItem = (input, context) => {
2910
- return {
2911
- ...(input.DashPlaylistSettings != null && {
2912
- DashPlaylistSettings: se_DashPlaylistSettings(input.DashPlaylistSettings, context),
2913
- }),
2914
- ...(input.HlsPlaylistSettings != null && {
2915
- HlsPlaylistSettings: se_HlsPlaylistSettings(input.HlsPlaylistSettings, context),
2916
- }),
2917
- ...(input.ManifestName != null && { ManifestName: input.ManifestName }),
2918
- ...(input.SourceGroup != null && { SourceGroup: input.SourceGroup }),
2919
- };
2920
- };
2921
- const se_RequestOutputs = (input, context) => {
2922
- return input
2923
- .filter((e) => e != null)
2924
- .map((entry) => {
2925
- return se_RequestOutputItem(entry, context);
2337
+ return (0, smithy_client_1.take)(input, {
2338
+ AvailMatchingCriteria: smithy_client_1._json,
2339
+ EndTime: (_) => Math.round(_.getTime() / 1000),
2340
+ StartTime: (_) => Math.round(_.getTime() / 1000),
2926
2341
  });
2927
2342
  };
2928
- const se_ScheduleConfiguration = (input, context) => {
2929
- return {
2930
- ...(input.ClipRange != null && { ClipRange: se_ClipRange(input.ClipRange, context) }),
2931
- ...(input.Transition != null && { Transition: se_Transition(input.Transition, context) }),
2932
- };
2933
- };
2934
- const se_SecretsManagerAccessTokenConfiguration = (input, context) => {
2935
- return {
2936
- ...(input.HeaderName != null && { HeaderName: input.HeaderName }),
2937
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
2938
- ...(input.SecretStringKey != null && { SecretStringKey: input.SecretStringKey }),
2939
- };
2940
- };
2941
- const se_SegmentationDescriptor = (input, context) => {
2942
- return {
2943
- ...(input.SegmentNum != null && { SegmentNum: input.SegmentNum }),
2944
- ...(input.SegmentationEventId != null && { SegmentationEventId: input.SegmentationEventId }),
2945
- ...(input.SegmentationTypeId != null && { SegmentationTypeId: input.SegmentationTypeId }),
2946
- ...(input.SegmentationUpid != null && { SegmentationUpid: input.SegmentationUpid }),
2947
- ...(input.SegmentationUpidType != null && { SegmentationUpidType: input.SegmentationUpidType }),
2948
- ...(input.SegmentsExpected != null && { SegmentsExpected: input.SegmentsExpected }),
2949
- ...(input.SubSegmentNum != null && { SubSegmentNum: input.SubSegmentNum }),
2950
- ...(input.SubSegmentsExpected != null && { SubSegmentsExpected: input.SubSegmentsExpected }),
2951
- };
2952
- };
2953
- const se_SegmentationDescriptorList = (input, context) => {
2954
- return input
2955
- .filter((e) => e != null)
2956
- .map((entry) => {
2957
- return se_SegmentationDescriptor(entry, context);
2958
- });
2959
- };
2960
- const se_SegmentDeliveryConfiguration = (input, context) => {
2961
- return {
2962
- ...(input.BaseUrl != null && { BaseUrl: input.BaseUrl }),
2963
- ...(input.Name != null && { Name: input.Name }),
2964
- };
2965
- };
2966
- const se_SlateSource = (input, context) => {
2967
- return {
2968
- ...(input.SourceLocationName != null && { SourceLocationName: input.SourceLocationName }),
2969
- ...(input.VodSourceName != null && { VodSourceName: input.VodSourceName }),
2970
- };
2971
- };
2972
- const se_SpliceInsertMessage = (input, context) => {
2973
- return {
2974
- ...(input.AvailNum != null && { AvailNum: input.AvailNum }),
2975
- ...(input.AvailsExpected != null && { AvailsExpected: input.AvailsExpected }),
2976
- ...(input.SpliceEventId != null && { SpliceEventId: input.SpliceEventId }),
2977
- ...(input.UniqueProgramId != null && { UniqueProgramId: input.UniqueProgramId }),
2978
- };
2979
- };
2980
- const se_TimeSignalMessage = (input, context) => {
2981
- return {
2982
- ...(input.SegmentationDescriptors != null && {
2983
- SegmentationDescriptors: se_SegmentationDescriptorList(input.SegmentationDescriptors, context),
2984
- }),
2985
- };
2986
- };
2987
- const se_Transition = (input, context) => {
2988
- return {
2989
- ...(input.DurationMillis != null && { DurationMillis: input.DurationMillis }),
2990
- ...(input.RelativePosition != null && { RelativePosition: input.RelativePosition }),
2991
- ...(input.RelativeProgram != null && { RelativeProgram: input.RelativeProgram }),
2992
- ...(input.ScheduledStartTimeMillis != null && { ScheduledStartTimeMillis: input.ScheduledStartTimeMillis }),
2993
- ...(input.Type != null && { Type: input.Type }),
2994
- };
2995
- };
2996
- const se_UpdateProgramScheduleConfiguration = (input, context) => {
2997
- return {
2998
- ...(input.ClipRange != null && { ClipRange: se_ClipRange(input.ClipRange, context) }),
2999
- ...(input.Transition != null && { Transition: se_UpdateProgramTransition(input.Transition, context) }),
3000
- };
3001
- };
3002
- const se_UpdateProgramTransition = (input, context) => {
3003
- return {
3004
- ...(input.DurationMillis != null && { DurationMillis: input.DurationMillis }),
3005
- ...(input.ScheduledStartTimeMillis != null && { ScheduledStartTimeMillis: input.ScheduledStartTimeMillis }),
3006
- };
3007
- };
3008
- const de___listOf__string = (output, context) => {
3009
- const retVal = (output || [])
3010
- .filter((e) => e != null)
3011
- .map((entry) => {
3012
- if (entry === null) {
3013
- return null;
3014
- }
3015
- return (0, smithy_client_1.expectString)(entry);
3016
- });
3017
- return retVal;
3018
- };
3019
- const de___listOfAdBreak = (output, context) => {
3020
- const retVal = (output || [])
3021
- .filter((e) => e != null)
3022
- .map((entry) => {
3023
- if (entry === null) {
3024
- return null;
3025
- }
3026
- return de_AdBreak(entry, context);
2343
+ const se_PrefetchRetrieval = (input, context) => {
2344
+ return (0, smithy_client_1.take)(input, {
2345
+ DynamicVariables: smithy_client_1._json,
2346
+ EndTime: (_) => Math.round(_.getTime() / 1000),
2347
+ StartTime: (_) => Math.round(_.getTime() / 1000),
3027
2348
  });
3028
- return retVal;
3029
2349
  };
3030
2350
  const de___listOfAlert = (output, context) => {
3031
2351
  const retVal = (output || [])
3032
2352
  .filter((e) => e != null)
3033
2353
  .map((entry) => {
3034
- if (entry === null) {
3035
- return null;
3036
- }
3037
2354
  return de_Alert(entry, context);
3038
2355
  });
3039
2356
  return retVal;
3040
2357
  };
3041
- const de___listOfAvailMatchingCriteria = (output, context) => {
3042
- const retVal = (output || [])
3043
- .filter((e) => e != null)
3044
- .map((entry) => {
3045
- if (entry === null) {
3046
- return null;
3047
- }
3048
- return de_AvailMatchingCriteria(entry, context);
3049
- });
3050
- return retVal;
3051
- };
3052
2358
  const de___listOfChannel = (output, context) => {
3053
2359
  const retVal = (output || [])
3054
2360
  .filter((e) => e != null)
3055
2361
  .map((entry) => {
3056
- if (entry === null) {
3057
- return null;
3058
- }
3059
2362
  return de_Channel(entry, context);
3060
2363
  });
3061
2364
  return retVal;
@@ -3064,9 +2367,6 @@ const de___listOfLiveSource = (output, context) => {
3064
2367
  const retVal = (output || [])
3065
2368
  .filter((e) => e != null)
3066
2369
  .map((entry) => {
3067
- if (entry === null) {
3068
- return null;
3069
- }
3070
2370
  return de_LiveSource(entry, context);
3071
2371
  });
3072
2372
  return retVal;
@@ -3075,9 +2375,6 @@ const de___listOfPlaybackConfiguration = (output, context) => {
3075
2375
  const retVal = (output || [])
3076
2376
  .filter((e) => e != null)
3077
2377
  .map((entry) => {
3078
- if (entry === null) {
3079
- return null;
3080
- }
3081
2378
  return de_PlaybackConfiguration(entry, context);
3082
2379
  });
3083
2380
  return retVal;
@@ -3086,9 +2383,6 @@ const de___listOfPrefetchSchedule = (output, context) => {
3086
2383
  const retVal = (output || [])
3087
2384
  .filter((e) => e != null)
3088
2385
  .map((entry) => {
3089
- if (entry === null) {
3090
- return null;
3091
- }
3092
2386
  return de_PrefetchSchedule(entry, context);
3093
2387
  });
3094
2388
  return retVal;
@@ -3097,9 +2391,6 @@ const de___listOfScheduleAdBreak = (output, context) => {
3097
2391
  const retVal = (output || [])
3098
2392
  .filter((e) => e != null)
3099
2393
  .map((entry) => {
3100
- if (entry === null) {
3101
- return null;
3102
- }
3103
2394
  return de_ScheduleAdBreak(entry, context);
3104
2395
  });
3105
2396
  return retVal;
@@ -3108,31 +2399,14 @@ const de___listOfScheduleEntry = (output, context) => {
3108
2399
  const retVal = (output || [])
3109
2400
  .filter((e) => e != null)
3110
2401
  .map((entry) => {
3111
- if (entry === null) {
3112
- return null;
3113
- }
3114
2402
  return de_ScheduleEntry(entry, context);
3115
2403
  });
3116
2404
  return retVal;
3117
2405
  };
3118
- const de___listOfSegmentDeliveryConfiguration = (output, context) => {
3119
- const retVal = (output || [])
3120
- .filter((e) => e != null)
3121
- .map((entry) => {
3122
- if (entry === null) {
3123
- return null;
3124
- }
3125
- return de_SegmentDeliveryConfiguration(entry, context);
3126
- });
3127
- return retVal;
3128
- };
3129
2406
  const de___listOfSourceLocation = (output, context) => {
3130
2407
  const retVal = (output || [])
3131
2408
  .filter((e) => e != null)
3132
2409
  .map((entry) => {
3133
- if (entry === null) {
3134
- return null;
3135
- }
3136
2410
  return de_SourceLocation(entry, context);
3137
2411
  });
3138
2412
  return retVal;
@@ -3141,409 +2415,137 @@ const de___listOfVodSource = (output, context) => {
3141
2415
  const retVal = (output || [])
3142
2416
  .filter((e) => e != null)
3143
2417
  .map((entry) => {
3144
- if (entry === null) {
3145
- return null;
3146
- }
3147
2418
  return de_VodSource(entry, context);
3148
2419
  });
3149
2420
  return retVal;
3150
2421
  };
3151
- const de___mapOf__string = (output, context) => {
3152
- return Object.entries(output).reduce((acc, [key, value]) => {
3153
- if (value === null) {
3154
- return acc;
3155
- }
3156
- acc[key] = (0, smithy_client_1.expectString)(value);
3157
- return acc;
3158
- }, {});
3159
- };
3160
- const de_AccessConfiguration = (output, context) => {
3161
- return {
3162
- AccessType: (0, smithy_client_1.expectString)(output.AccessType),
3163
- SecretsManagerAccessTokenConfiguration: output.SecretsManagerAccessTokenConfiguration != null
3164
- ? de_SecretsManagerAccessTokenConfiguration(output.SecretsManagerAccessTokenConfiguration, context)
3165
- : undefined,
3166
- };
3167
- };
3168
- const de_AdBreak = (output, context) => {
3169
- return {
3170
- MessageType: (0, smithy_client_1.expectString)(output.MessageType),
3171
- OffsetMillis: (0, smithy_client_1.expectLong)(output.OffsetMillis),
3172
- Slate: output.Slate != null ? de_SlateSource(output.Slate, context) : undefined,
3173
- SpliceInsertMessage: output.SpliceInsertMessage != null ? de_SpliceInsertMessage(output.SpliceInsertMessage, context) : undefined,
3174
- TimeSignalMessage: output.TimeSignalMessage != null ? de_TimeSignalMessage(output.TimeSignalMessage, context) : undefined,
3175
- };
3176
- };
3177
- const de_AdMarkerPassthrough = (output, context) => {
3178
- return {
3179
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
3180
- };
3181
- };
3182
2422
  const de_Alert = (output, context) => {
3183
- return {
3184
- AlertCode: (0, smithy_client_1.expectString)(output.AlertCode),
3185
- AlertMessage: (0, smithy_client_1.expectString)(output.AlertMessage),
3186
- LastModifiedTime: output.LastModifiedTime != null
3187
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModifiedTime)))
3188
- : undefined,
3189
- RelatedResourceArns: output.RelatedResourceArns != null ? de___listOf__string(output.RelatedResourceArns, context) : undefined,
3190
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
3191
- };
3192
- };
3193
- const de_AvailMatchingCriteria = (output, context) => {
3194
- return {
3195
- DynamicVariable: (0, smithy_client_1.expectString)(output.DynamicVariable),
3196
- Operator: (0, smithy_client_1.expectString)(output.Operator),
3197
- };
3198
- };
3199
- const de_AvailSuppression = (output, context) => {
3200
- return {
3201
- Mode: (0, smithy_client_1.expectString)(output.Mode),
3202
- Value: (0, smithy_client_1.expectString)(output.Value),
3203
- };
3204
- };
3205
- const de_Bumper = (output, context) => {
3206
- return {
3207
- EndUrl: (0, smithy_client_1.expectString)(output.EndUrl),
3208
- StartUrl: (0, smithy_client_1.expectString)(output.StartUrl),
3209
- };
3210
- };
3211
- const de_CdnConfiguration = (output, context) => {
3212
- return {
3213
- AdSegmentUrlPrefix: (0, smithy_client_1.expectString)(output.AdSegmentUrlPrefix),
3214
- ContentSegmentUrlPrefix: (0, smithy_client_1.expectString)(output.ContentSegmentUrlPrefix),
3215
- };
2423
+ return (0, smithy_client_1.take)(output, {
2424
+ AlertCode: smithy_client_1.expectString,
2425
+ AlertMessage: smithy_client_1.expectString,
2426
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2427
+ RelatedResourceArns: smithy_client_1._json,
2428
+ ResourceArn: smithy_client_1.expectString,
2429
+ });
3216
2430
  };
3217
2431
  const de_Channel = (output, context) => {
3218
- return {
3219
- Arn: (0, smithy_client_1.expectString)(output.Arn),
3220
- ChannelName: (0, smithy_client_1.expectString)(output.ChannelName),
3221
- ChannelState: (0, smithy_client_1.expectString)(output.ChannelState),
3222
- CreationTime: output.CreationTime != null
3223
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
3224
- : undefined,
3225
- FillerSlate: output.FillerSlate != null ? de_SlateSource(output.FillerSlate, context) : undefined,
3226
- LastModifiedTime: output.LastModifiedTime != null
3227
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModifiedTime)))
3228
- : undefined,
3229
- LogConfiguration: output.LogConfiguration != null ? de_LogConfigurationForChannel(output.LogConfiguration, context) : undefined,
3230
- Outputs: output.Outputs != null ? de_ResponseOutputs(output.Outputs, context) : undefined,
3231
- PlaybackMode: (0, smithy_client_1.expectString)(output.PlaybackMode),
3232
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3233
- Tier: (0, smithy_client_1.expectString)(output.Tier),
3234
- };
3235
- };
3236
- const de_ClipRange = (output, context) => {
3237
- return {
3238
- EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
3239
- };
3240
- };
3241
- const de_ConfigurationAliasesResponse = (output, context) => {
3242
- return Object.entries(output).reduce((acc, [key, value]) => {
3243
- if (value === null) {
3244
- return acc;
3245
- }
3246
- acc[key] = de___mapOf__string(value, context);
3247
- return acc;
3248
- }, {});
3249
- };
3250
- const de_DashConfiguration = (output, context) => {
3251
- return {
3252
- ManifestEndpointPrefix: (0, smithy_client_1.expectString)(output.ManifestEndpointPrefix),
3253
- MpdLocation: (0, smithy_client_1.expectString)(output.MpdLocation),
3254
- OriginManifestType: (0, smithy_client_1.expectString)(output.OriginManifestType),
3255
- };
3256
- };
3257
- const de_DashPlaylistSettings = (output, context) => {
3258
- return {
3259
- ManifestWindowSeconds: (0, smithy_client_1.expectInt32)(output.ManifestWindowSeconds),
3260
- MinBufferTimeSeconds: (0, smithy_client_1.expectInt32)(output.MinBufferTimeSeconds),
3261
- MinUpdatePeriodSeconds: (0, smithy_client_1.expectInt32)(output.MinUpdatePeriodSeconds),
3262
- SuggestedPresentationDelaySeconds: (0, smithy_client_1.expectInt32)(output.SuggestedPresentationDelaySeconds),
3263
- };
3264
- };
3265
- const de_DefaultSegmentDeliveryConfiguration = (output, context) => {
3266
- return {
3267
- BaseUrl: (0, smithy_client_1.expectString)(output.BaseUrl),
3268
- };
3269
- };
3270
- const de_HlsConfiguration = (output, context) => {
3271
- return {
3272
- ManifestEndpointPrefix: (0, smithy_client_1.expectString)(output.ManifestEndpointPrefix),
3273
- };
3274
- };
3275
- const de_HlsPlaylistSettings = (output, context) => {
3276
- return {
3277
- ManifestWindowSeconds: (0, smithy_client_1.expectInt32)(output.ManifestWindowSeconds),
3278
- };
3279
- };
3280
- const de_HttpConfiguration = (output, context) => {
3281
- return {
3282
- BaseUrl: (0, smithy_client_1.expectString)(output.BaseUrl),
3283
- };
3284
- };
3285
- const de_HttpPackageConfiguration = (output, context) => {
3286
- return {
3287
- Path: (0, smithy_client_1.expectString)(output.Path),
3288
- SourceGroup: (0, smithy_client_1.expectString)(output.SourceGroup),
3289
- Type: (0, smithy_client_1.expectString)(output.Type),
3290
- };
3291
- };
3292
- const de_HttpPackageConfigurations = (output, context) => {
3293
- const retVal = (output || [])
3294
- .filter((e) => e != null)
3295
- .map((entry) => {
3296
- if (entry === null) {
3297
- return null;
3298
- }
3299
- return de_HttpPackageConfiguration(entry, context);
2432
+ return (0, smithy_client_1.take)(output, {
2433
+ Arn: smithy_client_1.expectString,
2434
+ ChannelName: smithy_client_1.expectString,
2435
+ ChannelState: smithy_client_1.expectString,
2436
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2437
+ FillerSlate: smithy_client_1._json,
2438
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2439
+ LogConfiguration: smithy_client_1._json,
2440
+ Outputs: smithy_client_1._json,
2441
+ PlaybackMode: smithy_client_1.expectString,
2442
+ Tags: [, smithy_client_1._json, `tags`],
2443
+ Tier: smithy_client_1.expectString,
3300
2444
  });
3301
- return retVal;
3302
- };
3303
- const de_LivePreRollConfiguration = (output, context) => {
3304
- return {
3305
- AdDecisionServerUrl: (0, smithy_client_1.expectString)(output.AdDecisionServerUrl),
3306
- MaxDurationSeconds: (0, smithy_client_1.expectInt32)(output.MaxDurationSeconds),
3307
- };
3308
2445
  };
3309
2446
  const de_LiveSource = (output, context) => {
3310
- return {
3311
- Arn: (0, smithy_client_1.expectString)(output.Arn),
3312
- CreationTime: output.CreationTime != null
3313
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
3314
- : undefined,
3315
- HttpPackageConfigurations: output.HttpPackageConfigurations != null
3316
- ? de_HttpPackageConfigurations(output.HttpPackageConfigurations, context)
3317
- : undefined,
3318
- LastModifiedTime: output.LastModifiedTime != null
3319
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModifiedTime)))
3320
- : undefined,
3321
- LiveSourceName: (0, smithy_client_1.expectString)(output.LiveSourceName),
3322
- SourceLocationName: (0, smithy_client_1.expectString)(output.SourceLocationName),
3323
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3324
- };
3325
- };
3326
- const de_LogConfiguration = (output, context) => {
3327
- return {
3328
- PercentEnabled: (0, smithy_client_1.expectInt32)(output.PercentEnabled),
3329
- };
3330
- };
3331
- const de_LogConfigurationForChannel = (output, context) => {
3332
- return {
3333
- LogTypes: output.LogTypes != null ? de_LogTypes(output.LogTypes, context) : undefined,
3334
- };
3335
- };
3336
- const de_LogTypes = (output, context) => {
3337
- const retVal = (output || [])
3338
- .filter((e) => e != null)
3339
- .map((entry) => {
3340
- if (entry === null) {
3341
- return null;
3342
- }
3343
- return (0, smithy_client_1.expectString)(entry);
2447
+ return (0, smithy_client_1.take)(output, {
2448
+ Arn: smithy_client_1.expectString,
2449
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2450
+ HttpPackageConfigurations: smithy_client_1._json,
2451
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2452
+ LiveSourceName: smithy_client_1.expectString,
2453
+ SourceLocationName: smithy_client_1.expectString,
2454
+ Tags: [, smithy_client_1._json, `tags`],
3344
2455
  });
3345
- return retVal;
3346
- };
3347
- const de_ManifestProcessingRules = (output, context) => {
3348
- return {
3349
- AdMarkerPassthrough: output.AdMarkerPassthrough != null ? de_AdMarkerPassthrough(output.AdMarkerPassthrough, context) : undefined,
3350
- };
3351
2456
  };
3352
2457
  const de_PlaybackConfiguration = (output, context) => {
3353
- return {
3354
- AdDecisionServerUrl: (0, smithy_client_1.expectString)(output.AdDecisionServerUrl),
3355
- AvailSuppression: output.AvailSuppression != null ? de_AvailSuppression(output.AvailSuppression, context) : undefined,
3356
- Bumper: output.Bumper != null ? de_Bumper(output.Bumper, context) : undefined,
3357
- CdnConfiguration: output.CdnConfiguration != null ? de_CdnConfiguration(output.CdnConfiguration, context) : undefined,
3358
- ConfigurationAliases: output.ConfigurationAliases != null
3359
- ? de_ConfigurationAliasesResponse(output.ConfigurationAliases, context)
3360
- : undefined,
3361
- DashConfiguration: output.DashConfiguration != null ? de_DashConfiguration(output.DashConfiguration, context) : undefined,
3362
- HlsConfiguration: output.HlsConfiguration != null ? de_HlsConfiguration(output.HlsConfiguration, context) : undefined,
3363
- LivePreRollConfiguration: output.LivePreRollConfiguration != null
3364
- ? de_LivePreRollConfiguration(output.LivePreRollConfiguration, context)
3365
- : undefined,
3366
- LogConfiguration: output.LogConfiguration != null ? de_LogConfiguration(output.LogConfiguration, context) : undefined,
3367
- ManifestProcessingRules: output.ManifestProcessingRules != null
3368
- ? de_ManifestProcessingRules(output.ManifestProcessingRules, context)
3369
- : undefined,
3370
- Name: (0, smithy_client_1.expectString)(output.Name),
3371
- PersonalizationThresholdSeconds: (0, smithy_client_1.expectInt32)(output.PersonalizationThresholdSeconds),
3372
- PlaybackConfigurationArn: (0, smithy_client_1.expectString)(output.PlaybackConfigurationArn),
3373
- PlaybackEndpointPrefix: (0, smithy_client_1.expectString)(output.PlaybackEndpointPrefix),
3374
- SessionInitializationEndpointPrefix: (0, smithy_client_1.expectString)(output.SessionInitializationEndpointPrefix),
3375
- SlateAdUrl: (0, smithy_client_1.expectString)(output.SlateAdUrl),
3376
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3377
- TranscodeProfileName: (0, smithy_client_1.expectString)(output.TranscodeProfileName),
3378
- VideoContentSourceUrl: (0, smithy_client_1.expectString)(output.VideoContentSourceUrl),
3379
- };
2458
+ return (0, smithy_client_1.take)(output, {
2459
+ AdDecisionServerUrl: smithy_client_1.expectString,
2460
+ AvailSuppression: smithy_client_1._json,
2461
+ Bumper: smithy_client_1._json,
2462
+ CdnConfiguration: smithy_client_1._json,
2463
+ ConfigurationAliases: smithy_client_1._json,
2464
+ DashConfiguration: smithy_client_1._json,
2465
+ HlsConfiguration: smithy_client_1._json,
2466
+ LivePreRollConfiguration: smithy_client_1._json,
2467
+ LogConfiguration: smithy_client_1._json,
2468
+ ManifestProcessingRules: smithy_client_1._json,
2469
+ Name: smithy_client_1.expectString,
2470
+ PersonalizationThresholdSeconds: smithy_client_1.expectInt32,
2471
+ PlaybackConfigurationArn: smithy_client_1.expectString,
2472
+ PlaybackEndpointPrefix: smithy_client_1.expectString,
2473
+ SessionInitializationEndpointPrefix: smithy_client_1.expectString,
2474
+ SlateAdUrl: smithy_client_1.expectString,
2475
+ Tags: [, smithy_client_1._json, `tags`],
2476
+ TranscodeProfileName: smithy_client_1.expectString,
2477
+ VideoContentSourceUrl: smithy_client_1.expectString,
2478
+ });
3380
2479
  };
3381
2480
  const de_PrefetchConsumption = (output, context) => {
3382
- return {
3383
- AvailMatchingCriteria: output.AvailMatchingCriteria != null
3384
- ? de___listOfAvailMatchingCriteria(output.AvailMatchingCriteria, context)
3385
- : undefined,
3386
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
3387
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
3388
- };
2481
+ return (0, smithy_client_1.take)(output, {
2482
+ AvailMatchingCriteria: smithy_client_1._json,
2483
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2484
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2485
+ });
3389
2486
  };
3390
2487
  const de_PrefetchRetrieval = (output, context) => {
3391
- return {
3392
- DynamicVariables: output.DynamicVariables != null ? de___mapOf__string(output.DynamicVariables, context) : undefined,
3393
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
3394
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
3395
- };
2488
+ return (0, smithy_client_1.take)(output, {
2489
+ DynamicVariables: smithy_client_1._json,
2490
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2491
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2492
+ });
3396
2493
  };
3397
2494
  const de_PrefetchSchedule = (output, context) => {
3398
- return {
3399
- Arn: (0, smithy_client_1.expectString)(output.Arn),
3400
- Consumption: output.Consumption != null ? de_PrefetchConsumption(output.Consumption, context) : undefined,
3401
- Name: (0, smithy_client_1.expectString)(output.Name),
3402
- PlaybackConfigurationName: (0, smithy_client_1.expectString)(output.PlaybackConfigurationName),
3403
- Retrieval: output.Retrieval != null ? de_PrefetchRetrieval(output.Retrieval, context) : undefined,
3404
- StreamId: (0, smithy_client_1.expectString)(output.StreamId),
3405
- };
3406
- };
3407
- const de_ResponseOutputItem = (output, context) => {
3408
- return {
3409
- DashPlaylistSettings: output.DashPlaylistSettings != null ? de_DashPlaylistSettings(output.DashPlaylistSettings, context) : undefined,
3410
- HlsPlaylistSettings: output.HlsPlaylistSettings != null ? de_HlsPlaylistSettings(output.HlsPlaylistSettings, context) : undefined,
3411
- ManifestName: (0, smithy_client_1.expectString)(output.ManifestName),
3412
- PlaybackUrl: (0, smithy_client_1.expectString)(output.PlaybackUrl),
3413
- SourceGroup: (0, smithy_client_1.expectString)(output.SourceGroup),
3414
- };
3415
- };
3416
- const de_ResponseOutputs = (output, context) => {
3417
- const retVal = (output || [])
3418
- .filter((e) => e != null)
3419
- .map((entry) => {
3420
- if (entry === null) {
3421
- return null;
3422
- }
3423
- return de_ResponseOutputItem(entry, context);
2495
+ return (0, smithy_client_1.take)(output, {
2496
+ Arn: smithy_client_1.expectString,
2497
+ Consumption: (_) => de_PrefetchConsumption(_, context),
2498
+ Name: smithy_client_1.expectString,
2499
+ PlaybackConfigurationName: smithy_client_1.expectString,
2500
+ Retrieval: (_) => de_PrefetchRetrieval(_, context),
2501
+ StreamId: smithy_client_1.expectString,
3424
2502
  });
3425
- return retVal;
3426
2503
  };
3427
2504
  const de_ScheduleAdBreak = (output, context) => {
3428
- return {
3429
- ApproximateDurationSeconds: (0, smithy_client_1.expectLong)(output.ApproximateDurationSeconds),
3430
- ApproximateStartTime: output.ApproximateStartTime != null
3431
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ApproximateStartTime)))
3432
- : undefined,
3433
- SourceLocationName: (0, smithy_client_1.expectString)(output.SourceLocationName),
3434
- VodSourceName: (0, smithy_client_1.expectString)(output.VodSourceName),
3435
- };
2505
+ return (0, smithy_client_1.take)(output, {
2506
+ ApproximateDurationSeconds: smithy_client_1.expectLong,
2507
+ ApproximateStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2508
+ SourceLocationName: smithy_client_1.expectString,
2509
+ VodSourceName: smithy_client_1.expectString,
2510
+ });
3436
2511
  };
3437
2512
  const de_ScheduleEntry = (output, context) => {
3438
- return {
3439
- ApproximateDurationSeconds: (0, smithy_client_1.expectLong)(output.ApproximateDurationSeconds),
3440
- ApproximateStartTime: output.ApproximateStartTime != null
3441
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ApproximateStartTime)))
3442
- : undefined,
3443
- Arn: (0, smithy_client_1.expectString)(output.Arn),
3444
- ChannelName: (0, smithy_client_1.expectString)(output.ChannelName),
3445
- LiveSourceName: (0, smithy_client_1.expectString)(output.LiveSourceName),
3446
- ProgramName: (0, smithy_client_1.expectString)(output.ProgramName),
3447
- ScheduleAdBreaks: output.ScheduleAdBreaks != null ? de___listOfScheduleAdBreak(output.ScheduleAdBreaks, context) : undefined,
3448
- ScheduleEntryType: (0, smithy_client_1.expectString)(output.ScheduleEntryType),
3449
- SourceLocationName: (0, smithy_client_1.expectString)(output.SourceLocationName),
3450
- VodSourceName: (0, smithy_client_1.expectString)(output.VodSourceName),
3451
- };
3452
- };
3453
- const de_SecretsManagerAccessTokenConfiguration = (output, context) => {
3454
- return {
3455
- HeaderName: (0, smithy_client_1.expectString)(output.HeaderName),
3456
- SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
3457
- SecretStringKey: (0, smithy_client_1.expectString)(output.SecretStringKey),
3458
- };
3459
- };
3460
- const de_SegmentationDescriptor = (output, context) => {
3461
- return {
3462
- SegmentNum: (0, smithy_client_1.expectInt32)(output.SegmentNum),
3463
- SegmentationEventId: (0, smithy_client_1.expectInt32)(output.SegmentationEventId),
3464
- SegmentationTypeId: (0, smithy_client_1.expectInt32)(output.SegmentationTypeId),
3465
- SegmentationUpid: (0, smithy_client_1.expectString)(output.SegmentationUpid),
3466
- SegmentationUpidType: (0, smithy_client_1.expectInt32)(output.SegmentationUpidType),
3467
- SegmentsExpected: (0, smithy_client_1.expectInt32)(output.SegmentsExpected),
3468
- SubSegmentNum: (0, smithy_client_1.expectInt32)(output.SubSegmentNum),
3469
- SubSegmentsExpected: (0, smithy_client_1.expectInt32)(output.SubSegmentsExpected),
3470
- };
3471
- };
3472
- const de_SegmentationDescriptorList = (output, context) => {
3473
- const retVal = (output || [])
3474
- .filter((e) => e != null)
3475
- .map((entry) => {
3476
- if (entry === null) {
3477
- return null;
3478
- }
3479
- return de_SegmentationDescriptor(entry, context);
2513
+ return (0, smithy_client_1.take)(output, {
2514
+ ApproximateDurationSeconds: smithy_client_1.expectLong,
2515
+ ApproximateStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2516
+ Arn: smithy_client_1.expectString,
2517
+ ChannelName: smithy_client_1.expectString,
2518
+ LiveSourceName: smithy_client_1.expectString,
2519
+ ProgramName: smithy_client_1.expectString,
2520
+ ScheduleAdBreaks: (_) => de___listOfScheduleAdBreak(_, context),
2521
+ ScheduleEntryType: smithy_client_1.expectString,
2522
+ SourceLocationName: smithy_client_1.expectString,
2523
+ VodSourceName: smithy_client_1.expectString,
3480
2524
  });
3481
- return retVal;
3482
- };
3483
- const de_SegmentDeliveryConfiguration = (output, context) => {
3484
- return {
3485
- BaseUrl: (0, smithy_client_1.expectString)(output.BaseUrl),
3486
- Name: (0, smithy_client_1.expectString)(output.Name),
3487
- };
3488
- };
3489
- const de_SlateSource = (output, context) => {
3490
- return {
3491
- SourceLocationName: (0, smithy_client_1.expectString)(output.SourceLocationName),
3492
- VodSourceName: (0, smithy_client_1.expectString)(output.VodSourceName),
3493
- };
3494
2525
  };
3495
2526
  const de_SourceLocation = (output, context) => {
3496
- return {
3497
- AccessConfiguration: output.AccessConfiguration != null ? de_AccessConfiguration(output.AccessConfiguration, context) : undefined,
3498
- Arn: (0, smithy_client_1.expectString)(output.Arn),
3499
- CreationTime: output.CreationTime != null
3500
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
3501
- : undefined,
3502
- DefaultSegmentDeliveryConfiguration: output.DefaultSegmentDeliveryConfiguration != null
3503
- ? de_DefaultSegmentDeliveryConfiguration(output.DefaultSegmentDeliveryConfiguration, context)
3504
- : undefined,
3505
- HttpConfiguration: output.HttpConfiguration != null ? de_HttpConfiguration(output.HttpConfiguration, context) : undefined,
3506
- LastModifiedTime: output.LastModifiedTime != null
3507
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModifiedTime)))
3508
- : undefined,
3509
- SegmentDeliveryConfigurations: output.SegmentDeliveryConfigurations != null
3510
- ? de___listOfSegmentDeliveryConfiguration(output.SegmentDeliveryConfigurations, context)
3511
- : undefined,
3512
- SourceLocationName: (0, smithy_client_1.expectString)(output.SourceLocationName),
3513
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3514
- };
3515
- };
3516
- const de_SpliceInsertMessage = (output, context) => {
3517
- return {
3518
- AvailNum: (0, smithy_client_1.expectInt32)(output.AvailNum),
3519
- AvailsExpected: (0, smithy_client_1.expectInt32)(output.AvailsExpected),
3520
- SpliceEventId: (0, smithy_client_1.expectInt32)(output.SpliceEventId),
3521
- UniqueProgramId: (0, smithy_client_1.expectInt32)(output.UniqueProgramId),
3522
- };
3523
- };
3524
- const de_TimeSignalMessage = (output, context) => {
3525
- return {
3526
- SegmentationDescriptors: output.SegmentationDescriptors != null
3527
- ? de_SegmentationDescriptorList(output.SegmentationDescriptors, context)
3528
- : undefined,
3529
- };
2527
+ return (0, smithy_client_1.take)(output, {
2528
+ AccessConfiguration: smithy_client_1._json,
2529
+ Arn: smithy_client_1.expectString,
2530
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2531
+ DefaultSegmentDeliveryConfiguration: smithy_client_1._json,
2532
+ HttpConfiguration: smithy_client_1._json,
2533
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2534
+ SegmentDeliveryConfigurations: smithy_client_1._json,
2535
+ SourceLocationName: smithy_client_1.expectString,
2536
+ Tags: [, smithy_client_1._json, `tags`],
2537
+ });
3530
2538
  };
3531
2539
  const de_VodSource = (output, context) => {
3532
- return {
3533
- Arn: (0, smithy_client_1.expectString)(output.Arn),
3534
- CreationTime: output.CreationTime != null
3535
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
3536
- : undefined,
3537
- HttpPackageConfigurations: output.HttpPackageConfigurations != null
3538
- ? de_HttpPackageConfigurations(output.HttpPackageConfigurations, context)
3539
- : undefined,
3540
- LastModifiedTime: output.LastModifiedTime != null
3541
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModifiedTime)))
3542
- : undefined,
3543
- SourceLocationName: (0, smithy_client_1.expectString)(output.SourceLocationName),
3544
- Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined,
3545
- VodSourceName: (0, smithy_client_1.expectString)(output.VodSourceName),
3546
- };
2540
+ return (0, smithy_client_1.take)(output, {
2541
+ Arn: smithy_client_1.expectString,
2542
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2543
+ HttpPackageConfigurations: smithy_client_1._json,
2544
+ LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2545
+ SourceLocationName: smithy_client_1.expectString,
2546
+ Tags: [, smithy_client_1._json, `tags`],
2547
+ VodSourceName: smithy_client_1.expectString,
2548
+ });
3547
2549
  };
3548
2550
  const deserializeMetadata = (output) => ({
3549
2551
  httpStatusCode: output.statusCode,