{-# 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.SQS.SendMessage
(
SendMessage (..),
newSendMessage,
sendMessage_messageAttributes,
sendMessage_delaySeconds,
sendMessage_messageSystemAttributes,
sendMessage_messageDeduplicationId,
sendMessage_messageGroupId,
sendMessage_queueUrl,
sendMessage_messageBody,
SendMessageResponse (..),
newSendMessageResponse,
sendMessageResponse_sequenceNumber,
sendMessageResponse_mD5OfMessageSystemAttributes,
sendMessageResponse_messageId,
sendMessageResponse_mD5OfMessageBody,
sendMessageResponse_mD5OfMessageAttributes,
sendMessageResponse_httpStatus,
)
where
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
import Amazonka.SQS.Types
data SendMessage = SendMessage'
{
SendMessage -> Maybe (HashMap Text MessageAttributeValue)
messageAttributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text MessageAttributeValue),
SendMessage -> Maybe Int
delaySeconds :: Prelude.Maybe Prelude.Int,
SendMessage
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes :: Prelude.Maybe (Prelude.HashMap MessageSystemAttributeNameForSends MessageSystemAttributeValue),
SendMessage -> Maybe Text
messageDeduplicationId :: Prelude.Maybe Prelude.Text,
SendMessage -> Maybe Text
messageGroupId :: Prelude.Maybe Prelude.Text,
SendMessage -> Text
queueUrl :: Prelude.Text,
SendMessage -> Text
messageBody :: Prelude.Text
}
deriving (SendMessage -> SendMessage -> Bool
(SendMessage -> SendMessage -> Bool)
-> (SendMessage -> SendMessage -> Bool) -> Eq SendMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendMessage -> SendMessage -> Bool
$c/= :: SendMessage -> SendMessage -> Bool
== :: SendMessage -> SendMessage -> Bool
$c== :: SendMessage -> SendMessage -> Bool
Prelude.Eq, ReadPrec [SendMessage]
ReadPrec SendMessage
Int -> ReadS SendMessage
ReadS [SendMessage]
(Int -> ReadS SendMessage)
-> ReadS [SendMessage]
-> ReadPrec SendMessage
-> ReadPrec [SendMessage]
-> Read SendMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendMessage]
$creadListPrec :: ReadPrec [SendMessage]
readPrec :: ReadPrec SendMessage
$creadPrec :: ReadPrec SendMessage
readList :: ReadS [SendMessage]
$creadList :: ReadS [SendMessage]
readsPrec :: Int -> ReadS SendMessage
$creadsPrec :: Int -> ReadS SendMessage
Prelude.Read, Int -> SendMessage -> ShowS
[SendMessage] -> ShowS
SendMessage -> String
(Int -> SendMessage -> ShowS)
-> (SendMessage -> String)
-> ([SendMessage] -> ShowS)
-> Show SendMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendMessage] -> ShowS
$cshowList :: [SendMessage] -> ShowS
show :: SendMessage -> String
$cshow :: SendMessage -> String
showsPrec :: Int -> SendMessage -> ShowS
$cshowsPrec :: Int -> SendMessage -> ShowS
Prelude.Show, (forall x. SendMessage -> Rep SendMessage x)
-> (forall x. Rep SendMessage x -> SendMessage)
-> Generic SendMessage
forall x. Rep SendMessage x -> SendMessage
forall x. SendMessage -> Rep SendMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendMessage x -> SendMessage
$cfrom :: forall x. SendMessage -> Rep SendMessage x
Prelude.Generic)
newSendMessage ::
Prelude.Text ->
Prelude.Text ->
SendMessage
newSendMessage :: Text -> Text -> SendMessage
newSendMessage Text
pQueueUrl_ Text
pMessageBody_ =
SendMessage' :: Maybe (HashMap Text MessageAttributeValue)
-> Maybe Int
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> SendMessage
SendMessage'
{ $sel:messageAttributes:SendMessage' :: Maybe (HashMap Text MessageAttributeValue)
messageAttributes = Maybe (HashMap Text MessageAttributeValue)
forall a. Maybe a
Prelude.Nothing,
$sel:delaySeconds:SendMessage' :: Maybe Int
delaySeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:messageSystemAttributes:SendMessage' :: Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes = Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
forall a. Maybe a
Prelude.Nothing,
$sel:messageDeduplicationId:SendMessage' :: Maybe Text
messageDeduplicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:messageGroupId:SendMessage' :: Maybe Text
messageGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:queueUrl:SendMessage' :: Text
queueUrl = Text
pQueueUrl_,
$sel:messageBody:SendMessage' :: Text
messageBody = Text
pMessageBody_
}
sendMessage_messageAttributes :: Lens.Lens' SendMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text MessageAttributeValue))
sendMessage_messageAttributes :: (Maybe (HashMap Text MessageAttributeValue)
-> f (Maybe (HashMap Text MessageAttributeValue)))
-> SendMessage -> f SendMessage
sendMessage_messageAttributes = (SendMessage -> Maybe (HashMap Text MessageAttributeValue))
-> (SendMessage
-> Maybe (HashMap Text MessageAttributeValue) -> SendMessage)
-> Lens
SendMessage
SendMessage
(Maybe (HashMap Text MessageAttributeValue))
(Maybe (HashMap Text MessageAttributeValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Maybe (HashMap Text MessageAttributeValue)
messageAttributes :: Maybe (HashMap Text MessageAttributeValue)
$sel:messageAttributes:SendMessage' :: SendMessage -> Maybe (HashMap Text MessageAttributeValue)
messageAttributes} -> Maybe (HashMap Text MessageAttributeValue)
messageAttributes) (\s :: SendMessage
s@SendMessage' {} Maybe (HashMap Text MessageAttributeValue)
a -> SendMessage
s {$sel:messageAttributes:SendMessage' :: Maybe (HashMap Text MessageAttributeValue)
messageAttributes = Maybe (HashMap Text MessageAttributeValue)
a} :: SendMessage) ((Maybe (HashMap Text MessageAttributeValue)
-> f (Maybe (HashMap Text MessageAttributeValue)))
-> SendMessage -> f SendMessage)
-> ((Maybe (HashMap Text MessageAttributeValue)
-> f (Maybe (HashMap Text MessageAttributeValue)))
-> Maybe (HashMap Text MessageAttributeValue)
-> f (Maybe (HashMap Text MessageAttributeValue)))
-> (Maybe (HashMap Text MessageAttributeValue)
-> f (Maybe (HashMap Text MessageAttributeValue)))
-> SendMessage
-> f SendMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text MessageAttributeValue)
(HashMap Text MessageAttributeValue)
(HashMap Text MessageAttributeValue)
(HashMap Text MessageAttributeValue)
-> Iso
(Maybe (HashMap Text MessageAttributeValue))
(Maybe (HashMap Text MessageAttributeValue))
(Maybe (HashMap Text MessageAttributeValue))
(Maybe (HashMap Text MessageAttributeValue))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text MessageAttributeValue)
(HashMap Text MessageAttributeValue)
(HashMap Text MessageAttributeValue)
(HashMap Text MessageAttributeValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendMessage_delaySeconds :: Lens.Lens' SendMessage (Prelude.Maybe Prelude.Int)
sendMessage_delaySeconds :: (Maybe Int -> f (Maybe Int)) -> SendMessage -> f SendMessage
sendMessage_delaySeconds = (SendMessage -> Maybe Int)
-> (SendMessage -> Maybe Int -> SendMessage)
-> Lens SendMessage SendMessage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Maybe Int
delaySeconds :: Maybe Int
$sel:delaySeconds:SendMessage' :: SendMessage -> Maybe Int
delaySeconds} -> Maybe Int
delaySeconds) (\s :: SendMessage
s@SendMessage' {} Maybe Int
a -> SendMessage
s {$sel:delaySeconds:SendMessage' :: Maybe Int
delaySeconds = Maybe Int
a} :: SendMessage)
sendMessage_messageSystemAttributes :: Lens.Lens' SendMessage (Prelude.Maybe (Prelude.HashMap MessageSystemAttributeNameForSends MessageSystemAttributeValue))
sendMessage_messageSystemAttributes :: (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> f (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)))
-> SendMessage -> f SendMessage
sendMessage_messageSystemAttributes = (SendMessage
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
-> (SendMessage
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> SendMessage)
-> Lens
SendMessage
SendMessage
(Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
(Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes :: Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
$sel:messageSystemAttributes:SendMessage' :: SendMessage
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes} -> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes) (\s :: SendMessage
s@SendMessage' {} Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
a -> SendMessage
s {$sel:messageSystemAttributes:SendMessage' :: Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes = Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
a} :: SendMessage) ((Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> f (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)))
-> SendMessage -> f SendMessage)
-> ((Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> f (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)))
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> f (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)))
-> (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> f (Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)))
-> SendMessage
-> f SendMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> Iso
(Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
(Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
(Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
(Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendMessage_messageDeduplicationId :: Lens.Lens' SendMessage (Prelude.Maybe Prelude.Text)
sendMessage_messageDeduplicationId :: (Maybe Text -> f (Maybe Text)) -> SendMessage -> f SendMessage
sendMessage_messageDeduplicationId = (SendMessage -> Maybe Text)
-> (SendMessage -> Maybe Text -> SendMessage)
-> Lens SendMessage SendMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Maybe Text
messageDeduplicationId :: Maybe Text
$sel:messageDeduplicationId:SendMessage' :: SendMessage -> Maybe Text
messageDeduplicationId} -> Maybe Text
messageDeduplicationId) (\s :: SendMessage
s@SendMessage' {} Maybe Text
a -> SendMessage
s {$sel:messageDeduplicationId:SendMessage' :: Maybe Text
messageDeduplicationId = Maybe Text
a} :: SendMessage)
sendMessage_messageGroupId :: Lens.Lens' SendMessage (Prelude.Maybe Prelude.Text)
sendMessage_messageGroupId :: (Maybe Text -> f (Maybe Text)) -> SendMessage -> f SendMessage
sendMessage_messageGroupId = (SendMessage -> Maybe Text)
-> (SendMessage -> Maybe Text -> SendMessage)
-> Lens SendMessage SendMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Maybe Text
messageGroupId :: Maybe Text
$sel:messageGroupId:SendMessage' :: SendMessage -> Maybe Text
messageGroupId} -> Maybe Text
messageGroupId) (\s :: SendMessage
s@SendMessage' {} Maybe Text
a -> SendMessage
s {$sel:messageGroupId:SendMessage' :: Maybe Text
messageGroupId = Maybe Text
a} :: SendMessage)
sendMessage_queueUrl :: Lens.Lens' SendMessage Prelude.Text
sendMessage_queueUrl :: (Text -> f Text) -> SendMessage -> f SendMessage
sendMessage_queueUrl = (SendMessage -> Text)
-> (SendMessage -> Text -> SendMessage)
-> Lens SendMessage SendMessage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Text
queueUrl :: Text
$sel:queueUrl:SendMessage' :: SendMessage -> Text
queueUrl} -> Text
queueUrl) (\s :: SendMessage
s@SendMessage' {} Text
a -> SendMessage
s {$sel:queueUrl:SendMessage' :: Text
queueUrl = Text
a} :: SendMessage)
sendMessage_messageBody :: Lens.Lens' SendMessage Prelude.Text
sendMessage_messageBody :: (Text -> f Text) -> SendMessage -> f SendMessage
sendMessage_messageBody = (SendMessage -> Text)
-> (SendMessage -> Text -> SendMessage)
-> Lens SendMessage SendMessage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessage' {Text
messageBody :: Text
$sel:messageBody:SendMessage' :: SendMessage -> Text
messageBody} -> Text
messageBody) (\s :: SendMessage
s@SendMessage' {} Text
a -> SendMessage
s {$sel:messageBody:SendMessage' :: Text
messageBody = Text
a} :: SendMessage)
instance Core.AWSRequest SendMessage where
type AWSResponse SendMessage = SendMessageResponse
request :: SendMessage -> Request SendMessage
request = Service -> SendMessage -> Request SendMessage
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SendMessage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendMessage)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SendMessage))
-> Logger
-> Service
-> Proxy SendMessage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendMessage)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SendMessageResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> SendMessageResponse
SendMessageResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> SendMessageResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> SendMessageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SequenceNumber")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> SendMessageResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> SendMessageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MD5OfMessageSystemAttributes")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> SendMessageResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> Int -> SendMessageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MessageId")
Either
String (Maybe Text -> Maybe Text -> Int -> SendMessageResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> SendMessageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MD5OfMessageBody")
Either String (Maybe Text -> Int -> SendMessageResponse)
-> Either String (Maybe Text)
-> Either String (Int -> SendMessageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MD5OfMessageAttributes")
Either String (Int -> SendMessageResponse)
-> Either String Int -> Either String SendMessageResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable SendMessage
instance Prelude.NFData SendMessage
instance Core.ToHeaders SendMessage where
toHeaders :: SendMessage -> ResponseHeaders
toHeaders = ResponseHeaders -> SendMessage -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SendMessage where
toPath :: SendMessage -> ByteString
toPath = ByteString -> SendMessage -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SendMessage where
toQuery :: SendMessage -> QueryString
toQuery SendMessage' {Maybe Int
Maybe Text
Maybe (HashMap Text MessageAttributeValue)
Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
Text
messageBody :: Text
queueUrl :: Text
messageGroupId :: Maybe Text
messageDeduplicationId :: Maybe Text
messageSystemAttributes :: Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
delaySeconds :: Maybe Int
messageAttributes :: Maybe (HashMap Text MessageAttributeValue)
$sel:messageBody:SendMessage' :: SendMessage -> Text
$sel:queueUrl:SendMessage' :: SendMessage -> Text
$sel:messageGroupId:SendMessage' :: SendMessage -> Maybe Text
$sel:messageDeduplicationId:SendMessage' :: SendMessage -> Maybe Text
$sel:messageSystemAttributes:SendMessage' :: SendMessage
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
$sel:delaySeconds:SendMessage' :: SendMessage -> Maybe Int
$sel:messageAttributes:SendMessage' :: SendMessage -> Maybe (HashMap Text MessageAttributeValue)
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"SendMessage" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-11-05" :: Prelude.ByteString),
Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString
-> ByteString
-> ByteString
-> HashMap Text MessageAttributeValue
-> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap ByteString
"MessageAttribute" ByteString
"Name" ByteString
"Value"
(HashMap Text MessageAttributeValue -> QueryString)
-> Maybe (HashMap Text MessageAttributeValue) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text MessageAttributeValue)
messageAttributes
),
ByteString
"DelaySeconds" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
delaySeconds,
Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString
-> ByteString
-> ByteString
-> HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue
-> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap
ByteString
"MessageSystemAttribute"
ByteString
"Name"
ByteString
"Value"
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue
-> QueryString)
-> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
-> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe
(HashMap
MessageSystemAttributeNameForSends MessageSystemAttributeValue)
messageSystemAttributes
),
ByteString
"MessageDeduplicationId"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
messageDeduplicationId,
ByteString
"MessageGroupId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
messageGroupId,
ByteString
"QueueUrl" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
queueUrl,
ByteString
"MessageBody" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
messageBody
]
data SendMessageResponse = SendMessageResponse'
{
SendMessageResponse -> Maybe Text
sequenceNumber :: Prelude.Maybe Prelude.Text,
SendMessageResponse -> Maybe Text
mD5OfMessageSystemAttributes :: Prelude.Maybe Prelude.Text,
SendMessageResponse -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text,
SendMessageResponse -> Maybe Text
mD5OfMessageBody :: Prelude.Maybe Prelude.Text,
SendMessageResponse -> Maybe Text
mD5OfMessageAttributes :: Prelude.Maybe Prelude.Text,
SendMessageResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SendMessageResponse -> SendMessageResponse -> Bool
(SendMessageResponse -> SendMessageResponse -> Bool)
-> (SendMessageResponse -> SendMessageResponse -> Bool)
-> Eq SendMessageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendMessageResponse -> SendMessageResponse -> Bool
$c/= :: SendMessageResponse -> SendMessageResponse -> Bool
== :: SendMessageResponse -> SendMessageResponse -> Bool
$c== :: SendMessageResponse -> SendMessageResponse -> Bool
Prelude.Eq, ReadPrec [SendMessageResponse]
ReadPrec SendMessageResponse
Int -> ReadS SendMessageResponse
ReadS [SendMessageResponse]
(Int -> ReadS SendMessageResponse)
-> ReadS [SendMessageResponse]
-> ReadPrec SendMessageResponse
-> ReadPrec [SendMessageResponse]
-> Read SendMessageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendMessageResponse]
$creadListPrec :: ReadPrec [SendMessageResponse]
readPrec :: ReadPrec SendMessageResponse
$creadPrec :: ReadPrec SendMessageResponse
readList :: ReadS [SendMessageResponse]
$creadList :: ReadS [SendMessageResponse]
readsPrec :: Int -> ReadS SendMessageResponse
$creadsPrec :: Int -> ReadS SendMessageResponse
Prelude.Read, Int -> SendMessageResponse -> ShowS
[SendMessageResponse] -> ShowS
SendMessageResponse -> String
(Int -> SendMessageResponse -> ShowS)
-> (SendMessageResponse -> String)
-> ([SendMessageResponse] -> ShowS)
-> Show SendMessageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendMessageResponse] -> ShowS
$cshowList :: [SendMessageResponse] -> ShowS
show :: SendMessageResponse -> String
$cshow :: SendMessageResponse -> String
showsPrec :: Int -> SendMessageResponse -> ShowS
$cshowsPrec :: Int -> SendMessageResponse -> ShowS
Prelude.Show, (forall x. SendMessageResponse -> Rep SendMessageResponse x)
-> (forall x. Rep SendMessageResponse x -> SendMessageResponse)
-> Generic SendMessageResponse
forall x. Rep SendMessageResponse x -> SendMessageResponse
forall x. SendMessageResponse -> Rep SendMessageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendMessageResponse x -> SendMessageResponse
$cfrom :: forall x. SendMessageResponse -> Rep SendMessageResponse x
Prelude.Generic)
newSendMessageResponse ::
Prelude.Int ->
SendMessageResponse
newSendMessageResponse :: Int -> SendMessageResponse
newSendMessageResponse Int
pHttpStatus_ =
SendMessageResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> SendMessageResponse
SendMessageResponse'
{ $sel:sequenceNumber:SendMessageResponse' :: Maybe Text
sequenceNumber =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mD5OfMessageSystemAttributes:SendMessageResponse' :: Maybe Text
mD5OfMessageSystemAttributes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:messageId:SendMessageResponse' :: Maybe Text
messageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mD5OfMessageBody:SendMessageResponse' :: Maybe Text
mD5OfMessageBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mD5OfMessageAttributes:SendMessageResponse' :: Maybe Text
mD5OfMessageAttributes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SendMessageResponse' :: Int
httpStatus = Int
pHttpStatus_
}
sendMessageResponse_sequenceNumber :: Lens.Lens' SendMessageResponse (Prelude.Maybe Prelude.Text)
sendMessageResponse_sequenceNumber :: (Maybe Text -> f (Maybe Text))
-> SendMessageResponse -> f SendMessageResponse
sendMessageResponse_sequenceNumber = (SendMessageResponse -> Maybe Text)
-> (SendMessageResponse -> Maybe Text -> SendMessageResponse)
-> Lens
SendMessageResponse SendMessageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageResponse' {Maybe Text
sequenceNumber :: Maybe Text
$sel:sequenceNumber:SendMessageResponse' :: SendMessageResponse -> Maybe Text
sequenceNumber} -> Maybe Text
sequenceNumber) (\s :: SendMessageResponse
s@SendMessageResponse' {} Maybe Text
a -> SendMessageResponse
s {$sel:sequenceNumber:SendMessageResponse' :: Maybe Text
sequenceNumber = Maybe Text
a} :: SendMessageResponse)
sendMessageResponse_mD5OfMessageSystemAttributes :: Lens.Lens' SendMessageResponse (Prelude.Maybe Prelude.Text)
sendMessageResponse_mD5OfMessageSystemAttributes :: (Maybe Text -> f (Maybe Text))
-> SendMessageResponse -> f SendMessageResponse
sendMessageResponse_mD5OfMessageSystemAttributes = (SendMessageResponse -> Maybe Text)
-> (SendMessageResponse -> Maybe Text -> SendMessageResponse)
-> Lens
SendMessageResponse SendMessageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageResponse' {Maybe Text
mD5OfMessageSystemAttributes :: Maybe Text
$sel:mD5OfMessageSystemAttributes:SendMessageResponse' :: SendMessageResponse -> Maybe Text
mD5OfMessageSystemAttributes} -> Maybe Text
mD5OfMessageSystemAttributes) (\s :: SendMessageResponse
s@SendMessageResponse' {} Maybe Text
a -> SendMessageResponse
s {$sel:mD5OfMessageSystemAttributes:SendMessageResponse' :: Maybe Text
mD5OfMessageSystemAttributes = Maybe Text
a} :: SendMessageResponse)
sendMessageResponse_messageId :: Lens.Lens' SendMessageResponse (Prelude.Maybe Prelude.Text)
sendMessageResponse_messageId :: (Maybe Text -> f (Maybe Text))
-> SendMessageResponse -> f SendMessageResponse
sendMessageResponse_messageId = (SendMessageResponse -> Maybe Text)
-> (SendMessageResponse -> Maybe Text -> SendMessageResponse)
-> Lens
SendMessageResponse SendMessageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageResponse' {Maybe Text
messageId :: Maybe Text
$sel:messageId:SendMessageResponse' :: SendMessageResponse -> Maybe Text
messageId} -> Maybe Text
messageId) (\s :: SendMessageResponse
s@SendMessageResponse' {} Maybe Text
a -> SendMessageResponse
s {$sel:messageId:SendMessageResponse' :: Maybe Text
messageId = Maybe Text
a} :: SendMessageResponse)
sendMessageResponse_mD5OfMessageBody :: Lens.Lens' SendMessageResponse (Prelude.Maybe Prelude.Text)
sendMessageResponse_mD5OfMessageBody :: (Maybe Text -> f (Maybe Text))
-> SendMessageResponse -> f SendMessageResponse
sendMessageResponse_mD5OfMessageBody = (SendMessageResponse -> Maybe Text)
-> (SendMessageResponse -> Maybe Text -> SendMessageResponse)
-> Lens
SendMessageResponse SendMessageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageResponse' {Maybe Text
mD5OfMessageBody :: Maybe Text
$sel:mD5OfMessageBody:SendMessageResponse' :: SendMessageResponse -> Maybe Text
mD5OfMessageBody} -> Maybe Text
mD5OfMessageBody) (\s :: SendMessageResponse
s@SendMessageResponse' {} Maybe Text
a -> SendMessageResponse
s {$sel:mD5OfMessageBody:SendMessageResponse' :: Maybe Text
mD5OfMessageBody = Maybe Text
a} :: SendMessageResponse)
sendMessageResponse_mD5OfMessageAttributes :: Lens.Lens' SendMessageResponse (Prelude.Maybe Prelude.Text)
sendMessageResponse_mD5OfMessageAttributes :: (Maybe Text -> f (Maybe Text))
-> SendMessageResponse -> f SendMessageResponse
sendMessageResponse_mD5OfMessageAttributes = (SendMessageResponse -> Maybe Text)
-> (SendMessageResponse -> Maybe Text -> SendMessageResponse)
-> Lens
SendMessageResponse SendMessageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageResponse' {Maybe Text
mD5OfMessageAttributes :: Maybe Text
$sel:mD5OfMessageAttributes:SendMessageResponse' :: SendMessageResponse -> Maybe Text
mD5OfMessageAttributes} -> Maybe Text
mD5OfMessageAttributes) (\s :: SendMessageResponse
s@SendMessageResponse' {} Maybe Text
a -> SendMessageResponse
s {$sel:mD5OfMessageAttributes:SendMessageResponse' :: Maybe Text
mD5OfMessageAttributes = Maybe Text
a} :: SendMessageResponse)
sendMessageResponse_httpStatus :: Lens.Lens' SendMessageResponse Prelude.Int
sendMessageResponse_httpStatus :: (Int -> f Int) -> SendMessageResponse -> f SendMessageResponse
sendMessageResponse_httpStatus = (SendMessageResponse -> Int)
-> (SendMessageResponse -> Int -> SendMessageResponse)
-> Lens SendMessageResponse SendMessageResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageResponse' {Int
httpStatus :: Int
$sel:httpStatus:SendMessageResponse' :: SendMessageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SendMessageResponse
s@SendMessageResponse' {} Int
a -> SendMessageResponse
s {$sel:httpStatus:SendMessageResponse' :: Int
httpStatus = Int
a} :: SendMessageResponse)
instance Prelude.NFData SendMessageResponse