@aws-sdk/client-ivs 3.33.0 → 3.36.1
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.
- package/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/Ivs.js +1 -364
- package/dist-cjs/IvsClient.js +35 -0
- package/{dist/cjs → dist-cjs}/commands/BatchGetChannelCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/BatchGetStreamKeyCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/CreateChannelCommand.js +2 -27
- package/dist-cjs/commands/CreateRecordingConfigurationCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/CreateStreamKeyCommand.js +2 -30
- package/{dist/cjs → dist-cjs}/commands/DeleteChannelCommand.js +2 -31
- package/{dist/cjs → dist-cjs}/commands/DeletePlaybackKeyPairCommand.js +2 -29
- package/{dist/cjs → dist-cjs}/commands/DeleteRecordingConfigurationCommand.js +2 -32
- package/{dist/cjs → dist-cjs}/commands/DeleteStreamKeyCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/GetChannelCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetPlaybackKeyPairCommand.js +2 -31
- package/{dist/cjs → dist-cjs}/commands/GetRecordingConfigurationCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetStreamCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetStreamKeyCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ImportPlaybackKeyPairCommand.js +2 -31
- package/{dist/cjs → dist-cjs}/commands/ListChannelsCommand.js +2 -30
- package/{dist/cjs → dist-cjs}/commands/ListPlaybackKeyPairsCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListRecordingConfigurationsCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListStreamKeysCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListStreamsCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/PutMetadataCommand.js +2 -33
- package/{dist/cjs → dist-cjs}/commands/StopStreamCommand.js +2 -34
- package/{dist/cjs → dist-cjs}/commands/TagResourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UpdateChannelCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -214
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListChannelsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListPlaybackKeyPairsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListRecordingConfigurationsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListStreamKeysPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListStreamsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListTagsForResourcePaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +23 -29
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/Ivs.js +2 -365
- package/dist-es/IvsClient.js +37 -0
- package/{dist/es → dist-es}/commands/BatchGetChannelCommand.js +4 -30
- package/{dist/es → dist-es}/commands/BatchGetStreamKeyCommand.js +4 -30
- package/{dist/es → dist-es}/commands/CreateChannelCommand.js +4 -30
- package/{dist/es → dist-es}/commands/CreateRecordingConfigurationCommand.js +4 -41
- package/{dist/es → dist-es}/commands/CreateStreamKeyCommand.js +4 -33
- package/{dist/es → dist-es}/commands/DeleteChannelCommand.js +4 -34
- package/{dist/es → dist-es}/commands/DeletePlaybackKeyPairCommand.js +4 -32
- package/{dist/es → dist-es}/commands/DeleteRecordingConfigurationCommand.js +4 -35
- package/{dist/es → dist-es}/commands/DeleteStreamKeyCommand.js +4 -31
- package/{dist/es → dist-es}/commands/GetChannelCommand.js +4 -30
- package/{dist/es → dist-es}/commands/GetPlaybackKeyPairCommand.js +4 -34
- package/{dist/es → dist-es}/commands/GetRecordingConfigurationCommand.js +4 -30
- package/{dist/es → dist-es}/commands/GetStreamCommand.js +4 -30
- package/{dist/es → dist-es}/commands/GetStreamKeyCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ImportPlaybackKeyPairCommand.js +4 -34
- package/{dist/es → dist-es}/commands/ListChannelsCommand.js +4 -33
- package/{dist/es → dist-es}/commands/ListPlaybackKeyPairsCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListRecordingConfigurationsCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListStreamKeysCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ListStreamsCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +4 -30
- package/{dist/es → dist-es}/commands/PutMetadataCommand.js +4 -36
- package/{dist/es → dist-es}/commands/StopStreamCommand.js +4 -37
- package/{dist/es → dist-es}/commands/TagResourceCommand.js +4 -30
- package/{dist/es → dist-es}/commands/UntagResourceCommand.js +4 -30
- package/{dist/es → dist-es}/commands/UpdateChannelCommand.js +4 -31
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -214
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListChannelsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListPlaybackKeyPairsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListRecordingConfigurationsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListStreamKeysPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListStreamsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListTagsForResourcePaginator.js +17 -30
- package/{dist/es → dist-es}/protocols/Aws_restJson1.js +606 -612
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/Ivs.d.ts +2 -2
- package/{dist/types → dist-types}/IvsClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/BatchGetChannelCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/BatchGetStreamKeyCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateChannelCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateRecordingConfigurationCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateStreamKeyCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteChannelCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeletePlaybackKeyPairCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteRecordingConfigurationCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteStreamKeyCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetChannelCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetPlaybackKeyPairCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetRecordingConfigurationCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetStreamCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetStreamKeyCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ImportPlaybackKeyPairCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListChannelsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListPlaybackKeyPairsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListRecordingConfigurationsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListStreamKeysCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListStreamsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/PutMetadataCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/StopStreamCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UpdateChannelCommand.d.ts +2 -2
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListChannelsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListPlaybackKeyPairsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListRecordingConfigurationsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListStreamKeysPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListStreamsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListTagsForResourcePaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/Ivs.d.ts +135 -0
- package/dist-types/ts3.4/IvsClient.d.ts +93 -0
- package/{dist/types → dist-types}/ts3.4/commands/BatchGetChannelCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/BatchGetStreamKeyCommand.d.ts +4 -22
- package/dist-types/ts3.4/commands/CreateChannelCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateRecordingConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateStreamKeyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteChannelCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeletePlaybackKeyPairCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteRecordingConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteStreamKeyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetChannelCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetPlaybackKeyPairCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/GetRecordingConfigurationCommand.d.ts +4 -22
- package/dist-types/ts3.4/commands/GetStreamCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetStreamKeyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ImportPlaybackKeyPairCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListChannelsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListPlaybackKeyPairsCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/ListRecordingConfigurationsCommand.d.ts +4 -23
- package/dist-types/ts3.4/commands/ListStreamKeysCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListStreamsCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/ListTagsForResourceCommand.d.ts +4 -22
- package/dist-types/ts3.4/commands/PutMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopStreamCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateChannelCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +798 -0
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListChannelsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListPlaybackKeyPairsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListRecordingConfigurationsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListStreamKeysPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListStreamsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +52 -49
- package/Ivs.ts +0 -1316
- package/IvsClient.ts +0 -696
- package/commands/BatchGetChannelCommand.ts +0 -94
- package/commands/BatchGetStreamKeyCommand.ts +0 -94
- package/commands/CreateChannelCommand.ts +0 -94
- package/commands/CreateRecordingConfigurationCommand.ts +0 -110
- package/commands/CreateStreamKeyCommand.ts +0 -97
- package/commands/DeleteChannelCommand.ts +0 -98
- package/commands/DeletePlaybackKeyPairCommand.ts +0 -96
- package/commands/DeleteRecordingConfigurationCommand.ts +0 -102
- package/commands/DeleteStreamKeyCommand.ts +0 -95
- package/commands/GetChannelCommand.ts +0 -94
- package/commands/GetPlaybackKeyPairCommand.ts +0 -98
- package/commands/GetRecordingConfigurationCommand.ts +0 -97
- package/commands/GetStreamCommand.ts +0 -90
- package/commands/GetStreamKeyCommand.ts +0 -94
- package/commands/ImportPlaybackKeyPairCommand.ts +0 -98
- package/commands/ListChannelsCommand.ts +0 -97
- package/commands/ListPlaybackKeyPairsCommand.ts +0 -95
- package/commands/ListRecordingConfigurationsCommand.ts +0 -100
- package/commands/ListStreamKeysCommand.ts +0 -94
- package/commands/ListStreamsCommand.ts +0 -95
- package/commands/ListTagsForResourceCommand.ts +0 -94
- package/commands/PutMetadataCommand.ts +0 -100
- package/commands/StopStreamCommand.ts +0 -101
- package/commands/TagResourceCommand.ts +0 -94
- package/commands/UntagResourceCommand.ts +0 -94
- package/commands/UpdateChannelCommand.ts +0 -95
- package/dist/cjs/Ivs.js.map +0 -1
- package/dist/cjs/IvsClient.js +0 -403
- package/dist/cjs/IvsClient.js.map +0 -1
- package/dist/cjs/commands/BatchGetChannelCommand.js.map +0 -1
- package/dist/cjs/commands/BatchGetStreamKeyCommand.js.map +0 -1
- package/dist/cjs/commands/CreateChannelCommand.js.map +0 -1
- package/dist/cjs/commands/CreateRecordingConfigurationCommand.js +0 -72
- package/dist/cjs/commands/CreateRecordingConfigurationCommand.js.map +0 -1
- package/dist/cjs/commands/CreateStreamKeyCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteChannelCommand.js.map +0 -1
- package/dist/cjs/commands/DeletePlaybackKeyPairCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteRecordingConfigurationCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteStreamKeyCommand.js.map +0 -1
- package/dist/cjs/commands/GetChannelCommand.js.map +0 -1
- package/dist/cjs/commands/GetPlaybackKeyPairCommand.js.map +0 -1
- package/dist/cjs/commands/GetRecordingConfigurationCommand.js.map +0 -1
- package/dist/cjs/commands/GetStreamCommand.js.map +0 -1
- package/dist/cjs/commands/GetStreamKeyCommand.js.map +0 -1
- package/dist/cjs/commands/ImportPlaybackKeyPairCommand.js.map +0 -1
- package/dist/cjs/commands/ListChannelsCommand.js.map +0 -1
- package/dist/cjs/commands/ListPlaybackKeyPairsCommand.js.map +0 -1
- package/dist/cjs/commands/ListRecordingConfigurationsCommand.js.map +0 -1
- package/dist/cjs/commands/ListStreamKeysCommand.js.map +0 -1
- package/dist/cjs/commands/ListStreamsCommand.js.map +0 -1
- package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist/cjs/commands/PutMetadataCommand.js.map +0 -1
- package/dist/cjs/commands/StopStreamCommand.js.map +0 -1
- package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateChannelCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -91
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListChannelsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListPlaybackKeyPairsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListRecordingConfigurationsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListStreamKeysPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListStreamsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListTagsForResourcePaginator.js.map +0 -1
- package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/Ivs.js.map +0 -1
- package/dist/es/IvsClient.js +0 -405
- package/dist/es/IvsClient.js.map +0 -1
- package/dist/es/commands/BatchGetChannelCommand.js.map +0 -1
- package/dist/es/commands/BatchGetStreamKeyCommand.js.map +0 -1
- package/dist/es/commands/CreateChannelCommand.js.map +0 -1
- package/dist/es/commands/CreateRecordingConfigurationCommand.js.map +0 -1
- package/dist/es/commands/CreateStreamKeyCommand.js.map +0 -1
- package/dist/es/commands/DeleteChannelCommand.js.map +0 -1
- package/dist/es/commands/DeletePlaybackKeyPairCommand.js.map +0 -1
- package/dist/es/commands/DeleteRecordingConfigurationCommand.js.map +0 -1
- package/dist/es/commands/DeleteStreamKeyCommand.js.map +0 -1
- package/dist/es/commands/GetChannelCommand.js.map +0 -1
- package/dist/es/commands/GetPlaybackKeyPairCommand.js.map +0 -1
- package/dist/es/commands/GetRecordingConfigurationCommand.js.map +0 -1
- package/dist/es/commands/GetStreamCommand.js.map +0 -1
- package/dist/es/commands/GetStreamKeyCommand.js.map +0 -1
- package/dist/es/commands/ImportPlaybackKeyPairCommand.js.map +0 -1
- package/dist/es/commands/ListChannelsCommand.js.map +0 -1
- package/dist/es/commands/ListPlaybackKeyPairsCommand.js.map +0 -1
- package/dist/es/commands/ListRecordingConfigurationsCommand.js.map +0 -1
- package/dist/es/commands/ListStreamKeysCommand.js.map +0 -1
- package/dist/es/commands/ListStreamsCommand.js.map +0 -1
- package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist/es/commands/PutMetadataCommand.js.map +0 -1
- package/dist/es/commands/StopStreamCommand.js.map +0 -1
- package/dist/es/commands/TagResourceCommand.js.map +0 -1
- package/dist/es/commands/UntagResourceCommand.js.map +0 -1
- package/dist/es/commands/UpdateChannelCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -37
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListChannelsPaginator.js.map +0 -1
- package/dist/es/pagination/ListPlaybackKeyPairsPaginator.js.map +0 -1
- package/dist/es/pagination/ListRecordingConfigurationsPaginator.js.map +0 -1
- package/dist/es/pagination/ListStreamKeysPaginator.js.map +0 -1
- package/dist/es/pagination/ListStreamsPaginator.js.map +0 -1
- package/dist/es/pagination/ListTagsForResourcePaginator.js.map +0 -1
- package/dist/es/protocols/Aws_restJson1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/ts3.4/Ivs.d.ts +0 -602
- package/dist/types/ts3.4/IvsClient.d.ts +0 -517
- package/dist/types/ts3.4/commands/CreateChannelCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/CreateRecordingConfigurationCommand.d.ts +0 -46
- package/dist/types/ts3.4/commands/CreateStreamKeyCommand.d.ts +0 -38
- package/dist/types/ts3.4/commands/DeleteChannelCommand.d.ts +0 -39
- package/dist/types/ts3.4/commands/DeletePlaybackKeyPairCommand.d.ts +0 -37
- package/dist/types/ts3.4/commands/DeleteRecordingConfigurationCommand.d.ts +0 -40
- package/dist/types/ts3.4/commands/DeleteStreamKeyCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/GetChannelCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/GetPlaybackKeyPairCommand.d.ts +0 -39
- package/dist/types/ts3.4/commands/GetStreamCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/GetStreamKeyCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ImportPlaybackKeyPairCommand.d.ts +0 -39
- package/dist/types/ts3.4/commands/ListChannelsCommand.d.ts +0 -38
- package/dist/types/ts3.4/commands/ListPlaybackKeyPairsCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListStreamKeysCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ListStreamsCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/PutMetadataCommand.d.ts +0 -41
- package/dist/types/ts3.4/commands/StopStreamCommand.d.ts +0 -42
- package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/UpdateChannelCommand.d.ts +0 -36
- package/dist/types/ts3.4/models/models_0.d.ts +0 -1340
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1673
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListChannelsPaginator.ts +0 -58
- package/pagination/ListPlaybackKeyPairsPaginator.ts +0 -58
- package/pagination/ListRecordingConfigurationsPaginator.ts +0 -58
- package/pagination/ListStreamKeysPaginator.ts +0 -58
- package/pagination/ListStreamsPaginator.ts +0 -54
- package/pagination/ListTagsForResourcePaginator.ts +0 -58
- package/protocols/Aws_restJson1.ts +0 -3326
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
|
@@ -1,3326 +0,0 @@
|
|
|
1
|
-
import { BatchGetChannelCommandInput, BatchGetChannelCommandOutput } from "../commands/BatchGetChannelCommand";
|
|
2
|
-
import { BatchGetStreamKeyCommandInput, BatchGetStreamKeyCommandOutput } from "../commands/BatchGetStreamKeyCommand";
|
|
3
|
-
import { CreateChannelCommandInput, CreateChannelCommandOutput } from "../commands/CreateChannelCommand";
|
|
4
|
-
import {
|
|
5
|
-
CreateRecordingConfigurationCommandInput,
|
|
6
|
-
CreateRecordingConfigurationCommandOutput,
|
|
7
|
-
} from "../commands/CreateRecordingConfigurationCommand";
|
|
8
|
-
import { CreateStreamKeyCommandInput, CreateStreamKeyCommandOutput } from "../commands/CreateStreamKeyCommand";
|
|
9
|
-
import { DeleteChannelCommandInput, DeleteChannelCommandOutput } from "../commands/DeleteChannelCommand";
|
|
10
|
-
import {
|
|
11
|
-
DeletePlaybackKeyPairCommandInput,
|
|
12
|
-
DeletePlaybackKeyPairCommandOutput,
|
|
13
|
-
} from "../commands/DeletePlaybackKeyPairCommand";
|
|
14
|
-
import {
|
|
15
|
-
DeleteRecordingConfigurationCommandInput,
|
|
16
|
-
DeleteRecordingConfigurationCommandOutput,
|
|
17
|
-
} from "../commands/DeleteRecordingConfigurationCommand";
|
|
18
|
-
import { DeleteStreamKeyCommandInput, DeleteStreamKeyCommandOutput } from "../commands/DeleteStreamKeyCommand";
|
|
19
|
-
import { GetChannelCommandInput, GetChannelCommandOutput } from "../commands/GetChannelCommand";
|
|
20
|
-
import { GetPlaybackKeyPairCommandInput, GetPlaybackKeyPairCommandOutput } from "../commands/GetPlaybackKeyPairCommand";
|
|
21
|
-
import {
|
|
22
|
-
GetRecordingConfigurationCommandInput,
|
|
23
|
-
GetRecordingConfigurationCommandOutput,
|
|
24
|
-
} from "../commands/GetRecordingConfigurationCommand";
|
|
25
|
-
import { GetStreamCommandInput, GetStreamCommandOutput } from "../commands/GetStreamCommand";
|
|
26
|
-
import { GetStreamKeyCommandInput, GetStreamKeyCommandOutput } from "../commands/GetStreamKeyCommand";
|
|
27
|
-
import {
|
|
28
|
-
ImportPlaybackKeyPairCommandInput,
|
|
29
|
-
ImportPlaybackKeyPairCommandOutput,
|
|
30
|
-
} from "../commands/ImportPlaybackKeyPairCommand";
|
|
31
|
-
import { ListChannelsCommandInput, ListChannelsCommandOutput } from "../commands/ListChannelsCommand";
|
|
32
|
-
import {
|
|
33
|
-
ListPlaybackKeyPairsCommandInput,
|
|
34
|
-
ListPlaybackKeyPairsCommandOutput,
|
|
35
|
-
} from "../commands/ListPlaybackKeyPairsCommand";
|
|
36
|
-
import {
|
|
37
|
-
ListRecordingConfigurationsCommandInput,
|
|
38
|
-
ListRecordingConfigurationsCommandOutput,
|
|
39
|
-
} from "../commands/ListRecordingConfigurationsCommand";
|
|
40
|
-
import { ListStreamKeysCommandInput, ListStreamKeysCommandOutput } from "../commands/ListStreamKeysCommand";
|
|
41
|
-
import { ListStreamsCommandInput, ListStreamsCommandOutput } from "../commands/ListStreamsCommand";
|
|
42
|
-
import {
|
|
43
|
-
ListTagsForResourceCommandInput,
|
|
44
|
-
ListTagsForResourceCommandOutput,
|
|
45
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
46
|
-
import { PutMetadataCommandInput, PutMetadataCommandOutput } from "../commands/PutMetadataCommand";
|
|
47
|
-
import { StopStreamCommandInput, StopStreamCommandOutput } from "../commands/StopStreamCommand";
|
|
48
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
49
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
50
|
-
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "../commands/UpdateChannelCommand";
|
|
51
|
-
import {
|
|
52
|
-
AccessDeniedException,
|
|
53
|
-
BatchError,
|
|
54
|
-
Channel,
|
|
55
|
-
ChannelNotBroadcasting,
|
|
56
|
-
ChannelSummary,
|
|
57
|
-
ConflictException,
|
|
58
|
-
DestinationConfiguration,
|
|
59
|
-
InternalServerException,
|
|
60
|
-
PendingVerification,
|
|
61
|
-
PlaybackKeyPair,
|
|
62
|
-
PlaybackKeyPairSummary,
|
|
63
|
-
RecordingConfiguration,
|
|
64
|
-
RecordingConfigurationSummary,
|
|
65
|
-
ResourceNotFoundException,
|
|
66
|
-
S3DestinationConfiguration,
|
|
67
|
-
ServiceQuotaExceededException,
|
|
68
|
-
StreamKey,
|
|
69
|
-
StreamKeySummary,
|
|
70
|
-
StreamSummary,
|
|
71
|
-
StreamUnavailable,
|
|
72
|
-
ThrottlingException,
|
|
73
|
-
ValidationException,
|
|
74
|
-
_Stream,
|
|
75
|
-
} from "../models/models_0";
|
|
76
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
77
|
-
import {
|
|
78
|
-
expectBoolean as __expectBoolean,
|
|
79
|
-
expectLong as __expectLong,
|
|
80
|
-
expectNonNull as __expectNonNull,
|
|
81
|
-
expectObject as __expectObject,
|
|
82
|
-
expectString as __expectString,
|
|
83
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
84
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
85
|
-
} from "@aws-sdk/smithy-client";
|
|
86
|
-
import {
|
|
87
|
-
Endpoint as __Endpoint,
|
|
88
|
-
MetadataBearer as __MetadataBearer,
|
|
89
|
-
ResponseMetadata as __ResponseMetadata,
|
|
90
|
-
SerdeContext as __SerdeContext,
|
|
91
|
-
SmithyException as __SmithyException,
|
|
92
|
-
} from "@aws-sdk/types";
|
|
93
|
-
|
|
94
|
-
export const serializeAws_restJson1BatchGetChannelCommand = async (
|
|
95
|
-
input: BatchGetChannelCommandInput,
|
|
96
|
-
context: __SerdeContext
|
|
97
|
-
): Promise<__HttpRequest> => {
|
|
98
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
99
|
-
const headers: any = {
|
|
100
|
-
"content-type": "application/json",
|
|
101
|
-
};
|
|
102
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetChannel";
|
|
103
|
-
let body: any;
|
|
104
|
-
body = JSON.stringify({
|
|
105
|
-
...(input.arns !== undefined &&
|
|
106
|
-
input.arns !== null && { arns: serializeAws_restJson1ChannelArnList(input.arns, context) }),
|
|
107
|
-
});
|
|
108
|
-
return new __HttpRequest({
|
|
109
|
-
protocol,
|
|
110
|
-
hostname,
|
|
111
|
-
port,
|
|
112
|
-
method: "POST",
|
|
113
|
-
headers,
|
|
114
|
-
path: resolvedPath,
|
|
115
|
-
body,
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export const serializeAws_restJson1BatchGetStreamKeyCommand = async (
|
|
120
|
-
input: BatchGetStreamKeyCommandInput,
|
|
121
|
-
context: __SerdeContext
|
|
122
|
-
): Promise<__HttpRequest> => {
|
|
123
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
124
|
-
const headers: any = {
|
|
125
|
-
"content-type": "application/json",
|
|
126
|
-
};
|
|
127
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetStreamKey";
|
|
128
|
-
let body: any;
|
|
129
|
-
body = JSON.stringify({
|
|
130
|
-
...(input.arns !== undefined &&
|
|
131
|
-
input.arns !== null && { arns: serializeAws_restJson1StreamKeyArnList(input.arns, context) }),
|
|
132
|
-
});
|
|
133
|
-
return new __HttpRequest({
|
|
134
|
-
protocol,
|
|
135
|
-
hostname,
|
|
136
|
-
port,
|
|
137
|
-
method: "POST",
|
|
138
|
-
headers,
|
|
139
|
-
path: resolvedPath,
|
|
140
|
-
body,
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export const serializeAws_restJson1CreateChannelCommand = async (
|
|
145
|
-
input: CreateChannelCommandInput,
|
|
146
|
-
context: __SerdeContext
|
|
147
|
-
): Promise<__HttpRequest> => {
|
|
148
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
|
-
const headers: any = {
|
|
150
|
-
"content-type": "application/json",
|
|
151
|
-
};
|
|
152
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateChannel";
|
|
153
|
-
let body: any;
|
|
154
|
-
body = JSON.stringify({
|
|
155
|
-
...(input.authorized !== undefined && input.authorized !== null && { authorized: input.authorized }),
|
|
156
|
-
...(input.latencyMode !== undefined && input.latencyMode !== null && { latencyMode: input.latencyMode }),
|
|
157
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
158
|
-
...(input.recordingConfigurationArn !== undefined &&
|
|
159
|
-
input.recordingConfigurationArn !== null && { recordingConfigurationArn: input.recordingConfigurationArn }),
|
|
160
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
161
|
-
...(input.type !== undefined && input.type !== null && { type: input.type }),
|
|
162
|
-
});
|
|
163
|
-
return new __HttpRequest({
|
|
164
|
-
protocol,
|
|
165
|
-
hostname,
|
|
166
|
-
port,
|
|
167
|
-
method: "POST",
|
|
168
|
-
headers,
|
|
169
|
-
path: resolvedPath,
|
|
170
|
-
body,
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export const serializeAws_restJson1CreateRecordingConfigurationCommand = async (
|
|
175
|
-
input: CreateRecordingConfigurationCommandInput,
|
|
176
|
-
context: __SerdeContext
|
|
177
|
-
): Promise<__HttpRequest> => {
|
|
178
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
179
|
-
const headers: any = {
|
|
180
|
-
"content-type": "application/json",
|
|
181
|
-
};
|
|
182
|
-
let resolvedPath =
|
|
183
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateRecordingConfiguration";
|
|
184
|
-
let body: any;
|
|
185
|
-
body = JSON.stringify({
|
|
186
|
-
...(input.destinationConfiguration !== undefined &&
|
|
187
|
-
input.destinationConfiguration !== null && {
|
|
188
|
-
destinationConfiguration: serializeAws_restJson1DestinationConfiguration(
|
|
189
|
-
input.destinationConfiguration,
|
|
190
|
-
context
|
|
191
|
-
),
|
|
192
|
-
}),
|
|
193
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
194
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
195
|
-
});
|
|
196
|
-
return new __HttpRequest({
|
|
197
|
-
protocol,
|
|
198
|
-
hostname,
|
|
199
|
-
port,
|
|
200
|
-
method: "POST",
|
|
201
|
-
headers,
|
|
202
|
-
path: resolvedPath,
|
|
203
|
-
body,
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
export const serializeAws_restJson1CreateStreamKeyCommand = async (
|
|
208
|
-
input: CreateStreamKeyCommandInput,
|
|
209
|
-
context: __SerdeContext
|
|
210
|
-
): Promise<__HttpRequest> => {
|
|
211
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
212
|
-
const headers: any = {
|
|
213
|
-
"content-type": "application/json",
|
|
214
|
-
};
|
|
215
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateStreamKey";
|
|
216
|
-
let body: any;
|
|
217
|
-
body = JSON.stringify({
|
|
218
|
-
...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
|
|
219
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
220
|
-
});
|
|
221
|
-
return new __HttpRequest({
|
|
222
|
-
protocol,
|
|
223
|
-
hostname,
|
|
224
|
-
port,
|
|
225
|
-
method: "POST",
|
|
226
|
-
headers,
|
|
227
|
-
path: resolvedPath,
|
|
228
|
-
body,
|
|
229
|
-
});
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
export const serializeAws_restJson1DeleteChannelCommand = async (
|
|
233
|
-
input: DeleteChannelCommandInput,
|
|
234
|
-
context: __SerdeContext
|
|
235
|
-
): Promise<__HttpRequest> => {
|
|
236
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
237
|
-
const headers: any = {
|
|
238
|
-
"content-type": "application/json",
|
|
239
|
-
};
|
|
240
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteChannel";
|
|
241
|
-
let body: any;
|
|
242
|
-
body = JSON.stringify({
|
|
243
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
244
|
-
});
|
|
245
|
-
return new __HttpRequest({
|
|
246
|
-
protocol,
|
|
247
|
-
hostname,
|
|
248
|
-
port,
|
|
249
|
-
method: "POST",
|
|
250
|
-
headers,
|
|
251
|
-
path: resolvedPath,
|
|
252
|
-
body,
|
|
253
|
-
});
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export const serializeAws_restJson1DeletePlaybackKeyPairCommand = async (
|
|
257
|
-
input: DeletePlaybackKeyPairCommandInput,
|
|
258
|
-
context: __SerdeContext
|
|
259
|
-
): Promise<__HttpRequest> => {
|
|
260
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
261
|
-
const headers: any = {
|
|
262
|
-
"content-type": "application/json",
|
|
263
|
-
};
|
|
264
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeletePlaybackKeyPair";
|
|
265
|
-
let body: any;
|
|
266
|
-
body = JSON.stringify({
|
|
267
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
268
|
-
});
|
|
269
|
-
return new __HttpRequest({
|
|
270
|
-
protocol,
|
|
271
|
-
hostname,
|
|
272
|
-
port,
|
|
273
|
-
method: "POST",
|
|
274
|
-
headers,
|
|
275
|
-
path: resolvedPath,
|
|
276
|
-
body,
|
|
277
|
-
});
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
export const serializeAws_restJson1DeleteRecordingConfigurationCommand = async (
|
|
281
|
-
input: DeleteRecordingConfigurationCommandInput,
|
|
282
|
-
context: __SerdeContext
|
|
283
|
-
): Promise<__HttpRequest> => {
|
|
284
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
285
|
-
const headers: any = {
|
|
286
|
-
"content-type": "application/json",
|
|
287
|
-
};
|
|
288
|
-
let resolvedPath =
|
|
289
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRecordingConfiguration";
|
|
290
|
-
let body: any;
|
|
291
|
-
body = JSON.stringify({
|
|
292
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
293
|
-
});
|
|
294
|
-
return new __HttpRequest({
|
|
295
|
-
protocol,
|
|
296
|
-
hostname,
|
|
297
|
-
port,
|
|
298
|
-
method: "POST",
|
|
299
|
-
headers,
|
|
300
|
-
path: resolvedPath,
|
|
301
|
-
body,
|
|
302
|
-
});
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
export const serializeAws_restJson1DeleteStreamKeyCommand = async (
|
|
306
|
-
input: DeleteStreamKeyCommandInput,
|
|
307
|
-
context: __SerdeContext
|
|
308
|
-
): Promise<__HttpRequest> => {
|
|
309
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
310
|
-
const headers: any = {
|
|
311
|
-
"content-type": "application/json",
|
|
312
|
-
};
|
|
313
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteStreamKey";
|
|
314
|
-
let body: any;
|
|
315
|
-
body = JSON.stringify({
|
|
316
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
317
|
-
});
|
|
318
|
-
return new __HttpRequest({
|
|
319
|
-
protocol,
|
|
320
|
-
hostname,
|
|
321
|
-
port,
|
|
322
|
-
method: "POST",
|
|
323
|
-
headers,
|
|
324
|
-
path: resolvedPath,
|
|
325
|
-
body,
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
export const serializeAws_restJson1GetChannelCommand = async (
|
|
330
|
-
input: GetChannelCommandInput,
|
|
331
|
-
context: __SerdeContext
|
|
332
|
-
): Promise<__HttpRequest> => {
|
|
333
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
334
|
-
const headers: any = {
|
|
335
|
-
"content-type": "application/json",
|
|
336
|
-
};
|
|
337
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetChannel";
|
|
338
|
-
let body: any;
|
|
339
|
-
body = JSON.stringify({
|
|
340
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
341
|
-
});
|
|
342
|
-
return new __HttpRequest({
|
|
343
|
-
protocol,
|
|
344
|
-
hostname,
|
|
345
|
-
port,
|
|
346
|
-
method: "POST",
|
|
347
|
-
headers,
|
|
348
|
-
path: resolvedPath,
|
|
349
|
-
body,
|
|
350
|
-
});
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
export const serializeAws_restJson1GetPlaybackKeyPairCommand = async (
|
|
354
|
-
input: GetPlaybackKeyPairCommandInput,
|
|
355
|
-
context: __SerdeContext
|
|
356
|
-
): Promise<__HttpRequest> => {
|
|
357
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
358
|
-
const headers: any = {
|
|
359
|
-
"content-type": "application/json",
|
|
360
|
-
};
|
|
361
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetPlaybackKeyPair";
|
|
362
|
-
let body: any;
|
|
363
|
-
body = JSON.stringify({
|
|
364
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
365
|
-
});
|
|
366
|
-
return new __HttpRequest({
|
|
367
|
-
protocol,
|
|
368
|
-
hostname,
|
|
369
|
-
port,
|
|
370
|
-
method: "POST",
|
|
371
|
-
headers,
|
|
372
|
-
path: resolvedPath,
|
|
373
|
-
body,
|
|
374
|
-
});
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
export const serializeAws_restJson1GetRecordingConfigurationCommand = async (
|
|
378
|
-
input: GetRecordingConfigurationCommandInput,
|
|
379
|
-
context: __SerdeContext
|
|
380
|
-
): Promise<__HttpRequest> => {
|
|
381
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
382
|
-
const headers: any = {
|
|
383
|
-
"content-type": "application/json",
|
|
384
|
-
};
|
|
385
|
-
let resolvedPath =
|
|
386
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetRecordingConfiguration";
|
|
387
|
-
let body: any;
|
|
388
|
-
body = JSON.stringify({
|
|
389
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
390
|
-
});
|
|
391
|
-
return new __HttpRequest({
|
|
392
|
-
protocol,
|
|
393
|
-
hostname,
|
|
394
|
-
port,
|
|
395
|
-
method: "POST",
|
|
396
|
-
headers,
|
|
397
|
-
path: resolvedPath,
|
|
398
|
-
body,
|
|
399
|
-
});
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
export const serializeAws_restJson1GetStreamCommand = async (
|
|
403
|
-
input: GetStreamCommandInput,
|
|
404
|
-
context: __SerdeContext
|
|
405
|
-
): Promise<__HttpRequest> => {
|
|
406
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
407
|
-
const headers: any = {
|
|
408
|
-
"content-type": "application/json",
|
|
409
|
-
};
|
|
410
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStream";
|
|
411
|
-
let body: any;
|
|
412
|
-
body = JSON.stringify({
|
|
413
|
-
...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
|
|
414
|
-
});
|
|
415
|
-
return new __HttpRequest({
|
|
416
|
-
protocol,
|
|
417
|
-
hostname,
|
|
418
|
-
port,
|
|
419
|
-
method: "POST",
|
|
420
|
-
headers,
|
|
421
|
-
path: resolvedPath,
|
|
422
|
-
body,
|
|
423
|
-
});
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
export const serializeAws_restJson1GetStreamKeyCommand = async (
|
|
427
|
-
input: GetStreamKeyCommandInput,
|
|
428
|
-
context: __SerdeContext
|
|
429
|
-
): Promise<__HttpRequest> => {
|
|
430
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
431
|
-
const headers: any = {
|
|
432
|
-
"content-type": "application/json",
|
|
433
|
-
};
|
|
434
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStreamKey";
|
|
435
|
-
let body: any;
|
|
436
|
-
body = JSON.stringify({
|
|
437
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
438
|
-
});
|
|
439
|
-
return new __HttpRequest({
|
|
440
|
-
protocol,
|
|
441
|
-
hostname,
|
|
442
|
-
port,
|
|
443
|
-
method: "POST",
|
|
444
|
-
headers,
|
|
445
|
-
path: resolvedPath,
|
|
446
|
-
body,
|
|
447
|
-
});
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
export const serializeAws_restJson1ImportPlaybackKeyPairCommand = async (
|
|
451
|
-
input: ImportPlaybackKeyPairCommandInput,
|
|
452
|
-
context: __SerdeContext
|
|
453
|
-
): Promise<__HttpRequest> => {
|
|
454
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
455
|
-
const headers: any = {
|
|
456
|
-
"content-type": "application/json",
|
|
457
|
-
};
|
|
458
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ImportPlaybackKeyPair";
|
|
459
|
-
let body: any;
|
|
460
|
-
body = JSON.stringify({
|
|
461
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
462
|
-
...(input.publicKeyMaterial !== undefined &&
|
|
463
|
-
input.publicKeyMaterial !== null && { publicKeyMaterial: input.publicKeyMaterial }),
|
|
464
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
465
|
-
});
|
|
466
|
-
return new __HttpRequest({
|
|
467
|
-
protocol,
|
|
468
|
-
hostname,
|
|
469
|
-
port,
|
|
470
|
-
method: "POST",
|
|
471
|
-
headers,
|
|
472
|
-
path: resolvedPath,
|
|
473
|
-
body,
|
|
474
|
-
});
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
export const serializeAws_restJson1ListChannelsCommand = async (
|
|
478
|
-
input: ListChannelsCommandInput,
|
|
479
|
-
context: __SerdeContext
|
|
480
|
-
): Promise<__HttpRequest> => {
|
|
481
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
482
|
-
const headers: any = {
|
|
483
|
-
"content-type": "application/json",
|
|
484
|
-
};
|
|
485
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListChannels";
|
|
486
|
-
let body: any;
|
|
487
|
-
body = JSON.stringify({
|
|
488
|
-
...(input.filterByName !== undefined && input.filterByName !== null && { filterByName: input.filterByName }),
|
|
489
|
-
...(input.filterByRecordingConfigurationArn !== undefined &&
|
|
490
|
-
input.filterByRecordingConfigurationArn !== null && {
|
|
491
|
-
filterByRecordingConfigurationArn: input.filterByRecordingConfigurationArn,
|
|
492
|
-
}),
|
|
493
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
494
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
495
|
-
});
|
|
496
|
-
return new __HttpRequest({
|
|
497
|
-
protocol,
|
|
498
|
-
hostname,
|
|
499
|
-
port,
|
|
500
|
-
method: "POST",
|
|
501
|
-
headers,
|
|
502
|
-
path: resolvedPath,
|
|
503
|
-
body,
|
|
504
|
-
});
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
export const serializeAws_restJson1ListPlaybackKeyPairsCommand = async (
|
|
508
|
-
input: ListPlaybackKeyPairsCommandInput,
|
|
509
|
-
context: __SerdeContext
|
|
510
|
-
): Promise<__HttpRequest> => {
|
|
511
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
512
|
-
const headers: any = {
|
|
513
|
-
"content-type": "application/json",
|
|
514
|
-
};
|
|
515
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListPlaybackKeyPairs";
|
|
516
|
-
let body: any;
|
|
517
|
-
body = JSON.stringify({
|
|
518
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
519
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
520
|
-
});
|
|
521
|
-
return new __HttpRequest({
|
|
522
|
-
protocol,
|
|
523
|
-
hostname,
|
|
524
|
-
port,
|
|
525
|
-
method: "POST",
|
|
526
|
-
headers,
|
|
527
|
-
path: resolvedPath,
|
|
528
|
-
body,
|
|
529
|
-
});
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
export const serializeAws_restJson1ListRecordingConfigurationsCommand = async (
|
|
533
|
-
input: ListRecordingConfigurationsCommandInput,
|
|
534
|
-
context: __SerdeContext
|
|
535
|
-
): Promise<__HttpRequest> => {
|
|
536
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
537
|
-
const headers: any = {
|
|
538
|
-
"content-type": "application/json",
|
|
539
|
-
};
|
|
540
|
-
let resolvedPath =
|
|
541
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListRecordingConfigurations";
|
|
542
|
-
let body: any;
|
|
543
|
-
body = JSON.stringify({
|
|
544
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
545
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
546
|
-
});
|
|
547
|
-
return new __HttpRequest({
|
|
548
|
-
protocol,
|
|
549
|
-
hostname,
|
|
550
|
-
port,
|
|
551
|
-
method: "POST",
|
|
552
|
-
headers,
|
|
553
|
-
path: resolvedPath,
|
|
554
|
-
body,
|
|
555
|
-
});
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
export const serializeAws_restJson1ListStreamKeysCommand = async (
|
|
559
|
-
input: ListStreamKeysCommandInput,
|
|
560
|
-
context: __SerdeContext
|
|
561
|
-
): Promise<__HttpRequest> => {
|
|
562
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
563
|
-
const headers: any = {
|
|
564
|
-
"content-type": "application/json",
|
|
565
|
-
};
|
|
566
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreamKeys";
|
|
567
|
-
let body: any;
|
|
568
|
-
body = JSON.stringify({
|
|
569
|
-
...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
|
|
570
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
571
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
572
|
-
});
|
|
573
|
-
return new __HttpRequest({
|
|
574
|
-
protocol,
|
|
575
|
-
hostname,
|
|
576
|
-
port,
|
|
577
|
-
method: "POST",
|
|
578
|
-
headers,
|
|
579
|
-
path: resolvedPath,
|
|
580
|
-
body,
|
|
581
|
-
});
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
export const serializeAws_restJson1ListStreamsCommand = async (
|
|
585
|
-
input: ListStreamsCommandInput,
|
|
586
|
-
context: __SerdeContext
|
|
587
|
-
): Promise<__HttpRequest> => {
|
|
588
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
589
|
-
const headers: any = {
|
|
590
|
-
"content-type": "application/json",
|
|
591
|
-
};
|
|
592
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreams";
|
|
593
|
-
let body: any;
|
|
594
|
-
body = JSON.stringify({
|
|
595
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
596
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
597
|
-
});
|
|
598
|
-
return new __HttpRequest({
|
|
599
|
-
protocol,
|
|
600
|
-
hostname,
|
|
601
|
-
port,
|
|
602
|
-
method: "POST",
|
|
603
|
-
headers,
|
|
604
|
-
path: resolvedPath,
|
|
605
|
-
body,
|
|
606
|
-
});
|
|
607
|
-
};
|
|
608
|
-
|
|
609
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
610
|
-
input: ListTagsForResourceCommandInput,
|
|
611
|
-
context: __SerdeContext
|
|
612
|
-
): Promise<__HttpRequest> => {
|
|
613
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
614
|
-
const headers: any = {
|
|
615
|
-
"content-type": "application/json",
|
|
616
|
-
};
|
|
617
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
618
|
-
if (input.resourceArn !== undefined) {
|
|
619
|
-
const labelValue: string = input.resourceArn;
|
|
620
|
-
if (labelValue.length <= 0) {
|
|
621
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
622
|
-
}
|
|
623
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
624
|
-
} else {
|
|
625
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
626
|
-
}
|
|
627
|
-
let body: any;
|
|
628
|
-
body = JSON.stringify({
|
|
629
|
-
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
630
|
-
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
631
|
-
});
|
|
632
|
-
return new __HttpRequest({
|
|
633
|
-
protocol,
|
|
634
|
-
hostname,
|
|
635
|
-
port,
|
|
636
|
-
method: "GET",
|
|
637
|
-
headers,
|
|
638
|
-
path: resolvedPath,
|
|
639
|
-
body,
|
|
640
|
-
});
|
|
641
|
-
};
|
|
642
|
-
|
|
643
|
-
export const serializeAws_restJson1PutMetadataCommand = async (
|
|
644
|
-
input: PutMetadataCommandInput,
|
|
645
|
-
context: __SerdeContext
|
|
646
|
-
): Promise<__HttpRequest> => {
|
|
647
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
648
|
-
const headers: any = {
|
|
649
|
-
"content-type": "application/json",
|
|
650
|
-
};
|
|
651
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutMetadata";
|
|
652
|
-
let body: any;
|
|
653
|
-
body = JSON.stringify({
|
|
654
|
-
...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
|
|
655
|
-
...(input.metadata !== undefined && input.metadata !== null && { metadata: input.metadata }),
|
|
656
|
-
});
|
|
657
|
-
return new __HttpRequest({
|
|
658
|
-
protocol,
|
|
659
|
-
hostname,
|
|
660
|
-
port,
|
|
661
|
-
method: "POST",
|
|
662
|
-
headers,
|
|
663
|
-
path: resolvedPath,
|
|
664
|
-
body,
|
|
665
|
-
});
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
export const serializeAws_restJson1StopStreamCommand = async (
|
|
669
|
-
input: StopStreamCommandInput,
|
|
670
|
-
context: __SerdeContext
|
|
671
|
-
): Promise<__HttpRequest> => {
|
|
672
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
673
|
-
const headers: any = {
|
|
674
|
-
"content-type": "application/json",
|
|
675
|
-
};
|
|
676
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopStream";
|
|
677
|
-
let body: any;
|
|
678
|
-
body = JSON.stringify({
|
|
679
|
-
...(input.channelArn !== undefined && input.channelArn !== null && { channelArn: input.channelArn }),
|
|
680
|
-
});
|
|
681
|
-
return new __HttpRequest({
|
|
682
|
-
protocol,
|
|
683
|
-
hostname,
|
|
684
|
-
port,
|
|
685
|
-
method: "POST",
|
|
686
|
-
headers,
|
|
687
|
-
path: resolvedPath,
|
|
688
|
-
body,
|
|
689
|
-
});
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
693
|
-
input: TagResourceCommandInput,
|
|
694
|
-
context: __SerdeContext
|
|
695
|
-
): Promise<__HttpRequest> => {
|
|
696
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
697
|
-
const headers: any = {
|
|
698
|
-
"content-type": "application/json",
|
|
699
|
-
};
|
|
700
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
701
|
-
if (input.resourceArn !== undefined) {
|
|
702
|
-
const labelValue: string = input.resourceArn;
|
|
703
|
-
if (labelValue.length <= 0) {
|
|
704
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
705
|
-
}
|
|
706
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
707
|
-
} else {
|
|
708
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
709
|
-
}
|
|
710
|
-
let body: any;
|
|
711
|
-
body = JSON.stringify({
|
|
712
|
-
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
713
|
-
});
|
|
714
|
-
return new __HttpRequest({
|
|
715
|
-
protocol,
|
|
716
|
-
hostname,
|
|
717
|
-
port,
|
|
718
|
-
method: "POST",
|
|
719
|
-
headers,
|
|
720
|
-
path: resolvedPath,
|
|
721
|
-
body,
|
|
722
|
-
});
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
726
|
-
input: UntagResourceCommandInput,
|
|
727
|
-
context: __SerdeContext
|
|
728
|
-
): Promise<__HttpRequest> => {
|
|
729
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
730
|
-
const headers: any = {};
|
|
731
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
732
|
-
if (input.resourceArn !== undefined) {
|
|
733
|
-
const labelValue: string = input.resourceArn;
|
|
734
|
-
if (labelValue.length <= 0) {
|
|
735
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
736
|
-
}
|
|
737
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
738
|
-
} else {
|
|
739
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
740
|
-
}
|
|
741
|
-
const query: any = {
|
|
742
|
-
...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }),
|
|
743
|
-
};
|
|
744
|
-
let body: any;
|
|
745
|
-
return new __HttpRequest({
|
|
746
|
-
protocol,
|
|
747
|
-
hostname,
|
|
748
|
-
port,
|
|
749
|
-
method: "DELETE",
|
|
750
|
-
headers,
|
|
751
|
-
path: resolvedPath,
|
|
752
|
-
query,
|
|
753
|
-
body,
|
|
754
|
-
});
|
|
755
|
-
};
|
|
756
|
-
|
|
757
|
-
export const serializeAws_restJson1UpdateChannelCommand = async (
|
|
758
|
-
input: UpdateChannelCommandInput,
|
|
759
|
-
context: __SerdeContext
|
|
760
|
-
): Promise<__HttpRequest> => {
|
|
761
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
762
|
-
const headers: any = {
|
|
763
|
-
"content-type": "application/json",
|
|
764
|
-
};
|
|
765
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateChannel";
|
|
766
|
-
let body: any;
|
|
767
|
-
body = JSON.stringify({
|
|
768
|
-
...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
|
|
769
|
-
...(input.authorized !== undefined && input.authorized !== null && { authorized: input.authorized }),
|
|
770
|
-
...(input.latencyMode !== undefined && input.latencyMode !== null && { latencyMode: input.latencyMode }),
|
|
771
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
772
|
-
...(input.recordingConfigurationArn !== undefined &&
|
|
773
|
-
input.recordingConfigurationArn !== null && { recordingConfigurationArn: input.recordingConfigurationArn }),
|
|
774
|
-
...(input.type !== undefined && input.type !== null && { type: input.type }),
|
|
775
|
-
});
|
|
776
|
-
return new __HttpRequest({
|
|
777
|
-
protocol,
|
|
778
|
-
hostname,
|
|
779
|
-
port,
|
|
780
|
-
method: "POST",
|
|
781
|
-
headers,
|
|
782
|
-
path: resolvedPath,
|
|
783
|
-
body,
|
|
784
|
-
});
|
|
785
|
-
};
|
|
786
|
-
|
|
787
|
-
export const deserializeAws_restJson1BatchGetChannelCommand = async (
|
|
788
|
-
output: __HttpResponse,
|
|
789
|
-
context: __SerdeContext
|
|
790
|
-
): Promise<BatchGetChannelCommandOutput> => {
|
|
791
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
792
|
-
return deserializeAws_restJson1BatchGetChannelCommandError(output, context);
|
|
793
|
-
}
|
|
794
|
-
const contents: BatchGetChannelCommandOutput = {
|
|
795
|
-
$metadata: deserializeMetadata(output),
|
|
796
|
-
channels: undefined,
|
|
797
|
-
errors: undefined,
|
|
798
|
-
};
|
|
799
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
800
|
-
if (data.channels !== undefined && data.channels !== null) {
|
|
801
|
-
contents.channels = deserializeAws_restJson1Channels(data.channels, context);
|
|
802
|
-
}
|
|
803
|
-
if (data.errors !== undefined && data.errors !== null) {
|
|
804
|
-
contents.errors = deserializeAws_restJson1BatchErrors(data.errors, context);
|
|
805
|
-
}
|
|
806
|
-
return Promise.resolve(contents);
|
|
807
|
-
};
|
|
808
|
-
|
|
809
|
-
const deserializeAws_restJson1BatchGetChannelCommandError = async (
|
|
810
|
-
output: __HttpResponse,
|
|
811
|
-
context: __SerdeContext
|
|
812
|
-
): Promise<BatchGetChannelCommandOutput> => {
|
|
813
|
-
const parsedOutput: any = {
|
|
814
|
-
...output,
|
|
815
|
-
body: await parseBody(output.body, context),
|
|
816
|
-
};
|
|
817
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
818
|
-
let errorCode: string = "UnknownError";
|
|
819
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
820
|
-
switch (errorCode) {
|
|
821
|
-
default:
|
|
822
|
-
const parsedBody = parsedOutput.body;
|
|
823
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
824
|
-
response = {
|
|
825
|
-
...parsedBody,
|
|
826
|
-
name: `${errorCode}`,
|
|
827
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
828
|
-
$fault: "client",
|
|
829
|
-
$metadata: deserializeMetadata(output),
|
|
830
|
-
} as any;
|
|
831
|
-
}
|
|
832
|
-
const message = response.message || response.Message || errorCode;
|
|
833
|
-
response.message = message;
|
|
834
|
-
delete response.Message;
|
|
835
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
export const deserializeAws_restJson1BatchGetStreamKeyCommand = async (
|
|
839
|
-
output: __HttpResponse,
|
|
840
|
-
context: __SerdeContext
|
|
841
|
-
): Promise<BatchGetStreamKeyCommandOutput> => {
|
|
842
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
843
|
-
return deserializeAws_restJson1BatchGetStreamKeyCommandError(output, context);
|
|
844
|
-
}
|
|
845
|
-
const contents: BatchGetStreamKeyCommandOutput = {
|
|
846
|
-
$metadata: deserializeMetadata(output),
|
|
847
|
-
errors: undefined,
|
|
848
|
-
streamKeys: undefined,
|
|
849
|
-
};
|
|
850
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
851
|
-
if (data.errors !== undefined && data.errors !== null) {
|
|
852
|
-
contents.errors = deserializeAws_restJson1BatchErrors(data.errors, context);
|
|
853
|
-
}
|
|
854
|
-
if (data.streamKeys !== undefined && data.streamKeys !== null) {
|
|
855
|
-
contents.streamKeys = deserializeAws_restJson1StreamKeys(data.streamKeys, context);
|
|
856
|
-
}
|
|
857
|
-
return Promise.resolve(contents);
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
const deserializeAws_restJson1BatchGetStreamKeyCommandError = async (
|
|
861
|
-
output: __HttpResponse,
|
|
862
|
-
context: __SerdeContext
|
|
863
|
-
): Promise<BatchGetStreamKeyCommandOutput> => {
|
|
864
|
-
const parsedOutput: any = {
|
|
865
|
-
...output,
|
|
866
|
-
body: await parseBody(output.body, context),
|
|
867
|
-
};
|
|
868
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
869
|
-
let errorCode: string = "UnknownError";
|
|
870
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
871
|
-
switch (errorCode) {
|
|
872
|
-
default:
|
|
873
|
-
const parsedBody = parsedOutput.body;
|
|
874
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
875
|
-
response = {
|
|
876
|
-
...parsedBody,
|
|
877
|
-
name: `${errorCode}`,
|
|
878
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
879
|
-
$fault: "client",
|
|
880
|
-
$metadata: deserializeMetadata(output),
|
|
881
|
-
} as any;
|
|
882
|
-
}
|
|
883
|
-
const message = response.message || response.Message || errorCode;
|
|
884
|
-
response.message = message;
|
|
885
|
-
delete response.Message;
|
|
886
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
887
|
-
};
|
|
888
|
-
|
|
889
|
-
export const deserializeAws_restJson1CreateChannelCommand = async (
|
|
890
|
-
output: __HttpResponse,
|
|
891
|
-
context: __SerdeContext
|
|
892
|
-
): Promise<CreateChannelCommandOutput> => {
|
|
893
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
894
|
-
return deserializeAws_restJson1CreateChannelCommandError(output, context);
|
|
895
|
-
}
|
|
896
|
-
const contents: CreateChannelCommandOutput = {
|
|
897
|
-
$metadata: deserializeMetadata(output),
|
|
898
|
-
channel: undefined,
|
|
899
|
-
streamKey: undefined,
|
|
900
|
-
};
|
|
901
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
902
|
-
if (data.channel !== undefined && data.channel !== null) {
|
|
903
|
-
contents.channel = deserializeAws_restJson1Channel(data.channel, context);
|
|
904
|
-
}
|
|
905
|
-
if (data.streamKey !== undefined && data.streamKey !== null) {
|
|
906
|
-
contents.streamKey = deserializeAws_restJson1StreamKey(data.streamKey, context);
|
|
907
|
-
}
|
|
908
|
-
return Promise.resolve(contents);
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
const deserializeAws_restJson1CreateChannelCommandError = async (
|
|
912
|
-
output: __HttpResponse,
|
|
913
|
-
context: __SerdeContext
|
|
914
|
-
): Promise<CreateChannelCommandOutput> => {
|
|
915
|
-
const parsedOutput: any = {
|
|
916
|
-
...output,
|
|
917
|
-
body: await parseBody(output.body, context),
|
|
918
|
-
};
|
|
919
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
920
|
-
let errorCode: string = "UnknownError";
|
|
921
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
922
|
-
switch (errorCode) {
|
|
923
|
-
case "AccessDeniedException":
|
|
924
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
925
|
-
response = {
|
|
926
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
927
|
-
name: errorCode,
|
|
928
|
-
$metadata: deserializeMetadata(output),
|
|
929
|
-
};
|
|
930
|
-
break;
|
|
931
|
-
case "PendingVerification":
|
|
932
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
933
|
-
response = {
|
|
934
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
935
|
-
name: errorCode,
|
|
936
|
-
$metadata: deserializeMetadata(output),
|
|
937
|
-
};
|
|
938
|
-
break;
|
|
939
|
-
case "ResourceNotFoundException":
|
|
940
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
941
|
-
response = {
|
|
942
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
943
|
-
name: errorCode,
|
|
944
|
-
$metadata: deserializeMetadata(output),
|
|
945
|
-
};
|
|
946
|
-
break;
|
|
947
|
-
case "ServiceQuotaExceededException":
|
|
948
|
-
case "com.amazonaws.ivs#ServiceQuotaExceededException":
|
|
949
|
-
response = {
|
|
950
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
951
|
-
name: errorCode,
|
|
952
|
-
$metadata: deserializeMetadata(output),
|
|
953
|
-
};
|
|
954
|
-
break;
|
|
955
|
-
case "ValidationException":
|
|
956
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
957
|
-
response = {
|
|
958
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
959
|
-
name: errorCode,
|
|
960
|
-
$metadata: deserializeMetadata(output),
|
|
961
|
-
};
|
|
962
|
-
break;
|
|
963
|
-
default:
|
|
964
|
-
const parsedBody = parsedOutput.body;
|
|
965
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
966
|
-
response = {
|
|
967
|
-
...parsedBody,
|
|
968
|
-
name: `${errorCode}`,
|
|
969
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
970
|
-
$fault: "client",
|
|
971
|
-
$metadata: deserializeMetadata(output),
|
|
972
|
-
} as any;
|
|
973
|
-
}
|
|
974
|
-
const message = response.message || response.Message || errorCode;
|
|
975
|
-
response.message = message;
|
|
976
|
-
delete response.Message;
|
|
977
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
export const deserializeAws_restJson1CreateRecordingConfigurationCommand = async (
|
|
981
|
-
output: __HttpResponse,
|
|
982
|
-
context: __SerdeContext
|
|
983
|
-
): Promise<CreateRecordingConfigurationCommandOutput> => {
|
|
984
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
985
|
-
return deserializeAws_restJson1CreateRecordingConfigurationCommandError(output, context);
|
|
986
|
-
}
|
|
987
|
-
const contents: CreateRecordingConfigurationCommandOutput = {
|
|
988
|
-
$metadata: deserializeMetadata(output),
|
|
989
|
-
recordingConfiguration: undefined,
|
|
990
|
-
};
|
|
991
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
992
|
-
if (data.recordingConfiguration !== undefined && data.recordingConfiguration !== null) {
|
|
993
|
-
contents.recordingConfiguration = deserializeAws_restJson1RecordingConfiguration(
|
|
994
|
-
data.recordingConfiguration,
|
|
995
|
-
context
|
|
996
|
-
);
|
|
997
|
-
}
|
|
998
|
-
return Promise.resolve(contents);
|
|
999
|
-
};
|
|
1000
|
-
|
|
1001
|
-
const deserializeAws_restJson1CreateRecordingConfigurationCommandError = async (
|
|
1002
|
-
output: __HttpResponse,
|
|
1003
|
-
context: __SerdeContext
|
|
1004
|
-
): Promise<CreateRecordingConfigurationCommandOutput> => {
|
|
1005
|
-
const parsedOutput: any = {
|
|
1006
|
-
...output,
|
|
1007
|
-
body: await parseBody(output.body, context),
|
|
1008
|
-
};
|
|
1009
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1010
|
-
let errorCode: string = "UnknownError";
|
|
1011
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1012
|
-
switch (errorCode) {
|
|
1013
|
-
case "AccessDeniedException":
|
|
1014
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1015
|
-
response = {
|
|
1016
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1017
|
-
name: errorCode,
|
|
1018
|
-
$metadata: deserializeMetadata(output),
|
|
1019
|
-
};
|
|
1020
|
-
break;
|
|
1021
|
-
case "ConflictException":
|
|
1022
|
-
case "com.amazonaws.ivs#ConflictException":
|
|
1023
|
-
response = {
|
|
1024
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1025
|
-
name: errorCode,
|
|
1026
|
-
$metadata: deserializeMetadata(output),
|
|
1027
|
-
};
|
|
1028
|
-
break;
|
|
1029
|
-
case "InternalServerException":
|
|
1030
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
1031
|
-
response = {
|
|
1032
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1033
|
-
name: errorCode,
|
|
1034
|
-
$metadata: deserializeMetadata(output),
|
|
1035
|
-
};
|
|
1036
|
-
break;
|
|
1037
|
-
case "PendingVerification":
|
|
1038
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
1039
|
-
response = {
|
|
1040
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
1041
|
-
name: errorCode,
|
|
1042
|
-
$metadata: deserializeMetadata(output),
|
|
1043
|
-
};
|
|
1044
|
-
break;
|
|
1045
|
-
case "ServiceQuotaExceededException":
|
|
1046
|
-
case "com.amazonaws.ivs#ServiceQuotaExceededException":
|
|
1047
|
-
response = {
|
|
1048
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1049
|
-
name: errorCode,
|
|
1050
|
-
$metadata: deserializeMetadata(output),
|
|
1051
|
-
};
|
|
1052
|
-
break;
|
|
1053
|
-
case "ValidationException":
|
|
1054
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1055
|
-
response = {
|
|
1056
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1057
|
-
name: errorCode,
|
|
1058
|
-
$metadata: deserializeMetadata(output),
|
|
1059
|
-
};
|
|
1060
|
-
break;
|
|
1061
|
-
default:
|
|
1062
|
-
const parsedBody = parsedOutput.body;
|
|
1063
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1064
|
-
response = {
|
|
1065
|
-
...parsedBody,
|
|
1066
|
-
name: `${errorCode}`,
|
|
1067
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1068
|
-
$fault: "client",
|
|
1069
|
-
$metadata: deserializeMetadata(output),
|
|
1070
|
-
} as any;
|
|
1071
|
-
}
|
|
1072
|
-
const message = response.message || response.Message || errorCode;
|
|
1073
|
-
response.message = message;
|
|
1074
|
-
delete response.Message;
|
|
1075
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1076
|
-
};
|
|
1077
|
-
|
|
1078
|
-
export const deserializeAws_restJson1CreateStreamKeyCommand = async (
|
|
1079
|
-
output: __HttpResponse,
|
|
1080
|
-
context: __SerdeContext
|
|
1081
|
-
): Promise<CreateStreamKeyCommandOutput> => {
|
|
1082
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1083
|
-
return deserializeAws_restJson1CreateStreamKeyCommandError(output, context);
|
|
1084
|
-
}
|
|
1085
|
-
const contents: CreateStreamKeyCommandOutput = {
|
|
1086
|
-
$metadata: deserializeMetadata(output),
|
|
1087
|
-
streamKey: undefined,
|
|
1088
|
-
};
|
|
1089
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1090
|
-
if (data.streamKey !== undefined && data.streamKey !== null) {
|
|
1091
|
-
contents.streamKey = deserializeAws_restJson1StreamKey(data.streamKey, context);
|
|
1092
|
-
}
|
|
1093
|
-
return Promise.resolve(contents);
|
|
1094
|
-
};
|
|
1095
|
-
|
|
1096
|
-
const deserializeAws_restJson1CreateStreamKeyCommandError = async (
|
|
1097
|
-
output: __HttpResponse,
|
|
1098
|
-
context: __SerdeContext
|
|
1099
|
-
): Promise<CreateStreamKeyCommandOutput> => {
|
|
1100
|
-
const parsedOutput: any = {
|
|
1101
|
-
...output,
|
|
1102
|
-
body: await parseBody(output.body, context),
|
|
1103
|
-
};
|
|
1104
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1105
|
-
let errorCode: string = "UnknownError";
|
|
1106
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1107
|
-
switch (errorCode) {
|
|
1108
|
-
case "AccessDeniedException":
|
|
1109
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1110
|
-
response = {
|
|
1111
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1112
|
-
name: errorCode,
|
|
1113
|
-
$metadata: deserializeMetadata(output),
|
|
1114
|
-
};
|
|
1115
|
-
break;
|
|
1116
|
-
case "PendingVerification":
|
|
1117
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
1118
|
-
response = {
|
|
1119
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
1120
|
-
name: errorCode,
|
|
1121
|
-
$metadata: deserializeMetadata(output),
|
|
1122
|
-
};
|
|
1123
|
-
break;
|
|
1124
|
-
case "ResourceNotFoundException":
|
|
1125
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1126
|
-
response = {
|
|
1127
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1128
|
-
name: errorCode,
|
|
1129
|
-
$metadata: deserializeMetadata(output),
|
|
1130
|
-
};
|
|
1131
|
-
break;
|
|
1132
|
-
case "ServiceQuotaExceededException":
|
|
1133
|
-
case "com.amazonaws.ivs#ServiceQuotaExceededException":
|
|
1134
|
-
response = {
|
|
1135
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1136
|
-
name: errorCode,
|
|
1137
|
-
$metadata: deserializeMetadata(output),
|
|
1138
|
-
};
|
|
1139
|
-
break;
|
|
1140
|
-
case "ValidationException":
|
|
1141
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1142
|
-
response = {
|
|
1143
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1144
|
-
name: errorCode,
|
|
1145
|
-
$metadata: deserializeMetadata(output),
|
|
1146
|
-
};
|
|
1147
|
-
break;
|
|
1148
|
-
default:
|
|
1149
|
-
const parsedBody = parsedOutput.body;
|
|
1150
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1151
|
-
response = {
|
|
1152
|
-
...parsedBody,
|
|
1153
|
-
name: `${errorCode}`,
|
|
1154
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1155
|
-
$fault: "client",
|
|
1156
|
-
$metadata: deserializeMetadata(output),
|
|
1157
|
-
} as any;
|
|
1158
|
-
}
|
|
1159
|
-
const message = response.message || response.Message || errorCode;
|
|
1160
|
-
response.message = message;
|
|
1161
|
-
delete response.Message;
|
|
1162
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
|
-
export const deserializeAws_restJson1DeleteChannelCommand = async (
|
|
1166
|
-
output: __HttpResponse,
|
|
1167
|
-
context: __SerdeContext
|
|
1168
|
-
): Promise<DeleteChannelCommandOutput> => {
|
|
1169
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1170
|
-
return deserializeAws_restJson1DeleteChannelCommandError(output, context);
|
|
1171
|
-
}
|
|
1172
|
-
const contents: DeleteChannelCommandOutput = {
|
|
1173
|
-
$metadata: deserializeMetadata(output),
|
|
1174
|
-
};
|
|
1175
|
-
await collectBody(output.body, context);
|
|
1176
|
-
return Promise.resolve(contents);
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
const deserializeAws_restJson1DeleteChannelCommandError = async (
|
|
1180
|
-
output: __HttpResponse,
|
|
1181
|
-
context: __SerdeContext
|
|
1182
|
-
): Promise<DeleteChannelCommandOutput> => {
|
|
1183
|
-
const parsedOutput: any = {
|
|
1184
|
-
...output,
|
|
1185
|
-
body: await parseBody(output.body, context),
|
|
1186
|
-
};
|
|
1187
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1188
|
-
let errorCode: string = "UnknownError";
|
|
1189
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1190
|
-
switch (errorCode) {
|
|
1191
|
-
case "AccessDeniedException":
|
|
1192
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1193
|
-
response = {
|
|
1194
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1195
|
-
name: errorCode,
|
|
1196
|
-
$metadata: deserializeMetadata(output),
|
|
1197
|
-
};
|
|
1198
|
-
break;
|
|
1199
|
-
case "ConflictException":
|
|
1200
|
-
case "com.amazonaws.ivs#ConflictException":
|
|
1201
|
-
response = {
|
|
1202
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1203
|
-
name: errorCode,
|
|
1204
|
-
$metadata: deserializeMetadata(output),
|
|
1205
|
-
};
|
|
1206
|
-
break;
|
|
1207
|
-
case "PendingVerification":
|
|
1208
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
1209
|
-
response = {
|
|
1210
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
1211
|
-
name: errorCode,
|
|
1212
|
-
$metadata: deserializeMetadata(output),
|
|
1213
|
-
};
|
|
1214
|
-
break;
|
|
1215
|
-
case "ResourceNotFoundException":
|
|
1216
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1217
|
-
response = {
|
|
1218
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1219
|
-
name: errorCode,
|
|
1220
|
-
$metadata: deserializeMetadata(output),
|
|
1221
|
-
};
|
|
1222
|
-
break;
|
|
1223
|
-
case "ValidationException":
|
|
1224
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1225
|
-
response = {
|
|
1226
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1227
|
-
name: errorCode,
|
|
1228
|
-
$metadata: deserializeMetadata(output),
|
|
1229
|
-
};
|
|
1230
|
-
break;
|
|
1231
|
-
default:
|
|
1232
|
-
const parsedBody = parsedOutput.body;
|
|
1233
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1234
|
-
response = {
|
|
1235
|
-
...parsedBody,
|
|
1236
|
-
name: `${errorCode}`,
|
|
1237
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1238
|
-
$fault: "client",
|
|
1239
|
-
$metadata: deserializeMetadata(output),
|
|
1240
|
-
} as any;
|
|
1241
|
-
}
|
|
1242
|
-
const message = response.message || response.Message || errorCode;
|
|
1243
|
-
response.message = message;
|
|
1244
|
-
delete response.Message;
|
|
1245
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1246
|
-
};
|
|
1247
|
-
|
|
1248
|
-
export const deserializeAws_restJson1DeletePlaybackKeyPairCommand = async (
|
|
1249
|
-
output: __HttpResponse,
|
|
1250
|
-
context: __SerdeContext
|
|
1251
|
-
): Promise<DeletePlaybackKeyPairCommandOutput> => {
|
|
1252
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1253
|
-
return deserializeAws_restJson1DeletePlaybackKeyPairCommandError(output, context);
|
|
1254
|
-
}
|
|
1255
|
-
const contents: DeletePlaybackKeyPairCommandOutput = {
|
|
1256
|
-
$metadata: deserializeMetadata(output),
|
|
1257
|
-
};
|
|
1258
|
-
await collectBody(output.body, context);
|
|
1259
|
-
return Promise.resolve(contents);
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
const deserializeAws_restJson1DeletePlaybackKeyPairCommandError = async (
|
|
1263
|
-
output: __HttpResponse,
|
|
1264
|
-
context: __SerdeContext
|
|
1265
|
-
): Promise<DeletePlaybackKeyPairCommandOutput> => {
|
|
1266
|
-
const parsedOutput: any = {
|
|
1267
|
-
...output,
|
|
1268
|
-
body: await parseBody(output.body, context),
|
|
1269
|
-
};
|
|
1270
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1271
|
-
let errorCode: string = "UnknownError";
|
|
1272
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1273
|
-
switch (errorCode) {
|
|
1274
|
-
case "AccessDeniedException":
|
|
1275
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1276
|
-
response = {
|
|
1277
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1278
|
-
name: errorCode,
|
|
1279
|
-
$metadata: deserializeMetadata(output),
|
|
1280
|
-
};
|
|
1281
|
-
break;
|
|
1282
|
-
case "PendingVerification":
|
|
1283
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
1284
|
-
response = {
|
|
1285
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
1286
|
-
name: errorCode,
|
|
1287
|
-
$metadata: deserializeMetadata(output),
|
|
1288
|
-
};
|
|
1289
|
-
break;
|
|
1290
|
-
case "ResourceNotFoundException":
|
|
1291
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1292
|
-
response = {
|
|
1293
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1294
|
-
name: errorCode,
|
|
1295
|
-
$metadata: deserializeMetadata(output),
|
|
1296
|
-
};
|
|
1297
|
-
break;
|
|
1298
|
-
case "ValidationException":
|
|
1299
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1300
|
-
response = {
|
|
1301
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1302
|
-
name: errorCode,
|
|
1303
|
-
$metadata: deserializeMetadata(output),
|
|
1304
|
-
};
|
|
1305
|
-
break;
|
|
1306
|
-
default:
|
|
1307
|
-
const parsedBody = parsedOutput.body;
|
|
1308
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1309
|
-
response = {
|
|
1310
|
-
...parsedBody,
|
|
1311
|
-
name: `${errorCode}`,
|
|
1312
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1313
|
-
$fault: "client",
|
|
1314
|
-
$metadata: deserializeMetadata(output),
|
|
1315
|
-
} as any;
|
|
1316
|
-
}
|
|
1317
|
-
const message = response.message || response.Message || errorCode;
|
|
1318
|
-
response.message = message;
|
|
1319
|
-
delete response.Message;
|
|
1320
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1321
|
-
};
|
|
1322
|
-
|
|
1323
|
-
export const deserializeAws_restJson1DeleteRecordingConfigurationCommand = async (
|
|
1324
|
-
output: __HttpResponse,
|
|
1325
|
-
context: __SerdeContext
|
|
1326
|
-
): Promise<DeleteRecordingConfigurationCommandOutput> => {
|
|
1327
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1328
|
-
return deserializeAws_restJson1DeleteRecordingConfigurationCommandError(output, context);
|
|
1329
|
-
}
|
|
1330
|
-
const contents: DeleteRecordingConfigurationCommandOutput = {
|
|
1331
|
-
$metadata: deserializeMetadata(output),
|
|
1332
|
-
};
|
|
1333
|
-
await collectBody(output.body, context);
|
|
1334
|
-
return Promise.resolve(contents);
|
|
1335
|
-
};
|
|
1336
|
-
|
|
1337
|
-
const deserializeAws_restJson1DeleteRecordingConfigurationCommandError = async (
|
|
1338
|
-
output: __HttpResponse,
|
|
1339
|
-
context: __SerdeContext
|
|
1340
|
-
): Promise<DeleteRecordingConfigurationCommandOutput> => {
|
|
1341
|
-
const parsedOutput: any = {
|
|
1342
|
-
...output,
|
|
1343
|
-
body: await parseBody(output.body, context),
|
|
1344
|
-
};
|
|
1345
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1346
|
-
let errorCode: string = "UnknownError";
|
|
1347
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1348
|
-
switch (errorCode) {
|
|
1349
|
-
case "AccessDeniedException":
|
|
1350
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1351
|
-
response = {
|
|
1352
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1353
|
-
name: errorCode,
|
|
1354
|
-
$metadata: deserializeMetadata(output),
|
|
1355
|
-
};
|
|
1356
|
-
break;
|
|
1357
|
-
case "ConflictException":
|
|
1358
|
-
case "com.amazonaws.ivs#ConflictException":
|
|
1359
|
-
response = {
|
|
1360
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1361
|
-
name: errorCode,
|
|
1362
|
-
$metadata: deserializeMetadata(output),
|
|
1363
|
-
};
|
|
1364
|
-
break;
|
|
1365
|
-
case "InternalServerException":
|
|
1366
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
1367
|
-
response = {
|
|
1368
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1369
|
-
name: errorCode,
|
|
1370
|
-
$metadata: deserializeMetadata(output),
|
|
1371
|
-
};
|
|
1372
|
-
break;
|
|
1373
|
-
case "ResourceNotFoundException":
|
|
1374
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1375
|
-
response = {
|
|
1376
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1377
|
-
name: errorCode,
|
|
1378
|
-
$metadata: deserializeMetadata(output),
|
|
1379
|
-
};
|
|
1380
|
-
break;
|
|
1381
|
-
case "ValidationException":
|
|
1382
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1383
|
-
response = {
|
|
1384
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1385
|
-
name: errorCode,
|
|
1386
|
-
$metadata: deserializeMetadata(output),
|
|
1387
|
-
};
|
|
1388
|
-
break;
|
|
1389
|
-
default:
|
|
1390
|
-
const parsedBody = parsedOutput.body;
|
|
1391
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1392
|
-
response = {
|
|
1393
|
-
...parsedBody,
|
|
1394
|
-
name: `${errorCode}`,
|
|
1395
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1396
|
-
$fault: "client",
|
|
1397
|
-
$metadata: deserializeMetadata(output),
|
|
1398
|
-
} as any;
|
|
1399
|
-
}
|
|
1400
|
-
const message = response.message || response.Message || errorCode;
|
|
1401
|
-
response.message = message;
|
|
1402
|
-
delete response.Message;
|
|
1403
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1404
|
-
};
|
|
1405
|
-
|
|
1406
|
-
export const deserializeAws_restJson1DeleteStreamKeyCommand = async (
|
|
1407
|
-
output: __HttpResponse,
|
|
1408
|
-
context: __SerdeContext
|
|
1409
|
-
): Promise<DeleteStreamKeyCommandOutput> => {
|
|
1410
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1411
|
-
return deserializeAws_restJson1DeleteStreamKeyCommandError(output, context);
|
|
1412
|
-
}
|
|
1413
|
-
const contents: DeleteStreamKeyCommandOutput = {
|
|
1414
|
-
$metadata: deserializeMetadata(output),
|
|
1415
|
-
};
|
|
1416
|
-
await collectBody(output.body, context);
|
|
1417
|
-
return Promise.resolve(contents);
|
|
1418
|
-
};
|
|
1419
|
-
|
|
1420
|
-
const deserializeAws_restJson1DeleteStreamKeyCommandError = async (
|
|
1421
|
-
output: __HttpResponse,
|
|
1422
|
-
context: __SerdeContext
|
|
1423
|
-
): Promise<DeleteStreamKeyCommandOutput> => {
|
|
1424
|
-
const parsedOutput: any = {
|
|
1425
|
-
...output,
|
|
1426
|
-
body: await parseBody(output.body, context),
|
|
1427
|
-
};
|
|
1428
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1429
|
-
let errorCode: string = "UnknownError";
|
|
1430
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1431
|
-
switch (errorCode) {
|
|
1432
|
-
case "AccessDeniedException":
|
|
1433
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1434
|
-
response = {
|
|
1435
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1436
|
-
name: errorCode,
|
|
1437
|
-
$metadata: deserializeMetadata(output),
|
|
1438
|
-
};
|
|
1439
|
-
break;
|
|
1440
|
-
case "PendingVerification":
|
|
1441
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
1442
|
-
response = {
|
|
1443
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
1444
|
-
name: errorCode,
|
|
1445
|
-
$metadata: deserializeMetadata(output),
|
|
1446
|
-
};
|
|
1447
|
-
break;
|
|
1448
|
-
case "ResourceNotFoundException":
|
|
1449
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1450
|
-
response = {
|
|
1451
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1452
|
-
name: errorCode,
|
|
1453
|
-
$metadata: deserializeMetadata(output),
|
|
1454
|
-
};
|
|
1455
|
-
break;
|
|
1456
|
-
case "ValidationException":
|
|
1457
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1458
|
-
response = {
|
|
1459
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1460
|
-
name: errorCode,
|
|
1461
|
-
$metadata: deserializeMetadata(output),
|
|
1462
|
-
};
|
|
1463
|
-
break;
|
|
1464
|
-
default:
|
|
1465
|
-
const parsedBody = parsedOutput.body;
|
|
1466
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1467
|
-
response = {
|
|
1468
|
-
...parsedBody,
|
|
1469
|
-
name: `${errorCode}`,
|
|
1470
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1471
|
-
$fault: "client",
|
|
1472
|
-
$metadata: deserializeMetadata(output),
|
|
1473
|
-
} as any;
|
|
1474
|
-
}
|
|
1475
|
-
const message = response.message || response.Message || errorCode;
|
|
1476
|
-
response.message = message;
|
|
1477
|
-
delete response.Message;
|
|
1478
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1479
|
-
};
|
|
1480
|
-
|
|
1481
|
-
export const deserializeAws_restJson1GetChannelCommand = async (
|
|
1482
|
-
output: __HttpResponse,
|
|
1483
|
-
context: __SerdeContext
|
|
1484
|
-
): Promise<GetChannelCommandOutput> => {
|
|
1485
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1486
|
-
return deserializeAws_restJson1GetChannelCommandError(output, context);
|
|
1487
|
-
}
|
|
1488
|
-
const contents: GetChannelCommandOutput = {
|
|
1489
|
-
$metadata: deserializeMetadata(output),
|
|
1490
|
-
channel: undefined,
|
|
1491
|
-
};
|
|
1492
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1493
|
-
if (data.channel !== undefined && data.channel !== null) {
|
|
1494
|
-
contents.channel = deserializeAws_restJson1Channel(data.channel, context);
|
|
1495
|
-
}
|
|
1496
|
-
return Promise.resolve(contents);
|
|
1497
|
-
};
|
|
1498
|
-
|
|
1499
|
-
const deserializeAws_restJson1GetChannelCommandError = async (
|
|
1500
|
-
output: __HttpResponse,
|
|
1501
|
-
context: __SerdeContext
|
|
1502
|
-
): Promise<GetChannelCommandOutput> => {
|
|
1503
|
-
const parsedOutput: any = {
|
|
1504
|
-
...output,
|
|
1505
|
-
body: await parseBody(output.body, context),
|
|
1506
|
-
};
|
|
1507
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1508
|
-
let errorCode: string = "UnknownError";
|
|
1509
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1510
|
-
switch (errorCode) {
|
|
1511
|
-
case "AccessDeniedException":
|
|
1512
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1513
|
-
response = {
|
|
1514
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1515
|
-
name: errorCode,
|
|
1516
|
-
$metadata: deserializeMetadata(output),
|
|
1517
|
-
};
|
|
1518
|
-
break;
|
|
1519
|
-
case "ResourceNotFoundException":
|
|
1520
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1521
|
-
response = {
|
|
1522
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1523
|
-
name: errorCode,
|
|
1524
|
-
$metadata: deserializeMetadata(output),
|
|
1525
|
-
};
|
|
1526
|
-
break;
|
|
1527
|
-
case "ValidationException":
|
|
1528
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1529
|
-
response = {
|
|
1530
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1531
|
-
name: errorCode,
|
|
1532
|
-
$metadata: deserializeMetadata(output),
|
|
1533
|
-
};
|
|
1534
|
-
break;
|
|
1535
|
-
default:
|
|
1536
|
-
const parsedBody = parsedOutput.body;
|
|
1537
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1538
|
-
response = {
|
|
1539
|
-
...parsedBody,
|
|
1540
|
-
name: `${errorCode}`,
|
|
1541
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1542
|
-
$fault: "client",
|
|
1543
|
-
$metadata: deserializeMetadata(output),
|
|
1544
|
-
} as any;
|
|
1545
|
-
}
|
|
1546
|
-
const message = response.message || response.Message || errorCode;
|
|
1547
|
-
response.message = message;
|
|
1548
|
-
delete response.Message;
|
|
1549
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1550
|
-
};
|
|
1551
|
-
|
|
1552
|
-
export const deserializeAws_restJson1GetPlaybackKeyPairCommand = async (
|
|
1553
|
-
output: __HttpResponse,
|
|
1554
|
-
context: __SerdeContext
|
|
1555
|
-
): Promise<GetPlaybackKeyPairCommandOutput> => {
|
|
1556
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1557
|
-
return deserializeAws_restJson1GetPlaybackKeyPairCommandError(output, context);
|
|
1558
|
-
}
|
|
1559
|
-
const contents: GetPlaybackKeyPairCommandOutput = {
|
|
1560
|
-
$metadata: deserializeMetadata(output),
|
|
1561
|
-
keyPair: undefined,
|
|
1562
|
-
};
|
|
1563
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1564
|
-
if (data.keyPair !== undefined && data.keyPair !== null) {
|
|
1565
|
-
contents.keyPair = deserializeAws_restJson1PlaybackKeyPair(data.keyPair, context);
|
|
1566
|
-
}
|
|
1567
|
-
return Promise.resolve(contents);
|
|
1568
|
-
};
|
|
1569
|
-
|
|
1570
|
-
const deserializeAws_restJson1GetPlaybackKeyPairCommandError = async (
|
|
1571
|
-
output: __HttpResponse,
|
|
1572
|
-
context: __SerdeContext
|
|
1573
|
-
): Promise<GetPlaybackKeyPairCommandOutput> => {
|
|
1574
|
-
const parsedOutput: any = {
|
|
1575
|
-
...output,
|
|
1576
|
-
body: await parseBody(output.body, context),
|
|
1577
|
-
};
|
|
1578
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1579
|
-
let errorCode: string = "UnknownError";
|
|
1580
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1581
|
-
switch (errorCode) {
|
|
1582
|
-
case "AccessDeniedException":
|
|
1583
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1584
|
-
response = {
|
|
1585
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1586
|
-
name: errorCode,
|
|
1587
|
-
$metadata: deserializeMetadata(output),
|
|
1588
|
-
};
|
|
1589
|
-
break;
|
|
1590
|
-
case "ResourceNotFoundException":
|
|
1591
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1592
|
-
response = {
|
|
1593
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1594
|
-
name: errorCode,
|
|
1595
|
-
$metadata: deserializeMetadata(output),
|
|
1596
|
-
};
|
|
1597
|
-
break;
|
|
1598
|
-
case "ValidationException":
|
|
1599
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1600
|
-
response = {
|
|
1601
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1602
|
-
name: errorCode,
|
|
1603
|
-
$metadata: deserializeMetadata(output),
|
|
1604
|
-
};
|
|
1605
|
-
break;
|
|
1606
|
-
default:
|
|
1607
|
-
const parsedBody = parsedOutput.body;
|
|
1608
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1609
|
-
response = {
|
|
1610
|
-
...parsedBody,
|
|
1611
|
-
name: `${errorCode}`,
|
|
1612
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1613
|
-
$fault: "client",
|
|
1614
|
-
$metadata: deserializeMetadata(output),
|
|
1615
|
-
} as any;
|
|
1616
|
-
}
|
|
1617
|
-
const message = response.message || response.Message || errorCode;
|
|
1618
|
-
response.message = message;
|
|
1619
|
-
delete response.Message;
|
|
1620
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1621
|
-
};
|
|
1622
|
-
|
|
1623
|
-
export const deserializeAws_restJson1GetRecordingConfigurationCommand = async (
|
|
1624
|
-
output: __HttpResponse,
|
|
1625
|
-
context: __SerdeContext
|
|
1626
|
-
): Promise<GetRecordingConfigurationCommandOutput> => {
|
|
1627
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1628
|
-
return deserializeAws_restJson1GetRecordingConfigurationCommandError(output, context);
|
|
1629
|
-
}
|
|
1630
|
-
const contents: GetRecordingConfigurationCommandOutput = {
|
|
1631
|
-
$metadata: deserializeMetadata(output),
|
|
1632
|
-
recordingConfiguration: undefined,
|
|
1633
|
-
};
|
|
1634
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1635
|
-
if (data.recordingConfiguration !== undefined && data.recordingConfiguration !== null) {
|
|
1636
|
-
contents.recordingConfiguration = deserializeAws_restJson1RecordingConfiguration(
|
|
1637
|
-
data.recordingConfiguration,
|
|
1638
|
-
context
|
|
1639
|
-
);
|
|
1640
|
-
}
|
|
1641
|
-
return Promise.resolve(contents);
|
|
1642
|
-
};
|
|
1643
|
-
|
|
1644
|
-
const deserializeAws_restJson1GetRecordingConfigurationCommandError = async (
|
|
1645
|
-
output: __HttpResponse,
|
|
1646
|
-
context: __SerdeContext
|
|
1647
|
-
): Promise<GetRecordingConfigurationCommandOutput> => {
|
|
1648
|
-
const parsedOutput: any = {
|
|
1649
|
-
...output,
|
|
1650
|
-
body: await parseBody(output.body, context),
|
|
1651
|
-
};
|
|
1652
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1653
|
-
let errorCode: string = "UnknownError";
|
|
1654
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1655
|
-
switch (errorCode) {
|
|
1656
|
-
case "AccessDeniedException":
|
|
1657
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1658
|
-
response = {
|
|
1659
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1660
|
-
name: errorCode,
|
|
1661
|
-
$metadata: deserializeMetadata(output),
|
|
1662
|
-
};
|
|
1663
|
-
break;
|
|
1664
|
-
case "InternalServerException":
|
|
1665
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
1666
|
-
response = {
|
|
1667
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1668
|
-
name: errorCode,
|
|
1669
|
-
$metadata: deserializeMetadata(output),
|
|
1670
|
-
};
|
|
1671
|
-
break;
|
|
1672
|
-
case "ResourceNotFoundException":
|
|
1673
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1674
|
-
response = {
|
|
1675
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1676
|
-
name: errorCode,
|
|
1677
|
-
$metadata: deserializeMetadata(output),
|
|
1678
|
-
};
|
|
1679
|
-
break;
|
|
1680
|
-
case "ValidationException":
|
|
1681
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1682
|
-
response = {
|
|
1683
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1684
|
-
name: errorCode,
|
|
1685
|
-
$metadata: deserializeMetadata(output),
|
|
1686
|
-
};
|
|
1687
|
-
break;
|
|
1688
|
-
default:
|
|
1689
|
-
const parsedBody = parsedOutput.body;
|
|
1690
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1691
|
-
response = {
|
|
1692
|
-
...parsedBody,
|
|
1693
|
-
name: `${errorCode}`,
|
|
1694
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1695
|
-
$fault: "client",
|
|
1696
|
-
$metadata: deserializeMetadata(output),
|
|
1697
|
-
} as any;
|
|
1698
|
-
}
|
|
1699
|
-
const message = response.message || response.Message || errorCode;
|
|
1700
|
-
response.message = message;
|
|
1701
|
-
delete response.Message;
|
|
1702
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1703
|
-
};
|
|
1704
|
-
|
|
1705
|
-
export const deserializeAws_restJson1GetStreamCommand = async (
|
|
1706
|
-
output: __HttpResponse,
|
|
1707
|
-
context: __SerdeContext
|
|
1708
|
-
): Promise<GetStreamCommandOutput> => {
|
|
1709
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1710
|
-
return deserializeAws_restJson1GetStreamCommandError(output, context);
|
|
1711
|
-
}
|
|
1712
|
-
const contents: GetStreamCommandOutput = {
|
|
1713
|
-
$metadata: deserializeMetadata(output),
|
|
1714
|
-
stream: undefined,
|
|
1715
|
-
};
|
|
1716
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1717
|
-
if (data.stream !== undefined && data.stream !== null) {
|
|
1718
|
-
contents.stream = deserializeAws_restJson1_Stream(data.stream, context);
|
|
1719
|
-
}
|
|
1720
|
-
return Promise.resolve(contents);
|
|
1721
|
-
};
|
|
1722
|
-
|
|
1723
|
-
const deserializeAws_restJson1GetStreamCommandError = async (
|
|
1724
|
-
output: __HttpResponse,
|
|
1725
|
-
context: __SerdeContext
|
|
1726
|
-
): Promise<GetStreamCommandOutput> => {
|
|
1727
|
-
const parsedOutput: any = {
|
|
1728
|
-
...output,
|
|
1729
|
-
body: await parseBody(output.body, context),
|
|
1730
|
-
};
|
|
1731
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1732
|
-
let errorCode: string = "UnknownError";
|
|
1733
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1734
|
-
switch (errorCode) {
|
|
1735
|
-
case "AccessDeniedException":
|
|
1736
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1737
|
-
response = {
|
|
1738
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1739
|
-
name: errorCode,
|
|
1740
|
-
$metadata: deserializeMetadata(output),
|
|
1741
|
-
};
|
|
1742
|
-
break;
|
|
1743
|
-
case "ChannelNotBroadcasting":
|
|
1744
|
-
case "com.amazonaws.ivs#ChannelNotBroadcasting":
|
|
1745
|
-
response = {
|
|
1746
|
-
...(await deserializeAws_restJson1ChannelNotBroadcastingResponse(parsedOutput, context)),
|
|
1747
|
-
name: errorCode,
|
|
1748
|
-
$metadata: deserializeMetadata(output),
|
|
1749
|
-
};
|
|
1750
|
-
break;
|
|
1751
|
-
case "ResourceNotFoundException":
|
|
1752
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1753
|
-
response = {
|
|
1754
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1755
|
-
name: errorCode,
|
|
1756
|
-
$metadata: deserializeMetadata(output),
|
|
1757
|
-
};
|
|
1758
|
-
break;
|
|
1759
|
-
case "ValidationException":
|
|
1760
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1761
|
-
response = {
|
|
1762
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1763
|
-
name: errorCode,
|
|
1764
|
-
$metadata: deserializeMetadata(output),
|
|
1765
|
-
};
|
|
1766
|
-
break;
|
|
1767
|
-
default:
|
|
1768
|
-
const parsedBody = parsedOutput.body;
|
|
1769
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1770
|
-
response = {
|
|
1771
|
-
...parsedBody,
|
|
1772
|
-
name: `${errorCode}`,
|
|
1773
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1774
|
-
$fault: "client",
|
|
1775
|
-
$metadata: deserializeMetadata(output),
|
|
1776
|
-
} as any;
|
|
1777
|
-
}
|
|
1778
|
-
const message = response.message || response.Message || errorCode;
|
|
1779
|
-
response.message = message;
|
|
1780
|
-
delete response.Message;
|
|
1781
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1782
|
-
};
|
|
1783
|
-
|
|
1784
|
-
export const deserializeAws_restJson1GetStreamKeyCommand = async (
|
|
1785
|
-
output: __HttpResponse,
|
|
1786
|
-
context: __SerdeContext
|
|
1787
|
-
): Promise<GetStreamKeyCommandOutput> => {
|
|
1788
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1789
|
-
return deserializeAws_restJson1GetStreamKeyCommandError(output, context);
|
|
1790
|
-
}
|
|
1791
|
-
const contents: GetStreamKeyCommandOutput = {
|
|
1792
|
-
$metadata: deserializeMetadata(output),
|
|
1793
|
-
streamKey: undefined,
|
|
1794
|
-
};
|
|
1795
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1796
|
-
if (data.streamKey !== undefined && data.streamKey !== null) {
|
|
1797
|
-
contents.streamKey = deserializeAws_restJson1StreamKey(data.streamKey, context);
|
|
1798
|
-
}
|
|
1799
|
-
return Promise.resolve(contents);
|
|
1800
|
-
};
|
|
1801
|
-
|
|
1802
|
-
const deserializeAws_restJson1GetStreamKeyCommandError = async (
|
|
1803
|
-
output: __HttpResponse,
|
|
1804
|
-
context: __SerdeContext
|
|
1805
|
-
): Promise<GetStreamKeyCommandOutput> => {
|
|
1806
|
-
const parsedOutput: any = {
|
|
1807
|
-
...output,
|
|
1808
|
-
body: await parseBody(output.body, context),
|
|
1809
|
-
};
|
|
1810
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1811
|
-
let errorCode: string = "UnknownError";
|
|
1812
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1813
|
-
switch (errorCode) {
|
|
1814
|
-
case "AccessDeniedException":
|
|
1815
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1816
|
-
response = {
|
|
1817
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1818
|
-
name: errorCode,
|
|
1819
|
-
$metadata: deserializeMetadata(output),
|
|
1820
|
-
};
|
|
1821
|
-
break;
|
|
1822
|
-
case "ResourceNotFoundException":
|
|
1823
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
1824
|
-
response = {
|
|
1825
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1826
|
-
name: errorCode,
|
|
1827
|
-
$metadata: deserializeMetadata(output),
|
|
1828
|
-
};
|
|
1829
|
-
break;
|
|
1830
|
-
case "ValidationException":
|
|
1831
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1832
|
-
response = {
|
|
1833
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1834
|
-
name: errorCode,
|
|
1835
|
-
$metadata: deserializeMetadata(output),
|
|
1836
|
-
};
|
|
1837
|
-
break;
|
|
1838
|
-
default:
|
|
1839
|
-
const parsedBody = parsedOutput.body;
|
|
1840
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1841
|
-
response = {
|
|
1842
|
-
...parsedBody,
|
|
1843
|
-
name: `${errorCode}`,
|
|
1844
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1845
|
-
$fault: "client",
|
|
1846
|
-
$metadata: deserializeMetadata(output),
|
|
1847
|
-
} as any;
|
|
1848
|
-
}
|
|
1849
|
-
const message = response.message || response.Message || errorCode;
|
|
1850
|
-
response.message = message;
|
|
1851
|
-
delete response.Message;
|
|
1852
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1853
|
-
};
|
|
1854
|
-
|
|
1855
|
-
export const deserializeAws_restJson1ImportPlaybackKeyPairCommand = async (
|
|
1856
|
-
output: __HttpResponse,
|
|
1857
|
-
context: __SerdeContext
|
|
1858
|
-
): Promise<ImportPlaybackKeyPairCommandOutput> => {
|
|
1859
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1860
|
-
return deserializeAws_restJson1ImportPlaybackKeyPairCommandError(output, context);
|
|
1861
|
-
}
|
|
1862
|
-
const contents: ImportPlaybackKeyPairCommandOutput = {
|
|
1863
|
-
$metadata: deserializeMetadata(output),
|
|
1864
|
-
keyPair: undefined,
|
|
1865
|
-
};
|
|
1866
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1867
|
-
if (data.keyPair !== undefined && data.keyPair !== null) {
|
|
1868
|
-
contents.keyPair = deserializeAws_restJson1PlaybackKeyPair(data.keyPair, context);
|
|
1869
|
-
}
|
|
1870
|
-
return Promise.resolve(contents);
|
|
1871
|
-
};
|
|
1872
|
-
|
|
1873
|
-
const deserializeAws_restJson1ImportPlaybackKeyPairCommandError = async (
|
|
1874
|
-
output: __HttpResponse,
|
|
1875
|
-
context: __SerdeContext
|
|
1876
|
-
): Promise<ImportPlaybackKeyPairCommandOutput> => {
|
|
1877
|
-
const parsedOutput: any = {
|
|
1878
|
-
...output,
|
|
1879
|
-
body: await parseBody(output.body, context),
|
|
1880
|
-
};
|
|
1881
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1882
|
-
let errorCode: string = "UnknownError";
|
|
1883
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1884
|
-
switch (errorCode) {
|
|
1885
|
-
case "AccessDeniedException":
|
|
1886
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1887
|
-
response = {
|
|
1888
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1889
|
-
name: errorCode,
|
|
1890
|
-
$metadata: deserializeMetadata(output),
|
|
1891
|
-
};
|
|
1892
|
-
break;
|
|
1893
|
-
case "ConflictException":
|
|
1894
|
-
case "com.amazonaws.ivs#ConflictException":
|
|
1895
|
-
response = {
|
|
1896
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1897
|
-
name: errorCode,
|
|
1898
|
-
$metadata: deserializeMetadata(output),
|
|
1899
|
-
};
|
|
1900
|
-
break;
|
|
1901
|
-
case "PendingVerification":
|
|
1902
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
1903
|
-
response = {
|
|
1904
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
1905
|
-
name: errorCode,
|
|
1906
|
-
$metadata: deserializeMetadata(output),
|
|
1907
|
-
};
|
|
1908
|
-
break;
|
|
1909
|
-
case "ServiceQuotaExceededException":
|
|
1910
|
-
case "com.amazonaws.ivs#ServiceQuotaExceededException":
|
|
1911
|
-
response = {
|
|
1912
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1913
|
-
name: errorCode,
|
|
1914
|
-
$metadata: deserializeMetadata(output),
|
|
1915
|
-
};
|
|
1916
|
-
break;
|
|
1917
|
-
case "ValidationException":
|
|
1918
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1919
|
-
response = {
|
|
1920
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1921
|
-
name: errorCode,
|
|
1922
|
-
$metadata: deserializeMetadata(output),
|
|
1923
|
-
};
|
|
1924
|
-
break;
|
|
1925
|
-
default:
|
|
1926
|
-
const parsedBody = parsedOutput.body;
|
|
1927
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1928
|
-
response = {
|
|
1929
|
-
...parsedBody,
|
|
1930
|
-
name: `${errorCode}`,
|
|
1931
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1932
|
-
$fault: "client",
|
|
1933
|
-
$metadata: deserializeMetadata(output),
|
|
1934
|
-
} as any;
|
|
1935
|
-
}
|
|
1936
|
-
const message = response.message || response.Message || errorCode;
|
|
1937
|
-
response.message = message;
|
|
1938
|
-
delete response.Message;
|
|
1939
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1940
|
-
};
|
|
1941
|
-
|
|
1942
|
-
export const deserializeAws_restJson1ListChannelsCommand = async (
|
|
1943
|
-
output: __HttpResponse,
|
|
1944
|
-
context: __SerdeContext
|
|
1945
|
-
): Promise<ListChannelsCommandOutput> => {
|
|
1946
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1947
|
-
return deserializeAws_restJson1ListChannelsCommandError(output, context);
|
|
1948
|
-
}
|
|
1949
|
-
const contents: ListChannelsCommandOutput = {
|
|
1950
|
-
$metadata: deserializeMetadata(output),
|
|
1951
|
-
channels: undefined,
|
|
1952
|
-
nextToken: undefined,
|
|
1953
|
-
};
|
|
1954
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1955
|
-
if (data.channels !== undefined && data.channels !== null) {
|
|
1956
|
-
contents.channels = deserializeAws_restJson1ChannelList(data.channels, context);
|
|
1957
|
-
}
|
|
1958
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1959
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
1960
|
-
}
|
|
1961
|
-
return Promise.resolve(contents);
|
|
1962
|
-
};
|
|
1963
|
-
|
|
1964
|
-
const deserializeAws_restJson1ListChannelsCommandError = async (
|
|
1965
|
-
output: __HttpResponse,
|
|
1966
|
-
context: __SerdeContext
|
|
1967
|
-
): Promise<ListChannelsCommandOutput> => {
|
|
1968
|
-
const parsedOutput: any = {
|
|
1969
|
-
...output,
|
|
1970
|
-
body: await parseBody(output.body, context),
|
|
1971
|
-
};
|
|
1972
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1973
|
-
let errorCode: string = "UnknownError";
|
|
1974
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1975
|
-
switch (errorCode) {
|
|
1976
|
-
case "AccessDeniedException":
|
|
1977
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
1978
|
-
response = {
|
|
1979
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1980
|
-
name: errorCode,
|
|
1981
|
-
$metadata: deserializeMetadata(output),
|
|
1982
|
-
};
|
|
1983
|
-
break;
|
|
1984
|
-
case "ConflictException":
|
|
1985
|
-
case "com.amazonaws.ivs#ConflictException":
|
|
1986
|
-
response = {
|
|
1987
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1988
|
-
name: errorCode,
|
|
1989
|
-
$metadata: deserializeMetadata(output),
|
|
1990
|
-
};
|
|
1991
|
-
break;
|
|
1992
|
-
case "ValidationException":
|
|
1993
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
1994
|
-
response = {
|
|
1995
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1996
|
-
name: errorCode,
|
|
1997
|
-
$metadata: deserializeMetadata(output),
|
|
1998
|
-
};
|
|
1999
|
-
break;
|
|
2000
|
-
default:
|
|
2001
|
-
const parsedBody = parsedOutput.body;
|
|
2002
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2003
|
-
response = {
|
|
2004
|
-
...parsedBody,
|
|
2005
|
-
name: `${errorCode}`,
|
|
2006
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2007
|
-
$fault: "client",
|
|
2008
|
-
$metadata: deserializeMetadata(output),
|
|
2009
|
-
} as any;
|
|
2010
|
-
}
|
|
2011
|
-
const message = response.message || response.Message || errorCode;
|
|
2012
|
-
response.message = message;
|
|
2013
|
-
delete response.Message;
|
|
2014
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2015
|
-
};
|
|
2016
|
-
|
|
2017
|
-
export const deserializeAws_restJson1ListPlaybackKeyPairsCommand = async (
|
|
2018
|
-
output: __HttpResponse,
|
|
2019
|
-
context: __SerdeContext
|
|
2020
|
-
): Promise<ListPlaybackKeyPairsCommandOutput> => {
|
|
2021
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2022
|
-
return deserializeAws_restJson1ListPlaybackKeyPairsCommandError(output, context);
|
|
2023
|
-
}
|
|
2024
|
-
const contents: ListPlaybackKeyPairsCommandOutput = {
|
|
2025
|
-
$metadata: deserializeMetadata(output),
|
|
2026
|
-
keyPairs: undefined,
|
|
2027
|
-
nextToken: undefined,
|
|
2028
|
-
};
|
|
2029
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2030
|
-
if (data.keyPairs !== undefined && data.keyPairs !== null) {
|
|
2031
|
-
contents.keyPairs = deserializeAws_restJson1PlaybackKeyPairList(data.keyPairs, context);
|
|
2032
|
-
}
|
|
2033
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2034
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2035
|
-
}
|
|
2036
|
-
return Promise.resolve(contents);
|
|
2037
|
-
};
|
|
2038
|
-
|
|
2039
|
-
const deserializeAws_restJson1ListPlaybackKeyPairsCommandError = async (
|
|
2040
|
-
output: __HttpResponse,
|
|
2041
|
-
context: __SerdeContext
|
|
2042
|
-
): Promise<ListPlaybackKeyPairsCommandOutput> => {
|
|
2043
|
-
const parsedOutput: any = {
|
|
2044
|
-
...output,
|
|
2045
|
-
body: await parseBody(output.body, context),
|
|
2046
|
-
};
|
|
2047
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2048
|
-
let errorCode: string = "UnknownError";
|
|
2049
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2050
|
-
switch (errorCode) {
|
|
2051
|
-
case "AccessDeniedException":
|
|
2052
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2053
|
-
response = {
|
|
2054
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2055
|
-
name: errorCode,
|
|
2056
|
-
$metadata: deserializeMetadata(output),
|
|
2057
|
-
};
|
|
2058
|
-
break;
|
|
2059
|
-
case "ValidationException":
|
|
2060
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2061
|
-
response = {
|
|
2062
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2063
|
-
name: errorCode,
|
|
2064
|
-
$metadata: deserializeMetadata(output),
|
|
2065
|
-
};
|
|
2066
|
-
break;
|
|
2067
|
-
default:
|
|
2068
|
-
const parsedBody = parsedOutput.body;
|
|
2069
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2070
|
-
response = {
|
|
2071
|
-
...parsedBody,
|
|
2072
|
-
name: `${errorCode}`,
|
|
2073
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2074
|
-
$fault: "client",
|
|
2075
|
-
$metadata: deserializeMetadata(output),
|
|
2076
|
-
} as any;
|
|
2077
|
-
}
|
|
2078
|
-
const message = response.message || response.Message || errorCode;
|
|
2079
|
-
response.message = message;
|
|
2080
|
-
delete response.Message;
|
|
2081
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2082
|
-
};
|
|
2083
|
-
|
|
2084
|
-
export const deserializeAws_restJson1ListRecordingConfigurationsCommand = async (
|
|
2085
|
-
output: __HttpResponse,
|
|
2086
|
-
context: __SerdeContext
|
|
2087
|
-
): Promise<ListRecordingConfigurationsCommandOutput> => {
|
|
2088
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2089
|
-
return deserializeAws_restJson1ListRecordingConfigurationsCommandError(output, context);
|
|
2090
|
-
}
|
|
2091
|
-
const contents: ListRecordingConfigurationsCommandOutput = {
|
|
2092
|
-
$metadata: deserializeMetadata(output),
|
|
2093
|
-
nextToken: undefined,
|
|
2094
|
-
recordingConfigurations: undefined,
|
|
2095
|
-
};
|
|
2096
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2097
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2098
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2099
|
-
}
|
|
2100
|
-
if (data.recordingConfigurations !== undefined && data.recordingConfigurations !== null) {
|
|
2101
|
-
contents.recordingConfigurations = deserializeAws_restJson1RecordingConfigurationList(
|
|
2102
|
-
data.recordingConfigurations,
|
|
2103
|
-
context
|
|
2104
|
-
);
|
|
2105
|
-
}
|
|
2106
|
-
return Promise.resolve(contents);
|
|
2107
|
-
};
|
|
2108
|
-
|
|
2109
|
-
const deserializeAws_restJson1ListRecordingConfigurationsCommandError = async (
|
|
2110
|
-
output: __HttpResponse,
|
|
2111
|
-
context: __SerdeContext
|
|
2112
|
-
): Promise<ListRecordingConfigurationsCommandOutput> => {
|
|
2113
|
-
const parsedOutput: any = {
|
|
2114
|
-
...output,
|
|
2115
|
-
body: await parseBody(output.body, context),
|
|
2116
|
-
};
|
|
2117
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2118
|
-
let errorCode: string = "UnknownError";
|
|
2119
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2120
|
-
switch (errorCode) {
|
|
2121
|
-
case "AccessDeniedException":
|
|
2122
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2123
|
-
response = {
|
|
2124
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2125
|
-
name: errorCode,
|
|
2126
|
-
$metadata: deserializeMetadata(output),
|
|
2127
|
-
};
|
|
2128
|
-
break;
|
|
2129
|
-
case "InternalServerException":
|
|
2130
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
2131
|
-
response = {
|
|
2132
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2133
|
-
name: errorCode,
|
|
2134
|
-
$metadata: deserializeMetadata(output),
|
|
2135
|
-
};
|
|
2136
|
-
break;
|
|
2137
|
-
case "ValidationException":
|
|
2138
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2139
|
-
response = {
|
|
2140
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2141
|
-
name: errorCode,
|
|
2142
|
-
$metadata: deserializeMetadata(output),
|
|
2143
|
-
};
|
|
2144
|
-
break;
|
|
2145
|
-
default:
|
|
2146
|
-
const parsedBody = parsedOutput.body;
|
|
2147
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2148
|
-
response = {
|
|
2149
|
-
...parsedBody,
|
|
2150
|
-
name: `${errorCode}`,
|
|
2151
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2152
|
-
$fault: "client",
|
|
2153
|
-
$metadata: deserializeMetadata(output),
|
|
2154
|
-
} as any;
|
|
2155
|
-
}
|
|
2156
|
-
const message = response.message || response.Message || errorCode;
|
|
2157
|
-
response.message = message;
|
|
2158
|
-
delete response.Message;
|
|
2159
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2160
|
-
};
|
|
2161
|
-
|
|
2162
|
-
export const deserializeAws_restJson1ListStreamKeysCommand = async (
|
|
2163
|
-
output: __HttpResponse,
|
|
2164
|
-
context: __SerdeContext
|
|
2165
|
-
): Promise<ListStreamKeysCommandOutput> => {
|
|
2166
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2167
|
-
return deserializeAws_restJson1ListStreamKeysCommandError(output, context);
|
|
2168
|
-
}
|
|
2169
|
-
const contents: ListStreamKeysCommandOutput = {
|
|
2170
|
-
$metadata: deserializeMetadata(output),
|
|
2171
|
-
nextToken: undefined,
|
|
2172
|
-
streamKeys: undefined,
|
|
2173
|
-
};
|
|
2174
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2175
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2176
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2177
|
-
}
|
|
2178
|
-
if (data.streamKeys !== undefined && data.streamKeys !== null) {
|
|
2179
|
-
contents.streamKeys = deserializeAws_restJson1StreamKeyList(data.streamKeys, context);
|
|
2180
|
-
}
|
|
2181
|
-
return Promise.resolve(contents);
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
|
-
const deserializeAws_restJson1ListStreamKeysCommandError = async (
|
|
2185
|
-
output: __HttpResponse,
|
|
2186
|
-
context: __SerdeContext
|
|
2187
|
-
): Promise<ListStreamKeysCommandOutput> => {
|
|
2188
|
-
const parsedOutput: any = {
|
|
2189
|
-
...output,
|
|
2190
|
-
body: await parseBody(output.body, context),
|
|
2191
|
-
};
|
|
2192
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2193
|
-
let errorCode: string = "UnknownError";
|
|
2194
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2195
|
-
switch (errorCode) {
|
|
2196
|
-
case "AccessDeniedException":
|
|
2197
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2198
|
-
response = {
|
|
2199
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2200
|
-
name: errorCode,
|
|
2201
|
-
$metadata: deserializeMetadata(output),
|
|
2202
|
-
};
|
|
2203
|
-
break;
|
|
2204
|
-
case "ResourceNotFoundException":
|
|
2205
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2206
|
-
response = {
|
|
2207
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2208
|
-
name: errorCode,
|
|
2209
|
-
$metadata: deserializeMetadata(output),
|
|
2210
|
-
};
|
|
2211
|
-
break;
|
|
2212
|
-
case "ValidationException":
|
|
2213
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2214
|
-
response = {
|
|
2215
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2216
|
-
name: errorCode,
|
|
2217
|
-
$metadata: deserializeMetadata(output),
|
|
2218
|
-
};
|
|
2219
|
-
break;
|
|
2220
|
-
default:
|
|
2221
|
-
const parsedBody = parsedOutput.body;
|
|
2222
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2223
|
-
response = {
|
|
2224
|
-
...parsedBody,
|
|
2225
|
-
name: `${errorCode}`,
|
|
2226
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2227
|
-
$fault: "client",
|
|
2228
|
-
$metadata: deserializeMetadata(output),
|
|
2229
|
-
} as any;
|
|
2230
|
-
}
|
|
2231
|
-
const message = response.message || response.Message || errorCode;
|
|
2232
|
-
response.message = message;
|
|
2233
|
-
delete response.Message;
|
|
2234
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2235
|
-
};
|
|
2236
|
-
|
|
2237
|
-
export const deserializeAws_restJson1ListStreamsCommand = async (
|
|
2238
|
-
output: __HttpResponse,
|
|
2239
|
-
context: __SerdeContext
|
|
2240
|
-
): Promise<ListStreamsCommandOutput> => {
|
|
2241
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2242
|
-
return deserializeAws_restJson1ListStreamsCommandError(output, context);
|
|
2243
|
-
}
|
|
2244
|
-
const contents: ListStreamsCommandOutput = {
|
|
2245
|
-
$metadata: deserializeMetadata(output),
|
|
2246
|
-
nextToken: undefined,
|
|
2247
|
-
streams: undefined,
|
|
2248
|
-
};
|
|
2249
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2250
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2251
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2252
|
-
}
|
|
2253
|
-
if (data.streams !== undefined && data.streams !== null) {
|
|
2254
|
-
contents.streams = deserializeAws_restJson1StreamList(data.streams, context);
|
|
2255
|
-
}
|
|
2256
|
-
return Promise.resolve(contents);
|
|
2257
|
-
};
|
|
2258
|
-
|
|
2259
|
-
const deserializeAws_restJson1ListStreamsCommandError = async (
|
|
2260
|
-
output: __HttpResponse,
|
|
2261
|
-
context: __SerdeContext
|
|
2262
|
-
): Promise<ListStreamsCommandOutput> => {
|
|
2263
|
-
const parsedOutput: any = {
|
|
2264
|
-
...output,
|
|
2265
|
-
body: await parseBody(output.body, context),
|
|
2266
|
-
};
|
|
2267
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2268
|
-
let errorCode: string = "UnknownError";
|
|
2269
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2270
|
-
switch (errorCode) {
|
|
2271
|
-
case "AccessDeniedException":
|
|
2272
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2273
|
-
response = {
|
|
2274
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2275
|
-
name: errorCode,
|
|
2276
|
-
$metadata: deserializeMetadata(output),
|
|
2277
|
-
};
|
|
2278
|
-
break;
|
|
2279
|
-
default:
|
|
2280
|
-
const parsedBody = parsedOutput.body;
|
|
2281
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2282
|
-
response = {
|
|
2283
|
-
...parsedBody,
|
|
2284
|
-
name: `${errorCode}`,
|
|
2285
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2286
|
-
$fault: "client",
|
|
2287
|
-
$metadata: deserializeMetadata(output),
|
|
2288
|
-
} as any;
|
|
2289
|
-
}
|
|
2290
|
-
const message = response.message || response.Message || errorCode;
|
|
2291
|
-
response.message = message;
|
|
2292
|
-
delete response.Message;
|
|
2293
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
2297
|
-
output: __HttpResponse,
|
|
2298
|
-
context: __SerdeContext
|
|
2299
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2300
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2301
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
2302
|
-
}
|
|
2303
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
2304
|
-
$metadata: deserializeMetadata(output),
|
|
2305
|
-
nextToken: undefined,
|
|
2306
|
-
tags: undefined,
|
|
2307
|
-
};
|
|
2308
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2309
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2310
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
2311
|
-
}
|
|
2312
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2313
|
-
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2314
|
-
}
|
|
2315
|
-
return Promise.resolve(contents);
|
|
2316
|
-
};
|
|
2317
|
-
|
|
2318
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
2319
|
-
output: __HttpResponse,
|
|
2320
|
-
context: __SerdeContext
|
|
2321
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2322
|
-
const parsedOutput: any = {
|
|
2323
|
-
...output,
|
|
2324
|
-
body: await parseBody(output.body, context),
|
|
2325
|
-
};
|
|
2326
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2327
|
-
let errorCode: string = "UnknownError";
|
|
2328
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2329
|
-
switch (errorCode) {
|
|
2330
|
-
case "InternalServerException":
|
|
2331
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
2332
|
-
response = {
|
|
2333
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2334
|
-
name: errorCode,
|
|
2335
|
-
$metadata: deserializeMetadata(output),
|
|
2336
|
-
};
|
|
2337
|
-
break;
|
|
2338
|
-
case "ResourceNotFoundException":
|
|
2339
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2340
|
-
response = {
|
|
2341
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2342
|
-
name: errorCode,
|
|
2343
|
-
$metadata: deserializeMetadata(output),
|
|
2344
|
-
};
|
|
2345
|
-
break;
|
|
2346
|
-
case "ValidationException":
|
|
2347
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2348
|
-
response = {
|
|
2349
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2350
|
-
name: errorCode,
|
|
2351
|
-
$metadata: deserializeMetadata(output),
|
|
2352
|
-
};
|
|
2353
|
-
break;
|
|
2354
|
-
default:
|
|
2355
|
-
const parsedBody = parsedOutput.body;
|
|
2356
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2357
|
-
response = {
|
|
2358
|
-
...parsedBody,
|
|
2359
|
-
name: `${errorCode}`,
|
|
2360
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2361
|
-
$fault: "client",
|
|
2362
|
-
$metadata: deserializeMetadata(output),
|
|
2363
|
-
} as any;
|
|
2364
|
-
}
|
|
2365
|
-
const message = response.message || response.Message || errorCode;
|
|
2366
|
-
response.message = message;
|
|
2367
|
-
delete response.Message;
|
|
2368
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2369
|
-
};
|
|
2370
|
-
|
|
2371
|
-
export const deserializeAws_restJson1PutMetadataCommand = async (
|
|
2372
|
-
output: __HttpResponse,
|
|
2373
|
-
context: __SerdeContext
|
|
2374
|
-
): Promise<PutMetadataCommandOutput> => {
|
|
2375
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2376
|
-
return deserializeAws_restJson1PutMetadataCommandError(output, context);
|
|
2377
|
-
}
|
|
2378
|
-
const contents: PutMetadataCommandOutput = {
|
|
2379
|
-
$metadata: deserializeMetadata(output),
|
|
2380
|
-
};
|
|
2381
|
-
await collectBody(output.body, context);
|
|
2382
|
-
return Promise.resolve(contents);
|
|
2383
|
-
};
|
|
2384
|
-
|
|
2385
|
-
const deserializeAws_restJson1PutMetadataCommandError = async (
|
|
2386
|
-
output: __HttpResponse,
|
|
2387
|
-
context: __SerdeContext
|
|
2388
|
-
): Promise<PutMetadataCommandOutput> => {
|
|
2389
|
-
const parsedOutput: any = {
|
|
2390
|
-
...output,
|
|
2391
|
-
body: await parseBody(output.body, context),
|
|
2392
|
-
};
|
|
2393
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2394
|
-
let errorCode: string = "UnknownError";
|
|
2395
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2396
|
-
switch (errorCode) {
|
|
2397
|
-
case "AccessDeniedException":
|
|
2398
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2399
|
-
response = {
|
|
2400
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2401
|
-
name: errorCode,
|
|
2402
|
-
$metadata: deserializeMetadata(output),
|
|
2403
|
-
};
|
|
2404
|
-
break;
|
|
2405
|
-
case "ChannelNotBroadcasting":
|
|
2406
|
-
case "com.amazonaws.ivs#ChannelNotBroadcasting":
|
|
2407
|
-
response = {
|
|
2408
|
-
...(await deserializeAws_restJson1ChannelNotBroadcastingResponse(parsedOutput, context)),
|
|
2409
|
-
name: errorCode,
|
|
2410
|
-
$metadata: deserializeMetadata(output),
|
|
2411
|
-
};
|
|
2412
|
-
break;
|
|
2413
|
-
case "ResourceNotFoundException":
|
|
2414
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2415
|
-
response = {
|
|
2416
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2417
|
-
name: errorCode,
|
|
2418
|
-
$metadata: deserializeMetadata(output),
|
|
2419
|
-
};
|
|
2420
|
-
break;
|
|
2421
|
-
case "ThrottlingException":
|
|
2422
|
-
case "com.amazonaws.ivs#ThrottlingException":
|
|
2423
|
-
response = {
|
|
2424
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2425
|
-
name: errorCode,
|
|
2426
|
-
$metadata: deserializeMetadata(output),
|
|
2427
|
-
};
|
|
2428
|
-
break;
|
|
2429
|
-
case "ValidationException":
|
|
2430
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2431
|
-
response = {
|
|
2432
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2433
|
-
name: errorCode,
|
|
2434
|
-
$metadata: deserializeMetadata(output),
|
|
2435
|
-
};
|
|
2436
|
-
break;
|
|
2437
|
-
default:
|
|
2438
|
-
const parsedBody = parsedOutput.body;
|
|
2439
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2440
|
-
response = {
|
|
2441
|
-
...parsedBody,
|
|
2442
|
-
name: `${errorCode}`,
|
|
2443
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2444
|
-
$fault: "client",
|
|
2445
|
-
$metadata: deserializeMetadata(output),
|
|
2446
|
-
} as any;
|
|
2447
|
-
}
|
|
2448
|
-
const message = response.message || response.Message || errorCode;
|
|
2449
|
-
response.message = message;
|
|
2450
|
-
delete response.Message;
|
|
2451
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2452
|
-
};
|
|
2453
|
-
|
|
2454
|
-
export const deserializeAws_restJson1StopStreamCommand = async (
|
|
2455
|
-
output: __HttpResponse,
|
|
2456
|
-
context: __SerdeContext
|
|
2457
|
-
): Promise<StopStreamCommandOutput> => {
|
|
2458
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2459
|
-
return deserializeAws_restJson1StopStreamCommandError(output, context);
|
|
2460
|
-
}
|
|
2461
|
-
const contents: StopStreamCommandOutput = {
|
|
2462
|
-
$metadata: deserializeMetadata(output),
|
|
2463
|
-
};
|
|
2464
|
-
await collectBody(output.body, context);
|
|
2465
|
-
return Promise.resolve(contents);
|
|
2466
|
-
};
|
|
2467
|
-
|
|
2468
|
-
const deserializeAws_restJson1StopStreamCommandError = async (
|
|
2469
|
-
output: __HttpResponse,
|
|
2470
|
-
context: __SerdeContext
|
|
2471
|
-
): Promise<StopStreamCommandOutput> => {
|
|
2472
|
-
const parsedOutput: any = {
|
|
2473
|
-
...output,
|
|
2474
|
-
body: await parseBody(output.body, context),
|
|
2475
|
-
};
|
|
2476
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2477
|
-
let errorCode: string = "UnknownError";
|
|
2478
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2479
|
-
switch (errorCode) {
|
|
2480
|
-
case "AccessDeniedException":
|
|
2481
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2482
|
-
response = {
|
|
2483
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2484
|
-
name: errorCode,
|
|
2485
|
-
$metadata: deserializeMetadata(output),
|
|
2486
|
-
};
|
|
2487
|
-
break;
|
|
2488
|
-
case "ChannelNotBroadcasting":
|
|
2489
|
-
case "com.amazonaws.ivs#ChannelNotBroadcasting":
|
|
2490
|
-
response = {
|
|
2491
|
-
...(await deserializeAws_restJson1ChannelNotBroadcastingResponse(parsedOutput, context)),
|
|
2492
|
-
name: errorCode,
|
|
2493
|
-
$metadata: deserializeMetadata(output),
|
|
2494
|
-
};
|
|
2495
|
-
break;
|
|
2496
|
-
case "ResourceNotFoundException":
|
|
2497
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2498
|
-
response = {
|
|
2499
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2500
|
-
name: errorCode,
|
|
2501
|
-
$metadata: deserializeMetadata(output),
|
|
2502
|
-
};
|
|
2503
|
-
break;
|
|
2504
|
-
case "StreamUnavailable":
|
|
2505
|
-
case "com.amazonaws.ivs#StreamUnavailable":
|
|
2506
|
-
response = {
|
|
2507
|
-
...(await deserializeAws_restJson1StreamUnavailableResponse(parsedOutput, context)),
|
|
2508
|
-
name: errorCode,
|
|
2509
|
-
$metadata: deserializeMetadata(output),
|
|
2510
|
-
};
|
|
2511
|
-
break;
|
|
2512
|
-
case "ValidationException":
|
|
2513
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2514
|
-
response = {
|
|
2515
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2516
|
-
name: errorCode,
|
|
2517
|
-
$metadata: deserializeMetadata(output),
|
|
2518
|
-
};
|
|
2519
|
-
break;
|
|
2520
|
-
default:
|
|
2521
|
-
const parsedBody = parsedOutput.body;
|
|
2522
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2523
|
-
response = {
|
|
2524
|
-
...parsedBody,
|
|
2525
|
-
name: `${errorCode}`,
|
|
2526
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2527
|
-
$fault: "client",
|
|
2528
|
-
$metadata: deserializeMetadata(output),
|
|
2529
|
-
} as any;
|
|
2530
|
-
}
|
|
2531
|
-
const message = response.message || response.Message || errorCode;
|
|
2532
|
-
response.message = message;
|
|
2533
|
-
delete response.Message;
|
|
2534
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2535
|
-
};
|
|
2536
|
-
|
|
2537
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
2538
|
-
output: __HttpResponse,
|
|
2539
|
-
context: __SerdeContext
|
|
2540
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2541
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2542
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
2543
|
-
}
|
|
2544
|
-
const contents: TagResourceCommandOutput = {
|
|
2545
|
-
$metadata: deserializeMetadata(output),
|
|
2546
|
-
};
|
|
2547
|
-
await collectBody(output.body, context);
|
|
2548
|
-
return Promise.resolve(contents);
|
|
2549
|
-
};
|
|
2550
|
-
|
|
2551
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
2552
|
-
output: __HttpResponse,
|
|
2553
|
-
context: __SerdeContext
|
|
2554
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2555
|
-
const parsedOutput: any = {
|
|
2556
|
-
...output,
|
|
2557
|
-
body: await parseBody(output.body, context),
|
|
2558
|
-
};
|
|
2559
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2560
|
-
let errorCode: string = "UnknownError";
|
|
2561
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2562
|
-
switch (errorCode) {
|
|
2563
|
-
case "InternalServerException":
|
|
2564
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
2565
|
-
response = {
|
|
2566
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2567
|
-
name: errorCode,
|
|
2568
|
-
$metadata: deserializeMetadata(output),
|
|
2569
|
-
};
|
|
2570
|
-
break;
|
|
2571
|
-
case "ResourceNotFoundException":
|
|
2572
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2573
|
-
response = {
|
|
2574
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2575
|
-
name: errorCode,
|
|
2576
|
-
$metadata: deserializeMetadata(output),
|
|
2577
|
-
};
|
|
2578
|
-
break;
|
|
2579
|
-
case "ValidationException":
|
|
2580
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2581
|
-
response = {
|
|
2582
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2583
|
-
name: errorCode,
|
|
2584
|
-
$metadata: deserializeMetadata(output),
|
|
2585
|
-
};
|
|
2586
|
-
break;
|
|
2587
|
-
default:
|
|
2588
|
-
const parsedBody = parsedOutput.body;
|
|
2589
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2590
|
-
response = {
|
|
2591
|
-
...parsedBody,
|
|
2592
|
-
name: `${errorCode}`,
|
|
2593
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2594
|
-
$fault: "client",
|
|
2595
|
-
$metadata: deserializeMetadata(output),
|
|
2596
|
-
} as any;
|
|
2597
|
-
}
|
|
2598
|
-
const message = response.message || response.Message || errorCode;
|
|
2599
|
-
response.message = message;
|
|
2600
|
-
delete response.Message;
|
|
2601
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2602
|
-
};
|
|
2603
|
-
|
|
2604
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
2605
|
-
output: __HttpResponse,
|
|
2606
|
-
context: __SerdeContext
|
|
2607
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2608
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2609
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
2610
|
-
}
|
|
2611
|
-
const contents: UntagResourceCommandOutput = {
|
|
2612
|
-
$metadata: deserializeMetadata(output),
|
|
2613
|
-
};
|
|
2614
|
-
await collectBody(output.body, context);
|
|
2615
|
-
return Promise.resolve(contents);
|
|
2616
|
-
};
|
|
2617
|
-
|
|
2618
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
2619
|
-
output: __HttpResponse,
|
|
2620
|
-
context: __SerdeContext
|
|
2621
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2622
|
-
const parsedOutput: any = {
|
|
2623
|
-
...output,
|
|
2624
|
-
body: await parseBody(output.body, context),
|
|
2625
|
-
};
|
|
2626
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2627
|
-
let errorCode: string = "UnknownError";
|
|
2628
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2629
|
-
switch (errorCode) {
|
|
2630
|
-
case "InternalServerException":
|
|
2631
|
-
case "com.amazonaws.ivs#InternalServerException":
|
|
2632
|
-
response = {
|
|
2633
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2634
|
-
name: errorCode,
|
|
2635
|
-
$metadata: deserializeMetadata(output),
|
|
2636
|
-
};
|
|
2637
|
-
break;
|
|
2638
|
-
case "ResourceNotFoundException":
|
|
2639
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2640
|
-
response = {
|
|
2641
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2642
|
-
name: errorCode,
|
|
2643
|
-
$metadata: deserializeMetadata(output),
|
|
2644
|
-
};
|
|
2645
|
-
break;
|
|
2646
|
-
case "ValidationException":
|
|
2647
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2648
|
-
response = {
|
|
2649
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2650
|
-
name: errorCode,
|
|
2651
|
-
$metadata: deserializeMetadata(output),
|
|
2652
|
-
};
|
|
2653
|
-
break;
|
|
2654
|
-
default:
|
|
2655
|
-
const parsedBody = parsedOutput.body;
|
|
2656
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2657
|
-
response = {
|
|
2658
|
-
...parsedBody,
|
|
2659
|
-
name: `${errorCode}`,
|
|
2660
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2661
|
-
$fault: "client",
|
|
2662
|
-
$metadata: deserializeMetadata(output),
|
|
2663
|
-
} as any;
|
|
2664
|
-
}
|
|
2665
|
-
const message = response.message || response.Message || errorCode;
|
|
2666
|
-
response.message = message;
|
|
2667
|
-
delete response.Message;
|
|
2668
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2669
|
-
};
|
|
2670
|
-
|
|
2671
|
-
export const deserializeAws_restJson1UpdateChannelCommand = async (
|
|
2672
|
-
output: __HttpResponse,
|
|
2673
|
-
context: __SerdeContext
|
|
2674
|
-
): Promise<UpdateChannelCommandOutput> => {
|
|
2675
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2676
|
-
return deserializeAws_restJson1UpdateChannelCommandError(output, context);
|
|
2677
|
-
}
|
|
2678
|
-
const contents: UpdateChannelCommandOutput = {
|
|
2679
|
-
$metadata: deserializeMetadata(output),
|
|
2680
|
-
channel: undefined,
|
|
2681
|
-
};
|
|
2682
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2683
|
-
if (data.channel !== undefined && data.channel !== null) {
|
|
2684
|
-
contents.channel = deserializeAws_restJson1Channel(data.channel, context);
|
|
2685
|
-
}
|
|
2686
|
-
return Promise.resolve(contents);
|
|
2687
|
-
};
|
|
2688
|
-
|
|
2689
|
-
const deserializeAws_restJson1UpdateChannelCommandError = async (
|
|
2690
|
-
output: __HttpResponse,
|
|
2691
|
-
context: __SerdeContext
|
|
2692
|
-
): Promise<UpdateChannelCommandOutput> => {
|
|
2693
|
-
const parsedOutput: any = {
|
|
2694
|
-
...output,
|
|
2695
|
-
body: await parseBody(output.body, context),
|
|
2696
|
-
};
|
|
2697
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2698
|
-
let errorCode: string = "UnknownError";
|
|
2699
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2700
|
-
switch (errorCode) {
|
|
2701
|
-
case "AccessDeniedException":
|
|
2702
|
-
case "com.amazonaws.ivs#AccessDeniedException":
|
|
2703
|
-
response = {
|
|
2704
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2705
|
-
name: errorCode,
|
|
2706
|
-
$metadata: deserializeMetadata(output),
|
|
2707
|
-
};
|
|
2708
|
-
break;
|
|
2709
|
-
case "ConflictException":
|
|
2710
|
-
case "com.amazonaws.ivs#ConflictException":
|
|
2711
|
-
response = {
|
|
2712
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2713
|
-
name: errorCode,
|
|
2714
|
-
$metadata: deserializeMetadata(output),
|
|
2715
|
-
};
|
|
2716
|
-
break;
|
|
2717
|
-
case "PendingVerification":
|
|
2718
|
-
case "com.amazonaws.ivs#PendingVerification":
|
|
2719
|
-
response = {
|
|
2720
|
-
...(await deserializeAws_restJson1PendingVerificationResponse(parsedOutput, context)),
|
|
2721
|
-
name: errorCode,
|
|
2722
|
-
$metadata: deserializeMetadata(output),
|
|
2723
|
-
};
|
|
2724
|
-
break;
|
|
2725
|
-
case "ResourceNotFoundException":
|
|
2726
|
-
case "com.amazonaws.ivs#ResourceNotFoundException":
|
|
2727
|
-
response = {
|
|
2728
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2729
|
-
name: errorCode,
|
|
2730
|
-
$metadata: deserializeMetadata(output),
|
|
2731
|
-
};
|
|
2732
|
-
break;
|
|
2733
|
-
case "ValidationException":
|
|
2734
|
-
case "com.amazonaws.ivs#ValidationException":
|
|
2735
|
-
response = {
|
|
2736
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2737
|
-
name: errorCode,
|
|
2738
|
-
$metadata: deserializeMetadata(output),
|
|
2739
|
-
};
|
|
2740
|
-
break;
|
|
2741
|
-
default:
|
|
2742
|
-
const parsedBody = parsedOutput.body;
|
|
2743
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2744
|
-
response = {
|
|
2745
|
-
...parsedBody,
|
|
2746
|
-
name: `${errorCode}`,
|
|
2747
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2748
|
-
$fault: "client",
|
|
2749
|
-
$metadata: deserializeMetadata(output),
|
|
2750
|
-
} as any;
|
|
2751
|
-
}
|
|
2752
|
-
const message = response.message || response.Message || errorCode;
|
|
2753
|
-
response.message = message;
|
|
2754
|
-
delete response.Message;
|
|
2755
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2756
|
-
};
|
|
2757
|
-
|
|
2758
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (
|
|
2759
|
-
parsedOutput: any,
|
|
2760
|
-
context: __SerdeContext
|
|
2761
|
-
): Promise<AccessDeniedException> => {
|
|
2762
|
-
const contents: AccessDeniedException = {
|
|
2763
|
-
name: "AccessDeniedException",
|
|
2764
|
-
$fault: "client",
|
|
2765
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2766
|
-
exceptionMessage: undefined,
|
|
2767
|
-
};
|
|
2768
|
-
const data: any = parsedOutput.body;
|
|
2769
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2770
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2771
|
-
}
|
|
2772
|
-
return contents;
|
|
2773
|
-
};
|
|
2774
|
-
|
|
2775
|
-
const deserializeAws_restJson1ChannelNotBroadcastingResponse = async (
|
|
2776
|
-
parsedOutput: any,
|
|
2777
|
-
context: __SerdeContext
|
|
2778
|
-
): Promise<ChannelNotBroadcasting> => {
|
|
2779
|
-
const contents: ChannelNotBroadcasting = {
|
|
2780
|
-
name: "ChannelNotBroadcasting",
|
|
2781
|
-
$fault: "client",
|
|
2782
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2783
|
-
exceptionMessage: undefined,
|
|
2784
|
-
};
|
|
2785
|
-
const data: any = parsedOutput.body;
|
|
2786
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2787
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2788
|
-
}
|
|
2789
|
-
return contents;
|
|
2790
|
-
};
|
|
2791
|
-
|
|
2792
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
2793
|
-
parsedOutput: any,
|
|
2794
|
-
context: __SerdeContext
|
|
2795
|
-
): Promise<ConflictException> => {
|
|
2796
|
-
const contents: ConflictException = {
|
|
2797
|
-
name: "ConflictException",
|
|
2798
|
-
$fault: "client",
|
|
2799
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2800
|
-
exceptionMessage: undefined,
|
|
2801
|
-
};
|
|
2802
|
-
const data: any = parsedOutput.body;
|
|
2803
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2804
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2805
|
-
}
|
|
2806
|
-
return contents;
|
|
2807
|
-
};
|
|
2808
|
-
|
|
2809
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (
|
|
2810
|
-
parsedOutput: any,
|
|
2811
|
-
context: __SerdeContext
|
|
2812
|
-
): Promise<InternalServerException> => {
|
|
2813
|
-
const contents: InternalServerException = {
|
|
2814
|
-
name: "InternalServerException",
|
|
2815
|
-
$fault: "server",
|
|
2816
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2817
|
-
exceptionMessage: undefined,
|
|
2818
|
-
};
|
|
2819
|
-
const data: any = parsedOutput.body;
|
|
2820
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2821
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2822
|
-
}
|
|
2823
|
-
return contents;
|
|
2824
|
-
};
|
|
2825
|
-
|
|
2826
|
-
const deserializeAws_restJson1PendingVerificationResponse = async (
|
|
2827
|
-
parsedOutput: any,
|
|
2828
|
-
context: __SerdeContext
|
|
2829
|
-
): Promise<PendingVerification> => {
|
|
2830
|
-
const contents: PendingVerification = {
|
|
2831
|
-
name: "PendingVerification",
|
|
2832
|
-
$fault: "client",
|
|
2833
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2834
|
-
exceptionMessage: undefined,
|
|
2835
|
-
};
|
|
2836
|
-
const data: any = parsedOutput.body;
|
|
2837
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2838
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2839
|
-
}
|
|
2840
|
-
return contents;
|
|
2841
|
-
};
|
|
2842
|
-
|
|
2843
|
-
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
|
|
2844
|
-
parsedOutput: any,
|
|
2845
|
-
context: __SerdeContext
|
|
2846
|
-
): Promise<ResourceNotFoundException> => {
|
|
2847
|
-
const contents: ResourceNotFoundException = {
|
|
2848
|
-
name: "ResourceNotFoundException",
|
|
2849
|
-
$fault: "client",
|
|
2850
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2851
|
-
exceptionMessage: undefined,
|
|
2852
|
-
};
|
|
2853
|
-
const data: any = parsedOutput.body;
|
|
2854
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2855
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2856
|
-
}
|
|
2857
|
-
return contents;
|
|
2858
|
-
};
|
|
2859
|
-
|
|
2860
|
-
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (
|
|
2861
|
-
parsedOutput: any,
|
|
2862
|
-
context: __SerdeContext
|
|
2863
|
-
): Promise<ServiceQuotaExceededException> => {
|
|
2864
|
-
const contents: ServiceQuotaExceededException = {
|
|
2865
|
-
name: "ServiceQuotaExceededException",
|
|
2866
|
-
$fault: "client",
|
|
2867
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2868
|
-
exceptionMessage: undefined,
|
|
2869
|
-
};
|
|
2870
|
-
const data: any = parsedOutput.body;
|
|
2871
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2872
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2873
|
-
}
|
|
2874
|
-
return contents;
|
|
2875
|
-
};
|
|
2876
|
-
|
|
2877
|
-
const deserializeAws_restJson1StreamUnavailableResponse = async (
|
|
2878
|
-
parsedOutput: any,
|
|
2879
|
-
context: __SerdeContext
|
|
2880
|
-
): Promise<StreamUnavailable> => {
|
|
2881
|
-
const contents: StreamUnavailable = {
|
|
2882
|
-
name: "StreamUnavailable",
|
|
2883
|
-
$fault: "server",
|
|
2884
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2885
|
-
exceptionMessage: undefined,
|
|
2886
|
-
};
|
|
2887
|
-
const data: any = parsedOutput.body;
|
|
2888
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2889
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2890
|
-
}
|
|
2891
|
-
return contents;
|
|
2892
|
-
};
|
|
2893
|
-
|
|
2894
|
-
const deserializeAws_restJson1ThrottlingExceptionResponse = async (
|
|
2895
|
-
parsedOutput: any,
|
|
2896
|
-
context: __SerdeContext
|
|
2897
|
-
): Promise<ThrottlingException> => {
|
|
2898
|
-
const contents: ThrottlingException = {
|
|
2899
|
-
name: "ThrottlingException",
|
|
2900
|
-
$fault: "client",
|
|
2901
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2902
|
-
exceptionMessage: undefined,
|
|
2903
|
-
};
|
|
2904
|
-
const data: any = parsedOutput.body;
|
|
2905
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2906
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2907
|
-
}
|
|
2908
|
-
return contents;
|
|
2909
|
-
};
|
|
2910
|
-
|
|
2911
|
-
const deserializeAws_restJson1ValidationExceptionResponse = async (
|
|
2912
|
-
parsedOutput: any,
|
|
2913
|
-
context: __SerdeContext
|
|
2914
|
-
): Promise<ValidationException> => {
|
|
2915
|
-
const contents: ValidationException = {
|
|
2916
|
-
name: "ValidationException",
|
|
2917
|
-
$fault: "client",
|
|
2918
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2919
|
-
exceptionMessage: undefined,
|
|
2920
|
-
};
|
|
2921
|
-
const data: any = parsedOutput.body;
|
|
2922
|
-
if (data.exceptionMessage !== undefined && data.exceptionMessage !== null) {
|
|
2923
|
-
contents.exceptionMessage = __expectString(data.exceptionMessage);
|
|
2924
|
-
}
|
|
2925
|
-
return contents;
|
|
2926
|
-
};
|
|
2927
|
-
|
|
2928
|
-
const serializeAws_restJson1ChannelArnList = (input: string[], context: __SerdeContext): any => {
|
|
2929
|
-
return input
|
|
2930
|
-
.filter((e: any) => e != null)
|
|
2931
|
-
.map((entry) => {
|
|
2932
|
-
if (entry === null) {
|
|
2933
|
-
return null as any;
|
|
2934
|
-
}
|
|
2935
|
-
return entry;
|
|
2936
|
-
});
|
|
2937
|
-
};
|
|
2938
|
-
|
|
2939
|
-
const serializeAws_restJson1DestinationConfiguration = (
|
|
2940
|
-
input: DestinationConfiguration,
|
|
2941
|
-
context: __SerdeContext
|
|
2942
|
-
): any => {
|
|
2943
|
-
return {
|
|
2944
|
-
...(input.s3 !== undefined &&
|
|
2945
|
-
input.s3 !== null && { s3: serializeAws_restJson1S3DestinationConfiguration(input.s3, context) }),
|
|
2946
|
-
};
|
|
2947
|
-
};
|
|
2948
|
-
|
|
2949
|
-
const serializeAws_restJson1S3DestinationConfiguration = (
|
|
2950
|
-
input: S3DestinationConfiguration,
|
|
2951
|
-
context: __SerdeContext
|
|
2952
|
-
): any => {
|
|
2953
|
-
return {
|
|
2954
|
-
...(input.bucketName !== undefined && input.bucketName !== null && { bucketName: input.bucketName }),
|
|
2955
|
-
};
|
|
2956
|
-
};
|
|
2957
|
-
|
|
2958
|
-
const serializeAws_restJson1StreamKeyArnList = (input: string[], context: __SerdeContext): any => {
|
|
2959
|
-
return input
|
|
2960
|
-
.filter((e: any) => e != null)
|
|
2961
|
-
.map((entry) => {
|
|
2962
|
-
if (entry === null) {
|
|
2963
|
-
return null as any;
|
|
2964
|
-
}
|
|
2965
|
-
return entry;
|
|
2966
|
-
});
|
|
2967
|
-
};
|
|
2968
|
-
|
|
2969
|
-
const serializeAws_restJson1Tags = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
2970
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
2971
|
-
if (value === null) {
|
|
2972
|
-
return acc;
|
|
2973
|
-
}
|
|
2974
|
-
return {
|
|
2975
|
-
...acc,
|
|
2976
|
-
[key]: value,
|
|
2977
|
-
};
|
|
2978
|
-
}, {});
|
|
2979
|
-
};
|
|
2980
|
-
|
|
2981
|
-
const deserializeAws_restJson1BatchError = (output: any, context: __SerdeContext): BatchError => {
|
|
2982
|
-
return {
|
|
2983
|
-
arn: __expectString(output.arn),
|
|
2984
|
-
code: __expectString(output.code),
|
|
2985
|
-
message: __expectString(output.message),
|
|
2986
|
-
} as any;
|
|
2987
|
-
};
|
|
2988
|
-
|
|
2989
|
-
const deserializeAws_restJson1BatchErrors = (output: any, context: __SerdeContext): BatchError[] => {
|
|
2990
|
-
return (output || [])
|
|
2991
|
-
.filter((e: any) => e != null)
|
|
2992
|
-
.map((entry: any) => {
|
|
2993
|
-
if (entry === null) {
|
|
2994
|
-
return null as any;
|
|
2995
|
-
}
|
|
2996
|
-
return deserializeAws_restJson1BatchError(entry, context);
|
|
2997
|
-
});
|
|
2998
|
-
};
|
|
2999
|
-
|
|
3000
|
-
const deserializeAws_restJson1Channel = (output: any, context: __SerdeContext): Channel => {
|
|
3001
|
-
return {
|
|
3002
|
-
arn: __expectString(output.arn),
|
|
3003
|
-
authorized: __expectBoolean(output.authorized),
|
|
3004
|
-
ingestEndpoint: __expectString(output.ingestEndpoint),
|
|
3005
|
-
latencyMode: __expectString(output.latencyMode),
|
|
3006
|
-
name: __expectString(output.name),
|
|
3007
|
-
playbackUrl: __expectString(output.playbackUrl),
|
|
3008
|
-
recordingConfigurationArn: __expectString(output.recordingConfigurationArn),
|
|
3009
|
-
tags:
|
|
3010
|
-
output.tags !== undefined && output.tags !== null
|
|
3011
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3012
|
-
: undefined,
|
|
3013
|
-
type: __expectString(output.type),
|
|
3014
|
-
} as any;
|
|
3015
|
-
};
|
|
3016
|
-
|
|
3017
|
-
const deserializeAws_restJson1ChannelList = (output: any, context: __SerdeContext): ChannelSummary[] => {
|
|
3018
|
-
return (output || [])
|
|
3019
|
-
.filter((e: any) => e != null)
|
|
3020
|
-
.map((entry: any) => {
|
|
3021
|
-
if (entry === null) {
|
|
3022
|
-
return null as any;
|
|
3023
|
-
}
|
|
3024
|
-
return deserializeAws_restJson1ChannelSummary(entry, context);
|
|
3025
|
-
});
|
|
3026
|
-
};
|
|
3027
|
-
|
|
3028
|
-
const deserializeAws_restJson1Channels = (output: any, context: __SerdeContext): Channel[] => {
|
|
3029
|
-
return (output || [])
|
|
3030
|
-
.filter((e: any) => e != null)
|
|
3031
|
-
.map((entry: any) => {
|
|
3032
|
-
if (entry === null) {
|
|
3033
|
-
return null as any;
|
|
3034
|
-
}
|
|
3035
|
-
return deserializeAws_restJson1Channel(entry, context);
|
|
3036
|
-
});
|
|
3037
|
-
};
|
|
3038
|
-
|
|
3039
|
-
const deserializeAws_restJson1ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => {
|
|
3040
|
-
return {
|
|
3041
|
-
arn: __expectString(output.arn),
|
|
3042
|
-
authorized: __expectBoolean(output.authorized),
|
|
3043
|
-
latencyMode: __expectString(output.latencyMode),
|
|
3044
|
-
name: __expectString(output.name),
|
|
3045
|
-
recordingConfigurationArn: __expectString(output.recordingConfigurationArn),
|
|
3046
|
-
tags:
|
|
3047
|
-
output.tags !== undefined && output.tags !== null
|
|
3048
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3049
|
-
: undefined,
|
|
3050
|
-
} as any;
|
|
3051
|
-
};
|
|
3052
|
-
|
|
3053
|
-
const deserializeAws_restJson1DestinationConfiguration = (
|
|
3054
|
-
output: any,
|
|
3055
|
-
context: __SerdeContext
|
|
3056
|
-
): DestinationConfiguration => {
|
|
3057
|
-
return {
|
|
3058
|
-
s3:
|
|
3059
|
-
output.s3 !== undefined && output.s3 !== null
|
|
3060
|
-
? deserializeAws_restJson1S3DestinationConfiguration(output.s3, context)
|
|
3061
|
-
: undefined,
|
|
3062
|
-
} as any;
|
|
3063
|
-
};
|
|
3064
|
-
|
|
3065
|
-
const deserializeAws_restJson1PlaybackKeyPair = (output: any, context: __SerdeContext): PlaybackKeyPair => {
|
|
3066
|
-
return {
|
|
3067
|
-
arn: __expectString(output.arn),
|
|
3068
|
-
fingerprint: __expectString(output.fingerprint),
|
|
3069
|
-
name: __expectString(output.name),
|
|
3070
|
-
tags:
|
|
3071
|
-
output.tags !== undefined && output.tags !== null
|
|
3072
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3073
|
-
: undefined,
|
|
3074
|
-
} as any;
|
|
3075
|
-
};
|
|
3076
|
-
|
|
3077
|
-
const deserializeAws_restJson1PlaybackKeyPairList = (
|
|
3078
|
-
output: any,
|
|
3079
|
-
context: __SerdeContext
|
|
3080
|
-
): PlaybackKeyPairSummary[] => {
|
|
3081
|
-
return (output || [])
|
|
3082
|
-
.filter((e: any) => e != null)
|
|
3083
|
-
.map((entry: any) => {
|
|
3084
|
-
if (entry === null) {
|
|
3085
|
-
return null as any;
|
|
3086
|
-
}
|
|
3087
|
-
return deserializeAws_restJson1PlaybackKeyPairSummary(entry, context);
|
|
3088
|
-
});
|
|
3089
|
-
};
|
|
3090
|
-
|
|
3091
|
-
const deserializeAws_restJson1PlaybackKeyPairSummary = (
|
|
3092
|
-
output: any,
|
|
3093
|
-
context: __SerdeContext
|
|
3094
|
-
): PlaybackKeyPairSummary => {
|
|
3095
|
-
return {
|
|
3096
|
-
arn: __expectString(output.arn),
|
|
3097
|
-
name: __expectString(output.name),
|
|
3098
|
-
tags:
|
|
3099
|
-
output.tags !== undefined && output.tags !== null
|
|
3100
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3101
|
-
: undefined,
|
|
3102
|
-
} as any;
|
|
3103
|
-
};
|
|
3104
|
-
|
|
3105
|
-
const deserializeAws_restJson1RecordingConfiguration = (
|
|
3106
|
-
output: any,
|
|
3107
|
-
context: __SerdeContext
|
|
3108
|
-
): RecordingConfiguration => {
|
|
3109
|
-
return {
|
|
3110
|
-
arn: __expectString(output.arn),
|
|
3111
|
-
destinationConfiguration:
|
|
3112
|
-
output.destinationConfiguration !== undefined && output.destinationConfiguration !== null
|
|
3113
|
-
? deserializeAws_restJson1DestinationConfiguration(output.destinationConfiguration, context)
|
|
3114
|
-
: undefined,
|
|
3115
|
-
name: __expectString(output.name),
|
|
3116
|
-
state: __expectString(output.state),
|
|
3117
|
-
tags:
|
|
3118
|
-
output.tags !== undefined && output.tags !== null
|
|
3119
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3120
|
-
: undefined,
|
|
3121
|
-
} as any;
|
|
3122
|
-
};
|
|
3123
|
-
|
|
3124
|
-
const deserializeAws_restJson1RecordingConfigurationList = (
|
|
3125
|
-
output: any,
|
|
3126
|
-
context: __SerdeContext
|
|
3127
|
-
): RecordingConfigurationSummary[] => {
|
|
3128
|
-
return (output || [])
|
|
3129
|
-
.filter((e: any) => e != null)
|
|
3130
|
-
.map((entry: any) => {
|
|
3131
|
-
if (entry === null) {
|
|
3132
|
-
return null as any;
|
|
3133
|
-
}
|
|
3134
|
-
return deserializeAws_restJson1RecordingConfigurationSummary(entry, context);
|
|
3135
|
-
});
|
|
3136
|
-
};
|
|
3137
|
-
|
|
3138
|
-
const deserializeAws_restJson1RecordingConfigurationSummary = (
|
|
3139
|
-
output: any,
|
|
3140
|
-
context: __SerdeContext
|
|
3141
|
-
): RecordingConfigurationSummary => {
|
|
3142
|
-
return {
|
|
3143
|
-
arn: __expectString(output.arn),
|
|
3144
|
-
destinationConfiguration:
|
|
3145
|
-
output.destinationConfiguration !== undefined && output.destinationConfiguration !== null
|
|
3146
|
-
? deserializeAws_restJson1DestinationConfiguration(output.destinationConfiguration, context)
|
|
3147
|
-
: undefined,
|
|
3148
|
-
name: __expectString(output.name),
|
|
3149
|
-
state: __expectString(output.state),
|
|
3150
|
-
tags:
|
|
3151
|
-
output.tags !== undefined && output.tags !== null
|
|
3152
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3153
|
-
: undefined,
|
|
3154
|
-
} as any;
|
|
3155
|
-
};
|
|
3156
|
-
|
|
3157
|
-
const deserializeAws_restJson1S3DestinationConfiguration = (
|
|
3158
|
-
output: any,
|
|
3159
|
-
context: __SerdeContext
|
|
3160
|
-
): S3DestinationConfiguration => {
|
|
3161
|
-
return {
|
|
3162
|
-
bucketName: __expectString(output.bucketName),
|
|
3163
|
-
} as any;
|
|
3164
|
-
};
|
|
3165
|
-
|
|
3166
|
-
const deserializeAws_restJson1_Stream = (output: any, context: __SerdeContext): _Stream => {
|
|
3167
|
-
return {
|
|
3168
|
-
channelArn: __expectString(output.channelArn),
|
|
3169
|
-
health: __expectString(output.health),
|
|
3170
|
-
playbackUrl: __expectString(output.playbackUrl),
|
|
3171
|
-
startTime:
|
|
3172
|
-
output.startTime !== undefined && output.startTime !== null
|
|
3173
|
-
? __expectNonNull(__parseRfc3339DateTime(output.startTime))
|
|
3174
|
-
: undefined,
|
|
3175
|
-
state: __expectString(output.state),
|
|
3176
|
-
viewerCount: __expectLong(output.viewerCount),
|
|
3177
|
-
} as any;
|
|
3178
|
-
};
|
|
3179
|
-
|
|
3180
|
-
const deserializeAws_restJson1StreamKey = (output: any, context: __SerdeContext): StreamKey => {
|
|
3181
|
-
return {
|
|
3182
|
-
arn: __expectString(output.arn),
|
|
3183
|
-
channelArn: __expectString(output.channelArn),
|
|
3184
|
-
tags:
|
|
3185
|
-
output.tags !== undefined && output.tags !== null
|
|
3186
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3187
|
-
: undefined,
|
|
3188
|
-
value: __expectString(output.value),
|
|
3189
|
-
} as any;
|
|
3190
|
-
};
|
|
3191
|
-
|
|
3192
|
-
const deserializeAws_restJson1StreamKeyList = (output: any, context: __SerdeContext): StreamKeySummary[] => {
|
|
3193
|
-
return (output || [])
|
|
3194
|
-
.filter((e: any) => e != null)
|
|
3195
|
-
.map((entry: any) => {
|
|
3196
|
-
if (entry === null) {
|
|
3197
|
-
return null as any;
|
|
3198
|
-
}
|
|
3199
|
-
return deserializeAws_restJson1StreamKeySummary(entry, context);
|
|
3200
|
-
});
|
|
3201
|
-
};
|
|
3202
|
-
|
|
3203
|
-
const deserializeAws_restJson1StreamKeys = (output: any, context: __SerdeContext): StreamKey[] => {
|
|
3204
|
-
return (output || [])
|
|
3205
|
-
.filter((e: any) => e != null)
|
|
3206
|
-
.map((entry: any) => {
|
|
3207
|
-
if (entry === null) {
|
|
3208
|
-
return null as any;
|
|
3209
|
-
}
|
|
3210
|
-
return deserializeAws_restJson1StreamKey(entry, context);
|
|
3211
|
-
});
|
|
3212
|
-
};
|
|
3213
|
-
|
|
3214
|
-
const deserializeAws_restJson1StreamKeySummary = (output: any, context: __SerdeContext): StreamKeySummary => {
|
|
3215
|
-
return {
|
|
3216
|
-
arn: __expectString(output.arn),
|
|
3217
|
-
channelArn: __expectString(output.channelArn),
|
|
3218
|
-
tags:
|
|
3219
|
-
output.tags !== undefined && output.tags !== null
|
|
3220
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3221
|
-
: undefined,
|
|
3222
|
-
} as any;
|
|
3223
|
-
};
|
|
3224
|
-
|
|
3225
|
-
const deserializeAws_restJson1StreamList = (output: any, context: __SerdeContext): StreamSummary[] => {
|
|
3226
|
-
return (output || [])
|
|
3227
|
-
.filter((e: any) => e != null)
|
|
3228
|
-
.map((entry: any) => {
|
|
3229
|
-
if (entry === null) {
|
|
3230
|
-
return null as any;
|
|
3231
|
-
}
|
|
3232
|
-
return deserializeAws_restJson1StreamSummary(entry, context);
|
|
3233
|
-
});
|
|
3234
|
-
};
|
|
3235
|
-
|
|
3236
|
-
const deserializeAws_restJson1StreamSummary = (output: any, context: __SerdeContext): StreamSummary => {
|
|
3237
|
-
return {
|
|
3238
|
-
channelArn: __expectString(output.channelArn),
|
|
3239
|
-
health: __expectString(output.health),
|
|
3240
|
-
startTime:
|
|
3241
|
-
output.startTime !== undefined && output.startTime !== null
|
|
3242
|
-
? __expectNonNull(__parseRfc3339DateTime(output.startTime))
|
|
3243
|
-
: undefined,
|
|
3244
|
-
state: __expectString(output.state),
|
|
3245
|
-
viewerCount: __expectLong(output.viewerCount),
|
|
3246
|
-
} as any;
|
|
3247
|
-
};
|
|
3248
|
-
|
|
3249
|
-
const deserializeAws_restJson1Tags = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
3250
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
3251
|
-
if (value === null) {
|
|
3252
|
-
return acc;
|
|
3253
|
-
}
|
|
3254
|
-
return {
|
|
3255
|
-
...acc,
|
|
3256
|
-
[key]: __expectString(value) as any,
|
|
3257
|
-
};
|
|
3258
|
-
}, {});
|
|
3259
|
-
};
|
|
3260
|
-
|
|
3261
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
3262
|
-
httpStatusCode: output.statusCode,
|
|
3263
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
3264
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3265
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3266
|
-
});
|
|
3267
|
-
|
|
3268
|
-
// Collect low-level response body stream to Uint8Array.
|
|
3269
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
3270
|
-
if (streamBody instanceof Uint8Array) {
|
|
3271
|
-
return Promise.resolve(streamBody);
|
|
3272
|
-
}
|
|
3273
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3274
|
-
};
|
|
3275
|
-
|
|
3276
|
-
// Encode Uint8Array data into string with utf-8.
|
|
3277
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
3278
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3279
|
-
|
|
3280
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
3281
|
-
value !== undefined &&
|
|
3282
|
-
value !== null &&
|
|
3283
|
-
value !== "" &&
|
|
3284
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
3285
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
3286
|
-
|
|
3287
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
3288
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
3289
|
-
if (encoded.length) {
|
|
3290
|
-
return JSON.parse(encoded);
|
|
3291
|
-
}
|
|
3292
|
-
return {};
|
|
3293
|
-
});
|
|
3294
|
-
|
|
3295
|
-
/**
|
|
3296
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
3297
|
-
*/
|
|
3298
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
3299
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3300
|
-
|
|
3301
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
3302
|
-
let cleanValue = rawValue;
|
|
3303
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3304
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3305
|
-
}
|
|
3306
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3307
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3308
|
-
}
|
|
3309
|
-
return cleanValue;
|
|
3310
|
-
};
|
|
3311
|
-
|
|
3312
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3313
|
-
if (headerKey !== undefined) {
|
|
3314
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
|
-
if (data.code !== undefined) {
|
|
3318
|
-
return sanitizeErrorCode(data.code);
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
|
-
if (data["__type"] !== undefined) {
|
|
3322
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3323
|
-
}
|
|
3324
|
-
|
|
3325
|
-
return "";
|
|
3326
|
-
};
|