{-# 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.Chime.Types.VoiceConnector where
import Amazonka.Chime.Types.VoiceConnectorAwsRegion
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VoiceConnector = VoiceConnector'
{
VoiceConnector -> Maybe POSIX
updatedTimestamp :: Prelude.Maybe Core.POSIX,
VoiceConnector -> Maybe Text
outboundHostName :: Prelude.Maybe Prelude.Text,
VoiceConnector -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
VoiceConnector -> Maybe Bool
requireEncryption :: Prelude.Maybe Prelude.Bool,
VoiceConnector -> Maybe VoiceConnectorAwsRegion
awsRegion :: Prelude.Maybe VoiceConnectorAwsRegion,
VoiceConnector -> Maybe Text
voiceConnectorId :: Prelude.Maybe Prelude.Text,
VoiceConnector -> Maybe Text
voiceConnectorArn :: Prelude.Maybe Prelude.Text,
VoiceConnector -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX
}
deriving (VoiceConnector -> VoiceConnector -> Bool
(VoiceConnector -> VoiceConnector -> Bool)
-> (VoiceConnector -> VoiceConnector -> Bool) -> Eq VoiceConnector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VoiceConnector -> VoiceConnector -> Bool
$c/= :: VoiceConnector -> VoiceConnector -> Bool
== :: VoiceConnector -> VoiceConnector -> Bool
$c== :: VoiceConnector -> VoiceConnector -> Bool
Prelude.Eq, ReadPrec [VoiceConnector]
ReadPrec VoiceConnector
Int -> ReadS VoiceConnector
ReadS [VoiceConnector]
(Int -> ReadS VoiceConnector)
-> ReadS [VoiceConnector]
-> ReadPrec VoiceConnector
-> ReadPrec [VoiceConnector]
-> Read VoiceConnector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VoiceConnector]
$creadListPrec :: ReadPrec [VoiceConnector]
readPrec :: ReadPrec VoiceConnector
$creadPrec :: ReadPrec VoiceConnector
readList :: ReadS [VoiceConnector]
$creadList :: ReadS [VoiceConnector]
readsPrec :: Int -> ReadS VoiceConnector
$creadsPrec :: Int -> ReadS VoiceConnector
Prelude.Read, Int -> VoiceConnector -> ShowS
[VoiceConnector] -> ShowS
VoiceConnector -> String
(Int -> VoiceConnector -> ShowS)
-> (VoiceConnector -> String)
-> ([VoiceConnector] -> ShowS)
-> Show VoiceConnector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VoiceConnector] -> ShowS
$cshowList :: [VoiceConnector] -> ShowS
show :: VoiceConnector -> String
$cshow :: VoiceConnector -> String
showsPrec :: Int -> VoiceConnector -> ShowS
$cshowsPrec :: Int -> VoiceConnector -> ShowS
Prelude.Show, (forall x. VoiceConnector -> Rep VoiceConnector x)
-> (forall x. Rep VoiceConnector x -> VoiceConnector)
-> Generic VoiceConnector
forall x. Rep VoiceConnector x -> VoiceConnector
forall x. VoiceConnector -> Rep VoiceConnector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VoiceConnector x -> VoiceConnector
$cfrom :: forall x. VoiceConnector -> Rep VoiceConnector x
Prelude.Generic)
newVoiceConnector ::
VoiceConnector
newVoiceConnector :: VoiceConnector
newVoiceConnector =
VoiceConnector' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector
VoiceConnector'
{ $sel:updatedTimestamp:VoiceConnector' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:outboundHostName:VoiceConnector' :: Maybe Text
outboundHostName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:VoiceConnector' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requireEncryption:VoiceConnector' :: Maybe Bool
requireEncryption = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:awsRegion:VoiceConnector' :: Maybe VoiceConnectorAwsRegion
awsRegion = Maybe VoiceConnectorAwsRegion
forall a. Maybe a
Prelude.Nothing,
$sel:voiceConnectorId:VoiceConnector' :: Maybe Text
voiceConnectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:voiceConnectorArn:VoiceConnector' :: Maybe Text
voiceConnectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTimestamp:VoiceConnector' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
voiceConnector_updatedTimestamp :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.UTCTime)
voiceConnector_updatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnector -> f VoiceConnector
voiceConnector_updatedTimestamp = (VoiceConnector -> Maybe POSIX)
-> (VoiceConnector -> Maybe POSIX -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe POSIX
updatedTimestamp :: Maybe POSIX
$sel:updatedTimestamp:VoiceConnector' :: VoiceConnector -> Maybe POSIX
updatedTimestamp} -> Maybe POSIX
updatedTimestamp) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe POSIX
a -> VoiceConnector
s {$sel:updatedTimestamp:VoiceConnector' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
a} :: VoiceConnector) ((Maybe POSIX -> f (Maybe POSIX))
-> VoiceConnector -> f VoiceConnector)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnector
-> f VoiceConnector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
voiceConnector_outboundHostName :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.Text)
voiceConnector_outboundHostName :: (Maybe Text -> f (Maybe Text))
-> VoiceConnector -> f VoiceConnector
voiceConnector_outboundHostName = (VoiceConnector -> Maybe Text)
-> (VoiceConnector -> Maybe Text -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe Text
outboundHostName :: Maybe Text
$sel:outboundHostName:VoiceConnector' :: VoiceConnector -> Maybe Text
outboundHostName} -> Maybe Text
outboundHostName) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe Text
a -> VoiceConnector
s {$sel:outboundHostName:VoiceConnector' :: Maybe Text
outboundHostName = Maybe Text
a} :: VoiceConnector)
voiceConnector_name :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.Text)
voiceConnector_name :: (Maybe Text -> f (Maybe Text))
-> VoiceConnector -> f VoiceConnector
voiceConnector_name = (VoiceConnector -> Maybe Text)
-> (VoiceConnector -> Maybe Text -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe Text
name :: Maybe Text
$sel:name:VoiceConnector' :: VoiceConnector -> Maybe Text
name} -> Maybe Text
name) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe Text
a -> VoiceConnector
s {$sel:name:VoiceConnector' :: Maybe Text
name = Maybe Text
a} :: VoiceConnector)
voiceConnector_requireEncryption :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.Bool)
voiceConnector_requireEncryption :: (Maybe Bool -> f (Maybe Bool))
-> VoiceConnector -> f VoiceConnector
voiceConnector_requireEncryption = (VoiceConnector -> Maybe Bool)
-> (VoiceConnector -> Maybe Bool -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe Bool
requireEncryption :: Maybe Bool
$sel:requireEncryption:VoiceConnector' :: VoiceConnector -> Maybe Bool
requireEncryption} -> Maybe Bool
requireEncryption) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe Bool
a -> VoiceConnector
s {$sel:requireEncryption:VoiceConnector' :: Maybe Bool
requireEncryption = Maybe Bool
a} :: VoiceConnector)
voiceConnector_awsRegion :: Lens.Lens' VoiceConnector (Prelude.Maybe VoiceConnectorAwsRegion)
voiceConnector_awsRegion :: (Maybe VoiceConnectorAwsRegion
-> f (Maybe VoiceConnectorAwsRegion))
-> VoiceConnector -> f VoiceConnector
voiceConnector_awsRegion = (VoiceConnector -> Maybe VoiceConnectorAwsRegion)
-> (VoiceConnector
-> Maybe VoiceConnectorAwsRegion -> VoiceConnector)
-> Lens
VoiceConnector
VoiceConnector
(Maybe VoiceConnectorAwsRegion)
(Maybe VoiceConnectorAwsRegion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe VoiceConnectorAwsRegion
awsRegion :: Maybe VoiceConnectorAwsRegion
$sel:awsRegion:VoiceConnector' :: VoiceConnector -> Maybe VoiceConnectorAwsRegion
awsRegion} -> Maybe VoiceConnectorAwsRegion
awsRegion) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe VoiceConnectorAwsRegion
a -> VoiceConnector
s {$sel:awsRegion:VoiceConnector' :: Maybe VoiceConnectorAwsRegion
awsRegion = Maybe VoiceConnectorAwsRegion
a} :: VoiceConnector)
voiceConnector_voiceConnectorId :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.Text)
voiceConnector_voiceConnectorId :: (Maybe Text -> f (Maybe Text))
-> VoiceConnector -> f VoiceConnector
voiceConnector_voiceConnectorId = (VoiceConnector -> Maybe Text)
-> (VoiceConnector -> Maybe Text -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe Text
voiceConnectorId :: Maybe Text
$sel:voiceConnectorId:VoiceConnector' :: VoiceConnector -> Maybe Text
voiceConnectorId} -> Maybe Text
voiceConnectorId) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe Text
a -> VoiceConnector
s {$sel:voiceConnectorId:VoiceConnector' :: Maybe Text
voiceConnectorId = Maybe Text
a} :: VoiceConnector)
voiceConnector_voiceConnectorArn :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.Text)
voiceConnector_voiceConnectorArn :: (Maybe Text -> f (Maybe Text))
-> VoiceConnector -> f VoiceConnector
voiceConnector_voiceConnectorArn = (VoiceConnector -> Maybe Text)
-> (VoiceConnector -> Maybe Text -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe Text
voiceConnectorArn :: Maybe Text
$sel:voiceConnectorArn:VoiceConnector' :: VoiceConnector -> Maybe Text
voiceConnectorArn} -> Maybe Text
voiceConnectorArn) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe Text
a -> VoiceConnector
s {$sel:voiceConnectorArn:VoiceConnector' :: Maybe Text
voiceConnectorArn = Maybe Text
a} :: VoiceConnector)
voiceConnector_createdTimestamp :: Lens.Lens' VoiceConnector (Prelude.Maybe Prelude.UTCTime)
voiceConnector_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnector -> f VoiceConnector
voiceConnector_createdTimestamp = (VoiceConnector -> Maybe POSIX)
-> (VoiceConnector -> Maybe POSIX -> VoiceConnector)
-> Lens VoiceConnector VoiceConnector (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnector' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:VoiceConnector' :: VoiceConnector -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: VoiceConnector
s@VoiceConnector' {} Maybe POSIX
a -> VoiceConnector
s {$sel:createdTimestamp:VoiceConnector' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: VoiceConnector) ((Maybe POSIX -> f (Maybe POSIX))
-> VoiceConnector -> f VoiceConnector)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnector
-> f VoiceConnector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON VoiceConnector where
parseJSON :: Value -> Parser VoiceConnector
parseJSON =
String
-> (Object -> Parser VoiceConnector)
-> Value
-> Parser VoiceConnector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VoiceConnector"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector
VoiceConnector'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdatedTimestamp")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutboundHostName")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe Bool
-> Maybe VoiceConnectorAwsRegion
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnector)
-> Parser (Maybe Bool)
-> Parser
(Maybe VoiceConnectorAwsRegion
-> Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequireEncryption")
Parser
(Maybe VoiceConnectorAwsRegion
-> Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnector)
-> Parser (Maybe VoiceConnectorAwsRegion)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VoiceConnectorAwsRegion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AwsRegion")
Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnector)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> VoiceConnector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VoiceConnectorId")
Parser (Maybe Text -> Maybe POSIX -> VoiceConnector)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> VoiceConnector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VoiceConnectorArn")
Parser (Maybe POSIX -> VoiceConnector)
-> Parser (Maybe POSIX) -> Parser VoiceConnector
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTimestamp")
)
instance Prelude.Hashable VoiceConnector
instance Prelude.NFData VoiceConnector