{-# 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.PoolInformation 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.MessageType
import Amazonka.PinpointSmsVoiceV2.Types.PoolStatus
import qualified Amazonka.Prelude as Prelude
data PoolInformation = PoolInformation'
{
PoolInformation -> Maybe Text
twoWayChannelArn :: Prelude.Maybe Prelude.Text,
PoolInformation -> Text
poolArn :: Prelude.Text,
PoolInformation -> Text
poolId :: Prelude.Text,
PoolInformation -> PoolStatus
status :: PoolStatus,
PoolInformation -> MessageType
messageType :: MessageType,
PoolInformation -> Bool
twoWayEnabled :: Prelude.Bool,
PoolInformation -> Bool
selfManagedOptOutsEnabled :: Prelude.Bool,
PoolInformation -> Text
optOutListName :: Prelude.Text,
PoolInformation -> Bool
sharedRoutesEnabled :: Prelude.Bool,
PoolInformation -> Bool
deletionProtectionEnabled :: Prelude.Bool,
PoolInformation -> POSIX
createdTimestamp :: Data.POSIX
}
deriving (PoolInformation -> PoolInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PoolInformation -> PoolInformation -> Bool
$c/= :: PoolInformation -> PoolInformation -> Bool
== :: PoolInformation -> PoolInformation -> Bool
$c== :: PoolInformation -> PoolInformation -> Bool
Prelude.Eq, ReadPrec [PoolInformation]
ReadPrec PoolInformation
Int -> ReadS PoolInformation
ReadS [PoolInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PoolInformation]
$creadListPrec :: ReadPrec [PoolInformation]
readPrec :: ReadPrec PoolInformation
$creadPrec :: ReadPrec PoolInformation
readList :: ReadS [PoolInformation]
$creadList :: ReadS [PoolInformation]
readsPrec :: Int -> ReadS PoolInformation
$creadsPrec :: Int -> ReadS PoolInformation
Prelude.Read, Int -> PoolInformation -> ShowS
[PoolInformation] -> ShowS
PoolInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PoolInformation] -> ShowS
$cshowList :: [PoolInformation] -> ShowS
show :: PoolInformation -> String
$cshow :: PoolInformation -> String
showsPrec :: Int -> PoolInformation -> ShowS
$cshowsPrec :: Int -> PoolInformation -> ShowS
Prelude.Show, forall x. Rep PoolInformation x -> PoolInformation
forall x. PoolInformation -> Rep PoolInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PoolInformation x -> PoolInformation
$cfrom :: forall x. PoolInformation -> Rep PoolInformation x
Prelude.Generic)
newPoolInformation ::
Prelude.Text ->
Prelude.Text ->
PoolStatus ->
MessageType ->
Prelude.Bool ->
Prelude.Bool ->
Prelude.Text ->
Prelude.Bool ->
Prelude.Bool ->
Prelude.UTCTime ->
PoolInformation
newPoolInformation :: Text
-> Text
-> PoolStatus
-> MessageType
-> Bool
-> Bool
-> Text
-> Bool
-> Bool
-> UTCTime
-> PoolInformation
newPoolInformation
Text
pPoolArn_
Text
pPoolId_
PoolStatus
pStatus_
MessageType
pMessageType_
Bool
pTwoWayEnabled_
Bool
pSelfManagedOptOutsEnabled_
Text
pOptOutListName_
Bool
pSharedRoutesEnabled_
Bool
pDeletionProtectionEnabled_
UTCTime
pCreatedTimestamp_ =
PoolInformation'
{ $sel:twoWayChannelArn:PoolInformation' :: Maybe Text
twoWayChannelArn =
forall a. Maybe a
Prelude.Nothing,
$sel:poolArn:PoolInformation' :: Text
poolArn = Text
pPoolArn_,
$sel:poolId:PoolInformation' :: Text
poolId = Text
pPoolId_,
$sel:status:PoolInformation' :: PoolStatus
status = PoolStatus
pStatus_,
$sel:messageType:PoolInformation' :: MessageType
messageType = MessageType
pMessageType_,
$sel:twoWayEnabled:PoolInformation' :: Bool
twoWayEnabled = Bool
pTwoWayEnabled_,
$sel:selfManagedOptOutsEnabled:PoolInformation' :: Bool
selfManagedOptOutsEnabled =
Bool
pSelfManagedOptOutsEnabled_,
$sel:optOutListName:PoolInformation' :: Text
optOutListName = Text
pOptOutListName_,
$sel:sharedRoutesEnabled:PoolInformation' :: Bool
sharedRoutesEnabled = Bool
pSharedRoutesEnabled_,
$sel:deletionProtectionEnabled:PoolInformation' :: Bool
deletionProtectionEnabled =
Bool
pDeletionProtectionEnabled_,
$sel:createdTimestamp:PoolInformation' :: POSIX
createdTimestamp =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTimestamp_
}
poolInformation_twoWayChannelArn :: Lens.Lens' PoolInformation (Prelude.Maybe Prelude.Text)
poolInformation_twoWayChannelArn :: Lens' PoolInformation (Maybe Text)
poolInformation_twoWayChannelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Maybe Text
twoWayChannelArn :: Maybe Text
$sel:twoWayChannelArn:PoolInformation' :: PoolInformation -> Maybe Text
twoWayChannelArn} -> Maybe Text
twoWayChannelArn) (\s :: PoolInformation
s@PoolInformation' {} Maybe Text
a -> PoolInformation
s {$sel:twoWayChannelArn:PoolInformation' :: Maybe Text
twoWayChannelArn = Maybe Text
a} :: PoolInformation)
poolInformation_poolArn :: Lens.Lens' PoolInformation Prelude.Text
poolInformation_poolArn :: Lens' PoolInformation Text
poolInformation_poolArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Text
poolArn :: Text
$sel:poolArn:PoolInformation' :: PoolInformation -> Text
poolArn} -> Text
poolArn) (\s :: PoolInformation
s@PoolInformation' {} Text
a -> PoolInformation
s {$sel:poolArn:PoolInformation' :: Text
poolArn = Text
a} :: PoolInformation)
poolInformation_poolId :: Lens.Lens' PoolInformation Prelude.Text
poolInformation_poolId :: Lens' PoolInformation Text
poolInformation_poolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Text
poolId :: Text
$sel:poolId:PoolInformation' :: PoolInformation -> Text
poolId} -> Text
poolId) (\s :: PoolInformation
s@PoolInformation' {} Text
a -> PoolInformation
s {$sel:poolId:PoolInformation' :: Text
poolId = Text
a} :: PoolInformation)
poolInformation_status :: Lens.Lens' PoolInformation PoolStatus
poolInformation_status :: Lens' PoolInformation PoolStatus
poolInformation_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {PoolStatus
status :: PoolStatus
$sel:status:PoolInformation' :: PoolInformation -> PoolStatus
status} -> PoolStatus
status) (\s :: PoolInformation
s@PoolInformation' {} PoolStatus
a -> PoolInformation
s {$sel:status:PoolInformation' :: PoolStatus
status = PoolStatus
a} :: PoolInformation)
poolInformation_messageType :: Lens.Lens' PoolInformation MessageType
poolInformation_messageType :: Lens' PoolInformation MessageType
poolInformation_messageType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {MessageType
messageType :: MessageType
$sel:messageType:PoolInformation' :: PoolInformation -> MessageType
messageType} -> MessageType
messageType) (\s :: PoolInformation
s@PoolInformation' {} MessageType
a -> PoolInformation
s {$sel:messageType:PoolInformation' :: MessageType
messageType = MessageType
a} :: PoolInformation)
poolInformation_twoWayEnabled :: Lens.Lens' PoolInformation Prelude.Bool
poolInformation_twoWayEnabled :: Lens' PoolInformation Bool
poolInformation_twoWayEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Bool
twoWayEnabled :: Bool
$sel:twoWayEnabled:PoolInformation' :: PoolInformation -> Bool
twoWayEnabled} -> Bool
twoWayEnabled) (\s :: PoolInformation
s@PoolInformation' {} Bool
a -> PoolInformation
s {$sel:twoWayEnabled:PoolInformation' :: Bool
twoWayEnabled = Bool
a} :: PoolInformation)
poolInformation_selfManagedOptOutsEnabled :: Lens.Lens' PoolInformation Prelude.Bool
poolInformation_selfManagedOptOutsEnabled :: Lens' PoolInformation Bool
poolInformation_selfManagedOptOutsEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Bool
selfManagedOptOutsEnabled :: Bool
$sel:selfManagedOptOutsEnabled:PoolInformation' :: PoolInformation -> Bool
selfManagedOptOutsEnabled} -> Bool
selfManagedOptOutsEnabled) (\s :: PoolInformation
s@PoolInformation' {} Bool
a -> PoolInformation
s {$sel:selfManagedOptOutsEnabled:PoolInformation' :: Bool
selfManagedOptOutsEnabled = Bool
a} :: PoolInformation)
poolInformation_optOutListName :: Lens.Lens' PoolInformation Prelude.Text
poolInformation_optOutListName :: Lens' PoolInformation Text
poolInformation_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Text
optOutListName :: Text
$sel:optOutListName:PoolInformation' :: PoolInformation -> Text
optOutListName} -> Text
optOutListName) (\s :: PoolInformation
s@PoolInformation' {} Text
a -> PoolInformation
s {$sel:optOutListName:PoolInformation' :: Text
optOutListName = Text
a} :: PoolInformation)
poolInformation_sharedRoutesEnabled :: Lens.Lens' PoolInformation Prelude.Bool
poolInformation_sharedRoutesEnabled :: Lens' PoolInformation Bool
poolInformation_sharedRoutesEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Bool
sharedRoutesEnabled :: Bool
$sel:sharedRoutesEnabled:PoolInformation' :: PoolInformation -> Bool
sharedRoutesEnabled} -> Bool
sharedRoutesEnabled) (\s :: PoolInformation
s@PoolInformation' {} Bool
a -> PoolInformation
s {$sel:sharedRoutesEnabled:PoolInformation' :: Bool
sharedRoutesEnabled = Bool
a} :: PoolInformation)
poolInformation_deletionProtectionEnabled :: Lens.Lens' PoolInformation Prelude.Bool
poolInformation_deletionProtectionEnabled :: Lens' PoolInformation Bool
poolInformation_deletionProtectionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {Bool
deletionProtectionEnabled :: Bool
$sel:deletionProtectionEnabled:PoolInformation' :: PoolInformation -> Bool
deletionProtectionEnabled} -> Bool
deletionProtectionEnabled) (\s :: PoolInformation
s@PoolInformation' {} Bool
a -> PoolInformation
s {$sel:deletionProtectionEnabled:PoolInformation' :: Bool
deletionProtectionEnabled = Bool
a} :: PoolInformation)
poolInformation_createdTimestamp :: Lens.Lens' PoolInformation Prelude.UTCTime
poolInformation_createdTimestamp :: Lens' PoolInformation UTCTime
poolInformation_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PoolInformation' {POSIX
createdTimestamp :: POSIX
$sel:createdTimestamp:PoolInformation' :: PoolInformation -> POSIX
createdTimestamp} -> POSIX
createdTimestamp) (\s :: PoolInformation
s@PoolInformation' {} POSIX
a -> PoolInformation
s {$sel:createdTimestamp:PoolInformation' :: POSIX
createdTimestamp = POSIX
a} :: PoolInformation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON PoolInformation where
parseJSON :: Value -> Parser PoolInformation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PoolInformation"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> PoolStatus
-> MessageType
-> Bool
-> Bool
-> Text
-> Bool
-> Bool
-> POSIX
-> PoolInformation
PoolInformation'
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
"TwoWayChannelArn")
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
"PoolArn")
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
"PoolId")
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
"Status")
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
"MessageType")
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
"TwoWayEnabled")
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
"SelfManagedOptOutsEnabled")
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
"SharedRoutesEnabled")
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
"DeletionProtectionEnabled")
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 PoolInformation where
hashWithSalt :: Int -> PoolInformation -> Int
hashWithSalt Int
_salt PoolInformation' {Bool
Maybe Text
Text
POSIX
MessageType
PoolStatus
createdTimestamp :: POSIX
deletionProtectionEnabled :: Bool
sharedRoutesEnabled :: Bool
optOutListName :: Text
selfManagedOptOutsEnabled :: Bool
twoWayEnabled :: Bool
messageType :: MessageType
status :: PoolStatus
poolId :: Text
poolArn :: Text
twoWayChannelArn :: Maybe Text
$sel:createdTimestamp:PoolInformation' :: PoolInformation -> POSIX
$sel:deletionProtectionEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:sharedRoutesEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:optOutListName:PoolInformation' :: PoolInformation -> Text
$sel:selfManagedOptOutsEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:twoWayEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:messageType:PoolInformation' :: PoolInformation -> MessageType
$sel:status:PoolInformation' :: PoolInformation -> PoolStatus
$sel:poolId:PoolInformation' :: PoolInformation -> Text
$sel:poolArn:PoolInformation' :: PoolInformation -> Text
$sel:twoWayChannelArn:PoolInformation' :: PoolInformation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
twoWayChannelArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
poolArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
poolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` PoolStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MessageType
messageType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
twoWayEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
selfManagedOptOutsEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optOutListName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
sharedRoutesEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
deletionProtectionEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdTimestamp
instance Prelude.NFData PoolInformation where
rnf :: PoolInformation -> ()
rnf PoolInformation' {Bool
Maybe Text
Text
POSIX
MessageType
PoolStatus
createdTimestamp :: POSIX
deletionProtectionEnabled :: Bool
sharedRoutesEnabled :: Bool
optOutListName :: Text
selfManagedOptOutsEnabled :: Bool
twoWayEnabled :: Bool
messageType :: MessageType
status :: PoolStatus
poolId :: Text
poolArn :: Text
twoWayChannelArn :: Maybe Text
$sel:createdTimestamp:PoolInformation' :: PoolInformation -> POSIX
$sel:deletionProtectionEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:sharedRoutesEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:optOutListName:PoolInformation' :: PoolInformation -> Text
$sel:selfManagedOptOutsEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:twoWayEnabled:PoolInformation' :: PoolInformation -> Bool
$sel:messageType:PoolInformation' :: PoolInformation -> MessageType
$sel:status:PoolInformation' :: PoolInformation -> PoolStatus
$sel:poolId:PoolInformation' :: PoolInformation -> Text
$sel:poolArn:PoolInformation' :: PoolInformation -> Text
$sel:twoWayChannelArn:PoolInformation' :: PoolInformation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
twoWayChannelArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
poolArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
poolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf PoolStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MessageType
messageType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
twoWayEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
selfManagedOptOutsEnabled
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 Bool
sharedRoutesEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
deletionProtectionEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdTimestamp