@aws-sdk/client-ivs 3.28.0 → 3.32.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.
@@ -76,9 +76,12 @@ import {
76
76
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
77
77
  import {
78
78
  expectBoolean as __expectBoolean,
79
- expectInt as __expectInt,
79
+ expectLong as __expectLong,
80
+ expectNonNull as __expectNonNull,
81
+ expectObject as __expectObject,
80
82
  expectString as __expectString,
81
83
  extendedEncodeURIComponent as __extendedEncodeURIComponent,
84
+ parseRfc3339DateTime as __parseRfc3339DateTime,
82
85
  } from "@aws-sdk/smithy-client";
83
86
  import {
84
87
  Endpoint as __Endpoint,
@@ -793,7 +796,7 @@ export const deserializeAws_restJson1BatchGetChannelCommand = async (
793
796
  channels: undefined,
794
797
  errors: undefined,
795
798
  };
796
- const data: any = await parseBody(output.body, context);
799
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
797
800
  if (data.channels !== undefined && data.channels !== null) {
798
801
  contents.channels = deserializeAws_restJson1Channels(data.channels, context);
799
802
  }
@@ -844,7 +847,7 @@ export const deserializeAws_restJson1BatchGetStreamKeyCommand = async (
844
847
  errors: undefined,
845
848
  streamKeys: undefined,
846
849
  };
847
- const data: any = await parseBody(output.body, context);
850
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
848
851
  if (data.errors !== undefined && data.errors !== null) {
849
852
  contents.errors = deserializeAws_restJson1BatchErrors(data.errors, context);
850
853
  }
@@ -895,7 +898,7 @@ export const deserializeAws_restJson1CreateChannelCommand = async (
895
898
  channel: undefined,
896
899
  streamKey: undefined,
897
900
  };
898
- const data: any = await parseBody(output.body, context);
901
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
899
902
  if (data.channel !== undefined && data.channel !== null) {
900
903
  contents.channel = deserializeAws_restJson1Channel(data.channel, context);
901
904
  }
@@ -985,7 +988,7 @@ export const deserializeAws_restJson1CreateRecordingConfigurationCommand = async
985
988
  $metadata: deserializeMetadata(output),
986
989
  recordingConfiguration: undefined,
987
990
  };
988
- const data: any = await parseBody(output.body, context);
991
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
989
992
  if (data.recordingConfiguration !== undefined && data.recordingConfiguration !== null) {
990
993
  contents.recordingConfiguration = deserializeAws_restJson1RecordingConfiguration(
991
994
  data.recordingConfiguration,
@@ -1083,7 +1086,7 @@ export const deserializeAws_restJson1CreateStreamKeyCommand = async (
1083
1086
  $metadata: deserializeMetadata(output),
1084
1087
  streamKey: undefined,
1085
1088
  };
1086
- const data: any = await parseBody(output.body, context);
1089
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1087
1090
  if (data.streamKey !== undefined && data.streamKey !== null) {
1088
1091
  contents.streamKey = deserializeAws_restJson1StreamKey(data.streamKey, context);
1089
1092
  }
@@ -1486,7 +1489,7 @@ export const deserializeAws_restJson1GetChannelCommand = async (
1486
1489
  $metadata: deserializeMetadata(output),
1487
1490
  channel: undefined,
1488
1491
  };
1489
- const data: any = await parseBody(output.body, context);
1492
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1490
1493
  if (data.channel !== undefined && data.channel !== null) {
1491
1494
  contents.channel = deserializeAws_restJson1Channel(data.channel, context);
1492
1495
  }
@@ -1557,7 +1560,7 @@ export const deserializeAws_restJson1GetPlaybackKeyPairCommand = async (
1557
1560
  $metadata: deserializeMetadata(output),
1558
1561
  keyPair: undefined,
1559
1562
  };
1560
- const data: any = await parseBody(output.body, context);
1563
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1561
1564
  if (data.keyPair !== undefined && data.keyPair !== null) {
1562
1565
  contents.keyPair = deserializeAws_restJson1PlaybackKeyPair(data.keyPair, context);
1563
1566
  }
@@ -1628,7 +1631,7 @@ export const deserializeAws_restJson1GetRecordingConfigurationCommand = async (
1628
1631
  $metadata: deserializeMetadata(output),
1629
1632
  recordingConfiguration: undefined,
1630
1633
  };
1631
- const data: any = await parseBody(output.body, context);
1634
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1632
1635
  if (data.recordingConfiguration !== undefined && data.recordingConfiguration !== null) {
1633
1636
  contents.recordingConfiguration = deserializeAws_restJson1RecordingConfiguration(
1634
1637
  data.recordingConfiguration,
@@ -1710,7 +1713,7 @@ export const deserializeAws_restJson1GetStreamCommand = async (
1710
1713
  $metadata: deserializeMetadata(output),
1711
1714
  stream: undefined,
1712
1715
  };
1713
- const data: any = await parseBody(output.body, context);
1716
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1714
1717
  if (data.stream !== undefined && data.stream !== null) {
1715
1718
  contents.stream = deserializeAws_restJson1_Stream(data.stream, context);
1716
1719
  }
@@ -1789,7 +1792,7 @@ export const deserializeAws_restJson1GetStreamKeyCommand = async (
1789
1792
  $metadata: deserializeMetadata(output),
1790
1793
  streamKey: undefined,
1791
1794
  };
1792
- const data: any = await parseBody(output.body, context);
1795
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1793
1796
  if (data.streamKey !== undefined && data.streamKey !== null) {
1794
1797
  contents.streamKey = deserializeAws_restJson1StreamKey(data.streamKey, context);
1795
1798
  }
@@ -1860,7 +1863,7 @@ export const deserializeAws_restJson1ImportPlaybackKeyPairCommand = async (
1860
1863
  $metadata: deserializeMetadata(output),
1861
1864
  keyPair: undefined,
1862
1865
  };
1863
- const data: any = await parseBody(output.body, context);
1866
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1864
1867
  if (data.keyPair !== undefined && data.keyPair !== null) {
1865
1868
  contents.keyPair = deserializeAws_restJson1PlaybackKeyPair(data.keyPair, context);
1866
1869
  }
@@ -1948,7 +1951,7 @@ export const deserializeAws_restJson1ListChannelsCommand = async (
1948
1951
  channels: undefined,
1949
1952
  nextToken: undefined,
1950
1953
  };
1951
- const data: any = await parseBody(output.body, context);
1954
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1952
1955
  if (data.channels !== undefined && data.channels !== null) {
1953
1956
  contents.channels = deserializeAws_restJson1ChannelList(data.channels, context);
1954
1957
  }
@@ -2023,7 +2026,7 @@ export const deserializeAws_restJson1ListPlaybackKeyPairsCommand = async (
2023
2026
  keyPairs: undefined,
2024
2027
  nextToken: undefined,
2025
2028
  };
2026
- const data: any = await parseBody(output.body, context);
2029
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2027
2030
  if (data.keyPairs !== undefined && data.keyPairs !== null) {
2028
2031
  contents.keyPairs = deserializeAws_restJson1PlaybackKeyPairList(data.keyPairs, context);
2029
2032
  }
@@ -2090,7 +2093,7 @@ export const deserializeAws_restJson1ListRecordingConfigurationsCommand = async
2090
2093
  nextToken: undefined,
2091
2094
  recordingConfigurations: undefined,
2092
2095
  };
2093
- const data: any = await parseBody(output.body, context);
2096
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2094
2097
  if (data.nextToken !== undefined && data.nextToken !== null) {
2095
2098
  contents.nextToken = __expectString(data.nextToken);
2096
2099
  }
@@ -2168,7 +2171,7 @@ export const deserializeAws_restJson1ListStreamKeysCommand = async (
2168
2171
  nextToken: undefined,
2169
2172
  streamKeys: undefined,
2170
2173
  };
2171
- const data: any = await parseBody(output.body, context);
2174
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2172
2175
  if (data.nextToken !== undefined && data.nextToken !== null) {
2173
2176
  contents.nextToken = __expectString(data.nextToken);
2174
2177
  }
@@ -2243,7 +2246,7 @@ export const deserializeAws_restJson1ListStreamsCommand = async (
2243
2246
  nextToken: undefined,
2244
2247
  streams: undefined,
2245
2248
  };
2246
- const data: any = await parseBody(output.body, context);
2249
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2247
2250
  if (data.nextToken !== undefined && data.nextToken !== null) {
2248
2251
  contents.nextToken = __expectString(data.nextToken);
2249
2252
  }
@@ -2302,7 +2305,7 @@ export const deserializeAws_restJson1ListTagsForResourceCommand = async (
2302
2305
  nextToken: undefined,
2303
2306
  tags: undefined,
2304
2307
  };
2305
- const data: any = await parseBody(output.body, context);
2308
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2306
2309
  if (data.nextToken !== undefined && data.nextToken !== null) {
2307
2310
  contents.nextToken = __expectString(data.nextToken);
2308
2311
  }
@@ -2676,7 +2679,7 @@ export const deserializeAws_restJson1UpdateChannelCommand = async (
2676
2679
  $metadata: deserializeMetadata(output),
2677
2680
  channel: undefined,
2678
2681
  };
2679
- const data: any = await parseBody(output.body, context);
2682
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2680
2683
  if (data.channel !== undefined && data.channel !== null) {
2681
2684
  contents.channel = deserializeAws_restJson1Channel(data.channel, context);
2682
2685
  }
@@ -3165,9 +3168,12 @@ const deserializeAws_restJson1_Stream = (output: any, context: __SerdeContext):
3165
3168
  channelArn: __expectString(output.channelArn),
3166
3169
  health: __expectString(output.health),
3167
3170
  playbackUrl: __expectString(output.playbackUrl),
3168
- startTime: output.startTime !== undefined && output.startTime !== null ? new Date(output.startTime) : undefined,
3171
+ startTime:
3172
+ output.startTime !== undefined && output.startTime !== null
3173
+ ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3174
+ : undefined,
3169
3175
  state: __expectString(output.state),
3170
- viewerCount: __expectInt(output.viewerCount),
3176
+ viewerCount: __expectLong(output.viewerCount),
3171
3177
  } as any;
3172
3178
  };
3173
3179
 
@@ -3231,9 +3237,12 @@ const deserializeAws_restJson1StreamSummary = (output: any, context: __SerdeCont
3231
3237
  return {
3232
3238
  channelArn: __expectString(output.channelArn),
3233
3239
  health: __expectString(output.health),
3234
- startTime: output.startTime !== undefined && output.startTime !== null ? new Date(output.startTime) : undefined,
3240
+ startTime:
3241
+ output.startTime !== undefined && output.startTime !== null
3242
+ ? __expectNonNull(__parseRfc3339DateTime(output.startTime))
3243
+ : undefined,
3235
3244
  state: __expectString(output.state),
3236
- viewerCount: __expectInt(output.viewerCount),
3245
+ viewerCount: __expectLong(output.viewerCount),
3237
3246
  } as any;
3238
3247
  };
3239
3248