{-# 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.DeleteChannelMessage
(
DeleteChannelMessage (..),
newDeleteChannelMessage,
deleteChannelMessage_channelArn,
deleteChannelMessage_messageId,
deleteChannelMessage_chimeBearer,
DeleteChannelMessageResponse (..),
newDeleteChannelMessageResponse,
)
where
import Amazonka.ChimeSDKMessaging.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 DeleteChannelMessage = DeleteChannelMessage'
{
DeleteChannelMessage -> Text
channelArn :: Prelude.Text,
DeleteChannelMessage -> Text
messageId :: Prelude.Text,
DeleteChannelMessage -> Text
chimeBearer :: Prelude.Text
}
deriving (DeleteChannelMessage -> DeleteChannelMessage -> Bool
(DeleteChannelMessage -> DeleteChannelMessage -> Bool)
-> (DeleteChannelMessage -> DeleteChannelMessage -> Bool)
-> Eq DeleteChannelMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChannelMessage -> DeleteChannelMessage -> Bool
$c/= :: DeleteChannelMessage -> DeleteChannelMessage -> Bool
== :: DeleteChannelMessage -> DeleteChannelMessage -> Bool
$c== :: DeleteChannelMessage -> DeleteChannelMessage -> Bool
Prelude.Eq, ReadPrec [DeleteChannelMessage]
ReadPrec DeleteChannelMessage
Int -> ReadS DeleteChannelMessage
ReadS [DeleteChannelMessage]
(Int -> ReadS DeleteChannelMessage)
-> ReadS [DeleteChannelMessage]
-> ReadPrec DeleteChannelMessage
-> ReadPrec [DeleteChannelMessage]
-> Read DeleteChannelMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChannelMessage]
$creadListPrec :: ReadPrec [DeleteChannelMessage]
readPrec :: ReadPrec DeleteChannelMessage
$creadPrec :: ReadPrec DeleteChannelMessage
readList :: ReadS [DeleteChannelMessage]
$creadList :: ReadS [DeleteChannelMessage]
readsPrec :: Int -> ReadS DeleteChannelMessage
$creadsPrec :: Int -> ReadS DeleteChannelMessage
Prelude.Read, Int -> DeleteChannelMessage -> ShowS
[DeleteChannelMessage] -> ShowS
DeleteChannelMessage -> String
(Int -> DeleteChannelMessage -> ShowS)
-> (DeleteChannelMessage -> String)
-> ([DeleteChannelMessage] -> ShowS)
-> Show DeleteChannelMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChannelMessage] -> ShowS
$cshowList :: [DeleteChannelMessage] -> ShowS
show :: DeleteChannelMessage -> String
$cshow :: DeleteChannelMessage -> String
showsPrec :: Int -> DeleteChannelMessage -> ShowS
$cshowsPrec :: Int -> DeleteChannelMessage -> ShowS
Prelude.Show, (forall x. DeleteChannelMessage -> Rep DeleteChannelMessage x)
-> (forall x. Rep DeleteChannelMessage x -> DeleteChannelMessage)
-> Generic DeleteChannelMessage
forall x. Rep DeleteChannelMessage x -> DeleteChannelMessage
forall x. DeleteChannelMessage -> Rep DeleteChannelMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteChannelMessage x -> DeleteChannelMessage
$cfrom :: forall x. DeleteChannelMessage -> Rep DeleteChannelMessage x
Prelude.Generic)
newDeleteChannelMessage ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteChannelMessage
newDeleteChannelMessage :: Text -> Text -> Text -> DeleteChannelMessage
newDeleteChannelMessage
Text
pChannelArn_
Text
pMessageId_
Text
pChimeBearer_ =
DeleteChannelMessage' :: Text -> Text -> Text -> DeleteChannelMessage
DeleteChannelMessage'
{ $sel:channelArn:DeleteChannelMessage' :: Text
channelArn = Text
pChannelArn_,
$sel:messageId:DeleteChannelMessage' :: Text
messageId = Text
pMessageId_,
$sel:chimeBearer:DeleteChannelMessage' :: Text
chimeBearer = Text
pChimeBearer_
}
deleteChannelMessage_channelArn :: Lens.Lens' DeleteChannelMessage Prelude.Text
deleteChannelMessage_channelArn :: (Text -> f Text) -> DeleteChannelMessage -> f DeleteChannelMessage
deleteChannelMessage_channelArn = (DeleteChannelMessage -> Text)
-> (DeleteChannelMessage -> Text -> DeleteChannelMessage)
-> Lens DeleteChannelMessage DeleteChannelMessage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMessage' {Text
channelArn :: Text
$sel:channelArn:DeleteChannelMessage' :: DeleteChannelMessage -> Text
channelArn} -> Text
channelArn) (\s :: DeleteChannelMessage
s@DeleteChannelMessage' {} Text
a -> DeleteChannelMessage
s {$sel:channelArn:DeleteChannelMessage' :: Text
channelArn = Text
a} :: DeleteChannelMessage)
deleteChannelMessage_messageId :: Lens.Lens' DeleteChannelMessage Prelude.Text
deleteChannelMessage_messageId :: (Text -> f Text) -> DeleteChannelMessage -> f DeleteChannelMessage
deleteChannelMessage_messageId = (DeleteChannelMessage -> Text)
-> (DeleteChannelMessage -> Text -> DeleteChannelMessage)
-> Lens DeleteChannelMessage DeleteChannelMessage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMessage' {Text
messageId :: Text
$sel:messageId:DeleteChannelMessage' :: DeleteChannelMessage -> Text
messageId} -> Text
messageId) (\s :: DeleteChannelMessage
s@DeleteChannelMessage' {} Text
a -> DeleteChannelMessage
s {$sel:messageId:DeleteChannelMessage' :: Text
messageId = Text
a} :: DeleteChannelMessage)
deleteChannelMessage_chimeBearer :: Lens.Lens' DeleteChannelMessage Prelude.Text
deleteChannelMessage_chimeBearer :: (Text -> f Text) -> DeleteChannelMessage -> f DeleteChannelMessage
deleteChannelMessage_chimeBearer = (DeleteChannelMessage -> Text)
-> (DeleteChannelMessage -> Text -> DeleteChannelMessage)
-> Lens DeleteChannelMessage DeleteChannelMessage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMessage' {Text
chimeBearer :: Text
$sel:chimeBearer:DeleteChannelMessage' :: DeleteChannelMessage -> Text
chimeBearer} -> Text
chimeBearer) (\s :: DeleteChannelMessage
s@DeleteChannelMessage' {} Text
a -> DeleteChannelMessage
s {$sel:chimeBearer:DeleteChannelMessage' :: Text
chimeBearer = Text
a} :: DeleteChannelMessage)
instance Core.AWSRequest DeleteChannelMessage where
type
AWSResponse DeleteChannelMessage =
DeleteChannelMessageResponse
request :: DeleteChannelMessage -> Request DeleteChannelMessage
request = Service -> DeleteChannelMessage -> Request DeleteChannelMessage
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteChannelMessage
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelMessage)))
response =
AWSResponse DeleteChannelMessage
-> Logger
-> Service
-> Proxy DeleteChannelMessage
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelMessage)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteChannelMessage
DeleteChannelMessageResponse
DeleteChannelMessageResponse'
instance Prelude.Hashable DeleteChannelMessage
instance Prelude.NFData DeleteChannelMessage
instance Core.ToHeaders DeleteChannelMessage where
toHeaders :: DeleteChannelMessage -> [Header]
toHeaders DeleteChannelMessage' {Text
chimeBearer :: Text
messageId :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:messageId:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:channelArn:DeleteChannelMessage' :: DeleteChannelMessage -> Text
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[HeaderName
"x-amz-chime-bearer" HeaderName -> Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Text
chimeBearer]
instance Core.ToPath DeleteChannelMessage where
toPath :: DeleteChannelMessage -> ByteString
toPath DeleteChannelMessage' {Text
chimeBearer :: Text
messageId :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:messageId:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:channelArn:DeleteChannelMessage' :: DeleteChannelMessage -> 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
"/messages/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
messageId
]
instance Core.ToQuery DeleteChannelMessage where
toQuery :: DeleteChannelMessage -> QueryString
toQuery = QueryString -> DeleteChannelMessage -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteChannelMessageResponse = DeleteChannelMessageResponse'
{
}
deriving (DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool
(DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool)
-> (DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool)
-> Eq DeleteChannelMessageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool
$c/= :: DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool
== :: DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool
$c== :: DeleteChannelMessageResponse
-> DeleteChannelMessageResponse -> Bool
Prelude.Eq, ReadPrec [DeleteChannelMessageResponse]
ReadPrec DeleteChannelMessageResponse
Int -> ReadS DeleteChannelMessageResponse
ReadS [DeleteChannelMessageResponse]
(Int -> ReadS DeleteChannelMessageResponse)
-> ReadS [DeleteChannelMessageResponse]
-> ReadPrec DeleteChannelMessageResponse
-> ReadPrec [DeleteChannelMessageResponse]
-> Read DeleteChannelMessageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChannelMessageResponse]
$creadListPrec :: ReadPrec [DeleteChannelMessageResponse]
readPrec :: ReadPrec DeleteChannelMessageResponse
$creadPrec :: ReadPrec DeleteChannelMessageResponse
readList :: ReadS [DeleteChannelMessageResponse]
$creadList :: ReadS [DeleteChannelMessageResponse]
readsPrec :: Int -> ReadS DeleteChannelMessageResponse
$creadsPrec :: Int -> ReadS DeleteChannelMessageResponse
Prelude.Read, Int -> DeleteChannelMessageResponse -> ShowS
[DeleteChannelMessageResponse] -> ShowS
DeleteChannelMessageResponse -> String
(Int -> DeleteChannelMessageResponse -> ShowS)
-> (DeleteChannelMessageResponse -> String)
-> ([DeleteChannelMessageResponse] -> ShowS)
-> Show DeleteChannelMessageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChannelMessageResponse] -> ShowS
$cshowList :: [DeleteChannelMessageResponse] -> ShowS
show :: DeleteChannelMessageResponse -> String
$cshow :: DeleteChannelMessageResponse -> String
showsPrec :: Int -> DeleteChannelMessageResponse -> ShowS
$cshowsPrec :: Int -> DeleteChannelMessageResponse -> ShowS
Prelude.Show, (forall x.
DeleteChannelMessageResponse -> Rep DeleteChannelMessageResponse x)
-> (forall x.
Rep DeleteChannelMessageResponse x -> DeleteChannelMessageResponse)
-> Generic DeleteChannelMessageResponse
forall x.
Rep DeleteChannelMessageResponse x -> DeleteChannelMessageResponse
forall x.
DeleteChannelMessageResponse -> Rep DeleteChannelMessageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteChannelMessageResponse x -> DeleteChannelMessageResponse
$cfrom :: forall x.
DeleteChannelMessageResponse -> Rep DeleteChannelMessageResponse x
Prelude.Generic)
newDeleteChannelMessageResponse ::
DeleteChannelMessageResponse
newDeleteChannelMessageResponse :: DeleteChannelMessageResponse
newDeleteChannelMessageResponse =
DeleteChannelMessageResponse
DeleteChannelMessageResponse'
instance Prelude.NFData DeleteChannelMessageResponse