{-# 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.BatchResultErrorEntry where
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
data BatchResultErrorEntry = BatchResultErrorEntry'
{
BatchResultErrorEntry -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
BatchResultErrorEntry -> Text
id :: Prelude.Text,
BatchResultErrorEntry -> Bool
senderFault :: Prelude.Bool,
BatchResultErrorEntry -> Text
code :: Prelude.Text
}
deriving (BatchResultErrorEntry -> BatchResultErrorEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchResultErrorEntry -> BatchResultErrorEntry -> Bool
$c/= :: BatchResultErrorEntry -> BatchResultErrorEntry -> Bool
== :: BatchResultErrorEntry -> BatchResultErrorEntry -> Bool
$c== :: BatchResultErrorEntry -> BatchResultErrorEntry -> Bool
Prelude.Eq, ReadPrec [BatchResultErrorEntry]
ReadPrec BatchResultErrorEntry
Int -> ReadS BatchResultErrorEntry
ReadS [BatchResultErrorEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchResultErrorEntry]
$creadListPrec :: ReadPrec [BatchResultErrorEntry]
readPrec :: ReadPrec BatchResultErrorEntry
$creadPrec :: ReadPrec BatchResultErrorEntry
readList :: ReadS [BatchResultErrorEntry]
$creadList :: ReadS [BatchResultErrorEntry]
readsPrec :: Int -> ReadS BatchResultErrorEntry
$creadsPrec :: Int -> ReadS BatchResultErrorEntry
Prelude.Read, Int -> BatchResultErrorEntry -> ShowS
[BatchResultErrorEntry] -> ShowS
BatchResultErrorEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchResultErrorEntry] -> ShowS
$cshowList :: [BatchResultErrorEntry] -> ShowS
show :: BatchResultErrorEntry -> String
$cshow :: BatchResultErrorEntry -> String
showsPrec :: Int -> BatchResultErrorEntry -> ShowS
$cshowsPrec :: Int -> BatchResultErrorEntry -> ShowS
Prelude.Show, forall x. Rep BatchResultErrorEntry x -> BatchResultErrorEntry
forall x. BatchResultErrorEntry -> Rep BatchResultErrorEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchResultErrorEntry x -> BatchResultErrorEntry
$cfrom :: forall x. BatchResultErrorEntry -> Rep BatchResultErrorEntry x
Prelude.Generic)
newBatchResultErrorEntry ::
Prelude.Text ->
Prelude.Bool ->
Prelude.Text ->
BatchResultErrorEntry
newBatchResultErrorEntry :: Text -> Bool -> Text -> BatchResultErrorEntry
newBatchResultErrorEntry Text
pId_ Bool
pSenderFault_ Text
pCode_ =
BatchResultErrorEntry'
{ $sel:message:BatchResultErrorEntry' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
$sel:id:BatchResultErrorEntry' :: Text
id = Text
pId_,
$sel:senderFault:BatchResultErrorEntry' :: Bool
senderFault = Bool
pSenderFault_,
$sel:code:BatchResultErrorEntry' :: Text
code = Text
pCode_
}
batchResultErrorEntry_message :: Lens.Lens' BatchResultErrorEntry (Prelude.Maybe Prelude.Text)
batchResultErrorEntry_message :: Lens' BatchResultErrorEntry (Maybe Text)
batchResultErrorEntry_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchResultErrorEntry' {Maybe Text
message :: Maybe Text
$sel:message:BatchResultErrorEntry' :: BatchResultErrorEntry -> Maybe Text
message} -> Maybe Text
message) (\s :: BatchResultErrorEntry
s@BatchResultErrorEntry' {} Maybe Text
a -> BatchResultErrorEntry
s {$sel:message:BatchResultErrorEntry' :: Maybe Text
message = Maybe Text
a} :: BatchResultErrorEntry)
batchResultErrorEntry_id :: Lens.Lens' BatchResultErrorEntry Prelude.Text
batchResultErrorEntry_id :: Lens' BatchResultErrorEntry Text
batchResultErrorEntry_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchResultErrorEntry' {Text
id :: Text
$sel:id:BatchResultErrorEntry' :: BatchResultErrorEntry -> Text
id} -> Text
id) (\s :: BatchResultErrorEntry
s@BatchResultErrorEntry' {} Text
a -> BatchResultErrorEntry
s {$sel:id:BatchResultErrorEntry' :: Text
id = Text
a} :: BatchResultErrorEntry)
batchResultErrorEntry_senderFault :: Lens.Lens' BatchResultErrorEntry Prelude.Bool
batchResultErrorEntry_senderFault :: Lens' BatchResultErrorEntry Bool
batchResultErrorEntry_senderFault = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchResultErrorEntry' {Bool
senderFault :: Bool
$sel:senderFault:BatchResultErrorEntry' :: BatchResultErrorEntry -> Bool
senderFault} -> Bool
senderFault) (\s :: BatchResultErrorEntry
s@BatchResultErrorEntry' {} Bool
a -> BatchResultErrorEntry
s {$sel:senderFault:BatchResultErrorEntry' :: Bool
senderFault = Bool
a} :: BatchResultErrorEntry)
batchResultErrorEntry_code :: Lens.Lens' BatchResultErrorEntry Prelude.Text
batchResultErrorEntry_code :: Lens' BatchResultErrorEntry Text
batchResultErrorEntry_code = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchResultErrorEntry' {Text
code :: Text
$sel:code:BatchResultErrorEntry' :: BatchResultErrorEntry -> Text
code} -> Text
code) (\s :: BatchResultErrorEntry
s@BatchResultErrorEntry' {} Text
a -> BatchResultErrorEntry
s {$sel:code:BatchResultErrorEntry' :: Text
code = Text
a} :: BatchResultErrorEntry)
instance Data.FromXML BatchResultErrorEntry where
parseXML :: [Node] -> Either String BatchResultErrorEntry
parseXML [Node]
x =
Maybe Text -> Text -> Bool -> Text -> BatchResultErrorEntry
BatchResultErrorEntry'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Message")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"SenderFault")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Code")
instance Prelude.Hashable BatchResultErrorEntry where
hashWithSalt :: Int -> BatchResultErrorEntry -> Int
hashWithSalt Int
_salt BatchResultErrorEntry' {Bool
Maybe Text
Text
code :: Text
senderFault :: Bool
id :: Text
message :: Maybe Text
$sel:code:BatchResultErrorEntry' :: BatchResultErrorEntry -> Text
$sel:senderFault:BatchResultErrorEntry' :: BatchResultErrorEntry -> Bool
$sel:id:BatchResultErrorEntry' :: BatchResultErrorEntry -> Text
$sel:message:BatchResultErrorEntry' :: BatchResultErrorEntry -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
senderFault
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
code
instance Prelude.NFData BatchResultErrorEntry where
rnf :: BatchResultErrorEntry -> ()
rnf BatchResultErrorEntry' {Bool
Maybe Text
Text
code :: Text
senderFault :: Bool
id :: Text
message :: Maybe Text
$sel:code:BatchResultErrorEntry' :: BatchResultErrorEntry -> Text
$sel:senderFault:BatchResultErrorEntry' :: BatchResultErrorEntry -> Bool
$sel:id:BatchResultErrorEntry' :: BatchResultErrorEntry -> Text
$sel:message:BatchResultErrorEntry' :: BatchResultErrorEntry -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
senderFault
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
code