{-# 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.SuppressedDestinationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.SuppressionListReason
data SuppressedDestinationSummary = SuppressedDestinationSummary'
{
SuppressedDestinationSummary -> Text
emailAddress :: Prelude.Text,
SuppressedDestinationSummary -> SuppressionListReason
reason :: SuppressionListReason,
SuppressedDestinationSummary -> POSIX
lastUpdateTime :: Core.POSIX
}
deriving (SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool
(SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool)
-> (SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool)
-> Eq SuppressedDestinationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool
$c/= :: SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool
== :: SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool
$c== :: SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool
Prelude.Eq, ReadPrec [SuppressedDestinationSummary]
ReadPrec SuppressedDestinationSummary
Int -> ReadS SuppressedDestinationSummary
ReadS [SuppressedDestinationSummary]
(Int -> ReadS SuppressedDestinationSummary)
-> ReadS [SuppressedDestinationSummary]
-> ReadPrec SuppressedDestinationSummary
-> ReadPrec [SuppressedDestinationSummary]
-> Read SuppressedDestinationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuppressedDestinationSummary]
$creadListPrec :: ReadPrec [SuppressedDestinationSummary]
readPrec :: ReadPrec SuppressedDestinationSummary
$creadPrec :: ReadPrec SuppressedDestinationSummary
readList :: ReadS [SuppressedDestinationSummary]
$creadList :: ReadS [SuppressedDestinationSummary]
readsPrec :: Int -> ReadS SuppressedDestinationSummary
$creadsPrec :: Int -> ReadS SuppressedDestinationSummary
Prelude.Read, Int -> SuppressedDestinationSummary -> ShowS
[SuppressedDestinationSummary] -> ShowS
SuppressedDestinationSummary -> String
(Int -> SuppressedDestinationSummary -> ShowS)
-> (SuppressedDestinationSummary -> String)
-> ([SuppressedDestinationSummary] -> ShowS)
-> Show SuppressedDestinationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuppressedDestinationSummary] -> ShowS
$cshowList :: [SuppressedDestinationSummary] -> ShowS
show :: SuppressedDestinationSummary -> String
$cshow :: SuppressedDestinationSummary -> String
showsPrec :: Int -> SuppressedDestinationSummary -> ShowS
$cshowsPrec :: Int -> SuppressedDestinationSummary -> ShowS
Prelude.Show, (forall x.
SuppressedDestinationSummary -> Rep SuppressedDestinationSummary x)
-> (forall x.
Rep SuppressedDestinationSummary x -> SuppressedDestinationSummary)
-> Generic SuppressedDestinationSummary
forall x.
Rep SuppressedDestinationSummary x -> SuppressedDestinationSummary
forall x.
SuppressedDestinationSummary -> Rep SuppressedDestinationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SuppressedDestinationSummary x -> SuppressedDestinationSummary
$cfrom :: forall x.
SuppressedDestinationSummary -> Rep SuppressedDestinationSummary x
Prelude.Generic)
newSuppressedDestinationSummary ::
Prelude.Text ->
SuppressionListReason ->
Prelude.UTCTime ->
SuppressedDestinationSummary
newSuppressedDestinationSummary :: Text
-> SuppressionListReason -> UTCTime -> SuppressedDestinationSummary
newSuppressedDestinationSummary
Text
pEmailAddress_
SuppressionListReason
pReason_
UTCTime
pLastUpdateTime_ =
SuppressedDestinationSummary' :: Text
-> SuppressionListReason -> POSIX -> SuppressedDestinationSummary
SuppressedDestinationSummary'
{ $sel:emailAddress:SuppressedDestinationSummary' :: Text
emailAddress =
Text
pEmailAddress_,
$sel:reason:SuppressedDestinationSummary' :: SuppressionListReason
reason = SuppressionListReason
pReason_,
$sel:lastUpdateTime:SuppressedDestinationSummary' :: POSIX
lastUpdateTime =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateTime_
}
suppressedDestinationSummary_emailAddress :: Lens.Lens' SuppressedDestinationSummary Prelude.Text
suppressedDestinationSummary_emailAddress :: (Text -> f Text)
-> SuppressedDestinationSummary -> f SuppressedDestinationSummary
suppressedDestinationSummary_emailAddress = (SuppressedDestinationSummary -> Text)
-> (SuppressedDestinationSummary
-> Text -> SuppressedDestinationSummary)
-> Lens
SuppressedDestinationSummary SuppressedDestinationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuppressedDestinationSummary' {Text
emailAddress :: Text
$sel:emailAddress:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> Text
emailAddress} -> Text
emailAddress) (\s :: SuppressedDestinationSummary
s@SuppressedDestinationSummary' {} Text
a -> SuppressedDestinationSummary
s {$sel:emailAddress:SuppressedDestinationSummary' :: Text
emailAddress = Text
a} :: SuppressedDestinationSummary)
suppressedDestinationSummary_reason :: Lens.Lens' SuppressedDestinationSummary SuppressionListReason
suppressedDestinationSummary_reason :: (SuppressionListReason -> f SuppressionListReason)
-> SuppressedDestinationSummary -> f SuppressedDestinationSummary
suppressedDestinationSummary_reason = (SuppressedDestinationSummary -> SuppressionListReason)
-> (SuppressedDestinationSummary
-> SuppressionListReason -> SuppressedDestinationSummary)
-> Lens
SuppressedDestinationSummary
SuppressedDestinationSummary
SuppressionListReason
SuppressionListReason
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuppressedDestinationSummary' {SuppressionListReason
reason :: SuppressionListReason
$sel:reason:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> SuppressionListReason
reason} -> SuppressionListReason
reason) (\s :: SuppressedDestinationSummary
s@SuppressedDestinationSummary' {} SuppressionListReason
a -> SuppressedDestinationSummary
s {$sel:reason:SuppressedDestinationSummary' :: SuppressionListReason
reason = SuppressionListReason
a} :: SuppressedDestinationSummary)
suppressedDestinationSummary_lastUpdateTime :: Lens.Lens' SuppressedDestinationSummary Prelude.UTCTime
suppressedDestinationSummary_lastUpdateTime :: (UTCTime -> f UTCTime)
-> SuppressedDestinationSummary -> f SuppressedDestinationSummary
suppressedDestinationSummary_lastUpdateTime = (SuppressedDestinationSummary -> POSIX)
-> (SuppressedDestinationSummary
-> POSIX -> SuppressedDestinationSummary)
-> Lens
SuppressedDestinationSummary
SuppressedDestinationSummary
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuppressedDestinationSummary' {POSIX
lastUpdateTime :: POSIX
$sel:lastUpdateTime:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> POSIX
lastUpdateTime} -> POSIX
lastUpdateTime) (\s :: SuppressedDestinationSummary
s@SuppressedDestinationSummary' {} POSIX
a -> SuppressedDestinationSummary
s {$sel:lastUpdateTime:SuppressedDestinationSummary' :: POSIX
lastUpdateTime = POSIX
a} :: SuppressedDestinationSummary) ((POSIX -> f POSIX)
-> SuppressedDestinationSummary -> f SuppressedDestinationSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> SuppressedDestinationSummary
-> f SuppressedDestinationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON SuppressedDestinationSummary where
parseJSON :: Value -> Parser SuppressedDestinationSummary
parseJSON =
String
-> (Object -> Parser SuppressedDestinationSummary)
-> Value
-> Parser SuppressedDestinationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SuppressedDestinationSummary"
( \Object
x ->
Text
-> SuppressionListReason -> POSIX -> SuppressedDestinationSummary
SuppressedDestinationSummary'
(Text
-> SuppressionListReason -> POSIX -> SuppressedDestinationSummary)
-> Parser Text
-> Parser
(SuppressionListReason -> POSIX -> SuppressedDestinationSummary)
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
"EmailAddress")
Parser
(SuppressionListReason -> POSIX -> SuppressedDestinationSummary)
-> Parser SuppressionListReason
-> Parser (POSIX -> SuppressedDestinationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser SuppressionListReason
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Reason")
Parser (POSIX -> SuppressedDestinationSummary)
-> Parser POSIX -> Parser SuppressedDestinationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastUpdateTime")
)
instance
Prelude.Hashable
SuppressedDestinationSummary
instance Prelude.NFData SuppressedDestinationSummary