{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FailedBatchItem = FailedBatchItem'
{
FailedBatchItem -> Text
id :: Prelude.Text,
FailedBatchItem -> Text
errorMessage :: Prelude.Text
}
deriving (FailedBatchItem -> FailedBatchItem -> Bool
(FailedBatchItem -> FailedBatchItem -> Bool)
-> (FailedBatchItem -> FailedBatchItem -> Bool)
-> Eq FailedBatchItem
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]
(Int -> ReadS FailedBatchItem)
-> ReadS [FailedBatchItem]
-> ReadPrec FailedBatchItem
-> ReadPrec [FailedBatchItem]
-> Read 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
(Int -> FailedBatchItem -> ShowS)
-> (FailedBatchItem -> String)
-> ([FailedBatchItem] -> ShowS)
-> Show FailedBatchItem
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. FailedBatchItem -> Rep FailedBatchItem x)
-> (forall x. Rep FailedBatchItem x -> FailedBatchItem)
-> Generic FailedBatchItem
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' :: Text -> Text -> FailedBatchItem
FailedBatchItem'
{ $sel:id:FailedBatchItem' :: Text
id = Text
pId_,
$sel:errorMessage:FailedBatchItem' :: Text
errorMessage = Text
pErrorMessage_
}
failedBatchItem_id :: Lens.Lens' FailedBatchItem Prelude.Text
failedBatchItem_id :: (Text -> f Text) -> FailedBatchItem -> f FailedBatchItem
failedBatchItem_id = (FailedBatchItem -> Text)
-> (FailedBatchItem -> Text -> FailedBatchItem)
-> Lens FailedBatchItem FailedBatchItem Text Text
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 :: (Text -> f Text) -> FailedBatchItem -> f FailedBatchItem
failedBatchItem_errorMessage = (FailedBatchItem -> Text)
-> (FailedBatchItem -> Text -> FailedBatchItem)
-> Lens FailedBatchItem FailedBatchItem Text Text
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 Core.FromJSON FailedBatchItem where
parseJSON :: Value -> Parser FailedBatchItem
parseJSON =
String
-> (Object -> Parser FailedBatchItem)
-> Value
-> Parser FailedBatchItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FailedBatchItem"
( \Object
x ->
Text -> Text -> FailedBatchItem
FailedBatchItem'
(Text -> Text -> FailedBatchItem)
-> Parser Text -> Parser (Text -> FailedBatchItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"id")
Parser (Text -> FailedBatchItem)
-> Parser Text -> Parser FailedBatchItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"errorMessage")
)
instance Prelude.Hashable FailedBatchItem
instance Prelude.NFData FailedBatchItem