{-# 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.RegionDescription
-- 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.RegionDescription where

import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types.DirectoryStage
import Amazonka.DirectoryService.Types.DirectoryVpcSettings
import Amazonka.DirectoryService.Types.RegionType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The replicated Region information for a directory.
--
-- /See:/ 'newRegionDescription' smart constructor.
data RegionDescription = RegionDescription'
  { -- | The status of the replication process for the specified Region.
    RegionDescription -> Maybe DirectoryStage
status :: Prelude.Maybe DirectoryStage,
    -- | The identifier of the directory.
    RegionDescription -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the Region. For example, @us-east-1@.
    RegionDescription -> Maybe Text
regionName :: Prelude.Maybe Prelude.Text,
    -- | The desired number of domain controllers in the specified Region for the
    -- specified directory.
    RegionDescription -> Maybe Natural
desiredNumberOfDomainControllers :: Prelude.Maybe Prelude.Natural,
    -- | Specifies whether the Region is the primary Region or an additional
    -- Region.
    RegionDescription -> Maybe RegionType
regionType :: Prelude.Maybe RegionType,
    -- | Specifies when the Region replication began.
    RegionDescription -> Maybe POSIX
launchTime :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the Region description was last updated.
    RegionDescription -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the Region status was last updated.
    RegionDescription -> Maybe POSIX
statusLastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    RegionDescription -> Maybe DirectoryVpcSettings
vpcSettings :: Prelude.Maybe DirectoryVpcSettings
  }
  deriving (RegionDescription -> RegionDescription -> Bool
(RegionDescription -> RegionDescription -> Bool)
-> (RegionDescription -> RegionDescription -> Bool)
-> Eq RegionDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegionDescription -> RegionDescription -> Bool
$c/= :: RegionDescription -> RegionDescription -> Bool
== :: RegionDescription -> RegionDescription -> Bool
$c== :: RegionDescription -> RegionDescription -> Bool
Prelude.Eq, ReadPrec [RegionDescription]
ReadPrec RegionDescription
Int -> ReadS RegionDescription
ReadS [RegionDescription]
(Int -> ReadS RegionDescription)
-> ReadS [RegionDescription]
-> ReadPrec RegionDescription
-> ReadPrec [RegionDescription]
-> Read RegionDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegionDescription]
$creadListPrec :: ReadPrec [RegionDescription]
readPrec :: ReadPrec RegionDescription
$creadPrec :: ReadPrec RegionDescription
readList :: ReadS [RegionDescription]
$creadList :: ReadS [RegionDescription]
readsPrec :: Int -> ReadS RegionDescription
$creadsPrec :: Int -> ReadS RegionDescription
Prelude.Read, Int -> RegionDescription -> ShowS
[RegionDescription] -> ShowS
RegionDescription -> String
(Int -> RegionDescription -> ShowS)
-> (RegionDescription -> String)
-> ([RegionDescription] -> ShowS)
-> Show RegionDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegionDescription] -> ShowS
$cshowList :: [RegionDescription] -> ShowS
show :: RegionDescription -> String
$cshow :: RegionDescription -> String
showsPrec :: Int -> RegionDescription -> ShowS
$cshowsPrec :: Int -> RegionDescription -> ShowS
Prelude.Show, (forall x. RegionDescription -> Rep RegionDescription x)
-> (forall x. Rep RegionDescription x -> RegionDescription)
-> Generic RegionDescription
forall x. Rep RegionDescription x -> RegionDescription
forall x. RegionDescription -> Rep RegionDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegionDescription x -> RegionDescription
$cfrom :: forall x. RegionDescription -> Rep RegionDescription x
Prelude.Generic)

-- |
-- Create a value of 'RegionDescription' 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:
--
-- 'status', 'regionDescription_status' - The status of the replication process for the specified Region.
--
-- 'directoryId', 'regionDescription_directoryId' - The identifier of the directory.
--
-- 'regionName', 'regionDescription_regionName' - The name of the Region. For example, @us-east-1@.
--
-- 'desiredNumberOfDomainControllers', 'regionDescription_desiredNumberOfDomainControllers' - The desired number of domain controllers in the specified Region for the
-- specified directory.
--
-- 'regionType', 'regionDescription_regionType' - Specifies whether the Region is the primary Region or an additional
-- Region.
--
-- 'launchTime', 'regionDescription_launchTime' - Specifies when the Region replication began.
--
-- 'lastUpdatedDateTime', 'regionDescription_lastUpdatedDateTime' - The date and time that the Region description was last updated.
--
-- 'statusLastUpdatedDateTime', 'regionDescription_statusLastUpdatedDateTime' - The date and time that the Region status was last updated.
--
-- 'vpcSettings', 'regionDescription_vpcSettings' - Undocumented member.
newRegionDescription ::
  RegionDescription
newRegionDescription :: RegionDescription
newRegionDescription =
  RegionDescription' :: Maybe DirectoryStage
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe RegionType
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe DirectoryVpcSettings
-> RegionDescription
RegionDescription'
    { $sel:status:RegionDescription' :: Maybe DirectoryStage
status = Maybe DirectoryStage
forall a. Maybe a
Prelude.Nothing,
      $sel:directoryId:RegionDescription' :: Maybe Text
directoryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:regionName:RegionDescription' :: Maybe Text
regionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredNumberOfDomainControllers:RegionDescription' :: Maybe Natural
desiredNumberOfDomainControllers = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:regionType:RegionDescription' :: Maybe RegionType
regionType = Maybe RegionType
forall a. Maybe a
Prelude.Nothing,
      $sel:launchTime:RegionDescription' :: Maybe POSIX
launchTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:RegionDescription' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusLastUpdatedDateTime:RegionDescription' :: Maybe POSIX
statusLastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSettings:RegionDescription' :: Maybe DirectoryVpcSettings
vpcSettings = Maybe DirectoryVpcSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the replication process for the specified Region.
regionDescription_status :: Lens.Lens' RegionDescription (Prelude.Maybe DirectoryStage)
regionDescription_status :: (Maybe DirectoryStage -> f (Maybe DirectoryStage))
-> RegionDescription -> f RegionDescription
regionDescription_status = (RegionDescription -> Maybe DirectoryStage)
-> (RegionDescription -> Maybe DirectoryStage -> RegionDescription)
-> Lens
     RegionDescription
     RegionDescription
     (Maybe DirectoryStage)
     (Maybe DirectoryStage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe DirectoryStage
status :: Maybe DirectoryStage
$sel:status:RegionDescription' :: RegionDescription -> Maybe DirectoryStage
status} -> Maybe DirectoryStage
status) (\s :: RegionDescription
s@RegionDescription' {} Maybe DirectoryStage
a -> RegionDescription
s {$sel:status:RegionDescription' :: Maybe DirectoryStage
status = Maybe DirectoryStage
a} :: RegionDescription)

-- | The identifier of the directory.
regionDescription_directoryId :: Lens.Lens' RegionDescription (Prelude.Maybe Prelude.Text)
regionDescription_directoryId :: (Maybe Text -> f (Maybe Text))
-> RegionDescription -> f RegionDescription
regionDescription_directoryId = (RegionDescription -> Maybe Text)
-> (RegionDescription -> Maybe Text -> RegionDescription)
-> Lens
     RegionDescription RegionDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:RegionDescription' :: RegionDescription -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: RegionDescription
s@RegionDescription' {} Maybe Text
a -> RegionDescription
s {$sel:directoryId:RegionDescription' :: Maybe Text
directoryId = Maybe Text
a} :: RegionDescription)

-- | The name of the Region. For example, @us-east-1@.
regionDescription_regionName :: Lens.Lens' RegionDescription (Prelude.Maybe Prelude.Text)
regionDescription_regionName :: (Maybe Text -> f (Maybe Text))
-> RegionDescription -> f RegionDescription
regionDescription_regionName = (RegionDescription -> Maybe Text)
-> (RegionDescription -> Maybe Text -> RegionDescription)
-> Lens
     RegionDescription RegionDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe Text
regionName :: Maybe Text
$sel:regionName:RegionDescription' :: RegionDescription -> Maybe Text
regionName} -> Maybe Text
regionName) (\s :: RegionDescription
s@RegionDescription' {} Maybe Text
a -> RegionDescription
s {$sel:regionName:RegionDescription' :: Maybe Text
regionName = Maybe Text
a} :: RegionDescription)

-- | The desired number of domain controllers in the specified Region for the
-- specified directory.
regionDescription_desiredNumberOfDomainControllers :: Lens.Lens' RegionDescription (Prelude.Maybe Prelude.Natural)
regionDescription_desiredNumberOfDomainControllers :: (Maybe Natural -> f (Maybe Natural))
-> RegionDescription -> f RegionDescription
regionDescription_desiredNumberOfDomainControllers = (RegionDescription -> Maybe Natural)
-> (RegionDescription -> Maybe Natural -> RegionDescription)
-> Lens
     RegionDescription RegionDescription (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe Natural
desiredNumberOfDomainControllers :: Maybe Natural
$sel:desiredNumberOfDomainControllers:RegionDescription' :: RegionDescription -> Maybe Natural
desiredNumberOfDomainControllers} -> Maybe Natural
desiredNumberOfDomainControllers) (\s :: RegionDescription
s@RegionDescription' {} Maybe Natural
a -> RegionDescription
s {$sel:desiredNumberOfDomainControllers:RegionDescription' :: Maybe Natural
desiredNumberOfDomainControllers = Maybe Natural
a} :: RegionDescription)

-- | Specifies whether the Region is the primary Region or an additional
-- Region.
regionDescription_regionType :: Lens.Lens' RegionDescription (Prelude.Maybe RegionType)
regionDescription_regionType :: (Maybe RegionType -> f (Maybe RegionType))
-> RegionDescription -> f RegionDescription
regionDescription_regionType = (RegionDescription -> Maybe RegionType)
-> (RegionDescription -> Maybe RegionType -> RegionDescription)
-> Lens
     RegionDescription
     RegionDescription
     (Maybe RegionType)
     (Maybe RegionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe RegionType
regionType :: Maybe RegionType
$sel:regionType:RegionDescription' :: RegionDescription -> Maybe RegionType
regionType} -> Maybe RegionType
regionType) (\s :: RegionDescription
s@RegionDescription' {} Maybe RegionType
a -> RegionDescription
s {$sel:regionType:RegionDescription' :: Maybe RegionType
regionType = Maybe RegionType
a} :: RegionDescription)

-- | Specifies when the Region replication began.
regionDescription_launchTime :: Lens.Lens' RegionDescription (Prelude.Maybe Prelude.UTCTime)
regionDescription_launchTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RegionDescription -> f RegionDescription
regionDescription_launchTime = (RegionDescription -> Maybe POSIX)
-> (RegionDescription -> Maybe POSIX -> RegionDescription)
-> Lens
     RegionDescription RegionDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe POSIX
launchTime :: Maybe POSIX
$sel:launchTime:RegionDescription' :: RegionDescription -> Maybe POSIX
launchTime} -> Maybe POSIX
launchTime) (\s :: RegionDescription
s@RegionDescription' {} Maybe POSIX
a -> RegionDescription
s {$sel:launchTime:RegionDescription' :: Maybe POSIX
launchTime = Maybe POSIX
a} :: RegionDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> RegionDescription -> f RegionDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RegionDescription
-> f RegionDescription
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

-- | The date and time that the Region description was last updated.
regionDescription_lastUpdatedDateTime :: Lens.Lens' RegionDescription (Prelude.Maybe Prelude.UTCTime)
regionDescription_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RegionDescription -> f RegionDescription
regionDescription_lastUpdatedDateTime = (RegionDescription -> Maybe POSIX)
-> (RegionDescription -> Maybe POSIX -> RegionDescription)
-> Lens
     RegionDescription RegionDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:RegionDescription' :: RegionDescription -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: RegionDescription
s@RegionDescription' {} Maybe POSIX
a -> RegionDescription
s {$sel:lastUpdatedDateTime:RegionDescription' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: RegionDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> RegionDescription -> f RegionDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RegionDescription
-> f RegionDescription
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

-- | The date and time that the Region status was last updated.
regionDescription_statusLastUpdatedDateTime :: Lens.Lens' RegionDescription (Prelude.Maybe Prelude.UTCTime)
regionDescription_statusLastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RegionDescription -> f RegionDescription
regionDescription_statusLastUpdatedDateTime = (RegionDescription -> Maybe POSIX)
-> (RegionDescription -> Maybe POSIX -> RegionDescription)
-> Lens
     RegionDescription RegionDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe POSIX
statusLastUpdatedDateTime :: Maybe POSIX
$sel:statusLastUpdatedDateTime:RegionDescription' :: RegionDescription -> Maybe POSIX
statusLastUpdatedDateTime} -> Maybe POSIX
statusLastUpdatedDateTime) (\s :: RegionDescription
s@RegionDescription' {} Maybe POSIX
a -> RegionDescription
s {$sel:statusLastUpdatedDateTime:RegionDescription' :: Maybe POSIX
statusLastUpdatedDateTime = Maybe POSIX
a} :: RegionDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> RegionDescription -> f RegionDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RegionDescription
-> f RegionDescription
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

-- | Undocumented member.
regionDescription_vpcSettings :: Lens.Lens' RegionDescription (Prelude.Maybe DirectoryVpcSettings)
regionDescription_vpcSettings :: (Maybe DirectoryVpcSettings -> f (Maybe DirectoryVpcSettings))
-> RegionDescription -> f RegionDescription
regionDescription_vpcSettings = (RegionDescription -> Maybe DirectoryVpcSettings)
-> (RegionDescription
    -> Maybe DirectoryVpcSettings -> RegionDescription)
-> Lens
     RegionDescription
     RegionDescription
     (Maybe DirectoryVpcSettings)
     (Maybe DirectoryVpcSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegionDescription' {Maybe DirectoryVpcSettings
vpcSettings :: Maybe DirectoryVpcSettings
$sel:vpcSettings:RegionDescription' :: RegionDescription -> Maybe DirectoryVpcSettings
vpcSettings} -> Maybe DirectoryVpcSettings
vpcSettings) (\s :: RegionDescription
s@RegionDescription' {} Maybe DirectoryVpcSettings
a -> RegionDescription
s {$sel:vpcSettings:RegionDescription' :: Maybe DirectoryVpcSettings
vpcSettings = Maybe DirectoryVpcSettings
a} :: RegionDescription)

instance Core.FromJSON RegionDescription where
  parseJSON :: Value -> Parser RegionDescription
parseJSON =
    String
-> (Object -> Parser RegionDescription)
-> Value
-> Parser RegionDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RegionDescription"
      ( \Object
x ->
          Maybe DirectoryStage
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe RegionType
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe DirectoryVpcSettings
-> RegionDescription
RegionDescription'
            (Maybe DirectoryStage
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe RegionType
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe DirectoryVpcSettings
 -> RegionDescription)
-> Parser (Maybe DirectoryStage)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe RegionType
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe DirectoryVpcSettings
      -> RegionDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DirectoryStage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe RegionType
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe DirectoryVpcSettings
   -> RegionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe RegionType
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe DirectoryVpcSettings
      -> RegionDescription)
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
"DirectoryId")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe RegionType
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe DirectoryVpcSettings
   -> RegionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe RegionType
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe DirectoryVpcSettings
      -> RegionDescription)
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
"RegionName")
            Parser
  (Maybe Natural
   -> Maybe RegionType
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe DirectoryVpcSettings
   -> RegionDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe RegionType
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe DirectoryVpcSettings
      -> RegionDescription)
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
"DesiredNumberOfDomainControllers")
            Parser
  (Maybe RegionType
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe DirectoryVpcSettings
   -> RegionDescription)
-> Parser (Maybe RegionType)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe DirectoryVpcSettings
      -> RegionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RegionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RegionType")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe DirectoryVpcSettings
   -> RegionDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX -> Maybe DirectoryVpcSettings -> RegionDescription)
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
"LaunchTime")
            Parser
  (Maybe POSIX
   -> Maybe POSIX -> Maybe DirectoryVpcSettings -> RegionDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX -> Maybe DirectoryVpcSettings -> RegionDescription)
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
"LastUpdatedDateTime")
            Parser
  (Maybe POSIX -> Maybe DirectoryVpcSettings -> RegionDescription)
-> Parser (Maybe POSIX)
-> Parser (Maybe DirectoryVpcSettings -> RegionDescription)
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
"StatusLastUpdatedDateTime")
            Parser (Maybe DirectoryVpcSettings -> RegionDescription)
-> Parser (Maybe DirectoryVpcSettings) -> Parser RegionDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DirectoryVpcSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcSettings")
      )

instance Prelude.Hashable RegionDescription

instance Prelude.NFData RegionDescription