{-# 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.Chime.DeleteChannelModerator
(
DeleteChannelModerator (..),
newDeleteChannelModerator,
deleteChannelModerator_chimeBearer,
deleteChannelModerator_channelArn,
deleteChannelModerator_channelModeratorArn,
DeleteChannelModeratorResponse (..),
newDeleteChannelModeratorResponse,
)
where
import Amazonka.Chime.Types
import qualified Amazonka.Core as Core
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 DeleteChannelModerator = DeleteChannelModerator'
{
DeleteChannelModerator -> Maybe Text
chimeBearer :: Prelude.Maybe Prelude.Text,
DeleteChannelModerator -> Text
channelArn :: Prelude.Text,
DeleteChannelModerator -> Text
channelModeratorArn :: Prelude.Text
}
deriving (DeleteChannelModerator -> DeleteChannelModerator -> Bool
(DeleteChannelModerator -> DeleteChannelModerator -> Bool)
-> (DeleteChannelModerator -> DeleteChannelModerator -> Bool)
-> Eq DeleteChannelModerator
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]
(Int -> ReadS DeleteChannelModerator)
-> ReadS [DeleteChannelModerator]
-> ReadPrec DeleteChannelModerator
-> ReadPrec [DeleteChannelModerator]
-> Read 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
(Int -> DeleteChannelModerator -> ShowS)
-> (DeleteChannelModerator -> String)
-> ([DeleteChannelModerator] -> ShowS)
-> Show DeleteChannelModerator
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. DeleteChannelModerator -> Rep DeleteChannelModerator x)
-> (forall x.
Rep DeleteChannelModerator x -> DeleteChannelModerator)
-> Generic DeleteChannelModerator
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 ->
DeleteChannelModerator
newDeleteChannelModerator :: Text -> Text -> DeleteChannelModerator
newDeleteChannelModerator
Text
pChannelArn_
Text
pChannelModeratorArn_ =
DeleteChannelModerator' :: Maybe Text -> Text -> Text -> DeleteChannelModerator
DeleteChannelModerator'
{ $sel:chimeBearer:DeleteChannelModerator' :: Maybe Text
chimeBearer =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelArn:DeleteChannelModerator' :: Text
channelArn = Text
pChannelArn_,
$sel:channelModeratorArn:DeleteChannelModerator' :: Text
channelModeratorArn = Text
pChannelModeratorArn_
}
deleteChannelModerator_chimeBearer :: Lens.Lens' DeleteChannelModerator (Prelude.Maybe Prelude.Text)
deleteChannelModerator_chimeBearer :: (Maybe Text -> f (Maybe Text))
-> DeleteChannelModerator -> f DeleteChannelModerator
deleteChannelModerator_chimeBearer = (DeleteChannelModerator -> Maybe Text)
-> (DeleteChannelModerator -> Maybe Text -> DeleteChannelModerator)
-> Lens
DeleteChannelModerator
DeleteChannelModerator
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelModerator' {Maybe Text
chimeBearer :: Maybe Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Maybe Text
chimeBearer} -> Maybe Text
chimeBearer) (\s :: DeleteChannelModerator
s@DeleteChannelModerator' {} Maybe Text
a -> DeleteChannelModerator
s {$sel:chimeBearer:DeleteChannelModerator' :: Maybe Text
chimeBearer = Maybe Text
a} :: DeleteChannelModerator)
deleteChannelModerator_channelArn :: Lens.Lens' DeleteChannelModerator Prelude.Text
deleteChannelModerator_channelArn :: (Text -> f Text)
-> DeleteChannelModerator -> f DeleteChannelModerator
deleteChannelModerator_channelArn = (DeleteChannelModerator -> Text)
-> (DeleteChannelModerator -> Text -> DeleteChannelModerator)
-> Lens DeleteChannelModerator DeleteChannelModerator Text Text
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 :: (Text -> f Text)
-> DeleteChannelModerator -> f DeleteChannelModerator
deleteChannelModerator_channelModeratorArn = (DeleteChannelModerator -> Text)
-> (DeleteChannelModerator -> Text -> DeleteChannelModerator)
-> Lens DeleteChannelModerator DeleteChannelModerator Text Text
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)
instance Core.AWSRequest DeleteChannelModerator where
type
AWSResponse DeleteChannelModerator =
DeleteChannelModeratorResponse
request :: DeleteChannelModerator -> Request DeleteChannelModerator
request = Service -> DeleteChannelModerator -> Request DeleteChannelModerator
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteChannelModerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelModerator)))
response =
AWSResponse DeleteChannelModerator
-> Logger
-> Service
-> Proxy DeleteChannelModerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelModerator)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteChannelModerator
DeleteChannelModeratorResponse
DeleteChannelModeratorResponse'
instance Prelude.Hashable DeleteChannelModerator
instance Prelude.NFData DeleteChannelModerator
instance Core.ToHeaders DeleteChannelModerator where
toHeaders :: DeleteChannelModerator -> [Header]
toHeaders DeleteChannelModerator' {Maybe Text
Text
channelModeratorArn :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Maybe Text
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[HeaderName
"x-amz-chime-bearer" HeaderName -> Maybe Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Text
chimeBearer]
instance Core.ToPath DeleteChannelModerator where
toPath :: DeleteChannelModerator -> ByteString
toPath DeleteChannelModerator' {Maybe Text
Text
channelModeratorArn :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:channelModeratorArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:channelArn:DeleteChannelModerator' :: DeleteChannelModerator -> Text
$sel:chimeBearer:DeleteChannelModerator' :: DeleteChannelModerator -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/channels/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelArn,
ByteString
"/moderators/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelModeratorArn
]
instance Core.ToQuery DeleteChannelModerator where
toQuery :: DeleteChannelModerator -> QueryString
toQuery = QueryString -> DeleteChannelModerator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteChannelModeratorResponse = DeleteChannelModeratorResponse'
{
}
deriving (DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool
(DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool)
-> (DeleteChannelModeratorResponse
-> DeleteChannelModeratorResponse -> Bool)
-> Eq DeleteChannelModeratorResponse
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]
(Int -> ReadS DeleteChannelModeratorResponse)
-> ReadS [DeleteChannelModeratorResponse]
-> ReadPrec DeleteChannelModeratorResponse
-> ReadPrec [DeleteChannelModeratorResponse]
-> Read 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
(Int -> DeleteChannelModeratorResponse -> ShowS)
-> (DeleteChannelModeratorResponse -> String)
-> ([DeleteChannelModeratorResponse] -> ShowS)
-> Show DeleteChannelModeratorResponse
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.
DeleteChannelModeratorResponse
-> Rep DeleteChannelModeratorResponse x)
-> (forall x.
Rep DeleteChannelModeratorResponse x
-> DeleteChannelModeratorResponse)
-> Generic DeleteChannelModeratorResponse
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