{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KinesisVideo.DeleteSignalingChannel
(
DeleteSignalingChannel (..),
newDeleteSignalingChannel,
deleteSignalingChannel_currentVersion,
deleteSignalingChannel_channelARN,
DeleteSignalingChannelResponse (..),
newDeleteSignalingChannelResponse,
deleteSignalingChannelResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.KinesisVideo.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteSignalingChannel = DeleteSignalingChannel'
{
DeleteSignalingChannel -> Maybe Text
currentVersion :: Prelude.Maybe Prelude.Text,
DeleteSignalingChannel -> Text
channelARN :: Prelude.Text
}
deriving (DeleteSignalingChannel -> DeleteSignalingChannel -> Bool
(DeleteSignalingChannel -> DeleteSignalingChannel -> Bool)
-> (DeleteSignalingChannel -> DeleteSignalingChannel -> Bool)
-> Eq DeleteSignalingChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSignalingChannel -> DeleteSignalingChannel -> Bool
$c/= :: DeleteSignalingChannel -> DeleteSignalingChannel -> Bool
== :: DeleteSignalingChannel -> DeleteSignalingChannel -> Bool
$c== :: DeleteSignalingChannel -> DeleteSignalingChannel -> Bool
Prelude.Eq, ReadPrec [DeleteSignalingChannel]
ReadPrec DeleteSignalingChannel
Int -> ReadS DeleteSignalingChannel
ReadS [DeleteSignalingChannel]
(Int -> ReadS DeleteSignalingChannel)
-> ReadS [DeleteSignalingChannel]
-> ReadPrec DeleteSignalingChannel
-> ReadPrec [DeleteSignalingChannel]
-> Read DeleteSignalingChannel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSignalingChannel]
$creadListPrec :: ReadPrec [DeleteSignalingChannel]
readPrec :: ReadPrec DeleteSignalingChannel
$creadPrec :: ReadPrec DeleteSignalingChannel
readList :: ReadS [DeleteSignalingChannel]
$creadList :: ReadS [DeleteSignalingChannel]
readsPrec :: Int -> ReadS DeleteSignalingChannel
$creadsPrec :: Int -> ReadS DeleteSignalingChannel
Prelude.Read, Int -> DeleteSignalingChannel -> ShowS
[DeleteSignalingChannel] -> ShowS
DeleteSignalingChannel -> String
(Int -> DeleteSignalingChannel -> ShowS)
-> (DeleteSignalingChannel -> String)
-> ([DeleteSignalingChannel] -> ShowS)
-> Show DeleteSignalingChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSignalingChannel] -> ShowS
$cshowList :: [DeleteSignalingChannel] -> ShowS
show :: DeleteSignalingChannel -> String
$cshow :: DeleteSignalingChannel -> String
showsPrec :: Int -> DeleteSignalingChannel -> ShowS
$cshowsPrec :: Int -> DeleteSignalingChannel -> ShowS
Prelude.Show, (forall x. DeleteSignalingChannel -> Rep DeleteSignalingChannel x)
-> (forall x.
Rep DeleteSignalingChannel x -> DeleteSignalingChannel)
-> Generic DeleteSignalingChannel
forall x. Rep DeleteSignalingChannel x -> DeleteSignalingChannel
forall x. DeleteSignalingChannel -> Rep DeleteSignalingChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSignalingChannel x -> DeleteSignalingChannel
$cfrom :: forall x. DeleteSignalingChannel -> Rep DeleteSignalingChannel x
Prelude.Generic)
newDeleteSignalingChannel ::
Prelude.Text ->
DeleteSignalingChannel
newDeleteSignalingChannel :: Text -> DeleteSignalingChannel
newDeleteSignalingChannel Text
pChannelARN_ =
DeleteSignalingChannel' :: Maybe Text -> Text -> DeleteSignalingChannel
DeleteSignalingChannel'
{ $sel:currentVersion:DeleteSignalingChannel' :: Maybe Text
currentVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelARN:DeleteSignalingChannel' :: Text
channelARN = Text
pChannelARN_
}
deleteSignalingChannel_currentVersion :: Lens.Lens' DeleteSignalingChannel (Prelude.Maybe Prelude.Text)
deleteSignalingChannel_currentVersion :: (Maybe Text -> f (Maybe Text))
-> DeleteSignalingChannel -> f DeleteSignalingChannel
deleteSignalingChannel_currentVersion = (DeleteSignalingChannel -> Maybe Text)
-> (DeleteSignalingChannel -> Maybe Text -> DeleteSignalingChannel)
-> Lens
DeleteSignalingChannel
DeleteSignalingChannel
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSignalingChannel' {Maybe Text
currentVersion :: Maybe Text
$sel:currentVersion:DeleteSignalingChannel' :: DeleteSignalingChannel -> Maybe Text
currentVersion} -> Maybe Text
currentVersion) (\s :: DeleteSignalingChannel
s@DeleteSignalingChannel' {} Maybe Text
a -> DeleteSignalingChannel
s {$sel:currentVersion:DeleteSignalingChannel' :: Maybe Text
currentVersion = Maybe Text
a} :: DeleteSignalingChannel)
deleteSignalingChannel_channelARN :: Lens.Lens' DeleteSignalingChannel Prelude.Text
deleteSignalingChannel_channelARN :: (Text -> f Text)
-> DeleteSignalingChannel -> f DeleteSignalingChannel
deleteSignalingChannel_channelARN = (DeleteSignalingChannel -> Text)
-> (DeleteSignalingChannel -> Text -> DeleteSignalingChannel)
-> Lens DeleteSignalingChannel DeleteSignalingChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSignalingChannel' {Text
channelARN :: Text
$sel:channelARN:DeleteSignalingChannel' :: DeleteSignalingChannel -> Text
channelARN} -> Text
channelARN) (\s :: DeleteSignalingChannel
s@DeleteSignalingChannel' {} Text
a -> DeleteSignalingChannel
s {$sel:channelARN:DeleteSignalingChannel' :: Text
channelARN = Text
a} :: DeleteSignalingChannel)
instance Core.AWSRequest DeleteSignalingChannel where
type
AWSResponse DeleteSignalingChannel =
DeleteSignalingChannelResponse
request :: DeleteSignalingChannel -> Request DeleteSignalingChannel
request = Service -> DeleteSignalingChannel -> Request DeleteSignalingChannel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSignalingChannel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSignalingChannel)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteSignalingChannel))
-> Logger
-> Service
-> Proxy DeleteSignalingChannel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSignalingChannel)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteSignalingChannelResponse
DeleteSignalingChannelResponse'
(Int -> DeleteSignalingChannelResponse)
-> Either String Int
-> Either String DeleteSignalingChannelResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteSignalingChannel
instance Prelude.NFData DeleteSignalingChannel
instance Core.ToHeaders DeleteSignalingChannel where
toHeaders :: DeleteSignalingChannel -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteSignalingChannel -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON DeleteSignalingChannel where
toJSON :: DeleteSignalingChannel -> Value
toJSON DeleteSignalingChannel' {Maybe Text
Text
channelARN :: Text
currentVersion :: Maybe Text
$sel:channelARN:DeleteSignalingChannel' :: DeleteSignalingChannel -> Text
$sel:currentVersion:DeleteSignalingChannel' :: DeleteSignalingChannel -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CurrentVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
currentVersion,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ChannelARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
channelARN)
]
)
instance Core.ToPath DeleteSignalingChannel where
toPath :: DeleteSignalingChannel -> ByteString
toPath = ByteString -> DeleteSignalingChannel -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/deleteSignalingChannel"
instance Core.ToQuery DeleteSignalingChannel where
toQuery :: DeleteSignalingChannel -> QueryString
toQuery = QueryString -> DeleteSignalingChannel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteSignalingChannelResponse = DeleteSignalingChannelResponse'
{
DeleteSignalingChannelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool
(DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool)
-> (DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool)
-> Eq DeleteSignalingChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool
$c/= :: DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool
== :: DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool
$c== :: DeleteSignalingChannelResponse
-> DeleteSignalingChannelResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSignalingChannelResponse]
ReadPrec DeleteSignalingChannelResponse
Int -> ReadS DeleteSignalingChannelResponse
ReadS [DeleteSignalingChannelResponse]
(Int -> ReadS DeleteSignalingChannelResponse)
-> ReadS [DeleteSignalingChannelResponse]
-> ReadPrec DeleteSignalingChannelResponse
-> ReadPrec [DeleteSignalingChannelResponse]
-> Read DeleteSignalingChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSignalingChannelResponse]
$creadListPrec :: ReadPrec [DeleteSignalingChannelResponse]
readPrec :: ReadPrec DeleteSignalingChannelResponse
$creadPrec :: ReadPrec DeleteSignalingChannelResponse
readList :: ReadS [DeleteSignalingChannelResponse]
$creadList :: ReadS [DeleteSignalingChannelResponse]
readsPrec :: Int -> ReadS DeleteSignalingChannelResponse
$creadsPrec :: Int -> ReadS DeleteSignalingChannelResponse
Prelude.Read, Int -> DeleteSignalingChannelResponse -> ShowS
[DeleteSignalingChannelResponse] -> ShowS
DeleteSignalingChannelResponse -> String
(Int -> DeleteSignalingChannelResponse -> ShowS)
-> (DeleteSignalingChannelResponse -> String)
-> ([DeleteSignalingChannelResponse] -> ShowS)
-> Show DeleteSignalingChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSignalingChannelResponse] -> ShowS
$cshowList :: [DeleteSignalingChannelResponse] -> ShowS
show :: DeleteSignalingChannelResponse -> String
$cshow :: DeleteSignalingChannelResponse -> String
showsPrec :: Int -> DeleteSignalingChannelResponse -> ShowS
$cshowsPrec :: Int -> DeleteSignalingChannelResponse -> ShowS
Prelude.Show, (forall x.
DeleteSignalingChannelResponse
-> Rep DeleteSignalingChannelResponse x)
-> (forall x.
Rep DeleteSignalingChannelResponse x
-> DeleteSignalingChannelResponse)
-> Generic DeleteSignalingChannelResponse
forall x.
Rep DeleteSignalingChannelResponse x
-> DeleteSignalingChannelResponse
forall x.
DeleteSignalingChannelResponse
-> Rep DeleteSignalingChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSignalingChannelResponse x
-> DeleteSignalingChannelResponse
$cfrom :: forall x.
DeleteSignalingChannelResponse
-> Rep DeleteSignalingChannelResponse x
Prelude.Generic)
newDeleteSignalingChannelResponse ::
Prelude.Int ->
DeleteSignalingChannelResponse
newDeleteSignalingChannelResponse :: Int -> DeleteSignalingChannelResponse
newDeleteSignalingChannelResponse Int
pHttpStatus_ =
DeleteSignalingChannelResponse' :: Int -> DeleteSignalingChannelResponse
DeleteSignalingChannelResponse'
{ $sel:httpStatus:DeleteSignalingChannelResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteSignalingChannelResponse_httpStatus :: Lens.Lens' DeleteSignalingChannelResponse Prelude.Int
deleteSignalingChannelResponse_httpStatus :: (Int -> f Int)
-> DeleteSignalingChannelResponse
-> f DeleteSignalingChannelResponse
deleteSignalingChannelResponse_httpStatus = (DeleteSignalingChannelResponse -> Int)
-> (DeleteSignalingChannelResponse
-> Int -> DeleteSignalingChannelResponse)
-> Lens
DeleteSignalingChannelResponse
DeleteSignalingChannelResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSignalingChannelResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSignalingChannelResponse' :: DeleteSignalingChannelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSignalingChannelResponse
s@DeleteSignalingChannelResponse' {} Int
a -> DeleteSignalingChannelResponse
s {$sel:httpStatus:DeleteSignalingChannelResponse' :: Int
httpStatus = Int
a} :: DeleteSignalingChannelResponse)
instance
Prelude.NFData
DeleteSignalingChannelResponse