{-# 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.Connect.Types.InstanceSummary where
import Amazonka.Connect.Types.DirectoryType
import Amazonka.Connect.Types.InstanceStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceSummary = InstanceSummary'
{
InstanceSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
InstanceSummary -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
InstanceSummary -> Maybe Bool
outboundCallsEnabled :: Prelude.Maybe Prelude.Bool,
InstanceSummary -> Maybe Bool
inboundCallsEnabled :: Prelude.Maybe Prelude.Bool,
InstanceSummary -> Maybe (Sensitive Text)
instanceAlias :: Prelude.Maybe (Core.Sensitive Prelude.Text),
InstanceSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
InstanceSummary -> Maybe InstanceStatus
instanceStatus :: Prelude.Maybe InstanceStatus,
InstanceSummary -> Maybe DirectoryType
identityManagementType :: Prelude.Maybe DirectoryType,
InstanceSummary -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text
}
deriving (InstanceSummary -> InstanceSummary -> Bool
(InstanceSummary -> InstanceSummary -> Bool)
-> (InstanceSummary -> InstanceSummary -> Bool)
-> Eq InstanceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceSummary -> InstanceSummary -> Bool
$c/= :: InstanceSummary -> InstanceSummary -> Bool
== :: InstanceSummary -> InstanceSummary -> Bool
$c== :: InstanceSummary -> InstanceSummary -> Bool
Prelude.Eq, Int -> InstanceSummary -> ShowS
[InstanceSummary] -> ShowS
InstanceSummary -> String
(Int -> InstanceSummary -> ShowS)
-> (InstanceSummary -> String)
-> ([InstanceSummary] -> ShowS)
-> Show InstanceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceSummary] -> ShowS
$cshowList :: [InstanceSummary] -> ShowS
show :: InstanceSummary -> String
$cshow :: InstanceSummary -> String
showsPrec :: Int -> InstanceSummary -> ShowS
$cshowsPrec :: Int -> InstanceSummary -> ShowS
Prelude.Show, (forall x. InstanceSummary -> Rep InstanceSummary x)
-> (forall x. Rep InstanceSummary x -> InstanceSummary)
-> Generic InstanceSummary
forall x. Rep InstanceSummary x -> InstanceSummary
forall x. InstanceSummary -> Rep InstanceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceSummary x -> InstanceSummary
$cfrom :: forall x. InstanceSummary -> Rep InstanceSummary x
Prelude.Generic)
newInstanceSummary ::
InstanceSummary
newInstanceSummary :: InstanceSummary
newInstanceSummary =
InstanceSummary' :: Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary
InstanceSummary'
{ $sel:arn:InstanceSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:InstanceSummary' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:outboundCallsEnabled:InstanceSummary' :: Maybe Bool
outboundCallsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:inboundCallsEnabled:InstanceSummary' :: Maybe Bool
inboundCallsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:instanceAlias:InstanceSummary' :: Maybe (Sensitive Text)
instanceAlias = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:id:InstanceSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceStatus:InstanceSummary' :: Maybe InstanceStatus
instanceStatus = Maybe InstanceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:identityManagementType:InstanceSummary' :: Maybe DirectoryType
identityManagementType = Maybe DirectoryType
forall a. Maybe a
Prelude.Nothing,
$sel:serviceRole:InstanceSummary' :: Maybe Text
serviceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
instanceSummary_arn :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.Text)
instanceSummary_arn :: (Maybe Text -> f (Maybe Text))
-> InstanceSummary -> f InstanceSummary
instanceSummary_arn = (InstanceSummary -> Maybe Text)
-> (InstanceSummary -> Maybe Text -> InstanceSummary)
-> Lens InstanceSummary InstanceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:InstanceSummary' :: InstanceSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe Text
a -> InstanceSummary
s {$sel:arn:InstanceSummary' :: Maybe Text
arn = Maybe Text
a} :: InstanceSummary)
instanceSummary_createdTime :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.UTCTime)
instanceSummary_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceSummary -> f InstanceSummary
instanceSummary_createdTime = (InstanceSummary -> Maybe POSIX)
-> (InstanceSummary -> Maybe POSIX -> InstanceSummary)
-> Lens InstanceSummary InstanceSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:InstanceSummary' :: InstanceSummary -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe POSIX
a -> InstanceSummary
s {$sel:createdTime:InstanceSummary' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: InstanceSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceSummary -> f InstanceSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceSummary
-> f InstanceSummary
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
instanceSummary_outboundCallsEnabled :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.Bool)
instanceSummary_outboundCallsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> InstanceSummary -> f InstanceSummary
instanceSummary_outboundCallsEnabled = (InstanceSummary -> Maybe Bool)
-> (InstanceSummary -> Maybe Bool -> InstanceSummary)
-> Lens InstanceSummary InstanceSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe Bool
outboundCallsEnabled :: Maybe Bool
$sel:outboundCallsEnabled:InstanceSummary' :: InstanceSummary -> Maybe Bool
outboundCallsEnabled} -> Maybe Bool
outboundCallsEnabled) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe Bool
a -> InstanceSummary
s {$sel:outboundCallsEnabled:InstanceSummary' :: Maybe Bool
outboundCallsEnabled = Maybe Bool
a} :: InstanceSummary)
instanceSummary_inboundCallsEnabled :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.Bool)
instanceSummary_inboundCallsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> InstanceSummary -> f InstanceSummary
instanceSummary_inboundCallsEnabled = (InstanceSummary -> Maybe Bool)
-> (InstanceSummary -> Maybe Bool -> InstanceSummary)
-> Lens InstanceSummary InstanceSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe Bool
inboundCallsEnabled :: Maybe Bool
$sel:inboundCallsEnabled:InstanceSummary' :: InstanceSummary -> Maybe Bool
inboundCallsEnabled} -> Maybe Bool
inboundCallsEnabled) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe Bool
a -> InstanceSummary
s {$sel:inboundCallsEnabled:InstanceSummary' :: Maybe Bool
inboundCallsEnabled = Maybe Bool
a} :: InstanceSummary)
instanceSummary_instanceAlias :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.Text)
instanceSummary_instanceAlias :: (Maybe Text -> f (Maybe Text))
-> InstanceSummary -> f InstanceSummary
instanceSummary_instanceAlias = (InstanceSummary -> Maybe (Sensitive Text))
-> (InstanceSummary -> Maybe (Sensitive Text) -> InstanceSummary)
-> Lens
InstanceSummary
InstanceSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe (Sensitive Text)
instanceAlias :: Maybe (Sensitive Text)
$sel:instanceAlias:InstanceSummary' :: InstanceSummary -> Maybe (Sensitive Text)
instanceAlias} -> Maybe (Sensitive Text)
instanceAlias) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe (Sensitive Text)
a -> InstanceSummary
s {$sel:instanceAlias:InstanceSummary' :: Maybe (Sensitive Text)
instanceAlias = Maybe (Sensitive Text)
a} :: InstanceSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> InstanceSummary -> f InstanceSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> InstanceSummary
-> f InstanceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instanceSummary_id :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.Text)
instanceSummary_id :: (Maybe Text -> f (Maybe Text))
-> InstanceSummary -> f InstanceSummary
instanceSummary_id = (InstanceSummary -> Maybe Text)
-> (InstanceSummary -> Maybe Text -> InstanceSummary)
-> Lens InstanceSummary InstanceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe Text
id :: Maybe Text
$sel:id:InstanceSummary' :: InstanceSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe Text
a -> InstanceSummary
s {$sel:id:InstanceSummary' :: Maybe Text
id = Maybe Text
a} :: InstanceSummary)
instanceSummary_instanceStatus :: Lens.Lens' InstanceSummary (Prelude.Maybe InstanceStatus)
instanceSummary_instanceStatus :: (Maybe InstanceStatus -> f (Maybe InstanceStatus))
-> InstanceSummary -> f InstanceSummary
instanceSummary_instanceStatus = (InstanceSummary -> Maybe InstanceStatus)
-> (InstanceSummary -> Maybe InstanceStatus -> InstanceSummary)
-> Lens
InstanceSummary
InstanceSummary
(Maybe InstanceStatus)
(Maybe InstanceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe InstanceStatus
instanceStatus :: Maybe InstanceStatus
$sel:instanceStatus:InstanceSummary' :: InstanceSummary -> Maybe InstanceStatus
instanceStatus} -> Maybe InstanceStatus
instanceStatus) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe InstanceStatus
a -> InstanceSummary
s {$sel:instanceStatus:InstanceSummary' :: Maybe InstanceStatus
instanceStatus = Maybe InstanceStatus
a} :: InstanceSummary)
instanceSummary_identityManagementType :: Lens.Lens' InstanceSummary (Prelude.Maybe DirectoryType)
instanceSummary_identityManagementType :: (Maybe DirectoryType -> f (Maybe DirectoryType))
-> InstanceSummary -> f InstanceSummary
instanceSummary_identityManagementType = (InstanceSummary -> Maybe DirectoryType)
-> (InstanceSummary -> Maybe DirectoryType -> InstanceSummary)
-> Lens
InstanceSummary
InstanceSummary
(Maybe DirectoryType)
(Maybe DirectoryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe DirectoryType
identityManagementType :: Maybe DirectoryType
$sel:identityManagementType:InstanceSummary' :: InstanceSummary -> Maybe DirectoryType
identityManagementType} -> Maybe DirectoryType
identityManagementType) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe DirectoryType
a -> InstanceSummary
s {$sel:identityManagementType:InstanceSummary' :: Maybe DirectoryType
identityManagementType = Maybe DirectoryType
a} :: InstanceSummary)
instanceSummary_serviceRole :: Lens.Lens' InstanceSummary (Prelude.Maybe Prelude.Text)
instanceSummary_serviceRole :: (Maybe Text -> f (Maybe Text))
-> InstanceSummary -> f InstanceSummary
instanceSummary_serviceRole = (InstanceSummary -> Maybe Text)
-> (InstanceSummary -> Maybe Text -> InstanceSummary)
-> Lens InstanceSummary InstanceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSummary' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:InstanceSummary' :: InstanceSummary -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: InstanceSummary
s@InstanceSummary' {} Maybe Text
a -> InstanceSummary
s {$sel:serviceRole:InstanceSummary' :: Maybe Text
serviceRole = Maybe Text
a} :: InstanceSummary)
instance Core.FromJSON InstanceSummary where
parseJSON :: Value -> Parser InstanceSummary
parseJSON =
String
-> (Object -> Parser InstanceSummary)
-> Value
-> Parser InstanceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InstanceSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary
InstanceSummary'
(Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
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
"Arn")
Parser
(Maybe POSIX
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
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
"CreatedTime")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
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
"OutboundCallsEnabled")
Parser
(Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
-> Parser (Maybe Bool)
-> Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
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
"InboundCallsEnabled")
Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceAlias")
Parser
(Maybe Text
-> Maybe InstanceStatus
-> Maybe DirectoryType
-> Maybe Text
-> InstanceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe InstanceStatus
-> Maybe DirectoryType -> Maybe Text -> InstanceSummary)
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
"Id")
Parser
(Maybe InstanceStatus
-> Maybe DirectoryType -> Maybe Text -> InstanceSummary)
-> Parser (Maybe InstanceStatus)
-> Parser (Maybe DirectoryType -> Maybe Text -> InstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceStatus")
Parser (Maybe DirectoryType -> Maybe Text -> InstanceSummary)
-> Parser (Maybe DirectoryType)
-> Parser (Maybe Text -> InstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DirectoryType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentityManagementType")
Parser (Maybe Text -> InstanceSummary)
-> Parser (Maybe Text) -> Parser InstanceSummary
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
"ServiceRole")
)
instance Prelude.Hashable InstanceSummary
instance Prelude.NFData InstanceSummary