{-# 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.DeleteChannelMessage
(
DeleteChannelMessage (..),
newDeleteChannelMessage,
deleteChannelMessage_chimeBearer,
deleteChannelMessage_channelArn,
deleteChannelMessage_messageId,
DeleteChannelMessageResponse (..),
newDeleteChannelMessageResponse,
)
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 DeleteChannelMessage = DeleteChannelMessage'
{
DeleteChannelMessage -> Maybe Text
chimeBearer :: Prelude.Maybe Prelude.Text,
DeleteChannelMessage -> Text
channelArn :: Prelude.Text,
DeleteChannelMessage -> Text
messageId :: 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 ->
DeleteChannelMessage
newDeleteChannelMessage :: Text -> Text -> DeleteChannelMessage
newDeleteChannelMessage Text
pChannelArn_ Text
pMessageId_ =
DeleteChannelMessage' :: Maybe Text -> Text -> Text -> DeleteChannelMessage
DeleteChannelMessage'
{ $sel:chimeBearer:DeleteChannelMessage' :: Maybe Text
chimeBearer =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelArn:DeleteChannelMessage' :: Text
channelArn = Text
pChannelArn_,
$sel:messageId:DeleteChannelMessage' :: Text
messageId = Text
pMessageId_
}
deleteChannelMessage_chimeBearer :: Lens.Lens' DeleteChannelMessage (Prelude.Maybe Prelude.Text)
deleteChannelMessage_chimeBearer :: (Maybe Text -> f (Maybe Text))
-> DeleteChannelMessage -> f DeleteChannelMessage
deleteChannelMessage_chimeBearer = (DeleteChannelMessage -> Maybe Text)
-> (DeleteChannelMessage -> Maybe Text -> DeleteChannelMessage)
-> Lens
DeleteChannelMessage DeleteChannelMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMessage' {Maybe Text
chimeBearer :: Maybe Text
$sel:chimeBearer:DeleteChannelMessage' :: DeleteChannelMessage -> Maybe Text
chimeBearer} -> Maybe Text
chimeBearer) (\s :: DeleteChannelMessage
s@DeleteChannelMessage' {} Maybe Text
a -> DeleteChannelMessage
s {$sel:chimeBearer:DeleteChannelMessage' :: Maybe Text
chimeBearer = Maybe Text
a} :: DeleteChannelMessage)
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)
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' {Maybe Text
Text
messageId :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:messageId:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:channelArn:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:chimeBearer:DeleteChannelMessage' :: DeleteChannelMessage -> 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 DeleteChannelMessage where
toPath :: DeleteChannelMessage -> ByteString
toPath DeleteChannelMessage' {Maybe Text
Text
messageId :: Text
channelArn :: Text
chimeBearer :: Maybe Text
$sel:messageId:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:channelArn:DeleteChannelMessage' :: DeleteChannelMessage -> Text
$sel:chimeBearer:DeleteChannelMessage' :: DeleteChannelMessage -> 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
"/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