{-# 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.ChimeSDKMessaging.DeleteChannelModerator
(
DeleteChannelModerator (..),
newDeleteChannelModerator,
deleteChannelModerator_channelArn,
deleteChannelModerator_channelModeratorArn,
deleteChannelModerator_chimeBearer,
DeleteChannelModeratorResponse (..),
newDeleteChannelModeratorResponse,
)
where
import Amazonka.ChimeSDKMessaging.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteChannelModerator = DeleteChannelModerator'
{
DeleteChannelModerator -> Text
channelArn :: Prelude.Text,
DeleteChannelModerator -> Text
channelModeratorArn :: Prelude.Text,
DeleteChannelModerator -> Text
chimeBearer :: Prelude.Text
}
deriving (DeleteChannelModerator -> DeleteChannelModerator -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChannelModerator -> DeleteChannelModerator -> Bool
$c/= :: DeleteChannelModerator -> DeleteChannelModerator -> Bool
== :: DeleteChannelModerator -> DeleteChannelModerator -> Bool
$c== :: DeleteChannelModerator -> DeleteChannelModerator -> Bool
Prelude.Eq, ReadPrec [DeleteChannelModerator]
ReadPrec DeleteChannelModerator
Int -> ReadS DeleteChannelModerator
ReadS [DeleteChannelModerator]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChannelModerator]
$creadListPrec :: ReadPrec [DeleteChannelModerator]
readPrec :: ReadPrec DeleteChannelModerator
$creadPrec :: ReadPrec DeleteChannelModerator
readList :: ReadS [DeleteChannelModerator]
$creadList :: ReadS [DeleteChannelModerator]
readsPrec :: Int -> ReadS DeleteChannelModerator
$creadsPrec :: Int -> ReadS DeleteChannelModerator
Prelude.Read, Int -> DeleteChannelModerator -> ShowS
[DeleteChannelModerator] -> ShowS
DeleteChannelModerator -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChannelModerator] -> ShowS
$cshowList :: [DeleteChannelModerator] -> ShowS
show :: DeleteChannelModerator -> String
$cshow :: DeleteChannelModerator -> String
showsPrec :: Int -> DeleteChannelModerator -> ShowS
$cshowsPrec :: Int -> DeleteChannelModerator -> ShowS
Prelude.Show, forall x. Rep DeleteChannelModerator x -> DeleteChannelModerator
forall x. DeleteChannelModerator -> Rep DeleteChannelModerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteChannelModerator x -> DeleteChannelModerator
$cfrom :: forall x. DeleteChannelModerator -> Rep DeleteChannelModerator x
Prelude.Generic)
newDeleteChannelModerator ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteChannelModerator
newDeleteChannelModerator :: Text -> Text -> Text -> DeleteChannelModerator
newDeleteChannelModerator
Text
pChannelArn_
Text
pChannelModeratorArn_
Text
pChimeBearer_ =
DeleteChannelModerator'
{ $sel:channelArn:DeleteChannelModerator' :: Text
channelArn = Text
pChannelArn_,
$sel:channelModeratorArn:DeleteChannelModerator' :: Text
channelModeratorArn = Text
pChannelModeratorArn_,
$sel:chimeBearer:DeleteChannelModerator' :: Text
chimeBearer = Text
pChimeBearer_
}
deleteChannelModerator_channelArn :: Lens.Lens' DeleteChannelModerator Prelude.Text
deleteChannelModerator_channelArn :: Lens' DeleteChannelModerator Text
deleteChannelModerator_channelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelModerator' {Text
channelArn :: Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
channelArn} -> Text
channelArn) (\s :: DeleteChannelModerator
s@DeleteChannelModerator' {} Text
a -> DeleteChannelModerator
s {$sel:channelArn:DeleteChannelModerator' :: Text
channelArn = Text
a} :: DeleteChannelModerator)
deleteChannelModerator_channelModeratorArn :: Lens.Lens' DeleteChannelModerator Prelude.Text
deleteChannelModerator_channelModeratorArn :: Lens' DeleteChannelModerator Text
deleteChannelModerator_channelModeratorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelModerator' {Text
channelModeratorArn :: Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
channelModeratorArn} -> Text
channelModeratorArn) (\s :: DeleteChannelModerator
s@DeleteChannelModerator' {} Text
a -> DeleteChannelModerator
s {$sel:channelModeratorArn:DeleteChannelModerator' :: Text
channelModeratorArn = Text
a} :: DeleteChannelModerator)
deleteChannelModerator_chimeBearer :: Lens.Lens' DeleteChannelModerator Prelude.Text
deleteChannelModerator_chimeBearer :: Lens' DeleteChannelModerator Text
deleteChannelModerator_chimeBearer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelModerator' {Text
chimeBearer :: Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Text
chimeBearer} -> Text
chimeBearer) (\s :: DeleteChannelModerator
s@DeleteChannelModerator' {} Text
a -> DeleteChannelModerator
s {$sel:chimeBearer:DeleteChannelModerator' :: Text
chimeBearer = Text
a} :: DeleteChannelModerator)
instance Core.AWSRequest DeleteChannelModerator where
type
AWSResponse DeleteChannelModerator =
DeleteChannelModeratorResponse
request :: (Service -> Service)
-> DeleteChannelModerator -> Request DeleteChannelModerator
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteChannelModerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelModerator)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DeleteChannelModeratorResponse
DeleteChannelModeratorResponse'
instance Prelude.Hashable DeleteChannelModerator where
hashWithSalt :: Int -> DeleteChannelModerator -> Int
hashWithSalt Int
_salt DeleteChannelModerator' {Text
chimeBearer :: Text
channelModeratorArn :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelModeratorArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
chimeBearer
instance Prelude.NFData DeleteChannelModerator where
rnf :: DeleteChannelModerator -> ()
rnf DeleteChannelModerator' {Text
chimeBearer :: Text
channelModeratorArn :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
channelArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
channelModeratorArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
chimeBearer
instance Data.ToHeaders DeleteChannelModerator where
toHeaders :: DeleteChannelModerator -> [Header]
toHeaders DeleteChannelModerator' {Text
chimeBearer :: Text
channelModeratorArn :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[HeaderName
"x-amz-chime-bearer" forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# Text
chimeBearer]
instance Data.ToPath DeleteChannelModerator where
toPath :: DeleteChannelModerator -> ByteString
toPath DeleteChannelModerator' {Text
chimeBearer :: Text
channelModeratorArn :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/channels/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
channelArn,
ByteString
"/moderators/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
channelModeratorArn
]
instance Data.ToQuery DeleteChannelModerator where
toQuery :: DeleteChannelModerator -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteChannelModeratorResponse = DeleteChannelModeratorResponse'
{
}
deriving (DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool
$c/= :: DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool
== :: DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool
$c== :: DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool
Prelude.Eq, ReadPrec [DeleteChannelModeratorResponse]
ReadPrec DeleteChannelModeratorResponse
Int -> ReadS DeleteChannelModeratorResponse
ReadS [DeleteChannelModeratorResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChannelModeratorResponse]
$creadListPrec :: ReadPrec [DeleteChannelModeratorResponse]
readPrec :: ReadPrec DeleteChannelModeratorResponse
$creadPrec :: ReadPrec DeleteChannelModeratorResponse
readList :: ReadS [DeleteChannelModeratorResponse]
$creadList :: ReadS [DeleteChannelModeratorResponse]
readsPrec :: Int -> ReadS DeleteChannelModeratorResponse
$creadsPrec :: Int -> ReadS DeleteChannelModeratorResponse
Prelude.Read, Int -> DeleteChannelModeratorResponse -> ShowS
[DeleteChannelModeratorResponse] -> ShowS
DeleteChannelModeratorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChannelModeratorResponse] -> ShowS
$cshowList :: [DeleteChannelModeratorResponse] -> ShowS
show :: DeleteChannelModeratorResponse -> String
$cshow :: DeleteChannelModeratorResponse -> String
showsPrec :: Int -> DeleteChannelModeratorResponse -> ShowS
$cshowsPrec :: Int -> DeleteChannelModeratorResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteChannelModeratorResponse x
-> DeleteChannelModeratorResponse
forall x.
DeleteChannelModeratorResponse
-> Rep DeleteChannelModeratorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteChannelModeratorResponse x
-> DeleteChannelModeratorResponse
$cfrom :: forall x.
DeleteChannelModeratorResponse
-> Rep DeleteChannelModeratorResponse x
Prelude.Generic)
newDeleteChannelModeratorResponse ::
DeleteChannelModeratorResponse
newDeleteChannelModeratorResponse :: DeleteChannelModeratorResponse
newDeleteChannelModeratorResponse =
DeleteChannelModeratorResponse
DeleteChannelModeratorResponse'
instance
Prelude.NFData
DeleteChannelModeratorResponse
where
rnf :: DeleteChannelModeratorResponse -> ()
rnf DeleteChannelModeratorResponse
_ = ()