{-# 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.ConfigurationSetInformation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.PinpointSmsVoiceV2.Types.EventDestination
import Amazonka.PinpointSmsVoiceV2.Types.MessageType
import qualified Amazonka.Prelude as Prelude
data ConfigurationSetInformation = ConfigurationSetInformation'
{
ConfigurationSetInformation -> Maybe MessageType
defaultMessageType :: Prelude.Maybe MessageType,
ConfigurationSetInformation -> Maybe Text
defaultSenderId :: Prelude.Maybe Prelude.Text,
ConfigurationSetInformation -> Text
configurationSetArn :: Prelude.Text,
ConfigurationSetInformation -> Text
configurationSetName :: Prelude.Text,
ConfigurationSetInformation -> [EventDestination]
eventDestinations :: [EventDestination],
ConfigurationSetInformation -> POSIX
createdTimestamp :: Data.POSIX
}
deriving (ConfigurationSetInformation -> ConfigurationSetInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationSetInformation -> ConfigurationSetInformation -> Bool
$c/= :: ConfigurationSetInformation -> ConfigurationSetInformation -> Bool
== :: ConfigurationSetInformation -> ConfigurationSetInformation -> Bool
$c== :: ConfigurationSetInformation -> ConfigurationSetInformation -> Bool
Prelude.Eq, ReadPrec [ConfigurationSetInformation]
ReadPrec ConfigurationSetInformation
Int -> ReadS ConfigurationSetInformation
ReadS [ConfigurationSetInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationSetInformation]
$creadListPrec :: ReadPrec [ConfigurationSetInformation]
readPrec :: ReadPrec ConfigurationSetInformation
$creadPrec :: ReadPrec ConfigurationSetInformation
readList :: ReadS [ConfigurationSetInformation]
$creadList :: ReadS [ConfigurationSetInformation]
readsPrec :: Int -> ReadS ConfigurationSetInformation
$creadsPrec :: Int -> ReadS ConfigurationSetInformation
Prelude.Read, Int -> ConfigurationSetInformation -> ShowS
[ConfigurationSetInformation] -> ShowS
ConfigurationSetInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationSetInformation] -> ShowS
$cshowList :: [ConfigurationSetInformation] -> ShowS
show :: ConfigurationSetInformation -> String
$cshow :: ConfigurationSetInformation -> String
showsPrec :: Int -> ConfigurationSetInformation -> ShowS
$cshowsPrec :: Int -> ConfigurationSetInformation -> ShowS
Prelude.Show, forall x.
Rep ConfigurationSetInformation x -> ConfigurationSetInformation
forall x.
ConfigurationSetInformation -> Rep ConfigurationSetInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigurationSetInformation x -> ConfigurationSetInformation
$cfrom :: forall x.
ConfigurationSetInformation -> Rep ConfigurationSetInformation x
Prelude.Generic)
newConfigurationSetInformation ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
ConfigurationSetInformation
newConfigurationSetInformation :: Text -> Text -> UTCTime -> ConfigurationSetInformation
newConfigurationSetInformation
Text
pConfigurationSetArn_
Text
pConfigurationSetName_
UTCTime
pCreatedTimestamp_ =
ConfigurationSetInformation'
{ $sel:defaultMessageType:ConfigurationSetInformation' :: Maybe MessageType
defaultMessageType =
forall a. Maybe a
Prelude.Nothing,
$sel:defaultSenderId:ConfigurationSetInformation' :: Maybe Text
defaultSenderId = forall a. Maybe a
Prelude.Nothing,
$sel:configurationSetArn:ConfigurationSetInformation' :: Text
configurationSetArn = Text
pConfigurationSetArn_,
$sel:configurationSetName:ConfigurationSetInformation' :: Text
configurationSetName = Text
pConfigurationSetName_,
$sel:eventDestinations:ConfigurationSetInformation' :: [EventDestination]
eventDestinations = forall a. Monoid a => a
Prelude.mempty,
$sel:createdTimestamp:ConfigurationSetInformation' :: POSIX
createdTimestamp =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTimestamp_
}
configurationSetInformation_defaultMessageType :: Lens.Lens' ConfigurationSetInformation (Prelude.Maybe MessageType)
configurationSetInformation_defaultMessageType :: Lens' ConfigurationSetInformation (Maybe MessageType)
configurationSetInformation_defaultMessageType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSetInformation' {Maybe MessageType
defaultMessageType :: Maybe MessageType
$sel:defaultMessageType:ConfigurationSetInformation' :: ConfigurationSetInformation -> Maybe MessageType
defaultMessageType} -> Maybe MessageType
defaultMessageType) (\s :: ConfigurationSetInformation
s@ConfigurationSetInformation' {} Maybe MessageType
a -> ConfigurationSetInformation
s {$sel:defaultMessageType:ConfigurationSetInformation' :: Maybe MessageType
defaultMessageType = Maybe MessageType
a} :: ConfigurationSetInformation)
configurationSetInformation_defaultSenderId :: Lens.Lens' ConfigurationSetInformation (Prelude.Maybe Prelude.Text)
configurationSetInformation_defaultSenderId :: Lens' ConfigurationSetInformation (Maybe Text)
configurationSetInformation_defaultSenderId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSetInformation' {Maybe Text
defaultSenderId :: Maybe Text
$sel:defaultSenderId:ConfigurationSetInformation' :: ConfigurationSetInformation -> Maybe Text
defaultSenderId} -> Maybe Text
defaultSenderId) (\s :: ConfigurationSetInformation
s@ConfigurationSetInformation' {} Maybe Text
a -> ConfigurationSetInformation
s {$sel:defaultSenderId:ConfigurationSetInformation' :: Maybe Text
defaultSenderId = Maybe Text
a} :: ConfigurationSetInformation)
configurationSetInformation_configurationSetArn :: Lens.Lens' ConfigurationSetInformation Prelude.Text
configurationSetInformation_configurationSetArn :: Lens' ConfigurationSetInformation Text
configurationSetInformation_configurationSetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSetInformation' {Text
configurationSetArn :: Text
$sel:configurationSetArn:ConfigurationSetInformation' :: ConfigurationSetInformation -> Text
configurationSetArn} -> Text
configurationSetArn) (\s :: ConfigurationSetInformation
s@ConfigurationSetInformation' {} Text
a -> ConfigurationSetInformation
s {$sel:configurationSetArn:ConfigurationSetInformation' :: Text
configurationSetArn = Text
a} :: ConfigurationSetInformation)
configurationSetInformation_configurationSetName :: Lens.Lens' ConfigurationSetInformation Prelude.Text
configurationSetInformation_configurationSetName :: Lens' ConfigurationSetInformation Text
configurationSetInformation_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSetInformation' {Text
configurationSetName :: Text
$sel:configurationSetName:ConfigurationSetInformation' :: ConfigurationSetInformation -> Text
configurationSetName} -> Text
configurationSetName) (\s :: ConfigurationSetInformation
s@ConfigurationSetInformation' {} Text
a -> ConfigurationSetInformation
s {$sel:configurationSetName:ConfigurationSetInformation' :: Text
configurationSetName = Text
a} :: ConfigurationSetInformation)
configurationSetInformation_eventDestinations :: Lens.Lens' ConfigurationSetInformation [EventDestination]
configurationSetInformation_eventDestinations :: Lens' ConfigurationSetInformation [EventDestination]
configurationSetInformation_eventDestinations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSetInformation' {[EventDestination]
eventDestinations :: [EventDestination]
$sel:eventDestinations:ConfigurationSetInformation' :: ConfigurationSetInformation -> [EventDestination]
eventDestinations} -> [EventDestination]
eventDestinations) (\s :: ConfigurationSetInformation
s@ConfigurationSetInformation' {} [EventDestination]
a -> ConfigurationSetInformation
s {$sel:eventDestinations:ConfigurationSetInformation' :: [EventDestination]
eventDestinations = [EventDestination]
a} :: ConfigurationSetInformation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
configurationSetInformation_createdTimestamp :: Lens.Lens' ConfigurationSetInformation Prelude.UTCTime
configurationSetInformation_createdTimestamp :: Lens' ConfigurationSetInformation UTCTime
configurationSetInformation_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSetInformation' {POSIX
createdTimestamp :: POSIX
$sel:createdTimestamp:ConfigurationSetInformation' :: ConfigurationSetInformation -> POSIX
createdTimestamp} -> POSIX
createdTimestamp) (\s :: ConfigurationSetInformation
s@ConfigurationSetInformation' {} POSIX
a -> ConfigurationSetInformation
s {$sel:createdTimestamp:ConfigurationSetInformation' :: POSIX
createdTimestamp = POSIX
a} :: ConfigurationSetInformation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ConfigurationSetInformation where
parseJSON :: Value -> Parser ConfigurationSetInformation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConfigurationSetInformation"
( \Object
x ->
Maybe MessageType
-> Maybe Text
-> Text
-> Text
-> [EventDestination]
-> POSIX
-> ConfigurationSetInformation
ConfigurationSetInformation'
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
"DefaultMessageType")
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
"DefaultSenderId")
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
"ConfigurationSetArn")
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
"ConfigurationSetName")
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
"EventDestinations"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
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 ConfigurationSetInformation where
hashWithSalt :: Int -> ConfigurationSetInformation -> Int
hashWithSalt Int
_salt ConfigurationSetInformation' {[EventDestination]
Maybe Text
Maybe MessageType
Text
POSIX
createdTimestamp :: POSIX
eventDestinations :: [EventDestination]
configurationSetName :: Text
configurationSetArn :: Text
defaultSenderId :: Maybe Text
defaultMessageType :: Maybe MessageType
$sel:createdTimestamp:ConfigurationSetInformation' :: ConfigurationSetInformation -> POSIX
$sel:eventDestinations:ConfigurationSetInformation' :: ConfigurationSetInformation -> [EventDestination]
$sel:configurationSetName:ConfigurationSetInformation' :: ConfigurationSetInformation -> Text
$sel:configurationSetArn:ConfigurationSetInformation' :: ConfigurationSetInformation -> Text
$sel:defaultSenderId:ConfigurationSetInformation' :: ConfigurationSetInformation -> Maybe Text
$sel:defaultMessageType:ConfigurationSetInformation' :: ConfigurationSetInformation -> Maybe MessageType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MessageType
defaultMessageType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultSenderId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [EventDestination]
eventDestinations
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdTimestamp
instance Prelude.NFData ConfigurationSetInformation where
rnf :: ConfigurationSetInformation -> ()
rnf ConfigurationSetInformation' {[EventDestination]
Maybe Text
Maybe MessageType
Text
POSIX
createdTimestamp :: POSIX
eventDestinations :: [EventDestination]
configurationSetName :: Text
configurationSetArn :: Text
defaultSenderId :: Maybe Text
defaultMessageType :: Maybe MessageType
$sel:createdTimestamp:ConfigurationSetInformation' :: ConfigurationSetInformation -> POSIX
$sel:eventDestinations:ConfigurationSetInformation' :: ConfigurationSetInformation -> [EventDestination]
$sel:configurationSetName:ConfigurationSetInformation' :: ConfigurationSetInformation -> Text
$sel:configurationSetArn:ConfigurationSetInformation' :: ConfigurationSetInformation -> Text
$sel:defaultSenderId:ConfigurationSetInformation' :: ConfigurationSetInformation -> Maybe Text
$sel:defaultMessageType:ConfigurationSetInformation' :: ConfigurationSetInformation -> Maybe MessageType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe MessageType
defaultMessageType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultSenderId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [EventDestination]
eventDestinations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdTimestamp