{-# 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.DirectoryService.Types.DirectoryLimits
-- 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.DirectoryService.Types.DirectoryLimits where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains directory limit information for a Region.
--
-- /See:/ 'newDirectoryLimits' smart constructor.
data DirectoryLimits = DirectoryLimits'
  { -- | The current number of connected directories in the Region.
    DirectoryLimits -> Maybe Natural
connectedDirectoriesCurrentCount :: Prelude.Maybe Prelude.Natural,
    -- | Indicates if the Managed Microsoft AD directory limit has been reached.
    DirectoryLimits -> Maybe Bool
cloudOnlyMicrosoftADLimitReached :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of connected directories allowed in the Region.
    DirectoryLimits -> Maybe Natural
connectedDirectoriesLimit :: Prelude.Maybe Prelude.Natural,
    -- | Indicates if the connected directory limit has been reached.
    DirectoryLimits -> Maybe Bool
connectedDirectoriesLimitReached :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of Managed Microsoft AD directories allowed in the
    -- region.
    DirectoryLimits -> Maybe Natural
cloudOnlyMicrosoftADLimit :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of cloud directories allowed in the Region.
    DirectoryLimits -> Maybe Natural
cloudOnlyDirectoriesLimit :: Prelude.Maybe Prelude.Natural,
    -- | The current number of cloud directories in the Region.
    DirectoryLimits -> Maybe Natural
cloudOnlyDirectoriesCurrentCount :: Prelude.Maybe Prelude.Natural,
    -- | Indicates if the cloud directory limit has been reached.
    DirectoryLimits -> Maybe Bool
cloudOnlyDirectoriesLimitReached :: Prelude.Maybe Prelude.Bool,
    -- | The current number of Managed Microsoft AD directories in the region.
    DirectoryLimits -> Maybe Natural
cloudOnlyMicrosoftADCurrentCount :: Prelude.Maybe Prelude.Natural
  }
  deriving (DirectoryLimits -> DirectoryLimits -> Bool
(DirectoryLimits -> DirectoryLimits -> Bool)
-> (DirectoryLimits -> DirectoryLimits -> Bool)
-> Eq DirectoryLimits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectoryLimits -> DirectoryLimits -> Bool
$c/= :: DirectoryLimits -> DirectoryLimits -> Bool
== :: DirectoryLimits -> DirectoryLimits -> Bool
$c== :: DirectoryLimits -> DirectoryLimits -> Bool
Prelude.Eq, ReadPrec [DirectoryLimits]
ReadPrec DirectoryLimits
Int -> ReadS DirectoryLimits
ReadS [DirectoryLimits]
(Int -> ReadS DirectoryLimits)
-> ReadS [DirectoryLimits]
-> ReadPrec DirectoryLimits
-> ReadPrec [DirectoryLimits]
-> Read DirectoryLimits
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DirectoryLimits]
$creadListPrec :: ReadPrec [DirectoryLimits]
readPrec :: ReadPrec DirectoryLimits
$creadPrec :: ReadPrec DirectoryLimits
readList :: ReadS [DirectoryLimits]
$creadList :: ReadS [DirectoryLimits]
readsPrec :: Int -> ReadS DirectoryLimits
$creadsPrec :: Int -> ReadS DirectoryLimits
Prelude.Read, Int -> DirectoryLimits -> ShowS
[DirectoryLimits] -> ShowS
DirectoryLimits -> String
(Int -> DirectoryLimits -> ShowS)
-> (DirectoryLimits -> String)
-> ([DirectoryLimits] -> ShowS)
-> Show DirectoryLimits
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DirectoryLimits] -> ShowS
$cshowList :: [DirectoryLimits] -> ShowS
show :: DirectoryLimits -> String
$cshow :: DirectoryLimits -> String
showsPrec :: Int -> DirectoryLimits -> ShowS
$cshowsPrec :: Int -> DirectoryLimits -> ShowS
Prelude.Show, (forall x. DirectoryLimits -> Rep DirectoryLimits x)
-> (forall x. Rep DirectoryLimits x -> DirectoryLimits)
-> Generic DirectoryLimits
forall x. Rep DirectoryLimits x -> DirectoryLimits
forall x. DirectoryLimits -> Rep DirectoryLimits x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DirectoryLimits x -> DirectoryLimits
$cfrom :: forall x. DirectoryLimits -> Rep DirectoryLimits x
Prelude.Generic)

-- |
-- Create a value of 'DirectoryLimits' 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:
--
-- 'connectedDirectoriesCurrentCount', 'directoryLimits_connectedDirectoriesCurrentCount' - The current number of connected directories in the Region.
--
-- 'cloudOnlyMicrosoftADLimitReached', 'directoryLimits_cloudOnlyMicrosoftADLimitReached' - Indicates if the Managed Microsoft AD directory limit has been reached.
--
-- 'connectedDirectoriesLimit', 'directoryLimits_connectedDirectoriesLimit' - The maximum number of connected directories allowed in the Region.
--
-- 'connectedDirectoriesLimitReached', 'directoryLimits_connectedDirectoriesLimitReached' - Indicates if the connected directory limit has been reached.
--
-- 'cloudOnlyMicrosoftADLimit', 'directoryLimits_cloudOnlyMicrosoftADLimit' - The maximum number of Managed Microsoft AD directories allowed in the
-- region.
--
-- 'cloudOnlyDirectoriesLimit', 'directoryLimits_cloudOnlyDirectoriesLimit' - The maximum number of cloud directories allowed in the Region.
--
-- 'cloudOnlyDirectoriesCurrentCount', 'directoryLimits_cloudOnlyDirectoriesCurrentCount' - The current number of cloud directories in the Region.
--
-- 'cloudOnlyDirectoriesLimitReached', 'directoryLimits_cloudOnlyDirectoriesLimitReached' - Indicates if the cloud directory limit has been reached.
--
-- 'cloudOnlyMicrosoftADCurrentCount', 'directoryLimits_cloudOnlyMicrosoftADCurrentCount' - The current number of Managed Microsoft AD directories in the region.
newDirectoryLimits ::
  DirectoryLimits
newDirectoryLimits :: DirectoryLimits
newDirectoryLimits =
  DirectoryLimits' :: Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> DirectoryLimits
DirectoryLimits'
    { $sel:connectedDirectoriesCurrentCount:DirectoryLimits' :: Maybe Natural
connectedDirectoriesCurrentCount =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudOnlyMicrosoftADLimitReached:DirectoryLimits' :: Maybe Bool
cloudOnlyMicrosoftADLimitReached = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:connectedDirectoriesLimit:DirectoryLimits' :: Maybe Natural
connectedDirectoriesLimit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:connectedDirectoriesLimitReached:DirectoryLimits' :: Maybe Bool
connectedDirectoriesLimitReached = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudOnlyMicrosoftADLimit:DirectoryLimits' :: Maybe Natural
cloudOnlyMicrosoftADLimit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudOnlyDirectoriesLimit:DirectoryLimits' :: Maybe Natural
cloudOnlyDirectoriesLimit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudOnlyDirectoriesCurrentCount:DirectoryLimits' :: Maybe Natural
cloudOnlyDirectoriesCurrentCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudOnlyDirectoriesLimitReached:DirectoryLimits' :: Maybe Bool
cloudOnlyDirectoriesLimitReached = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudOnlyMicrosoftADCurrentCount:DirectoryLimits' :: Maybe Natural
cloudOnlyMicrosoftADCurrentCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The current number of connected directories in the Region.
directoryLimits_connectedDirectoriesCurrentCount :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Natural)
directoryLimits_connectedDirectoriesCurrentCount :: (Maybe Natural -> f (Maybe Natural))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_connectedDirectoriesCurrentCount = (DirectoryLimits -> Maybe Natural)
-> (DirectoryLimits -> Maybe Natural -> DirectoryLimits)
-> Lens
     DirectoryLimits DirectoryLimits (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Natural
connectedDirectoriesCurrentCount :: Maybe Natural
$sel:connectedDirectoriesCurrentCount:DirectoryLimits' :: DirectoryLimits -> Maybe Natural
connectedDirectoriesCurrentCount} -> Maybe Natural
connectedDirectoriesCurrentCount) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Natural
a -> DirectoryLimits
s {$sel:connectedDirectoriesCurrentCount:DirectoryLimits' :: Maybe Natural
connectedDirectoriesCurrentCount = Maybe Natural
a} :: DirectoryLimits)

-- | Indicates if the Managed Microsoft AD directory limit has been reached.
directoryLimits_cloudOnlyMicrosoftADLimitReached :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Bool)
directoryLimits_cloudOnlyMicrosoftADLimitReached :: (Maybe Bool -> f (Maybe Bool))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_cloudOnlyMicrosoftADLimitReached = (DirectoryLimits -> Maybe Bool)
-> (DirectoryLimits -> Maybe Bool -> DirectoryLimits)
-> Lens DirectoryLimits DirectoryLimits (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Bool
cloudOnlyMicrosoftADLimitReached :: Maybe Bool
$sel:cloudOnlyMicrosoftADLimitReached:DirectoryLimits' :: DirectoryLimits -> Maybe Bool
cloudOnlyMicrosoftADLimitReached} -> Maybe Bool
cloudOnlyMicrosoftADLimitReached) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Bool
a -> DirectoryLimits
s {$sel:cloudOnlyMicrosoftADLimitReached:DirectoryLimits' :: Maybe Bool
cloudOnlyMicrosoftADLimitReached = Maybe Bool
a} :: DirectoryLimits)

-- | The maximum number of connected directories allowed in the Region.
directoryLimits_connectedDirectoriesLimit :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Natural)
directoryLimits_connectedDirectoriesLimit :: (Maybe Natural -> f (Maybe Natural))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_connectedDirectoriesLimit = (DirectoryLimits -> Maybe Natural)
-> (DirectoryLimits -> Maybe Natural -> DirectoryLimits)
-> Lens
     DirectoryLimits DirectoryLimits (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Natural
connectedDirectoriesLimit :: Maybe Natural
$sel:connectedDirectoriesLimit:DirectoryLimits' :: DirectoryLimits -> Maybe Natural
connectedDirectoriesLimit} -> Maybe Natural
connectedDirectoriesLimit) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Natural
a -> DirectoryLimits
s {$sel:connectedDirectoriesLimit:DirectoryLimits' :: Maybe Natural
connectedDirectoriesLimit = Maybe Natural
a} :: DirectoryLimits)

-- | Indicates if the connected directory limit has been reached.
directoryLimits_connectedDirectoriesLimitReached :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Bool)
directoryLimits_connectedDirectoriesLimitReached :: (Maybe Bool -> f (Maybe Bool))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_connectedDirectoriesLimitReached = (DirectoryLimits -> Maybe Bool)
-> (DirectoryLimits -> Maybe Bool -> DirectoryLimits)
-> Lens DirectoryLimits DirectoryLimits (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Bool
connectedDirectoriesLimitReached :: Maybe Bool
$sel:connectedDirectoriesLimitReached:DirectoryLimits' :: DirectoryLimits -> Maybe Bool
connectedDirectoriesLimitReached} -> Maybe Bool
connectedDirectoriesLimitReached) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Bool
a -> DirectoryLimits
s {$sel:connectedDirectoriesLimitReached:DirectoryLimits' :: Maybe Bool
connectedDirectoriesLimitReached = Maybe Bool
a} :: DirectoryLimits)

