{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Connect.Types.InstanceSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Information about the instance.
--
-- /See:/ 'newInstanceSummary' smart constructor.
data InstanceSummary = InstanceSummary'
  { -- | The Amazon Resource Name (ARN) of the instance.
    InstanceSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the instance was created.
    InstanceSummary -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | Whether outbound calls are enabled.
    InstanceSummary -> Maybe Bool
outboundCallsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Whether inbound calls are enabled.
    InstanceSummary -> Maybe Bool
inboundCallsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The alias of the instance.
    InstanceSummary -> Maybe (Sensitive Text)
instanceAlias :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The identifier of the instance.
    InstanceSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The state of the instance.
    InstanceSummary -> Maybe InstanceStatus
instanceStatus :: Prelude.Maybe InstanceStatus,
    -- | The identity management type of the instance.
    InstanceSummary -> Maybe DirectoryType
identityManagementType :: Prelude.Maybe DirectoryType,
    -- | The service role of the instance.
    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)

-- |
-- Create a value of 'InstanceSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'instanceSummary_arn' - The Amazon Resource Name (ARN) of the instance.
--
-- 'createdTime', 'instanceSummary_createdTime' - When the instance was created.
--
-- 'outboundCallsEnabled', 'instanceSummary_outboundCallsEnabled' - Whether outbound calls are enabled.
--
-- 'inboundCallsEnabled', 'instanceSummary_inboundCallsEnabled' - Whether inbound calls are enabled.
--
-- 'instanceAlias', 'instanceSummary_instanceAlias' - The alias of the instance.
--
-- 'id', 'instanceSummary_id' - The identifier of the instance.
--
-- 'instanceStatus', 'instanceSummary_instanceStatus' - The state of the instance.
--
-- 'identityManagementType', 'instanceSummary_identityManagementType' - The identity management type of the instance.
--
-- 'serviceRole', 'instanceSummary_serviceRole' - The service role of the instance.
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
    }

-- | The Amazon Resource Name (ARN) of the instance.
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)

-- | When the instance was created.
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

-- | Whether outbound calls are enabled.
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)

-- | Whether inbound calls are enabled.
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)

-- | The alias of the instance.
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

-- | The identifier of the instance.
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)

-- | The state of the instance.
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)

-- | The identity management type of the instance.
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)

-- | The service role of the instance.
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