{-# 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.HoneyCode.Types.FailedBatchItem 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 FailedBatchItem = FailedBatchItem'
{
FailedBatchItem -> Text
id :: Prelude.Text,
FailedBatchItem -> Text
errorMessage :: Prelude.Text
}
deriving (FailedBatchItem -> FailedBatchItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FailedBatchItem -> FailedBatchItem -> Bool
$c/= :: FailedBatchItem -> FailedBatchItem -> Bool
== :: FailedBatchItem -> FailedBatchItem -> Bool
$c== :: FailedBatchItem -> FailedBatchItem -> Bool
Prelude.Eq, ReadPrec [FailedBatchItem]
ReadPrec FailedBatchItem
Int -> ReadS FailedBatchItem
ReadS [FailedBatchItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FailedBatchItem]
$creadListPrec :: ReadPrec [FailedBatchItem]
readPrec :: ReadPrec FailedBatchItem
$creadPrec :: ReadPrec FailedBatchItem
readList :: ReadS [FailedBatchItem]
$creadList :: ReadS [FailedBatchItem]
readsPrec :: Int -> ReadS FailedBatchItem
$creadsPrec :: Int -> ReadS FailedBatchItem
Prelude.Read, Int -> FailedBatchItem -> ShowS
[FailedBatchItem] -> ShowS
FailedBatchItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FailedBatchItem] -> ShowS
$cshowList :: [FailedBatchItem] -> ShowS
show :: FailedBatchItem -> String
$cshow :: FailedBatchItem -> String
showsPrec :: Int -> FailedBatchItem -> ShowS
$cshowsPrec :: Int -> FailedBatchItem -> ShowS
Prelude.Show, forall x. Rep FailedBatchItem x -> FailedBatchItem
forall x. FailedBatchItem -> Rep FailedBatchItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FailedBatchItem x -> FailedBatchItem
$cfrom :: forall x. FailedBatchItem -> Rep FailedBatchItem x
Prelude.Generic)
newFailedBatchItem ::
Prelude.Text ->
Prelude.Text ->
FailedBatchItem
newFailedBatchItem :: Text -> Text -> FailedBatchItem
newFailedBatchItem Text
pId_ Text
pErrorMessage_ =
FailedBatchItem'
{ $sel:id:FailedBatchItem' :: Text
id = Text
pId_,
$sel:errorMessage:FailedBatchItem' :: Text
errorMessage = Text
pErrorMessage_
}
failedBatchItem_id :: Lens.Lens' FailedBatchItem Prelude.Text
failedBatchItem_id :: Lens' FailedBatchItem Text
failedBatchItem_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedBatchItem' {Text
id :: Text
$sel:id:FailedBatchItem' :: FailedBatchItem -> Text
id} -> Text
id) (\s :: FailedBatchItem
s@FailedBatchItem' {} Text
a -> FailedBatchItem
s {$sel:id:FailedBatchItem' :: Text
id = Text
a} :: FailedBatchItem)
failedBatchItem_errorMessage :: Lens.Lens' FailedBatchItem Prelude.Text
failedBatchItem_errorMessage :: Lens' FailedBatchItem Text
failedBatchItem_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailedBatchItem' {Text
errorMessage :: Text
$sel:errorMessage:FailedBatchItem' :: FailedBatchItem -> Text
errorMessage} -> Text
errorMessage) (\s :: FailedBatchItem
s@FailedBatchItem' {} Text
a -> FailedBatchItem
s {$sel:errorMessage:FailedBatchItem' :: Text
errorMessage = Text
a} :: FailedBatchItem)
instance Data.FromJSON FailedBatchItem where
parseJSON :: Value -> Parser FailedBatchItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FailedBatchItem"
( \Object
x ->
Text -> Text -> FailedBatchItem
FailedBatchItem'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"errorMessage")
)
instance Prelude.Hashable FailedBatchItem where
hashWithSalt :: Int -> FailedBatchItem -> Int
hashWithSalt Int
_salt FailedBatchItem' {Text
errorMessage :: Text
id :: Text
$sel:errorMessage:FailedBatchItem' :: FailedBatchItem -> Text
$sel:id:FailedBatchItem' :: FailedBatchItem -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
errorMessage
instance Prelude.NFData FailedBatchItem where
rnf :: FailedBatchItem -> ()
rnf FailedBatchItem' {Text
errorMessage :: Text
id :: Text
$sel:errorMessage:FailedBatchItem' :: FailedBatchItem -> Text
$sel:id:FailedBatchItem' :: FailedBatchItem -> Text
..} =
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 Text
errorMessage