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