{-# 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.BulkEmailEntryResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.BulkEmailStatus
data BulkEmailEntryResult = BulkEmailEntryResult'
{
BulkEmailEntryResult -> Maybe BulkEmailStatus
status :: Prelude.Maybe BulkEmailStatus,
BulkEmailEntryResult -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
BulkEmailEntryResult -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text
}
deriving (BulkEmailEntryResult -> BulkEmailEntryResult -> Bool
(BulkEmailEntryResult -> BulkEmailEntryResult -> Bool)
-> (BulkEmailEntryResult -> BulkEmailEntryResult -> Bool)
-> Eq BulkEmailEntryResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BulkEmailEntryResult -> BulkEmailEntryResult -> Bool
$c/= :: BulkEmailEntryResult -> BulkEmailEntryResult -> Bool
== :: BulkEmailEntryResult -> BulkEmailEntryResult -> Bool
$c== :: BulkEmailEntryResult -> BulkEmailEntryResult -> Bool
Prelude.Eq, ReadPrec [BulkEmailEntryResult]
ReadPrec BulkEmailEntryResult
Int -> ReadS BulkEmailEntryResult
ReadS [BulkEmailEntryResult]
(Int -> ReadS BulkEmailEntryResult)
-> ReadS [BulkEmailEntryResult]
-> ReadPrec BulkEmailEntryResult
-> ReadPrec [BulkEmailEntryResult]
-> Read BulkEmailEntryResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BulkEmailEntryResult]
$creadListPrec :: ReadPrec [BulkEmailEntryResult]
readPrec :: ReadPrec BulkEmailEntryResult
$creadPrec :: ReadPrec BulkEmailEntryResult
readList :: ReadS [BulkEmailEntryResult]
$creadList :: ReadS [BulkEmailEntryResult]
readsPrec :: Int -> ReadS BulkEmailEntryResult
$creadsPrec :: Int -> ReadS BulkEmailEntryResult
Prelude.Read, Int -> BulkEmailEntryResult -> ShowS
[BulkEmailEntryResult] -> ShowS
BulkEmailEntryResult -> String
(Int -> BulkEmailEntryResult -> ShowS)
-> (BulkEmailEntryResult -> String)
-> ([BulkEmailEntryResult] -> ShowS)
-> Show BulkEmailEntryResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BulkEmailEntryResult] -> ShowS
$cshowList :: [BulkEmailEntryResult] -> ShowS
show :: BulkEmailEntryResult -> String
$cshow :: BulkEmailEntryResult -> String
showsPrec :: Int -> BulkEmailEntryResult -> ShowS
$cshowsPrec :: Int -> BulkEmailEntryResult -> ShowS
Prelude.Show, (forall x. BulkEmailEntryResult -> Rep BulkEmailEntryResult x)
-> (forall x. Rep BulkEmailEntryResult x -> BulkEmailEntryResult)
-> Generic BulkEmailEntryResult
forall x. Rep BulkEmailEntryResult x -> BulkEmailEntryResult
forall x. BulkEmailEntryResult -> Rep BulkEmailEntryResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BulkEmailEntryResult x -> BulkEmailEntryResult
$cfrom :: forall x. BulkEmailEntryResult -> Rep BulkEmailEntryResult x
Prelude.Generic)
newBulkEmailEntryResult ::
BulkEmailEntryResult
newBulkEmailEntryResult :: BulkEmailEntryResult
newBulkEmailEntryResult =
BulkEmailEntryResult' :: Maybe BulkEmailStatus
-> Maybe Text -> Maybe Text -> BulkEmailEntryResult
BulkEmailEntryResult'
{ $sel:status:BulkEmailEntryResult' :: Maybe BulkEmailStatus
status = Maybe BulkEmailStatus
forall a. Maybe a
Prelude.Nothing,
$sel:error:BulkEmailEntryResult' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:messageId:BulkEmailEntryResult' :: Maybe Text
messageId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
bulkEmailEntryResult_status :: Lens.Lens' BulkEmailEntryResult (Prelude.Maybe BulkEmailStatus)
bulkEmailEntryResult_status :: (Maybe BulkEmailStatus -> f (Maybe BulkEmailStatus))
-> BulkEmailEntryResult -> f BulkEmailEntryResult
bulkEmailEntryResult_status = (BulkEmailEntryResult -> Maybe BulkEmailStatus)
-> (BulkEmailEntryResult
-> Maybe BulkEmailStatus -> BulkEmailEntryResult)
-> Lens
BulkEmailEntryResult
BulkEmailEntryResult
(Maybe BulkEmailStatus)
(Maybe BulkEmailStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BulkEmailEntryResult' {Maybe BulkEmailStatus
status :: Maybe BulkEmailStatus
$sel:status:BulkEmailEntryResult' :: BulkEmailEntryResult -> Maybe BulkEmailStatus
status} -> Maybe BulkEmailStatus
status) (\s :: BulkEmailEntryResult
s@BulkEmailEntryResult' {} Maybe BulkEmailStatus
a -> BulkEmailEntryResult
s {$sel:status:BulkEmailEntryResult' :: Maybe BulkEmailStatus
status = Maybe BulkEmailStatus
a} :: BulkEmailEntryResult)
bulkEmailEntryResult_error :: Lens.Lens' BulkEmailEntryResult (Prelude.Maybe Prelude.Text)
bulkEmailEntryResult_error :: (Maybe Text -> f (Maybe Text))
-> BulkEmailEntryResult -> f BulkEmailEntryResult
bulkEmailEntryResult_error = (BulkEmailEntryResult -> Maybe Text)
-> (BulkEmailEntryResult -> Maybe Text -> BulkEmailEntryResult)
-> Lens
BulkEmailEntryResult BulkEmailEntryResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BulkEmailEntryResult' {Maybe Text
error :: Maybe Text
$sel:error:BulkEmailEntryResult' :: BulkEmailEntryResult -> Maybe Text
error} -> Maybe Text
error) (\s :: BulkEmailEntryResult
s@BulkEmailEntryResult' {} Maybe Text
a -> BulkEmailEntryResult
s {$sel:error:BulkEmailEntryResult' :: Maybe Text
error = Maybe Text
a} :: BulkEmailEntryResult)
bulkEmailEntryResult_messageId :: Lens.Lens' BulkEmailEntryResult (Prelude.Maybe Prelude.Text)
bulkEmailEntryResult_messageId :: (Maybe Text -> f (Maybe Text))
-> BulkEmailEntryResult -> f BulkEmailEntryResult
bulkEmailEntryResult_messageId = (BulkEmailEntryResult -> Maybe Text)
-> (BulkEmailEntryResult -> Maybe Text -> BulkEmailEntryResult)
-> Lens
BulkEmailEntryResult BulkEmailEntryResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BulkEmailEntryResult' {Maybe Text
messageId :: Maybe Text
$sel:messageId:BulkEmailEntryResult' :: BulkEmailEntryResult -> Maybe Text
messageId} -> Maybe Text
messageId) (\s :: BulkEmailEntryResult
s@BulkEmailEntryResult' {} Maybe Text
a -> BulkEmailEntryResult
s {$sel:messageId:BulkEmailEntryResult' :: Maybe Text
messageId = Maybe Text
a} :: BulkEmailEntryResult)
instance Core.FromJSON BulkEmailEntryResult where
parseJSON :: Value -> Parser BulkEmailEntryResult
parseJSON =
String
-> (Object -> Parser BulkEmailEntryResult)
-> Value
-> Parser BulkEmailEntryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BulkEmailEntryResult"
( \Object
x ->
Maybe BulkEmailStatus
-> Maybe Text -> Maybe Text -> BulkEmailEntryResult
BulkEmailEntryResult'
(Maybe BulkEmailStatus
-> Maybe Text -> Maybe Text -> BulkEmailEntryResult)
-> Parser (Maybe BulkEmailStatus)
-> Parser (Maybe Text -> Maybe Text -> BulkEmailEntryResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe BulkEmailStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser (Maybe Text -> Maybe Text -> BulkEmailEntryResult)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BulkEmailEntryResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Error")
Parser (Maybe Text -> BulkEmailEntryResult)
-> Parser (Maybe Text) -> Parser BulkEmailEntryResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MessageId")
)
instance Prelude.Hashable BulkEmailEntryResult
instance Prelude.NFData BulkEmailEntryResult