{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 :: Data.POSIX
}
deriving (SuppressedDestinationSummary
-> SuppressedDestinationSummary -> Bool
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]
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
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.
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'
{ $sel:emailAddress:SuppressedDestinationSummary' :: Text
emailAddress =
Text
pEmailAddress_,
$sel:reason:SuppressedDestinationSummary' :: SuppressionListReason
reason = SuppressionListReason
pReason_,
$sel:lastUpdateTime:SuppressedDestinationSummary' :: POSIX
lastUpdateTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateTime_
}
suppressedDestinationSummary_emailAddress :: Lens.Lens' SuppressedDestinationSummary Prelude.Text
suppressedDestinationSummary_emailAddress :: Lens' SuppressedDestinationSummary Text
suppressedDestinationSummary_emailAddress = 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 :: Lens' SuppressedDestinationSummary SuppressionListReason
suppressedDestinationSummary_reason = 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 :: Lens' SuppressedDestinationSummary UTCTime
suppressedDestinationSummary_lastUpdateTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON SuppressedDestinationSummary where
parseJSON :: Value -> Parser SuppressedDestinationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SuppressedDestinationSummary"
( \Object
x ->
Text
-> SuppressionListReason -> POSIX -> SuppressedDestinationSummary
SuppressedDestinationSummary'
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
"EmailAddress")
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
"Reason")
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
"LastUpdateTime")
)
instance
Prelude.Hashable
SuppressedDestinationSummary
where
hashWithSalt :: Int -> SuppressedDestinationSummary -> Int
hashWithSalt Int
_salt SuppressedDestinationSummary' {Text
POSIX
SuppressionListReason
lastUpdateTime :: POSIX
reason :: SuppressionListReason
emailAddress :: Text
$sel:lastUpdateTime:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> POSIX
$sel:reason:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> SuppressionListReason
$sel:emailAddress:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
emailAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SuppressionListReason
reason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastUpdateTime
instance Prelude.NFData SuppressedDestinationSummary where
rnf :: SuppressedDestinationSummary -> ()
rnf SuppressedDestinationSummary' {Text
POSIX
SuppressionListReason
lastUpdateTime :: POSIX
reason :: SuppressionListReason
emailAddress :: Text
$sel:lastUpdateTime:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> POSIX
$sel:reason:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> SuppressionListReason
$sel:emailAddress:SuppressedDestinationSummary' :: SuppressedDestinationSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
emailAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SuppressionListReason
reason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastUpdateTime