{-# 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.DirectoryService.Types.DomainController where
import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types.DomainControllerStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DomainController = DomainController'
{
DomainController -> Maybe DomainControllerStatus
status :: Prelude.Maybe DomainControllerStatus,
DomainController -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
DomainController -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
DomainController -> Maybe POSIX
launchTime :: Prelude.Maybe Core.POSIX,
DomainController -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
DomainController -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
DomainController -> Maybe POSIX
statusLastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
DomainController -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
DomainController -> Maybe Text
dnsIpAddr :: Prelude.Maybe Prelude.Text,
DomainController -> Maybe Text
domainControllerId :: Prelude.Maybe Prelude.Text
}
deriving (DomainController -> DomainController -> Bool
(DomainController -> DomainController -> Bool)
-> (DomainController -> DomainController -> Bool)
-> Eq DomainController
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainController -> DomainController -> Bool
$c/= :: DomainController -> DomainController -> Bool
== :: DomainController -> DomainController -> Bool
$c== :: DomainController -> DomainController -> Bool
Prelude.Eq, ReadPrec [DomainController]
ReadPrec DomainController
Int -> ReadS DomainController
ReadS [DomainController]
(Int -> ReadS DomainController)
-> ReadS [DomainController]
-> ReadPrec DomainController
-> ReadPrec [DomainController]
-> Read DomainController
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainController]
$creadListPrec :: ReadPrec [DomainController]
readPrec :: ReadPrec DomainController
$creadPrec :: ReadPrec DomainController
readList :: ReadS [DomainController]
$creadList :: ReadS [DomainController]
readsPrec :: Int -> ReadS DomainController
$creadsPrec :: Int -> ReadS DomainController
Prelude.Read, Int -> DomainController -> ShowS
[DomainController] -> ShowS
DomainController -> String
(Int -> DomainController -> ShowS)
-> (DomainController -> String)
-> ([DomainController] -> ShowS)
-> Show DomainController
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainController] -> ShowS
$cshowList :: [DomainController] -> ShowS
show :: DomainController -> String
$cshow :: DomainController -> String
showsPrec :: Int -> DomainController -> ShowS
$cshowsPrec :: Int -> DomainController -> ShowS
Prelude.Show, (forall x. DomainController -> Rep DomainController x)
-> (forall x. Rep DomainController x -> DomainController)
-> Generic DomainController
forall x. Rep DomainController x -> DomainController
forall x. DomainController -> Rep DomainController x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainController x -> DomainController
$cfrom :: forall x. DomainController -> Rep DomainController x
Prelude.Generic)
newDomainController ::
DomainController
newDomainController :: DomainController
newDomainController =
DomainController' :: Maybe DomainControllerStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController
DomainController'
{ $sel:status:DomainController' :: Maybe DomainControllerStatus
status = Maybe DomainControllerStatus
forall a. Maybe a
Prelude.Nothing,
$sel:directoryId:DomainController' :: Maybe Text
directoryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:DomainController' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:launchTime:DomainController' :: Maybe POSIX
launchTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:DomainController' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZone:DomainController' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusLastUpdatedDateTime:DomainController' :: Maybe POSIX
statusLastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:statusReason:DomainController' :: Maybe Text
statusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dnsIpAddr:DomainController' :: Maybe Text
dnsIpAddr = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainControllerId:DomainController' :: Maybe Text
domainControllerId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
domainController_status :: Lens.Lens' DomainController (Prelude.Maybe DomainControllerStatus)
domainController_status :: (Maybe DomainControllerStatus -> f (Maybe DomainControllerStatus))
-> DomainController -> f DomainController
domainController_status = (DomainController -> Maybe DomainControllerStatus)
-> (DomainController
-> Maybe DomainControllerStatus -> DomainController)
-> Lens
DomainController
DomainController
(Maybe DomainControllerStatus)
(Maybe DomainControllerStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe DomainControllerStatus
status :: Maybe DomainControllerStatus
$sel:status:DomainController' :: DomainController -> Maybe DomainControllerStatus
status} -> Maybe DomainControllerStatus
status) (\s :: DomainController
s@DomainController' {} Maybe DomainControllerStatus
a -> DomainController
s {$sel:status:DomainController' :: Maybe DomainControllerStatus
status = Maybe DomainControllerStatus
a} :: DomainController)
domainController_directoryId :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_directoryId :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_directoryId = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:DomainController' :: DomainController -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:directoryId:DomainController' :: Maybe Text
directoryId = Maybe Text
a} :: DomainController)
domainController_vpcId :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_vpcId :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_vpcId = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:DomainController' :: DomainController -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:vpcId:DomainController' :: Maybe Text
vpcId = Maybe Text
a} :: DomainController)
domainController_launchTime :: Lens.Lens' DomainController (Prelude.Maybe Prelude.UTCTime)
domainController_launchTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainController -> f DomainController
domainController_launchTime = (DomainController -> Maybe POSIX)
-> (DomainController -> Maybe POSIX -> DomainController)
-> Lens
DomainController DomainController (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe POSIX
launchTime :: Maybe POSIX
$sel:launchTime:DomainController' :: DomainController -> Maybe POSIX
launchTime} -> Maybe POSIX
launchTime) (\s :: DomainController
s@DomainController' {} Maybe POSIX
a -> DomainController
s {$sel:launchTime:DomainController' :: Maybe POSIX
launchTime = Maybe POSIX
a} :: DomainController) ((Maybe POSIX -> f (Maybe POSIX))
-> DomainController -> f DomainController)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainController
-> f DomainController
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
domainController_subnetId :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_subnetId :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_subnetId = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:DomainController' :: DomainController -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:subnetId:DomainController' :: Maybe Text
subnetId = Maybe Text
a} :: DomainController)
domainController_availabilityZone :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_availabilityZone = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:DomainController' :: DomainController -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:availabilityZone:DomainController' :: Maybe Text
availabilityZone = Maybe Text
a} :: DomainController)
domainController_statusLastUpdatedDateTime :: Lens.Lens' DomainController (Prelude.Maybe Prelude.UTCTime)
domainController_statusLastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainController -> f DomainController
domainController_statusLastUpdatedDateTime = (DomainController -> Maybe POSIX)
-> (DomainController -> Maybe POSIX -> DomainController)
-> Lens
DomainController DomainController (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe POSIX
statusLastUpdatedDateTime :: Maybe POSIX
$sel:statusLastUpdatedDateTime:DomainController' :: DomainController -> Maybe POSIX
statusLastUpdatedDateTime} -> Maybe POSIX
statusLastUpdatedDateTime) (\s :: DomainController
s@DomainController' {} Maybe POSIX
a -> DomainController
s {$sel:statusLastUpdatedDateTime:DomainController' :: Maybe POSIX
statusLastUpdatedDateTime = Maybe POSIX
a} :: DomainController) ((Maybe POSIX -> f (Maybe POSIX))
-> DomainController -> f DomainController)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainController
-> f DomainController
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
domainController_statusReason :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_statusReason :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_statusReason = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:DomainController' :: DomainController -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:statusReason:DomainController' :: Maybe Text
statusReason = Maybe Text
a} :: DomainController)
domainController_dnsIpAddr :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_dnsIpAddr :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_dnsIpAddr = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
dnsIpAddr :: Maybe Text
$sel:dnsIpAddr:DomainController' :: DomainController -> Maybe Text
dnsIpAddr} -> Maybe Text
dnsIpAddr) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:dnsIpAddr:DomainController' :: Maybe Text
dnsIpAddr = Maybe Text
a} :: DomainController)
domainController_domainControllerId :: Lens.Lens' DomainController (Prelude.Maybe Prelude.Text)
domainController_domainControllerId :: (Maybe Text -> f (Maybe Text))
-> DomainController -> f DomainController
domainController_domainControllerId = (DomainController -> Maybe Text)
-> (DomainController -> Maybe Text -> DomainController)
-> Lens DomainController DomainController (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainController' {Maybe Text
domainControllerId :: Maybe Text
$sel:domainControllerId:DomainController' :: DomainController -> Maybe Text
domainControllerId} -> Maybe Text
domainControllerId) (\s :: DomainController
s@DomainController' {} Maybe Text
a -> DomainController
s {$sel:domainControllerId:DomainController' :: Maybe Text
domainControllerId = Maybe Text
a} :: DomainController)
instance Core.FromJSON DomainController where
parseJSON :: Value -> Parser DomainController
parseJSON =
String
-> (Object -> Parser DomainController)
-> Value
-> Parser DomainController
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainController"
( \Object
x ->
Maybe DomainControllerStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController
DomainController'
(Maybe DomainControllerStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
-> Parser (Maybe DomainControllerStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DomainControllerStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
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
"VpcId")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
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 Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
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
"SubnetId")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DomainController)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> DomainController)
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
"AvailabilityZone")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> DomainController)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> DomainController)
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 Text -> Maybe Text -> Maybe Text -> DomainController)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> DomainController)
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
"StatusReason")
Parser (Maybe Text -> Maybe Text -> DomainController)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DomainController)
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
"DnsIpAddr")
Parser (Maybe Text -> DomainController)
-> Parser (Maybe Text) -> Parser DomainController
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
"DomainControllerId")
)
instance Prelude.Hashable DomainController
instance Prelude.NFData DomainController