{-# 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.PinpointSmsVoiceV2.Types.OptOutListInformation 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 OptOutListInformation = OptOutListInformation'
{
OptOutListInformation -> Text
optOutListArn :: Prelude.Text,
OptOutListInformation -> Text
optOutListName :: Prelude.Text,
OptOutListInformation -> POSIX
createdTimestamp :: Data.POSIX
}
deriving (OptOutListInformation -> OptOutListInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptOutListInformation -> OptOutListInformation -> Bool
$c/= :: OptOutListInformation -> OptOutListInformation -> Bool
== :: OptOutListInformation -> OptOutListInformation -> Bool
$c== :: OptOutListInformation -> OptOutListInformation -> Bool
Prelude.Eq, ReadPrec [OptOutListInformation]
ReadPrec OptOutListInformation
Int -> ReadS OptOutListInformation
ReadS [OptOutListInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OptOutListInformation]
$creadListPrec :: ReadPrec [OptOutListInformation]
readPrec :: ReadPrec OptOutListInformation
$creadPrec :: ReadPrec OptOutListInformation
readList :: ReadS [OptOutListInformation]
$creadList :: ReadS [OptOutListInformation]
readsPrec :: Int -> ReadS OptOutListInformation
$creadsPrec :: Int -> ReadS OptOutListInformation
Prelude.Read, Int -> OptOutListInformation -> ShowS
[OptOutListInformation] -> ShowS
OptOutListInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptOutListInformation] -> ShowS
$cshowList :: [OptOutListInformation] -> ShowS
show :: OptOutListInformation -> String
$cshow :: OptOutListInformation -> String
showsPrec :: Int -> OptOutListInformation -> ShowS
$cshowsPrec :: Int -> OptOutListInformation -> ShowS
Prelude.Show, forall x. Rep OptOutListInformation x -> OptOutListInformation
forall x. OptOutListInformation -> Rep OptOutListInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OptOutListInformation x -> OptOutListInformation
$cfrom :: forall x. OptOutListInformation -> Rep OptOutListInformation x
Prelude.Generic)
newOptOutListInformation ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
OptOutListInformation
newOptOutListInformation :: Text -> Text -> UTCTime -> OptOutListInformation
newOptOutListInformation
Text
pOptOutListArn_
Text
pOptOutListName_
UTCTime
pCreatedTimestamp_ =
OptOutListInformation'
{ $sel:optOutListArn:OptOutListInformation' :: Text
optOutListArn =
Text
pOptOutListArn_,
$sel:optOutListName:OptOutListInformation' :: Text
optOutListName = Text
pOptOutListName_,
$sel:createdTimestamp:OptOutListInformation' :: POSIX
createdTimestamp =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTimestamp_
}
optOutListInformation_optOutListArn :: Lens.Lens' OptOutListInformation Prelude.Text
optOutListInformation_optOutListArn :: Lens' OptOutListInformation Text
optOutListInformation_optOutListArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptOutListInformation' {Text
optOutListArn :: Text
$sel:optOutListArn:OptOutListInformation' :: OptOutListInformation -> Text
optOutListArn} -> Text
optOutListArn) (\s :: OptOutListInformation
s@OptOutListInformation' {} Text
a -> OptOutListInformation
s {$sel:optOutListArn:OptOutListInformation' :: Text
optOutListArn = Text
a} :: OptOutListInformation)
optOutListInformation_optOutListName :: Lens.Lens' OptOutListInformation Prelude.Text
optOutListInformation_optOutListName :: Lens' OptOutListInformation Text
optOutListInformation_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptOutListInformation' {Text
optOutListName :: Text
$sel:optOutListName:OptOutListInformation' :: OptOutListInformation -> Text
optOutListName} -> Text
optOutListName) (\s :: OptOutListInformation
s@OptOutListInformation' {} Text
a -> OptOutListInformation
s {$sel:optOutListName:OptOutListInformation' :: Text
optOutListName = Text
a} :: OptOutListInformation)
optOutListInformation_createdTimestamp :: Lens.Lens' OptOutListInformation Prelude.UTCTime
optOutListInformation_createdTimestamp :: Lens' OptOutListInformation UTCTime
optOutListInformation_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptOutListInformation' {POSIX
createdTimestamp :: POSIX
$sel:createdTimestamp:OptOutListInformation' :: OptOutListInformation -> POSIX
createdTimestamp} -> POSIX
createdTimestamp) (\s :: OptOutListInformation
s@OptOutListInformation' {} POSIX
a -> OptOutListInformation
s {$sel:createdTimestamp:OptOutListInformation' :: POSIX
createdTimestamp = POSIX
a} :: OptOutListInformation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON OptOutListInformation where
parseJSON :: Value -> Parser OptOutListInformation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OptOutListInformation"
( \Object
x ->
Text -> Text -> POSIX -> OptOutListInformation
OptOutListInformation'
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
"OptOutListArn")
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
"OptOutListName")
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
"CreatedTimestamp")
)
instance Prelude.Hashable OptOutListInformation where
hashWithSalt :: Int -> OptOutListInformation -> Int
hashWithSalt Int
_salt OptOutListInformation' {Text
POSIX
createdTimestamp :: POSIX
optOutListName :: Text
optOutListArn :: Text
$sel:createdTimestamp:OptOutListInformation' :: OptOutListInformation -> POSIX
$sel:optOutListName:OptOutListInformation' :: OptOutListInformation -> Text
$sel:optOutListArn:OptOutListInformation' :: OptOutListInformation -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optOutListArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optOutListName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdTimestamp
instance Prelude.NFData OptOutListInformation where
rnf :: OptOutListInformation -> ()
rnf OptOutListInformation' {Text
POSIX
createdTimestamp :: POSIX
optOutListName :: Text
optOutListArn :: Text
$sel:createdTimestamp:OptOutListInformation' :: OptOutListInformation -> POSIX
$sel:optOutListName:OptOutListInformation' :: OptOutListInformation -> Text
$sel:optOutListArn:OptOutListInformation' :: OptOutListInformation -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
optOutListArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
optOutListName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdTimestamp