{-# 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.VoiceConnectorGroup where
import Amazonka.Chime.Types.VoiceConnectorItem
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VoiceConnectorGroup = VoiceConnectorGroup'
{
VoiceConnectorGroup -> Maybe Text
voiceConnectorGroupId :: Prelude.Maybe Prelude.Text,
VoiceConnectorGroup -> Maybe POSIX
updatedTimestamp :: Prelude.Maybe Core.POSIX,
VoiceConnectorGroup -> Maybe [VoiceConnectorItem]
voiceConnectorItems :: Prelude.Maybe [VoiceConnectorItem],
VoiceConnectorGroup -> Maybe Text
voiceConnectorGroupArn :: Prelude.Maybe Prelude.Text,
VoiceConnectorGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
VoiceConnectorGroup -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX
}
deriving (VoiceConnectorGroup -> VoiceConnectorGroup -> Bool
(VoiceConnectorGroup -> VoiceConnectorGroup -> Bool)
-> (VoiceConnectorGroup -> VoiceConnectorGroup -> Bool)
-> Eq VoiceConnectorGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VoiceConnectorGroup -> VoiceConnectorGroup -> Bool
$c/= :: VoiceConnectorGroup -> VoiceConnectorGroup -> Bool
== :: VoiceConnectorGroup -> VoiceConnectorGroup -> Bool
$c== :: VoiceConnectorGroup -> VoiceConnectorGroup -> Bool
Prelude.Eq, ReadPrec [VoiceConnectorGroup]
ReadPrec VoiceConnectorGroup
Int -> ReadS VoiceConnectorGroup
ReadS [VoiceConnectorGroup]
(Int -> ReadS VoiceConnectorGroup)
-> ReadS [VoiceConnectorGroup]
-> ReadPrec VoiceConnectorGroup
-> ReadPrec [VoiceConnectorGroup]
-> Read VoiceConnectorGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VoiceConnectorGroup]
$creadListPrec :: ReadPrec [VoiceConnectorGroup]
readPrec :: ReadPrec VoiceConnectorGroup
$creadPrec :: ReadPrec VoiceConnectorGroup
readList :: ReadS [VoiceConnectorGroup]
$creadList :: ReadS [VoiceConnectorGroup]
readsPrec :: Int -> ReadS VoiceConnectorGroup
$creadsPrec :: Int -> ReadS VoiceConnectorGroup
Prelude.Read, Int -> VoiceConnectorGroup -> ShowS
[VoiceConnectorGroup] -> ShowS
VoiceConnectorGroup -> String
(Int -> VoiceConnectorGroup -> ShowS)
-> (VoiceConnectorGroup -> String)
-> ([VoiceConnectorGroup] -> ShowS)
-> Show VoiceConnectorGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VoiceConnectorGroup] -> ShowS
$cshowList :: [VoiceConnectorGroup] -> ShowS
show :: VoiceConnectorGroup -> String
$cshow :: VoiceConnectorGroup -> String
showsPrec :: Int -> VoiceConnectorGroup -> ShowS
$cshowsPrec :: Int -> VoiceConnectorGroup -> ShowS
Prelude.Show, (forall x. VoiceConnectorGroup -> Rep VoiceConnectorGroup x)
-> (forall x. Rep VoiceConnectorGroup x -> VoiceConnectorGroup)
-> Generic VoiceConnectorGroup
forall x. Rep VoiceConnectorGroup x -> VoiceConnectorGroup
forall x. VoiceConnectorGroup -> Rep VoiceConnectorGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VoiceConnectorGroup x -> VoiceConnectorGroup
$cfrom :: forall x. VoiceConnectorGroup -> Rep VoiceConnectorGroup x
Prelude.Generic)
newVoiceConnectorGroup ::
VoiceConnectorGroup
newVoiceConnectorGroup :: VoiceConnectorGroup
newVoiceConnectorGroup =
VoiceConnectorGroup' :: Maybe Text
-> Maybe POSIX
-> Maybe [VoiceConnectorItem]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnectorGroup
VoiceConnectorGroup'
{ $sel:voiceConnectorGroupId:VoiceConnectorGroup' :: Maybe Text
voiceConnectorGroupId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedTimestamp:VoiceConnectorGroup' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:voiceConnectorItems:VoiceConnectorGroup' :: Maybe [VoiceConnectorItem]
voiceConnectorItems = Maybe [VoiceConnectorItem]
forall a. Maybe a
Prelude.Nothing,
$sel:voiceConnectorGroupArn:VoiceConnectorGroup' :: Maybe Text
voiceConnectorGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:VoiceConnectorGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTimestamp:VoiceConnectorGroup' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
voiceConnectorGroup_voiceConnectorGroupId :: Lens.Lens' VoiceConnectorGroup (Prelude.Maybe Prelude.Text)
voiceConnectorGroup_voiceConnectorGroupId :: (Maybe Text -> f (Maybe Text))
-> VoiceConnectorGroup -> f VoiceConnectorGroup
voiceConnectorGroup_voiceConnectorGroupId = (VoiceConnectorGroup -> Maybe Text)
-> (VoiceConnectorGroup -> Maybe Text -> VoiceConnectorGroup)
-> Lens
VoiceConnectorGroup VoiceConnectorGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnectorGroup' {Maybe Text
voiceConnectorGroupId :: Maybe Text
$sel:voiceConnectorGroupId:VoiceConnectorGroup' :: VoiceConnectorGroup -> Maybe Text
voiceConnectorGroupId} -> Maybe Text
voiceConnectorGroupId) (\s :: VoiceConnectorGroup
s@VoiceConnectorGroup' {} Maybe Text
a -> VoiceConnectorGroup
s {$sel:voiceConnectorGroupId:VoiceConnectorGroup' :: Maybe Text
voiceConnectorGroupId = Maybe Text
a} :: VoiceConnectorGroup)
voiceConnectorGroup_updatedTimestamp :: Lens.Lens' VoiceConnectorGroup (Prelude.Maybe Prelude.UTCTime)
voiceConnectorGroup_updatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnectorGroup -> f VoiceConnectorGroup
voiceConnectorGroup_updatedTimestamp = (VoiceConnectorGroup -> Maybe POSIX)
-> (VoiceConnectorGroup -> Maybe POSIX -> VoiceConnectorGroup)
-> Lens
VoiceConnectorGroup VoiceConnectorGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnectorGroup' {Maybe POSIX
updatedTimestamp :: Maybe POSIX
$sel:updatedTimestamp:VoiceConnectorGroup' :: VoiceConnectorGroup -> Maybe POSIX
updatedTimestamp} -> Maybe POSIX
updatedTimestamp) (\s :: VoiceConnectorGroup
s@VoiceConnectorGroup' {} Maybe POSIX
a -> VoiceConnectorGroup
s {$sel:updatedTimestamp:VoiceConnectorGroup' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
a} :: VoiceConnectorGroup) ((Maybe POSIX -> f (Maybe POSIX))
-> VoiceConnectorGroup -> f VoiceConnectorGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnectorGroup
-> f VoiceConnectorGroup
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
voiceConnectorGroup_voiceConnectorItems :: Lens.Lens' VoiceConnectorGroup (Prelude.Maybe [VoiceConnectorItem])
voiceConnectorGroup_voiceConnectorItems :: (Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> VoiceConnectorGroup -> f VoiceConnectorGroup
voiceConnectorGroup_voiceConnectorItems = (VoiceConnectorGroup -> Maybe [VoiceConnectorItem])
-> (VoiceConnectorGroup
-> Maybe [VoiceConnectorItem] -> VoiceConnectorGroup)
-> Lens
VoiceConnectorGroup
VoiceConnectorGroup
(Maybe [VoiceConnectorItem])
(Maybe [VoiceConnectorItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnectorGroup' {Maybe [VoiceConnectorItem]
voiceConnectorItems :: Maybe [VoiceConnectorItem]
$sel:voiceConnectorItems:VoiceConnectorGroup' :: VoiceConnectorGroup -> Maybe [VoiceConnectorItem]
voiceConnectorItems} -> Maybe [VoiceConnectorItem]
voiceConnectorItems) (\s :: VoiceConnectorGroup
s@VoiceConnectorGroup' {} Maybe [VoiceConnectorItem]
a -> VoiceConnectorGroup
s {$sel:voiceConnectorItems:VoiceConnectorGroup' :: Maybe [VoiceConnectorItem]
voiceConnectorItems = Maybe [VoiceConnectorItem]
a} :: VoiceConnectorGroup) ((Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> VoiceConnectorGroup -> f VoiceConnectorGroup)
-> ((Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> (Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> VoiceConnectorGroup
-> f VoiceConnectorGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[VoiceConnectorItem]
[VoiceConnectorItem]
[VoiceConnectorItem]
[VoiceConnectorItem]
-> Iso
(Maybe [VoiceConnectorItem])
(Maybe [VoiceConnectorItem])
(Maybe [VoiceConnectorItem])
(Maybe [VoiceConnectorItem])
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
[VoiceConnectorItem]
[VoiceConnectorItem]
[VoiceConnectorItem]
[VoiceConnectorItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
voiceConnectorGroup_voiceConnectorGroupArn :: Lens.Lens' VoiceConnectorGroup (Prelude.Maybe Prelude.Text)
voiceConnectorGroup_voiceConnectorGroupArn :: (Maybe Text -> f (Maybe Text))
-> VoiceConnectorGroup -> f VoiceConnectorGroup
voiceConnectorGroup_voiceConnectorGroupArn = (VoiceConnectorGroup -> Maybe Text)
-> (VoiceConnectorGroup -> Maybe Text -> VoiceConnectorGroup)
-> Lens
VoiceConnectorGroup VoiceConnectorGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnectorGroup' {Maybe Text
voiceConnectorGroupArn :: Maybe Text
$sel:voiceConnectorGroupArn:VoiceConnectorGroup' :: VoiceConnectorGroup -> Maybe Text
voiceConnectorGroupArn} -> Maybe Text
voiceConnectorGroupArn) (\s :: VoiceConnectorGroup
s@VoiceConnectorGroup' {} Maybe Text
a -> VoiceConnectorGroup
s {$sel:voiceConnectorGroupArn:VoiceConnectorGroup' :: Maybe Text
voiceConnectorGroupArn = Maybe Text
a} :: VoiceConnectorGroup)
voiceConnectorGroup_name :: Lens.Lens' VoiceConnectorGroup (Prelude.Maybe Prelude.Text)
voiceConnectorGroup_name :: (Maybe Text -> f (Maybe Text))
-> VoiceConnectorGroup -> f VoiceConnectorGroup
voiceConnectorGroup_name = (VoiceConnectorGroup -> Maybe Text)
-> (VoiceConnectorGroup -> Maybe Text -> VoiceConnectorGroup)
-> Lens
VoiceConnectorGroup VoiceConnectorGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnectorGroup' {Maybe Text
name :: Maybe Text
$sel:name:VoiceConnectorGroup' :: VoiceConnectorGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: VoiceConnectorGroup
s@VoiceConnectorGroup' {} Maybe Text
a -> VoiceConnectorGroup
s {$sel:name:VoiceConnectorGroup' :: Maybe Text
name = Maybe Text
a} :: VoiceConnectorGroup)
voiceConnectorGroup_createdTimestamp :: Lens.Lens' VoiceConnectorGroup (Prelude.Maybe Prelude.UTCTime)
voiceConnectorGroup_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnectorGroup -> f VoiceConnectorGroup
voiceConnectorGroup_createdTimestamp = (VoiceConnectorGroup -> Maybe POSIX)
-> (VoiceConnectorGroup -> Maybe POSIX -> VoiceConnectorGroup)
-> Lens
VoiceConnectorGroup VoiceConnectorGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceConnectorGroup' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:VoiceConnectorGroup' :: VoiceConnectorGroup -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: VoiceConnectorGroup
s@VoiceConnectorGroup' {} Maybe POSIX
a -> VoiceConnectorGroup
s {$sel:createdTimestamp:VoiceConnectorGroup' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: VoiceConnectorGroup) ((Maybe POSIX -> f (Maybe POSIX))
-> VoiceConnectorGroup -> f VoiceConnectorGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VoiceConnectorGroup
-> f VoiceConnectorGroup
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 VoiceConnectorGroup where
parseJSON :: Value -> Parser VoiceConnectorGroup
parseJSON =
String
-> (Object -> Parser VoiceConnectorGroup)
-> Value
-> Parser VoiceConnectorGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VoiceConnectorGroup"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe [VoiceConnectorItem]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnectorGroup
VoiceConnectorGroup'
(Maybe Text
-> Maybe POSIX
-> Maybe [VoiceConnectorItem]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnectorGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe [VoiceConnectorItem]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnectorGroup)
forall (f :: * -> *) a b. Functor 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
"VoiceConnectorGroupId")
Parser
(Maybe POSIX
-> Maybe [VoiceConnectorItem]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VoiceConnectorGroup)
-> Parser (Maybe POSIX)
-> Parser
(Maybe [VoiceConnectorItem]
-> Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnectorGroup)
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
"UpdatedTimestamp")
Parser
(Maybe [VoiceConnectorItem]
-> Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnectorGroup)
-> Parser (Maybe [VoiceConnectorItem])
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnectorGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [VoiceConnectorItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VoiceConnectorItems"
Parser (Maybe (Maybe [VoiceConnectorItem]))
-> Maybe [VoiceConnectorItem]
-> Parser (Maybe [VoiceConnectorItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [VoiceConnectorItem]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> VoiceConnectorGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> VoiceConnectorGroup)
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
"VoiceConnectorGroupArn")
Parser (Maybe Text -> Maybe POSIX -> VoiceConnectorGroup)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> VoiceConnectorGroup)
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 POSIX -> VoiceConnectorGroup)
-> Parser (Maybe POSIX) -> Parser VoiceConnectorGroup
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 VoiceConnectorGroup
instance Prelude.NFData VoiceConnectorGroup