{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SQS.Types.SendMessageBatchResultEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SendMessageBatchResultEntry = SendMessageBatchResultEntry'
{
SendMessageBatchResultEntry -> Maybe Text
sequenceNumber :: Prelude.Maybe Prelude.Text,
SendMessageBatchResultEntry -> Maybe Text
mD5OfMessageSystemAttributes :: Prelude.Maybe Prelude.Text,
SendMessageBatchResultEntry -> Maybe Text
mD5OfMessageAttributes :: Prelude.Maybe Prelude.Text,
SendMessageBatchResultEntry -> Text
id :: Prelude.Text,
SendMessageBatchResultEntry -> Text
messageId :: Prelude.Text,
SendMessageBatchResultEntry -> Text
mD5OfMessageBody :: Prelude.Text
}
deriving (SendMessageBatchResultEntry -> SendMessageBatchResultEntry -> Bool
(SendMessageBatchResultEntry
-> SendMessageBatchResultEntry -> Bool)
-> (SendMessageBatchResultEntry
-> SendMessageBatchResultEntry -> Bool)
-> Eq SendMessageBatchResultEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendMessageBatchResultEntry -> SendMessageBatchResultEntry -> Bool
$c/= :: SendMessageBatchResultEntry -> SendMessageBatchResultEntry -> Bool
== :: SendMessageBatchResultEntry -> SendMessageBatchResultEntry -> Bool
$c== :: SendMessageBatchResultEntry -> SendMessageBatchResultEntry -> Bool
Prelude.Eq, ReadPrec [SendMessageBatchResultEntry]
ReadPrec SendMessageBatchResultEntry
Int -> ReadS SendMessageBatchResultEntry
ReadS [SendMessageBatchResultEntry]
(Int -> ReadS SendMessageBatchResultEntry)
-> ReadS [SendMessageBatchResultEntry]
-> ReadPrec SendMessageBatchResultEntry
-> ReadPrec [SendMessageBatchResultEntry]
-> Read SendMessageBatchResultEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendMessageBatchResultEntry]
$creadListPrec :: ReadPrec [SendMessageBatchResultEntry]
readPrec :: ReadPrec SendMessageBatchResultEntry
$creadPrec :: ReadPrec SendMessageBatchResultEntry
readList :: ReadS [SendMessageBatchResultEntry]
$creadList :: ReadS [SendMessageBatchResultEntry]
readsPrec :: Int -> ReadS SendMessageBatchResultEntry
$creadsPrec :: Int -> ReadS SendMessageBatchResultEntry
Prelude.Read, Int -> SendMessageBatchResultEntry -> ShowS
[SendMessageBatchResultEntry] -> ShowS
SendMessageBatchResultEntry -> String
(Int -> SendMessageBatchResultEntry -> ShowS)
-> (SendMessageBatchResultEntry -> String)
-> ([SendMessageBatchResultEntry] -> ShowS)
-> Show SendMessageBatchResultEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendMessageBatchResultEntry] -> ShowS
$cshowList :: [SendMessageBatchResultEntry] -> ShowS
show :: SendMessageBatchResultEntry -> String
$cshow :: SendMessageBatchResultEntry -> String
showsPrec :: Int -> SendMessageBatchResultEntry -> ShowS
$cshowsPrec :: Int -> SendMessageBatchResultEntry -> ShowS
Prelude.Show, (forall x.
SendMessageBatchResultEntry -> Rep SendMessageBatchResultEntry x)
-> (forall x.
Rep SendMessageBatchResultEntry x -> SendMessageBatchResultEntry)
-> Generic SendMessageBatchResultEntry
forall x.
Rep SendMessageBatchResultEntry x -> SendMessageBatchResultEntry
forall x.
SendMessageBatchResultEntry -> Rep SendMessageBatchResultEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendMessageBatchResultEntry x -> SendMessageBatchResultEntry
$cfrom :: forall x.
SendMessageBatchResultEntry -> Rep SendMessageBatchResultEntry x
Prelude.Generic)
newSendMessageBatchResultEntry ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
SendMessageBatchResultEntry
newSendMessageBatchResultEntry :: Text -> Text -> Text -> SendMessageBatchResultEntry
newSendMessageBatchResultEntry
Text
pId_
Text
pMessageId_
Text
pMD5OfMessageBody_ =
SendMessageBatchResultEntry' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SendMessageBatchResultEntry
SendMessageBatchResultEntry'
{ $sel:sequenceNumber:SendMessageBatchResultEntry' :: Maybe Text
sequenceNumber =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mD5OfMessageSystemAttributes:SendMessageBatchResultEntry' :: Maybe Text
mD5OfMessageSystemAttributes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mD5OfMessageAttributes:SendMessageBatchResultEntry' :: Maybe Text
mD5OfMessageAttributes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:SendMessageBatchResultEntry' :: Text
id = Text
pId_,
$sel:messageId:SendMessageBatchResultEntry' :: Text
messageId = Text
pMessageId_,
$sel:mD5OfMessageBody:SendMessageBatchResultEntry' :: Text
mD5OfMessageBody = Text
pMD5OfMessageBody_
}
sendMessageBatchResultEntry_sequenceNumber :: Lens.Lens' SendMessageBatchResultEntry (Prelude.Maybe Prelude.Text)
sendMessageBatchResultEntry_sequenceNumber :: (Maybe Text -> f (Maybe Text))
-> SendMessageBatchResultEntry -> f SendMessageBatchResultEntry
sendMessageBatchResultEntry_sequenceNumber = (SendMessageBatchResultEntry -> Maybe Text)
-> (SendMessageBatchResultEntry
-> Maybe Text -> SendMessageBatchResultEntry)
-> Lens
SendMessageBatchResultEntry
SendMessageBatchResultEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageBatchResultEntry' {Maybe Text
sequenceNumber :: Maybe Text
$sel:sequenceNumber:SendMessageBatchResultEntry' :: SendMessageBatchResultEntry -> Maybe Text
sequenceNumber} -> Maybe Text
sequenceNumber) (\s :: SendMessageBatchResultEntry
s@SendMessageBatchResultEntry' {} Maybe Text
a -> SendMessageBatchResultEntry
s {$sel:sequenceNumber:SendMessageBatchResultEntry' :: Maybe Text
sequenceNumber = Maybe Text
a} :: SendMessageBatchResultEntry)
sendMessageBatchResultEntry_mD5OfMessageSystemAttributes :: Lens.Lens' SendMessageBatchResultEntry (Prelude.Maybe Prelude.Text)
sendMessageBatchResultEntry_mD5OfMessageSystemAttributes :: (Maybe Text -> f (Maybe Text))
-> SendMessageBatchResultEntry -> f SendMessageBatchResultEntry
sendMessageBatchResultEntry_mD5OfMessageSystemAttributes = (SendMessageBatchResultEntry -> Maybe Text)
-> (SendMessageBatchResultEntry
-> Maybe Text -> SendMessageBatchResultEntry)
-> Lens
SendMessageBatchResultEntry
SendMessageBatchResultEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageBatchResultEntry' {Maybe Text
mD5OfMessageSystemAttributes :: Maybe Text
$sel:mD5OfMessageSystemAttributes:SendMessageBatchResultEntry' :: SendMessageBatchResultEntry -> Maybe Text
mD5OfMessageSystemAttributes} -> Maybe Text
mD5OfMessageSystemAttributes) (\s :: SendMessageBatchResultEntry
s@SendMessageBatchResultEntry' {} Maybe Text
a -> SendMessageBatchResultEntry
s {$sel:mD5OfMessageSystemAttributes:SendMessageBatchResultEntry' :: Maybe Text
mD5OfMessageSystemAttributes = Maybe Text
a} :: SendMessageBatchResultEntry)
sendMessageBatchResultEntry_mD5OfMessageAttributes :: Lens.Lens' SendMessageBatchResultEntry (Prelude.Maybe Prelude.Text)
sendMessageBatchResultEntry_mD5OfMessageAttributes :: (Maybe Text -> f (Maybe Text))
-> SendMessageBatchResultEntry -> f SendMessageBatchResultEntry
sendMessageBatchResultEntry_mD5OfMessageAttributes = (SendMessageBatchResultEntry -> Maybe Text)
-> (SendMessageBatchResultEntry
-> Maybe Text -> SendMessageBatchResultEntry)
-> Lens
SendMessageBatchResultEntry
SendMessageBatchResultEntry
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageBatchResultEntry' {Maybe Text
mD5OfMessageAttributes :: Maybe Text
$sel:mD5OfMessageAttributes:SendMessageBatchResultEntry' :: SendMessageBatchResultEntry -> Maybe Text
mD5OfMessageAttributes} -> Maybe Text
mD5OfMessageAttributes) (\s :: SendMessageBatchResultEntry
s@SendMessageBatchResultEntry' {} Maybe Text
a -> SendMessageBatchResultEntry
s {$sel:mD5OfMessageAttributes:SendMessageBatchResultEntry' :: Maybe Text
mD5OfMessageAttributes = Maybe Text
a} :: SendMessageBatchResultEntry)
sendMessageBatchResultEntry_id :: Lens.Lens' SendMessageBatchResultEntry Prelude.Text
sendMessageBatchResultEntry_id :: (Text -> f Text)
-> SendMessageBatchResultEntry -> f SendMessageBatchResultEntry
sendMessageBatchResultEntry_id = (SendMessageBatchResultEntry -> Text)
-> (SendMessageBatchResultEntry
-> Text -> SendMessageBatchResultEntry)
-> Lens
SendMessageBatchResultEntry SendMessageBatchResultEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageBatchResultEntry' {Text
id :: Text
$sel:id:SendMessageBatchResultEntry' :: SendMessageBatchResultEntry -> Text
id} -> Text
id) (\s :: SendMessageBatchResultEntry
s@SendMessageBatchResultEntry' {} Text
a -> SendMessageBatchResultEntry
s {$sel:id:SendMessageBatchResultEntry' :: Text
id = Text
a} :: SendMessageBatchResultEntry)
sendMessageBatchResultEntry_messageId :: Lens.Lens' SendMessageBatchResultEntry Prelude.Text
sendMessageBatchResultEntry_messageId :: (Text -> f Text)
-> SendMessageBatchResultEntry -> f SendMessageBatchResultEntry
sendMessageBatchResultEntry_messageId = (SendMessageBatchResultEntry -> Text)
-> (SendMessageBatchResultEntry
-> Text -> SendMessageBatchResultEntry)
-> Lens
SendMessageBatchResultEntry SendMessageBatchResultEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageBatchResultEntry' {Text
messageId :: Text
$sel:messageId:SendMessageBatchResultEntry' :: SendMessageBatchResultEntry -> Text
messageId} -> Text
messageId) (\s :: SendMessageBatchResultEntry
s@SendMessageBatchResultEntry' {} Text
a -> SendMessageBatchResultEntry
s {$sel:messageId:SendMessageBatchResultEntry' :: Text
messageId = Text
a} :: SendMessageBatchResultEntry)
sendMessageBatchResultEntry_mD5OfMessageBody :: Lens.Lens' SendMessageBatchResultEntry Prelude.Text
sendMessageBatchResultEntry_mD5OfMessageBody :: (Text -> f Text)
-> SendMessageBatchResultEntry -> f SendMessageBatchResultEntry
sendMessageBatchResultEntry_mD5OfMessageBody = (SendMessageBatchResultEntry -> Text)
-> (SendMessageBatchResultEntry
-> Text -> SendMessageBatchResultEntry)
-> Lens
SendMessageBatchResultEntry SendMessageBatchResultEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendMessageBatchResultEntry' {Text
mD5OfMessageBody :: Text
$sel:mD5OfMessageBody:SendMessageBatchResultEntry' :: SendMessageBatchResultEntry -> Text
mD5OfMessageBody} -> Text
mD5OfMessageBody) (\s :: SendMessageBatchResultEntry
s@SendMessageBatchResultEntry' {} Text
a -> SendMessageBatchResultEntry
s {$sel:mD5OfMessageBody:SendMessageBatchResultEntry' :: Text
mD5OfMessageBody = Text
a} :: SendMessageBatchResultEntry)
instance Core.FromXML SendMessageBatchResultEntry where
parseXML :: [Node] -> Either String SendMessageBatchResultEntry
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SendMessageBatchResultEntry
SendMessageBatchResultEntry'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SendMessageBatchResultEntry)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SendMessageBatchResultEntry)
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
-> Text
-> Text
-> Text
-> SendMessageBatchResultEntry)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Text -> Text -> Text -> SendMessageBatchResultEntry)
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 -> Text -> Text -> Text -> SendMessageBatchResultEntry)
-> Either String (Maybe Text)
-> Either
String (Text -> Text -> Text -> SendMessageBatchResultEntry)
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 (Text -> Text -> Text -> SendMessageBatchResultEntry)
-> Either String Text
-> Either String (Text -> Text -> SendMessageBatchResultEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Id")
Either String (Text -> Text -> SendMessageBatchResultEntry)
-> Either String Text
-> Either String (Text -> SendMessageBatchResultEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MessageId")
Either String (Text -> SendMessageBatchResultEntry)
-> Either String Text -> Either String SendMessageBatchResultEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MD5OfMessageBody")
instance Prelude.Hashable SendMessageBatchResultEntry
instance Prelude.NFData SendMessageBatchResultEntry