-- | The maximum number of Managed Microsoft AD directories allowed in the
-- region.
directoryLimits_cloudOnlyMicrosoftADLimit :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Natural)
directoryLimits_cloudOnlyMicrosoftADLimit :: (Maybe Natural -> f (Maybe Natural))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_cloudOnlyMicrosoftADLimit = (DirectoryLimits -> Maybe Natural)
-> (DirectoryLimits -> Maybe Natural -> DirectoryLimits)
-> Lens
     DirectoryLimits DirectoryLimits (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Natural
cloudOnlyMicrosoftADLimit :: Maybe Natural
$sel:cloudOnlyMicrosoftADLimit:DirectoryLimits' :: DirectoryLimits -> Maybe Natural
cloudOnlyMicrosoftADLimit} -> Maybe Natural
cloudOnlyMicrosoftADLimit) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Natural
a -> DirectoryLimits
s {$sel:cloudOnlyMicrosoftADLimit:DirectoryLimits' :: Maybe Natural
cloudOnlyMicrosoftADLimit = Maybe Natural
a} :: DirectoryLimits)

-- | The maximum number of cloud directories allowed in the Region.
directoryLimits_cloudOnlyDirectoriesLimit :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Natural)
directoryLimits_cloudOnlyDirectoriesLimit :: (Maybe Natural -> f (Maybe Natural))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_cloudOnlyDirectoriesLimit = (DirectoryLimits -> Maybe Natural)
-> (DirectoryLimits -> Maybe Natural -> DirectoryLimits)
-> Lens
     DirectoryLimits DirectoryLimits (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Natural
cloudOnlyDirectoriesLimit :: Maybe Natural
$sel:cloudOnlyDirectoriesLimit:DirectoryLimits' :: DirectoryLimits -> Maybe Natural
cloudOnlyDirectoriesLimit} -> Maybe Natural
cloudOnlyDirectoriesLimit) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Natural
a -> DirectoryLimits
s {$sel:cloudOnlyDirectoriesLimit:DirectoryLimits' :: Maybe Natural
cloudOnlyDirectoriesLimit = Maybe Natural
a} :: DirectoryLimits)

-- | The current number of cloud directories in the Region.
directoryLimits_cloudOnlyDirectoriesCurrentCount :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Natural)
directoryLimits_cloudOnlyDirectoriesCurrentCount :: (Maybe Natural -> f (Maybe Natural))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_cloudOnlyDirectoriesCurrentCount = (DirectoryLimits -> Maybe Natural)
-> (DirectoryLimits -> Maybe Natural -> DirectoryLimits)
-> Lens
     DirectoryLimits DirectoryLimits (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Natural
cloudOnlyDirectoriesCurrentCount :: Maybe Natural
$sel:cloudOnlyDirectoriesCurrentCount:DirectoryLimits' :: DirectoryLimits -> Maybe Natural
cloudOnlyDirectoriesCurrentCount} -> Maybe Natural
cloudOnlyDirectoriesCurrentCount) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Natural
a -> DirectoryLimits
s {$sel:cloudOnlyDirectoriesCurrentCount:DirectoryLimits' :: Maybe Natural
cloudOnlyDirectoriesCurrentCount = Maybe Natural
a} :: DirectoryLimits)

-- | Indicates if the cloud directory limit has been reached.
directoryLimits_cloudOnlyDirectoriesLimitReached :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Bool)
directoryLimits_cloudOnlyDirectoriesLimitReached :: (Maybe Bool -> f (Maybe Bool))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_cloudOnlyDirectoriesLimitReached = (DirectoryLimits -> Maybe Bool)
-> (DirectoryLimits -> Maybe Bool -> DirectoryLimits)
-> Lens DirectoryLimits DirectoryLimits (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Bool
cloudOnlyDirectoriesLimitReached :: Maybe Bool
$sel:cloudOnlyDirectoriesLimitReached:DirectoryLimits' :: DirectoryLimits -> Maybe Bool
cloudOnlyDirectoriesLimitReached} -> Maybe Bool
cloudOnlyDirectoriesLimitReached) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Bool
a -> DirectoryLimits
s {$sel:cloudOnlyDirectoriesLimitReached:DirectoryLimits' :: Maybe Bool
cloudOnlyDirectoriesLimitReached = Maybe Bool
a} :: DirectoryLimits)

-- | The current number of Managed Microsoft AD directories in the region.
directoryLimits_cloudOnlyMicrosoftADCurrentCount :: Lens.Lens' DirectoryLimits (Prelude.Maybe Prelude.Natural)
directoryLimits_cloudOnlyMicrosoftADCurrentCount :: (Maybe Natural -> f (Maybe Natural))
-> DirectoryLimits -> f DirectoryLimits
directoryLimits_cloudOnlyMicrosoftADCurrentCount = (DirectoryLimits -> Maybe Natural)
-> (DirectoryLimits -> Maybe Natural -> DirectoryLimits)
-> Lens
     DirectoryLimits DirectoryLimits (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryLimits' {Maybe Natural
cloudOnlyMicrosoftADCurrentCount :: Maybe Natural
$sel:cloudOnlyMicrosoftADCurrentCount:DirectoryLimits' :: DirectoryLimits -> Maybe Natural
cloudOnlyMicrosoftADCurrentCount} -> Maybe Natural
cloudOnlyMicrosoftADCurrentCount) (\s :: DirectoryLimits
s@DirectoryLimits' {} Maybe Natural
a -> DirectoryLimits
s {$sel:cloudOnlyMicrosoftADCurrentCount:DirectoryLimits' :: Maybe Natural
cloudOnlyMicrosoftADCurrentCount = Maybe Natural
a} :: DirectoryLimits)

instance Core.FromJSON DirectoryLimits where
  parseJSON :: Value -> Parser DirectoryLimits
parseJSON =
    String
-> (Object -> Parser DirectoryLimits)
-> Value
-> Parser DirectoryLimits
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DirectoryLimits"
      ( \Object
x ->
          Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> DirectoryLimits
DirectoryLimits'
            (Maybe Natural
 -> Maybe Bool
 -> Maybe Natural
 -> Maybe Bool
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Bool
 -> Maybe Natural
 -> DirectoryLimits)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> DirectoryLimits)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectedDirectoriesCurrentCount")
            Parser
  (Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> DirectoryLimits)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> DirectoryLimits)
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
"CloudOnlyMicrosoftADLimitReached")
            Parser
  (Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> DirectoryLimits)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> DirectoryLimits)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectedDirectoriesLimit")
            Parser
  (Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> DirectoryLimits)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> DirectoryLimits)
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
"ConnectedDirectoriesLimitReached")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> DirectoryLimits)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural -> Maybe Bool -> Maybe Natural -> DirectoryLimits)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudOnlyMicrosoftADLimit")
            Parser
  (Maybe Natural
   -> Maybe Natural -> Maybe Bool -> Maybe Natural -> DirectoryLimits)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural -> Maybe Bool -> Maybe Natural -> DirectoryLimits)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudOnlyDirectoriesLimit")
            Parser
  (Maybe Natural -> Maybe Bool -> Maybe Natural -> DirectoryLimits)
-> Parser (Maybe Natural)
-> Parser (Maybe Bool -> Maybe Natural -> DirectoryLimits)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudOnlyDirectoriesCurrentCount")
            Parser (Maybe Bool -> Maybe Natural -> DirectoryLimits)
-> Parser (Maybe Bool) -> Parser (Maybe Natural -> DirectoryLimits)
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
"CloudOnlyDirectoriesLimitReached")
            Parser (Maybe Natural -> DirectoryLimits)
-> Parser (Maybe Natural) -> Parser DirectoryLimits
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudOnlyMicrosoftADCurrentCount")
      )

instance Prelude.Hashable DirectoryLimits

instance Prelude.NFData DirectoryLimits