{-# 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.RedactConversationMessage
(
RedactConversationMessage (..),
newRedactConversationMessage,
redactConversationMessage_accountId,
redactConversationMessage_conversationId,
redactConversationMessage_messageId,
RedactConversationMessageResponse (..),
newRedactConversationMessageResponse,
redactConversationMessageResponse_httpStatus,
)
where
import Amazonka.Chime.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 RedactConversationMessage = RedactConversationMessage'
{
RedactConversationMessage -> Text
accountId :: Prelude.Text,
RedactConversationMessage -> Text
conversationId :: Prelude.Text,
RedactConversationMessage -> Text
messageId :: Prelude.Text
}
deriving (RedactConversationMessage -> RedactConversationMessage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedactConversationMessage -> RedactConversationMessage -> Bool
$c/= :: RedactConversationMessage -> RedactConversationMessage -> Bool
== :: RedactConversationMessage -> RedactConversationMessage -> Bool
$c== :: RedactConversationMessage -> RedactConversationMessage -> Bool
Prelude.Eq, ReadPrec [RedactConversationMessage]
ReadPrec RedactConversationMessage
Int -> ReadS RedactConversationMessage
ReadS [RedactConversationMessage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RedactConversationMessage]
$creadListPrec :: ReadPrec [RedactConversationMessage]
readPrec :: ReadPrec RedactConversationMessage
$creadPrec :: ReadPrec RedactConversationMessage
readList :: ReadS [RedactConversationMessage]
$creadList :: ReadS [RedactConversationMessage]
readsPrec :: Int -> ReadS RedactConversationMessage
$creadsPrec :: Int -> ReadS RedactConversationMessage
Prelude.Read, Int -> RedactConversationMessage -> ShowS
[RedactConversationMessage] -> ShowS
RedactConversationMessage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedactConversationMessage] -> ShowS
$cshowList :: [RedactConversationMessage] -> ShowS
show :: RedactConversationMessage -> String
$cshow :: RedactConversationMessage -> String
showsPrec :: Int -> RedactConversationMessage -> ShowS
$cshowsPrec :: Int -> RedactConversationMessage -> ShowS
Prelude.Show, forall x.
Rep RedactConversationMessage x -> RedactConversationMessage
forall x.
RedactConversationMessage -> Rep RedactConversationMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RedactConversationMessage x -> RedactConversationMessage
$cfrom :: forall x.
RedactConversationMessage -> Rep RedactConversationMessage x
Prelude.Generic)
newRedactConversationMessage ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
RedactConversationMessage
newRedactConversationMessage :: Text -> Text -> Text -> RedactConversationMessage
newRedactConversationMessage
Text
pAccountId_
Text
pConversationId_
Text
pMessageId_ =
RedactConversationMessage'
{ $sel:accountId:RedactConversationMessage' :: Text
accountId = Text
pAccountId_,
$sel:conversationId:RedactConversationMessage' :: Text
conversationId = Text
pConversationId_,
$sel:messageId:RedactConversationMessage' :: Text
messageId = Text
pMessageId_
}
redactConversationMessage_accountId :: Lens.Lens' RedactConversationMessage Prelude.Text
redactConversationMessage_accountId :: Lens' RedactConversationMessage Text
redactConversationMessage_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedactConversationMessage' {Text
accountId :: Text
$sel:accountId:RedactConversationMessage' :: RedactConversationMessage -> Text
accountId} -> Text
accountId) (\s :: RedactConversationMessage
s@RedactConversationMessage' {} Text
a -> RedactConversationMessage
s {$sel:accountId:RedactConversationMessage' :: Text
accountId = Text
a} :: RedactConversationMessage)
redactConversationMessage_conversationId :: Lens.Lens' RedactConversationMessage Prelude.Text
redactConversationMessage_conversationId :: Lens' RedactConversationMessage Text
redactConversationMessage_conversationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedactConversationMessage' {Text
conversationId :: Text
$sel:conversationId:RedactConversationMessage' :: RedactConversationMessage -> Text
conversationId} -> Text
conversationId) (\s :: RedactConversationMessage
s@RedactConversationMessage' {} Text
a -> RedactConversationMessage
s {$sel:conversationId:RedactConversationMessage' :: Text
conversationId = Text
a} :: RedactConversationMessage)
redactConversationMessage_messageId :: Lens.Lens' RedactConversationMessage Prelude.Text
redactConversationMessage_messageId :: Lens' RedactConversationMessage Text
redactConversationMessage_messageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedactConversationMessage' {Text
messageId :: Text
$sel:messageId:RedactConversationMessage' :: RedactConversationMessage -> Text
messageId} -> Text
messageId) (\s :: RedactConversationMessage
s@RedactConversationMessage' {} Text
a -> RedactConversationMessage
s {$sel:messageId:RedactConversationMessage' :: Text
messageId = Text
a} :: RedactConversationMessage)
instance Core.AWSRequest RedactConversationMessage where
type
AWSResponse RedactConversationMessage =
RedactConversationMessageResponse
request :: (Service -> Service)
-> RedactConversationMessage -> Request RedactConversationMessage
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RedactConversationMessage
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RedactConversationMessage)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> RedactConversationMessageResponse
RedactConversationMessageResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable RedactConversationMessage where
hashWithSalt :: Int -> RedactConversationMessage -> Int
hashWithSalt Int
_salt RedactConversationMessage' {Text
messageId :: Text
conversationId :: Text
accountId :: Text
$sel:messageId:RedactConversationMessage' :: RedactConversationMessage -> Text
$sel:conversationId:RedactConversationMessage' :: RedactConversationMessage -> Text
$sel:accountId:RedactConversationMessage' :: RedactConversationMessage -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
conversationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
messageId
instance Prelude.NFData RedactConversationMessage where
rnf :: RedactConversationMessage -> ()
rnf RedactConversationMessage' {Text
messageId :: Text
conversationId :: Text
accountId :: Text
$sel:messageId:RedactConversationMessage' :: RedactConversationMessage -> Text
$sel:conversationId:RedactConversationMessage' :: RedactConversationMessage -> Text
$sel:accountId:RedactConversationMessage' :: RedactConversationMessage -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
conversationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
messageId
instance Data.ToHeaders RedactConversationMessage where
toHeaders :: RedactConversationMessage -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON RedactConversationMessage where
toJSON :: RedactConversationMessage -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath RedactConversationMessage where
toPath :: RedactConversationMessage -> ByteString
toPath RedactConversationMessage' {Text
messageId :: Text
conversationId :: Text
accountId :: Text
$sel:messageId:RedactConversationMessage' :: RedactConversationMessage -> Text
$sel:conversationId:RedactConversationMessage' :: RedactConversationMessage -> Text
$sel:accountId:RedactConversationMessage' :: RedactConversationMessage -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/accounts/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
accountId,
ByteString
"/conversations/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
conversationId,
ByteString
"/messages/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
messageId
]
instance Data.ToQuery RedactConversationMessage where
toQuery :: RedactConversationMessage -> QueryString
toQuery =
forall a b. a -> b -> a
Prelude.const
(forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"operation=redact"])
data RedactConversationMessageResponse = RedactConversationMessageResponse'
{
RedactConversationMessageResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RedactConversationMessageResponse
-> RedactConversationMessageResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedactConversationMessageResponse
-> RedactConversationMessageResponse -> Bool
$c/= :: RedactConversationMessageResponse
-> RedactConversationMessageResponse -> Bool
== :: RedactConversationMessageResponse
-> RedactConversationMessageResponse -> Bool
$c== :: RedactConversationMessageResponse
-> RedactConversationMessageResponse -> Bool
Prelude.Eq, ReadPrec [RedactConversationMessageResponse]
ReadPrec RedactConversationMessageResponse
Int -> ReadS RedactConversationMessageResponse
ReadS [RedactConversationMessageResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RedactConversationMessageResponse]
$creadListPrec :: ReadPrec [RedactConversationMessageResponse]
readPrec :: ReadPrec RedactConversationMessageResponse
$creadPrec :: ReadPrec RedactConversationMessageResponse
readList :: ReadS [RedactConversationMessageResponse]
$creadList :: ReadS [RedactConversationMessageResponse]
readsPrec :: Int -> ReadS RedactConversationMessageResponse
$creadsPrec :: Int -> ReadS RedactConversationMessageResponse
Prelude.Read, Int -> RedactConversationMessageResponse -> ShowS
[RedactConversationMessageResponse] -> ShowS
RedactConversationMessageResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedactConversationMessageResponse] -> ShowS
$cshowList :: [RedactConversationMessageResponse] -> ShowS
show :: RedactConversationMessageResponse -> String
$cshow :: RedactConversationMessageResponse -> String
showsPrec :: Int -> RedactConversationMessageResponse -> ShowS
$cshowsPrec :: Int -> RedactConversationMessageResponse -> ShowS
Prelude.Show, forall x.
Rep RedactConversationMessageResponse x
-> RedactConversationMessageResponse
forall x.
RedactConversationMessageResponse
-> Rep RedactConversationMessageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RedactConversationMessageResponse x
-> RedactConversationMessageResponse
$cfrom :: forall x.
RedactConversationMessageResponse
-> Rep RedactConversationMessageResponse x
Prelude.Generic)
newRedactConversationMessageResponse ::
Prelude.Int ->
RedactConversationMessageResponse
newRedactConversationMessageResponse :: Int -> RedactConversationMessageResponse
newRedactConversationMessageResponse Int
pHttpStatus_ =
RedactConversationMessageResponse'
{ $sel:httpStatus:RedactConversationMessageResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
redactConversationMessageResponse_httpStatus :: Lens.Lens' RedactConversationMessageResponse Prelude.Int
redactConversationMessageResponse_httpStatus :: Lens' RedactConversationMessageResponse Int
redactConversationMessageResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedactConversationMessageResponse' {Int
httpStatus :: Int
$sel:httpStatus:RedactConversationMessageResponse' :: RedactConversationMessageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RedactConversationMessageResponse
s@RedactConversationMessageResponse' {} Int
a -> RedactConversationMessageResponse
s {$sel:httpStatus:RedactConversationMessageResponse' :: Int
httpStatus = Int
a} :: RedactConversationMessageResponse)
instance
Prelude.NFData
RedactConversationMessageResponse
where
rnf :: RedactConversationMessageResponse -> ()
rnf RedactConversationMessageResponse' {Int
httpStatus :: Int
$sel:httpStatus:RedactConversationMessageResponse' :: RedactConversationMessageResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus