{-# 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.ContactList 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 ContactList = ContactList'
{
ContactList -> Maybe Text
contactListName :: Prelude.Maybe Prelude.Text,
ContactList -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Data.POSIX
}
deriving (ContactList -> ContactList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContactList -> ContactList -> Bool
$c/= :: ContactList -> ContactList -> Bool
== :: ContactList -> ContactList -> Bool
$c== :: ContactList -> ContactList -> Bool
Prelude.Eq, ReadPrec [ContactList]
ReadPrec ContactList
Int -> ReadS ContactList
ReadS [ContactList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContactList]
$creadListPrec :: ReadPrec [ContactList]
readPrec :: ReadPrec ContactList
$creadPrec :: ReadPrec ContactList
readList :: ReadS [ContactList]
$creadList :: ReadS [ContactList]
readsPrec :: Int -> ReadS ContactList
$creadsPrec :: Int -> ReadS ContactList
Prelude.Read, Int -> ContactList -> ShowS
[ContactList] -> ShowS
ContactList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContactList] -> ShowS
$cshowList :: [ContactList] -> ShowS
show :: ContactList -> String
$cshow :: ContactList -> String
showsPrec :: Int -> ContactList -> ShowS
$cshowsPrec :: Int -> ContactList -> ShowS
Prelude.Show, forall x. Rep ContactList x -> ContactList
forall x. ContactList -> Rep ContactList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContactList x -> ContactList
$cfrom :: forall x. ContactList -> Rep ContactList x
Prelude.Generic)
newContactList ::
ContactList
newContactList :: ContactList
newContactList =
ContactList'
{ $sel:contactListName:ContactList' :: Maybe Text
contactListName = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:ContactList' :: Maybe POSIX
lastUpdatedTimestamp = forall a. Maybe a
Prelude.Nothing
}
contactList_contactListName :: Lens.Lens' ContactList (Prelude.Maybe Prelude.Text)
contactList_contactListName :: Lens' ContactList (Maybe Text)
contactList_contactListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactList' {Maybe Text
contactListName :: Maybe Text
$sel:contactListName:ContactList' :: ContactList -> Maybe Text
contactListName} -> Maybe Text
contactListName) (\s :: ContactList
s@ContactList' {} Maybe Text
a -> ContactList
s {$sel:contactListName:ContactList' :: Maybe Text
contactListName = Maybe Text
a} :: ContactList)
contactList_lastUpdatedTimestamp :: Lens.Lens' ContactList (Prelude.Maybe Prelude.UTCTime)
contactList_lastUpdatedTimestamp :: Lens' ContactList (Maybe UTCTime)
contactList_lastUpdatedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactList' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:ContactList' :: ContactList -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: ContactList
s@ContactList' {} Maybe POSIX
a -> ContactList
s {$sel:lastUpdatedTimestamp:ContactList' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: ContactList) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ContactList where
parseJSON :: Value -> Parser ContactList
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ContactList"
( \Object
x ->
Maybe Text -> Maybe POSIX -> ContactList
ContactList'
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
"ContactListName")
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
"LastUpdatedTimestamp")
)
instance Prelude.Hashable ContactList where
hashWithSalt :: Int -> ContactList -> Int
hashWithSalt Int
_salt ContactList' {Maybe Text
Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
contactListName :: Maybe Text
$sel:lastUpdatedTimestamp:ContactList' :: ContactList -> Maybe POSIX
$sel:contactListName:ContactList' :: ContactList -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contactListName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedTimestamp
instance Prelude.NFData ContactList where
rnf :: ContactList -> ()
rnf ContactList' {Maybe Text
Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
contactListName :: Maybe Text
$sel:lastUpdatedTimestamp:ContactList' :: ContactList -> Maybe POSIX
$sel:contactListName:ContactList' :: ContactList -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contactListName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTimestamp